@everframe/react-native 1.0.0 → 1.2.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.
package/dist/index.d.ts CHANGED
@@ -1,10 +1,87 @@
1
1
  import * as React from 'react';
2
2
  import { EverframeUserSpec, ConfigOpts } from './NativeEverframe.js';
3
3
  export { Rect, Spec } from './NativeEverframe.js';
4
- import { E as EverframeIntegration } from './types-D5e4kWaw.js';
5
4
  import { z } from 'zod';
5
+ import { E as EverframeIntegration } from './types-D5e4kWaw.js';
6
+ import { R as ReportDeliveryStatus, E as ErrorCaptureStatus, P as PromiseRejectionStatus } from './promise-rejection-types-C-lxCdDl.js';
7
+ export { a as ErrorCaptureCounters, b as ErrorCaptureOutcome, c as ErrorCapturePath, d as PromiseRejectionCounters, e as RejectionReason, f as ReportCaptureOutcome, g as ReportCapturePath, h as ReportCapturePathStatus, i as ReportDeliveryReason, j as ReportQueueOperation, k as ReportQueueStatus, l as ReportStorageFailure, m as ReportTransportOrigin, n as ReportTransportOutcome, o as ReportTransportStatus } from './promise-rejection-types-C-lxCdDl.js';
6
8
  import { ViewProps, EventSubscription } from 'react-native';
7
9
 
10
+ declare const ErrorSeverity: z.ZodEnum<{
11
+ error: "error";
12
+ info: "info";
13
+ warning: "warning";
14
+ }>;
15
+ type ErrorSeverity = z.infer<typeof ErrorSeverity>;
16
+
17
+ /** Optional per-occurrence details captured with a handled exception. */
18
+ interface CaptureExceptionOptions {
19
+ severity?: ErrorSeverity;
20
+ context?: string;
21
+ metadata?: Record<string, unknown>;
22
+ }
23
+ interface DeviceMetadata {
24
+ os: string;
25
+ osVersion: string;
26
+ model?: string;
27
+ screenSize: {
28
+ width: number;
29
+ height: number;
30
+ };
31
+ pixelRatio: number;
32
+ locale: string;
33
+ timezone: string;
34
+ network?: string;
35
+ /**
36
+ * Raw User-Agent string from `navigator.userAgent`. Surfaced to triagers so
37
+ * they can disambiguate things our OS/version parser doesn't capture
38
+ * (browser engine + version, in-app webviews, bot signatures, accessibility
39
+ * UA overrides). Web SDK only — native SDKs leave this undefined.
40
+ */
41
+ userAgent?: string;
42
+ }
43
+ interface ReportDraft {
44
+ title: string;
45
+ description: string;
46
+ excludedArtifacts: string[];
47
+ annotations: unknown[];
48
+ redactions: unknown[];
49
+ /** Host-supplied free-form metadata (from `setExtra`). Opaque string, ≤2000 chars. */
50
+ extra?: string;
51
+ }
52
+ /**
53
+ * The SDK key under its name, `sdkKey`, or under `apiKey`, its name before
54
+ * 1.2. `apiKey` is deprecated but still accepted, so a 1.1 config keeps
55
+ * working; `sdkKey` wins when both are set. Exactly one is required.
56
+ */
57
+ type SdkKeyField = {
58
+ /**
59
+ * Per-app SDK key (`evf_live_…`; publishable, not secret). Every
60
+ * Everframe SDK names this field `sdkKey`. It is not the App ID (a UUID)
61
+ * that symbol and source-map uploads take.
62
+ */
63
+ sdkKey: string;
64
+ /** @deprecated Renamed to `sdkKey`. Still accepted; `sdkKey` wins when both are set. */
65
+ apiKey?: string;
66
+ } | {
67
+ sdkKey?: undefined;
68
+ /** @deprecated Renamed to `sdkKey`. Still accepted. */
69
+ apiKey: string;
70
+ };
71
+ /** `C` as a host passes it: the SDK key as `sdkKey` or the deprecated `apiKey`. */
72
+ type WithSdkKeyField<C extends {
73
+ sdkKey: string;
74
+ }> = Omit<C, 'sdkKey'> & SdkKeyField;
75
+ /**
76
+ * A host-supplied function that produces the next report's `extra` payload
77
+ * on demand. Registered via `setExtra(resolve)`; invoked once per report
78
+ * assembly (see `resolveClientExtra`), never at registration time.
79
+ */
80
+ type ExtraResolver = () => string | Record<string, unknown>;
81
+
82
+ /** Protocol ceiling — `packages/protocol/src/envelope.ts`. */
83
+ declare const EXTRA_MAX_CHARS = 16384;
84
+
8
85
  type JsonScalar = string | number | boolean | null;
9
86
  type JsonValue = JsonScalar | JsonValue[] | JsonObject;
10
87
  type JsonObject = {
@@ -19,6 +96,7 @@ declare const ReportEnvelope: z.ZodObject<{
19
96
  error: "error";
20
97
  manual: "manual";
21
98
  crash: "crash";
99
+ diagnostic: "diagnostic";
22
100
  }>>;
23
101
  sessionId: z.ZodOptional<z.ZodString>;
24
102
  sdk: z.ZodObject<{
@@ -31,17 +109,19 @@ declare const ReportEnvelope: z.ZodObject<{
31
109
  "everframe-ios": "everframe-ios";
32
110
  "everframe-android": "everframe-android";
33
111
  "everframe-roku": "everframe-roku";
112
+ "everframe-vega": "everframe-vega";
34
113
  }>;
35
114
  version: z.ZodString;
36
115
  platform: z.ZodEnum<{
37
- web: "web";
38
- ios: "ios";
39
116
  android: "android";
117
+ ios: "ios";
118
+ web: "web";
40
119
  tvos: "tvos";
41
120
  tizen: "tizen";
42
121
  webos: "webos";
43
122
  androidtv: "androidtv";
44
123
  roku: "roku";
124
+ vega: "vega";
45
125
  }>;
46
126
  formFactor: z.ZodEnum<{
47
127
  phone: "phone";
@@ -125,13 +205,13 @@ declare const ReportEnvelope: z.ZodObject<{
125
205
  resHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
126
206
  reqBodySkipped: z.ZodOptional<z.ZodEnum<{
127
207
  error: "error";
128
- "content-type": "content-type";
129
208
  unsupported: "unsupported";
209
+ "content-type": "content-type";
130
210
  }>>;
131
211
  resBodySkipped: z.ZodOptional<z.ZodEnum<{
132
212
  error: "error";
133
- "content-type": "content-type";
134
213
  unsupported: "unsupported";
214
+ "content-type": "content-type";
135
215
  }>>;
136
216
  }, z.core.$loose>>>;
137
217
  vitals: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -210,8 +290,9 @@ declare const ReportEnvelope: z.ZodObject<{
210
290
  jsBundle: z.ZodOptional<z.ZodObject<{
211
291
  engine: z.ZodLiteral<"hermes">;
212
292
  platform: z.ZodEnum<{
213
- ios: "ios";
214
293
  android: "android";
294
+ ios: "ios";
295
+ vega: "vega";
215
296
  }>;
216
297
  buildId: z.ZodString;
217
298
  bundleName: z.ZodString;
@@ -232,6 +313,86 @@ declare const ReportEnvelope: z.ZodObject<{
232
313
  }, z.core.$strip>>;
233
314
  causesTruncated: z.ZodBoolean;
234
315
  }, z.core.$strip>>;
316
+ native: z.ZodOptional<z.ZodObject<{
317
+ releaseHealthEvidence: z.ZodOptional<z.ZodObject<{
318
+ version: z.ZodLiteral<1>;
319
+ attribution: z.ZodLiteral<"immutable_fatal_context">;
320
+ contextId: z.ZodString;
321
+ exposure: z.ZodObject<{
322
+ loadedBuildId: z.ZodNullable<z.ZodString>;
323
+ loadedBundleStatus: z.ZodEnum<{
324
+ unknown: "unknown";
325
+ known: "known";
326
+ not_applicable: "not_applicable";
327
+ }>;
328
+ exposureId: z.ZodString;
329
+ processLaunchId: z.ZodString;
330
+ startedAt: z.ZodISODateTime;
331
+ app: z.ZodObject<{
332
+ version: z.ZodString;
333
+ build: z.ZodNullable<z.ZodString>;
334
+ debug: z.ZodBoolean;
335
+ }, z.core.$strict>;
336
+ }, z.core.$strict>;
337
+ }, z.core.$strict>>;
338
+ platform: z.ZodLiteral<"apple">;
339
+ timestampMicros: z.ZodString;
340
+ crashedThreadIndex: z.ZodNumber;
341
+ framesIncomplete: z.ZodBoolean;
342
+ imagesIncomplete: z.ZodBoolean;
343
+ images: z.ZodArray<z.ZodObject<{
344
+ uuid: z.ZodString;
345
+ name: z.ZodString;
346
+ loadAddress: z.ZodString;
347
+ vmAddress: z.ZodOptional<z.ZodString>;
348
+ size: z.ZodString;
349
+ cpuType: z.ZodNumber;
350
+ cpuSubtype: z.ZodNumber;
351
+ architecture: z.ZodEnum<{
352
+ unknown: "unknown";
353
+ arm64e: "arm64e";
354
+ arm64: "arm64";
355
+ x86_64: "x86_64";
356
+ x86_64h: "x86_64h";
357
+ }>;
358
+ }, z.core.$strip>>;
359
+ frames: z.ZodArray<z.ZodObject<{
360
+ instructionAddress: z.ZodString;
361
+ imageIndex: z.ZodOptional<z.ZodNumber>;
362
+ imageOffset: z.ZodOptional<z.ZodString>;
363
+ }, z.core.$strip>>;
364
+ error: z.ZodObject<{
365
+ signalNumber: z.ZodOptional<z.ZodNumber>;
366
+ signalCode: z.ZodOptional<z.ZodNumber>;
367
+ machException: z.ZodOptional<z.ZodNumber>;
368
+ machCode: z.ZodOptional<z.ZodString>;
369
+ machSubcode: z.ZodOptional<z.ZodString>;
370
+ faultAddress: z.ZodOptional<z.ZodString>;
371
+ }, z.core.$strip>;
372
+ }, z.core.$strip>>;
373
+ androidNative: z.ZodOptional<z.ZodObject<{
374
+ source: z.ZodEnum<{
375
+ "android-exit-info": "android-exit-info";
376
+ "android-native-handler": "android-native-handler";
377
+ }>;
378
+ abi: z.ZodEnum<{
379
+ x86_64: "x86_64";
380
+ "armeabi-v7a": "armeabi-v7a";
381
+ "arm64-v8a": "arm64-v8a";
382
+ x86: "x86";
383
+ riscv64: "riscv64";
384
+ }>;
385
+ crashedThreadId: z.ZodNumber;
386
+ framesIncomplete: z.ZodBoolean;
387
+ frames: z.ZodArray<z.ZodObject<{
388
+ pc: z.ZodString;
389
+ relativePc: z.ZodString;
390
+ module: z.ZodOptional<z.ZodString>;
391
+ buildId: z.ZodOptional<z.ZodString>;
392
+ }, z.core.$strip>>;
393
+ signalNumber: z.ZodOptional<z.ZodNumber>;
394
+ signalCode: z.ZodOptional<z.ZodNumber>;
395
+ }, z.core.$strip>>;
235
396
  exceptionType: z.ZodString;
236
397
  message: z.ZodString;
237
398
  frames: z.ZodArray<z.ZodObject<{
@@ -248,12 +409,245 @@ declare const ReportEnvelope: z.ZodObject<{
248
409
  occurredAt: z.ZodString;
249
410
  fingerprint: z.ZodString;
250
411
  }, z.core.$loose>>;
412
+ diagnostic: z.ZodOptional<z.ZodObject<{
413
+ version: z.ZodLiteral<1>;
414
+ evidenceId: z.ZodString;
415
+ processLaunchId: z.ZodString;
416
+ nativeExposure: z.ZodOptional<z.ZodObject<{
417
+ loadedBuildId: z.ZodNullable<z.ZodString>;
418
+ loadedBundleStatus: z.ZodEnum<{
419
+ unknown: "unknown";
420
+ known: "known";
421
+ not_applicable: "not_applicable";
422
+ }>;
423
+ exposureId: z.ZodString;
424
+ processLaunchId: z.ZodString;
425
+ startedAt: z.ZodISODateTime;
426
+ app: z.ZodObject<{
427
+ version: z.ZodString;
428
+ build: z.ZodNullable<z.ZodString>;
429
+ debug: z.ZodBoolean;
430
+ }, z.core.$strict>;
431
+ }, z.core.$strict>>;
432
+ kind: z.ZodLiteral<"process_exit">;
433
+ provenance: z.ZodLiteral<"android_application_exit_info">;
434
+ scope: z.ZodLiteral<"os_process">;
435
+ outcome: z.ZodLiteral<"terminated">;
436
+ cause: z.ZodEnum<{
437
+ unknown: "unknown";
438
+ anr: "anr";
439
+ native_crash: "native_crash";
440
+ java_crash: "java_crash";
441
+ system_low_memory: "system_low_memory";
442
+ user_requested: "user_requested";
443
+ system_other: "system_other";
444
+ }>;
445
+ occurredAt: z.ZodString;
446
+ collectedAt: z.ZodString;
447
+ attribution: z.ZodObject<{
448
+ process: z.ZodLiteral<"exact_os_token">;
449
+ release: z.ZodLiteral<"frozen">;
450
+ session: z.ZodLiteral<"unavailable">;
451
+ webExposure: z.ZodLiteral<"unavailable">;
452
+ }, z.core.$strict>;
453
+ android: z.ZodObject<{
454
+ apiLevel: z.ZodNumber;
455
+ reason: z.ZodNumber;
456
+ pid: z.ZodNumber;
457
+ importance: z.ZodOptional<z.ZodNumber>;
458
+ pssKb: z.ZodOptional<z.ZodNumber>;
459
+ rssKb: z.ZodOptional<z.ZodNumber>;
460
+ description: z.ZodOptional<z.ZodString>;
461
+ mappingId: z.ZodOptional<z.ZodString>;
462
+ }, z.core.$strict>;
463
+ trace: z.ZodObject<{
464
+ status: z.ZodEnum<{
465
+ unavailable: "unavailable";
466
+ available: "available";
467
+ malformed: "malformed";
468
+ unsupported: "unsupported";
469
+ not_requested: "not_requested";
470
+ }>;
471
+ format: z.ZodEnum<{
472
+ none: "none";
473
+ android_anr_text: "android_anr_text";
474
+ android_tombstone: "android_tombstone";
475
+ }>;
476
+ truncated: z.ZodBoolean;
477
+ frames: z.ZodArray<z.ZodObject<{
478
+ function: z.ZodString;
479
+ file: z.ZodOptional<z.ZodString>;
480
+ line: z.ZodOptional<z.ZodNumber>;
481
+ }, z.core.$strict>>;
482
+ }, z.core.$strict>;
483
+ }, z.core.$strict>>;
484
+ appleDiagnostic: z.ZodOptional<z.ZodObject<{
485
+ version: z.ZodLiteral<1>;
486
+ evidenceId: z.ZodString;
487
+ ownershipId: z.ZodString;
488
+ kind: z.ZodEnum<{
489
+ hang_batch: "hang_batch";
490
+ app_exit_summary: "app_exit_summary";
491
+ }>;
492
+ provenance: z.ZodLiteral<"apple_metrickit">;
493
+ scope: z.ZodLiteral<"reporting_interval">;
494
+ outcome: z.ZodLiteral<"unknown">;
495
+ interval: z.ZodObject<{
496
+ begin: z.ZodString;
497
+ end: z.ZodString;
498
+ }, z.core.$strict>;
499
+ collectedAt: z.ZodString;
500
+ attribution: z.ZodObject<{
501
+ process: z.ZodLiteral<"unavailable">;
502
+ release: z.ZodLiteral<"frozen">;
503
+ session: z.ZodLiteral<"unavailable">;
504
+ webExposure: z.ZodLiteral<"unavailable">;
505
+ }, z.core.$strict>;
506
+ apple: z.ZodObject<{
507
+ applicationVersion: z.ZodString;
508
+ applicationBuild: z.ZodString;
509
+ osVersion: z.ZodString;
510
+ }, z.core.$strict>;
511
+ truncated: z.ZodBoolean;
512
+ hangs: z.ZodOptional<z.ZodArray<z.ZodObject<{
513
+ durationMs: z.ZodNumber;
514
+ stack: z.ZodObject<{
515
+ status: z.ZodEnum<{
516
+ unavailable: "unavailable";
517
+ available: "available";
518
+ malformed: "malformed";
519
+ oversized: "oversized";
520
+ }>;
521
+ truncated: z.ZodBoolean;
522
+ frames: z.ZodArray<z.ZodObject<{
523
+ binaryUUID: z.ZodString;
524
+ binaryName: z.ZodString;
525
+ address: z.ZodString;
526
+ offset: z.ZodString;
527
+ }, z.core.$strict>>;
528
+ }, z.core.$strict>;
529
+ }, z.core.$strict>>>;
530
+ exits: z.ZodOptional<z.ZodArray<z.ZodObject<{
531
+ state: z.ZodEnum<{
532
+ background: "background";
533
+ foreground: "foreground";
534
+ }>;
535
+ reason: z.ZodEnum<{
536
+ normal: "normal";
537
+ memory_resource_limit: "memory_resource_limit";
538
+ bad_access: "bad_access";
539
+ abnormal: "abnormal";
540
+ illegal_instruction: "illegal_instruction";
541
+ watchdog: "watchdog";
542
+ cpu_resource_limit: "cpu_resource_limit";
543
+ memory_pressure: "memory_pressure";
544
+ suspended_locked_file: "suspended_locked_file";
545
+ background_task_timeout: "background_task_timeout";
546
+ }>;
547
+ count: z.ZodNumber;
548
+ }, z.core.$strict>>>;
549
+ }, z.core.$strict>>;
550
+ recoveredStall: z.ZodOptional<z.ZodObject<{
551
+ version: z.ZodLiteral<1>;
552
+ evidenceId: z.ZodString;
553
+ kind: z.ZodLiteral<"recovered_main_thread_stall">;
554
+ provenance: z.ZodLiteral<"android_main_looper_probe">;
555
+ outcome: z.ZodLiteral<"recovered">;
556
+ scope: z.ZodLiteral<"main_looper">;
557
+ queuedAt: z.ZodString;
558
+ recoveredAt: z.ZodString;
559
+ probeDelayMs: z.ZodNumber;
560
+ thresholdMs: z.ZodLiteral<5000>;
561
+ sampleIntervalMs: z.ZodLiteral<1000>;
562
+ clock: z.ZodLiteral<"uptime">;
563
+ eligibility: z.ZodLiteral<"foreground-debugger-checked-v1">;
564
+ trace: z.ZodLiteral<"not_collected">;
565
+ attribution: z.ZodObject<{
566
+ release: z.ZodLiteral<"frozen">;
567
+ session: z.ZodLiteral<"unavailable">;
568
+ webExposure: z.ZodLiteral<"unavailable">;
569
+ nativeExposure: z.ZodLiteral<"unavailable">;
570
+ }, z.core.$strict>;
571
+ android: z.ZodObject<{
572
+ apiLevel: z.ZodNumber;
573
+ }, z.core.$strict>;
574
+ }, z.core.$strict>>;
575
+ inferredTermination: z.ZodOptional<z.ZodObject<{
576
+ version: z.ZodLiteral<1>;
577
+ evidenceId: z.ZodString;
578
+ processLaunchId: z.ZodString;
579
+ nativeExposure: z.ZodOptional<z.ZodObject<{
580
+ loadedBuildId: z.ZodNullable<z.ZodString>;
581
+ loadedBundleStatus: z.ZodEnum<{
582
+ unknown: "unknown";
583
+ known: "known";
584
+ not_applicable: "not_applicable";
585
+ }>;
586
+ exposureId: z.ZodString;
587
+ processLaunchId: z.ZodString;
588
+ startedAt: z.ZodISODateTime;
589
+ app: z.ZodObject<{
590
+ version: z.ZodString;
591
+ build: z.ZodNullable<z.ZodString>;
592
+ debug: z.ZodBoolean;
593
+ }, z.core.$strict>;
594
+ }, z.core.$strict>>;
595
+ kind: z.ZodLiteral<"process_exit">;
596
+ provenance: z.ZodEnum<{
597
+ apple_next_launch_inference: "apple_next_launch_inference";
598
+ }>;
599
+ scope: z.ZodLiteral<"os_process">;
600
+ outcome: z.ZodLiteral<"terminated">;
601
+ rules: z.ZodEnum<{
602
+ "apple-foreground-v1": "apple-foreground-v1";
603
+ }>;
604
+ cause: z.ZodEnum<{
605
+ low_memory: "low_memory";
606
+ unresponsive: "unresponsive";
607
+ unexplained: "unexplained";
608
+ }>;
609
+ lastSeenAt: z.ZodString;
610
+ collectedAt: z.ZodString;
611
+ attribution: z.ZodObject<{
612
+ process: z.ZodEnum<{
613
+ sdk_run_record: "sdk_run_record";
614
+ }>;
615
+ release: z.ZodLiteral<"frozen">;
616
+ session: z.ZodLiteral<"unavailable">;
617
+ webExposure: z.ZodLiteral<"unavailable">;
618
+ }, z.core.$strict>;
619
+ apple: z.ZodObject<{
620
+ appState: z.ZodEnum<{
621
+ active: "active";
622
+ inactive: "inactive";
623
+ launching: "launching";
624
+ }>;
625
+ footprintKb: z.ZodOptional<z.ZodNumber>;
626
+ availableKb: z.ZodOptional<z.ZodNumber>;
627
+ memorySampledAt: z.ZodOptional<z.ZodString>;
628
+ memoryWarnings: z.ZodNumber;
629
+ lastMemoryWarningAt: z.ZodOptional<z.ZodString>;
630
+ memoryPressure: z.ZodEnum<{
631
+ warning: "warning";
632
+ normal: "normal";
633
+ critical: "critical";
634
+ }>;
635
+ mainThreadStallMs: z.ZodOptional<z.ZodNumber>;
636
+ thermalState: z.ZodEnum<{
637
+ critical: "critical";
638
+ nominal: "nominal";
639
+ fair: "fair";
640
+ serious: "serious";
641
+ }>;
642
+ }, z.core.$strict>;
643
+ }, z.core.$strict>>;
251
644
  }, z.core.$loose>;
252
645
  context: z.ZodObject<{
253
646
  app: z.ZodObject<{
254
647
  name: z.ZodString;
255
648
  version: z.ZodString;
256
649
  build: z.ZodOptional<z.ZodString>;
650
+ debug: z.ZodOptional<z.ZodBoolean>;
257
651
  }, z.core.$loose>;
258
652
  device: z.ZodObject<{
259
653
  os: z.ZodString;
@@ -409,60 +803,14 @@ declare class EverframeNotMountedError extends Error {
409
803
  constructor(message?: string);
410
804
  }
411
805
 
412
- declare const ErrorSeverity: z.ZodEnum<{
413
- error: "error";
414
- info: "info";
415
- warning: "warning";
416
- }>;
417
- type ErrorSeverity = z.infer<typeof ErrorSeverity>;
418
-
419
- /** Optional per-occurrence details captured with a handled exception. */
420
- interface CaptureExceptionOptions {
421
- severity?: ErrorSeverity;
422
- context?: string;
423
- metadata?: Record<string, unknown>;
424
- }
425
- interface DeviceMetadata {
426
- os: string;
427
- osVersion: string;
428
- model?: string;
429
- screenSize: {
430
- width: number;
431
- height: number;
432
- };
433
- pixelRatio: number;
434
- locale: string;
435
- timezone: string;
436
- network?: string;
437
- /**
438
- * Raw User-Agent string from `navigator.userAgent`. Surfaced to triagers so
439
- * they can disambiguate things our OS/version parser doesn't capture
440
- * (browser engine + version, in-app webviews, bot signatures, accessibility
441
- * UA overrides). Web SDK only — native SDKs leave this undefined.
442
- */
443
- userAgent?: string;
444
- }
445
- interface ReportDraft {
446
- title: string;
447
- description: string;
448
- excludedArtifacts: string[];
449
- annotations: unknown[];
450
- redactions: unknown[];
451
- /** Host-supplied free-form metadata (from `setExtra`). Opaque string, ≤2000 chars. */
452
- extra?: string;
453
- }
454
- /**
455
- * A host-supplied function that produces the next report's `extra` payload
456
- * on demand. Registered via `setExtra(resolve)`; invoked once per report
457
- * assembly (see `resolveClientExtra`), never at registration time.
458
- */
459
- type ExtraResolver = () => string | Record<string, unknown>;
460
-
461
- /** Protocol ceiling — `packages/protocol/src/envelope.ts`. */
462
- declare const EXTRA_MAX_CHARS = 16384;
463
-
464
806
  /** Shape exposed via `useEverframe()` and the top-level `open` re-export. */
465
807
  interface EverframeContextValue {
808
+ /** Cached native delivery observations, independent of JS admission; optional for older context implementations. */
809
+ getReportDeliveryStatus?(): ReportDeliveryStatus;
810
+ /** Local admission only; optional for older context implementations. */
811
+ getErrorCaptureStatus?(): ErrorCaptureStatus;
812
+ /** Optional for compatibility with existing context implementations. */
813
+ getPromiseRejectionStatus?(): PromiseRejectionStatus;
466
814
  /** Capture a handled exception without opening the reporter. No-op outside the owning mount. */
467
815
  captureException(error: unknown, options?: CaptureExceptionOptions): void;
468
816
  /**
@@ -550,6 +898,8 @@ interface EverframeContextValue {
550
898
  */
551
899
  setUser(user?: EverframeUserSpec): void;
552
900
  }
901
+ /** Bounded coverage status only; does not install an observer or report delivery. */
902
+ declare function getPromiseRejectionStatus(): PromiseRejectionStatus;
553
903
  /**
554
904
  * Top-level imperative `open` re-export. Inside the React tree, prefer
555
905
  * `useEverframe().open()`. This re-export exists for non-component call
@@ -582,6 +932,10 @@ declare function recordScreen(name: string, data?: Record<string, unknown>): voi
582
932
  declare function setUser(user?: EverframeUserSpec): void;
583
933
  /** Capture a handled exception from any call site. No-op without a mounted provider. */
584
934
  declare function captureException(error: unknown, options?: CaptureExceptionOptions): void;
935
+ /** Detached local admission snapshot. Does not query native delivery or install hooks. */
936
+ declare function getErrorCaptureStatus(): ErrorCaptureStatus;
937
+ /** Cached native delivery observations, independent of JS admission. */
938
+ declare function getReportDeliveryStatus(): ReportDeliveryStatus;
585
939
 
586
940
  /**
587
941
  * Runtime configuration — the host-facing `EverframeProvider config` shape.
@@ -609,19 +963,38 @@ declare function captureException(error: unknown, options?: CaptureExceptionOpti
609
963
  * review instruction, left as pre-existing behavior rather than folded in
610
964
  * here.
611
965
  */
612
- interface RuntimeConfig extends Omit<ConfigOpts, "sdkVersion" | "installIdentifierDisabled" | "companionBadgeEnabled" | "companionBadgePosition" | "shakeToReportEnabled" | "themeBackground" | "themeSurface" | "themeBorder" | "themeText" | "themeTextMuted" | "themeAccent" | "themeAccentForeground" | "themeDestructive" | "vitalsEnabled" | "vitalsSampleRate" | "vitalsCaptureSourceQuery"> {
966
+ interface RuntimeConfig extends Omit<ConfigOpts, "sdkVersion" | "installIdentifierDisabled" | "crashReportingDisabled" | "companionBadgeEnabled" | "companionBadgePosition" | "shakeToReportEnabled" | "themeBackground" | "themeSurface" | "themeBorder" | "themeText" | "themeTextMuted" | "themeAccent" | "themeAccentForeground" | "themeDestructive" | "vitalsEnabled" | "vitalsSampleRate" | "vitalsCaptureSourceQuery" | "releaseHealthEnabled" | "releaseHealthLoadedBuildId" | "releaseHealthUserId" | "releaseHealthIncludeDebugBuilds"> {
613
967
  /**
614
968
  * Per-app SDK key (publishable, not secret). Required on the host-facing
615
- * config — narrows the bridge `ConfigOpts.apiKey?` to required so a missing
969
+ * config — narrows the bridge `ConfigOpts.sdkKey?` to required so a missing
616
970
  * key is a compile-time error, matching the React SDK. The bridge type stays
617
971
  * optional (extractBridgeConfig builds `{}`); only this host surface requires it.
618
972
  */
619
- apiKey: string;
973
+ sdkKey: string;
620
974
  appName?: string;
621
- appVersion?: string;
622
- appBuild?: string;
623
975
  /** Exact loaded Hermes bundle identity, independent of the native app build. */
624
976
  jsBundle?: JsBundleConfig;
977
+ /**
978
+ * Whether this is a debug build. Everframe never makes a release out of a debug build, and release
979
+ * health skips it. Defaults to React Native's `__DEV__`; set it only to override that.
980
+ */
981
+ debugBuild?: boolean;
982
+ /**
983
+ * Native foreground-session monitoring (release health). On by default:
984
+ * leave this out, or leave `enabled` out, and it is on; `enabled: false`
985
+ * turns it off and erases undelivered records on the device. The native SDK
986
+ * reads the app version and build; the loaded build comes from validated
987
+ * Hermes jsBundle metadata, and without that identity release health stays
988
+ * off. userId is an optional opaque identifier supplied for this purpose;
989
+ * null or omitted means anonymous, and setUser never supplies it implicitly.
990
+ * The native SDKs skip debug builds; `includeDebugBuilds: true` counts them,
991
+ * for checking an integration.
992
+ */
993
+ releaseHealth?: {
994
+ enabled?: boolean;
995
+ userId?: string | null;
996
+ includeDebugBuilds?: boolean;
997
+ };
625
998
  /**
626
999
  * Opt-in JS-side capture integrations (spec 2026-07-14 RN-iOS parity).
627
1000
  * Import from '@everframe/react-native/integrations/*'; nothing
@@ -630,13 +1003,19 @@ interface RuntimeConfig extends Omit<ConfigOpts, "sdkVersion" | "installIdentifi
630
1003
  integrations?: EverframeIntegration[];
631
1004
  /**
632
1005
  * Crash/error reporting (spec 2026-07-18). Installs a default-on global
633
- * ErrorUtils handler on mount — deliberately NOT gated behind
1006
+ * ErrorUtils handler on mount, plus a hook on React Native's
1007
+ * ExceptionsManager for errors no React error boundary catches (React 19
1008
+ * reports those through the root, not ErrorUtils) — deliberately NOT gated behind
634
1009
  * `integrations` (deviation from the RN integrations doctrine, recorded in
635
1010
  * the spec): crash capture is a safety net, not an opt-in enrichment. Set
636
- * `disabled: true` to veto it entirely.
1011
+ * `disabled: true` to veto it entirely, including native crash and ANR capture.
637
1012
  */
638
1013
  crashReporting?: {
639
1014
  disabled?: boolean;
1015
+ /** Opt-in automatic observation on qualified RN/Hermes runtimes. */
1016
+ promiseRejections?: {
1017
+ enabled?: boolean;
1018
+ };
640
1019
  };
641
1020
  /**
642
1021
  * Network request/response body capture (spec 2026-08-12). CLIENT VETO
@@ -741,9 +1120,14 @@ interface RuntimeConfig extends Omit<ConfigOpts, "sdkVersion" | "installIdentifi
741
1120
  captureSourceQuery?: boolean;
742
1121
  };
743
1122
  }
1123
+ /**
1124
+ * The provider config as a host passes it: the SDK key as `sdkKey`, or as the
1125
+ * deprecated `apiKey` (its name before 1.2).
1126
+ */
1127
+ type EverframeProviderConfig = WithSdkKeyField<RuntimeConfig>;
744
1128
 
745
1129
  interface EverframeProviderProps {
746
- config: RuntimeConfig;
1130
+ config: EverframeProviderConfig;
747
1131
  children: React.ReactNode;
748
1132
  }
749
1133
  declare function EverframeProvider(props: EverframeProviderProps): React.ReactElement;
@@ -1009,4 +1393,4 @@ declare namespace companion {
1009
1393
  export { type companion_CompanionAttachChallenge as CompanionAttachChallenge, type companion_CompanionState as CompanionState, companion_getEmitter as getEmitter, companion_onAttachChallenge as onAttachChallenge, companion_onAttachedUserName as onAttachedUserName, companion_onCode as onCode, companion_onPairUrl as onPairUrl, companion_onResolvedName as onResolvedName, companion_onRunning as onRunning, companion_onState as onState, companion_start as start, companion_stop as stop, companion_useCompanion as useCompanion };
1010
1394
  }
1011
1395
 
1012
- export { AttachmentRef, type CaptureExceptionOptions, type CompanionState, ConfigOpts, type DeviceMetadata, EXTRA_MAX_CHARS, type EverframeContextValue, EverframeIntegration, EverframeNotMountedError, EverframeProvider, type EverframeProviderProps, EverframeScreen, type EverframeScreenProps, EverframeSensitive, EverframeUserSpec, type HostPlayerEventType, type PlayerHandle, type PlayerStats, type ReportDraft, ReportEnvelope, type ReporterResult, EverframeSensitive as Sensitive, type TrackPlayerOptions, UINode, UITree, VitalsPlayerEventType, addBreadcrumb, captureException, companion, open, recordScreen, setExtra, setUser, trackPlayer, trackVitals, useCompanion, useEverframe, useEverframeScreen, useEverframeSensitiveRef, useTrackPlayer };
1396
+ export { AttachmentRef, type CaptureExceptionOptions, type CompanionState, ConfigOpts, type DeviceMetadata, EXTRA_MAX_CHARS, ErrorCaptureStatus, type EverframeContextValue, EverframeIntegration, EverframeNotMountedError, EverframeProvider, type EverframeProviderProps, EverframeScreen, type EverframeScreenProps, EverframeSensitive, EverframeUserSpec, type HostPlayerEventType, type PlayerHandle, type PlayerStats, PromiseRejectionStatus, ReportDeliveryStatus, type ReportDraft, ReportEnvelope, type ReporterResult, EverframeSensitive as Sensitive, type TrackPlayerOptions, UINode, UITree, VitalsPlayerEventType, addBreadcrumb, captureException, companion, getErrorCaptureStatus, getPromiseRejectionStatus, getReportDeliveryStatus, open, recordScreen, setExtra, setUser, trackPlayer, trackVitals, useCompanion, useEverframe, useEverframeScreen, useEverframeSensitiveRef, useTrackPlayer };