@everframe/react-native 1.4.1 → 1.6.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.
@@ -59,65 +59,21 @@ type ConfigOpts = {
59
59
  * Absent means capture stays on.
60
60
  */
61
61
  crashReportingDisabled?: boolean;
62
- /**
63
- * Built-in attach-PIN surface mode (spec 2026-08-19): 'builtin' (default —
64
- * the native SDK presents the code itself), 'custom' (host renders it from
65
- * onAttachChallenge; the device still announces the capability), 'off'
66
- * (legacy one-click dashboard attach, no PIN). Flat string, not a union —
67
- * codegen cannot express string-literal unions; the natives coerce unknown
68
- * values to 'builtin'.
69
- */
70
- attachPinUi?: string;
71
- /**
72
- * Explicit companion device-identity override (naming spec 2026-08-24) —
73
- * an MDM id or provisioning serial the host already trusts. Hashed
74
- * (SHA-256 → UUID shape) natively before it ever reaches the announce
75
- * `device` block — see `CompanionDeviceId.resolve` (iOS) /
76
- * `CompanionDeviceId.resolve` (Android). Flat optional string, same
77
- * codegen shape as `attachPinUi` above. `undefined`/absent falls through
78
- * to each native side's own Keychain/SSAID-then-stored-UUID chain.
79
- */
80
- companionDeviceId?: string;
81
- /**
82
- * Companion on-screen name-badge visibility (naming spec 2026-08-24,
83
- * controller ruling / Task 6b) — "a production app that finds it
84
- * intrusive turns it off in one line". `undefined`/absent defaults to
85
- * `true` (badge shown) on both natives, matching
86
- * `CompanionBadgeOptions.enabled`'s own default. Flat because RN codegen
87
- * rejects nested objects, same constraint `networkBodiesDisabled` above
88
- * documents — the host-facing nested `companionBadge: { enabled }` is
89
- * flattened here by `extractBridgeConfig`.
90
- */
91
- companionBadgeEnabled?: boolean;
92
- /** Local veto for native mobile shake-to-report. Absent defaults to enabled. */
62
+ /** Local veto for shake opening the reporter (not for shake quick capture). Absent defaults to enabled. */
93
63
  shakeToReportEnabled?: boolean;
64
+ /** Local veto for quick capture (simulators, emulators and real phones) and device linking. Absent defaults to enabled. */
65
+ quickCaptureEnabled?: boolean;
94
66
  /**
95
67
  * Crash-only session switch. `true` turns off every on-device way to open the reporter, keeps
96
- * network bodies off and samples replay with the server's crash-only rate until a companion
97
- * bond upgrades the session. Flattened by `extractBridgeConfig` from `reporter: { disabled }`.
68
+ * network bodies off and samples replay with the server's crash-only rate. Flattened by `extractBridgeConfig` from `reporter: { disabled }`.
98
69
  * Absent means a normal report session.
99
70
  */
100
71
  reporterDisabled?: boolean;
101
- /**
102
- * Companion on-screen name-badge corner (naming spec 2026-08-24,
103
- * controller ruling / Task 6b). Flat optional STRING, not a literal
104
- * union — same codegen ceiling as `attachPinUi` above (RN codegen cannot
105
- * express a string-literal union in a struct field): the host-facing
106
- * `RuntimeConfig.companionBadge.position` narrows to the real
107
- * `'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'` union and
108
- * `extractBridgeConfig` passes it through unchanged onto this wire field.
109
- * Each native side re-parses the string into its own
110
- * `CompanionBadgePosition` enum, coercing `undefined`/an unrecognised
111
- * value to `.bottomRight`/`BOTTOM_RIGHT` — the same default
112
- * `CompanionBadgeOptions.position` already uses.
113
- */
114
- companionBadgePosition?: string;
115
72
  /**
116
73
  * Inline reporter theme (reporter branding spec 2026-08-25, RN slice) —
117
74
  * 8 optional `#rrggbb` role strings, flattened from the host-facing nested
118
75
  * `RuntimeConfig.theme` by `extractBridgeConfig` (RN codegen cannot express
119
- * a nested object in a struct field — the `companionBadge` constraint
120
- * above). Pure passthrough: NO hex validation happens on the RN side; each
76
+ * a nested object in a struct field). Pure passthrough: NO hex validation happens on the RN side; each
121
77
  * native ThemeResolver revalidates per-field and ignores invalid values.
122
78
  * The theme only ever renders once the server entitles it (server
123
79
  * `watermark: false`) — the entitlement gate lives natively and cannot be
@@ -134,7 +90,7 @@ type ConfigOpts = {
134
90
  /**
135
91
  * Session Vitals local config (spec 2026-09-06, RN). Three FLAT fields
136
92
  * flattened from the host-facing nested `RuntimeConfig.vitals` by
137
- * `extractBridgeConfig` — same codegen reason as `companionBadge*`.
93
+ * `extractBridgeConfig` — RN codegen rejects nested objects.
138
94
  * `vitalsEnabled`: absent = follow the dashboard toggle; `false` = opt out
139
95
  * locally; `true` never forces it on. `vitalsSampleRate`: [0, 1], min()'d
140
96
  * with the server rate, clamped natively; absent = server rate.
@@ -232,8 +188,7 @@ interface Spec extends TurboModule {
232
188
  */
233
189
  setExtraResolverActive(active: boolean): void;
234
190
  /**
235
- * Companion-precedent-shaped ack (mirrors `signalCompanionReportRequestReady`
236
- * below exactly): called by the JS-side `everframe.extra.resolveRequested`
191
+ * Ack: called by the JS-side `everframe.extra.resolveRequested`
237
192
  * listener once it has — IF a resolver is currently registered — invoked
238
193
  * it, budgeted the result exactly like `@everframe/sdk-core`'s
239
194
  * `resolveClientExtra`, and pushed it through the existing `setExtra`
@@ -320,23 +275,10 @@ interface Spec extends TurboModule {
320
275
  * non-fatal `reportCrash`, it may carry a session replay.
321
276
  */
322
277
  captureHandledException(crashJson: string): boolean;
323
- startCompanion(): void;
324
- stopCompanion(): void;
325
- /**
326
- * Companion handshake: called by the JS-side `onReportRequested` listener
327
- * once it is ready for native capture to proceed. (It used to walk the
328
- * React fiber tree and attach it via `attachReactTree` first; both are
329
- * gone — spec 2026-08-29.) Releases the native bridge's bounded wait.
330
- *
331
- * Bounded: if JS never calls back, the native side times out after
332
- * ~250ms and captures anyway.
333
- */
334
- signalCompanionReportRequestReady(correlationId: string): void;
335
278
  /**
336
279
  * RN's `NativeEventEmitter` contract requires `addListener` /
337
280
  * `removeListeners` to exist on the underlying native module — RN warns
338
- * loudly otherwise. Both are intentional no-ops at the spec level: the
339
- * native event-emitter subscriptions are installed by `startCompanion`.
281
+ * loudly otherwise. Both are intentional no-ops at the spec level.
340
282
  */
341
283
  addListener(eventName: string): void;
342
284
  removeListeners(count: number): void;
package/dist/index.d.ts CHANGED
@@ -2,10 +2,10 @@ import * as React from 'react';
2
2
  import { EverframeUserSpec, ConfigOpts } from './NativeEverframe.js';
3
3
  export { Rect, Spec } from './NativeEverframe.js';
4
4
  import { E as EverframeIntegration } from './types-D5e4kWaw.js';
5
- import { R as ReportDeliveryStatus, E as ErrorCaptureStatus, P as PromiseRejectionStatus, a as ReporterOpenOptions, b as ReporterResult, c as ReporterTrigger, I as InteractionPolicyOptions, V as VitalsPlayerEventType, d as InteractionTargetAnnotation, e as InteractionHookOptions, C as ControlChangeInput, S as ScrollInput } from './launch-BvE4IjRk.js';
6
- export { A as AttachmentRef, f as ErrorCaptureCounters, g as ErrorCaptureOutcome, h as ErrorCapturePath, i as EverframeNotMountedError, j as EverframeReporterDisabledError, H as HelperType, L as LaunchContext, k as PermissionResult, l as PromiseRejectionCounters, m as RejectionReason, n as ReportCaptureOutcome, o as ReportCapturePath, p as ReportCapturePathStatus, q as ReportDeliveryReason, r as ReportEnvelope, s as ReportQueueOperation, t as ReportQueueStatus, u as ReportStorageFailure, v as ReportTransportOrigin, w as ReportTransportOutcome, x as ReportTransportStatus, U as UINode, y as UITree, z as observePermissionRequest, B as recordLaunchContext } from './launch-BvE4IjRk.js';
5
+ import { R as ReportDeliveryStatus, E as ErrorCaptureStatus, P as PromiseRejectionStatus, a as ReporterOpenOptions, b as ReporterResult, c as ReporterTrigger, I as InteractionPolicyOptions, V as VitalsPlayerEventType, d as InteractionTargetAnnotation, e as InteractionHookOptions, C as ControlChangeInput, S as ScrollInput } from './launch-aXtOOfNU.js';
6
+ export { A as AttachmentRef, f as ErrorCaptureCounters, g as ErrorCaptureOutcome, h as ErrorCapturePath, i as EverframeNotMountedError, j as EverframeReporterDisabledError, H as HelperType, L as LaunchContext, k as PermissionResult, l as PromiseRejectionCounters, m as RejectionReason, n as ReportCaptureOutcome, o as ReportCapturePath, p as ReportCapturePathStatus, q as ReportDeliveryReason, r as ReportEnvelope, s as ReportQueueOperation, t as ReportQueueStatus, u as ReportStorageFailure, v as ReportTransportOrigin, w as ReportTransportOutcome, x as ReportTransportStatus, U as UINode, y as UITree, z as observePermissionRequest, B as recordLaunchContext } from './launch-aXtOOfNU.js';
7
7
  import { z } from 'zod';
8
- import { ViewProps, EventSubscription } from 'react-native';
8
+ import { ViewProps } from 'react-native';
9
9
 
10
10
  interface JsBundleConfig {
11
11
  buildId: string;
@@ -119,8 +119,7 @@ interface EverframeContextValue {
119
119
  * chance for the host to refresh a pushed snapshot first — see the fuller
120
120
  * rationale on `@everframe/sdk-core`'s `EverframeClient.setExtra`. The
121
121
  * resolver is stored, never called at registration time; native ASKS for
122
- * it (a bounded round trip to JS, mirroring the companion
123
- * `reportRequested` handshake) right before it drains pending attachments
122
+ * it (a bounded round trip to JS) right before it drains pending attachments
124
123
  * for a report, so it always sees current values with no effect to write
125
124
  * or keep in sync. A throwing resolver never breaks the report: it is
126
125
  * caught, warned, and `extra` is simply omitted from that report — same
@@ -219,18 +218,12 @@ declare function markReporterClosed(): Promise<void>;
219
218
  * host-defined, it's owned by the SDK and stamped per release on the native
220
219
  * side (`Everframe.SDK_VERSION`). See extractBridgeConfig.
221
220
  *
222
- * External review, finding NN4 — also OMITS `companionBadgeEnabled` /
223
- * `companionBadgePosition`, the FLAT wire-shaped fields `ConfigOpts` declares
224
- * for codegen (RN codegen cannot express the nested `{ enabled, position }`
225
- * object at all — see `companionBadge` below). Without this, `RuntimeConfig`
226
- * structurally inherited BOTH the flat wire fields AND the nested
227
- * `companionBadge` declared below, so `{ companionBadgeEnabled: false }`
228
- * type-checked as a valid host config and silently no-opped: `extractBridge
229
- * Config` only ever reads the nested `companionBadge` object, never the flat
230
- * keys, so a host reaching for the (also-valid-looking) flat shape got no
231
- * error and no effect. Omitting them here makes `companionBadge` the ONLY
232
- * public surface for this option — passing the flat form is now a
233
- * compile-time error, matching the runtime's actual (nested-only) behavior.
221
+ * External review, finding NN4 — also OMITS the FLAT wire-shaped fields
222
+ * `ConfigOpts` declares for codegen wherever a nested host-facing option
223
+ * exists below (RN codegen cannot express nested objects). Without the Omit,
224
+ * `RuntimeConfig` structurally inherits BOTH shapes, and the flat one
225
+ * type-checks as a valid host config and silently no-ops, because
226
+ * `extractBridgeConfig` only ever reads the nested object.
234
227
  * Deliberately NOT applied to `networkBodiesDisabled`, even though the same
235
228
  * shape of gap arguably exists there too (`RuntimeConfig` also declares its
236
229
  * own nested `networkBodies?: { disabled? }` below, alongside the inherited
@@ -238,7 +231,7 @@ declare function markReporterClosed(): Promise<void>;
238
231
  * review instruction, left as pre-existing behavior rather than folded in
239
232
  * here.
240
233
  */
241
- interface RuntimeConfig extends Omit<ConfigOpts, 'sdkVersion' | 'interactionsJson' | 'installIdentifierDisabled' | 'crashReportingDisabled' | 'companionBadgeEnabled' | 'companionBadgePosition' | 'shakeToReportEnabled' | 'reporterDisabled' | 'themeBackground' | 'themeSurface' | 'themeBorder' | 'themeText' | 'themeTextMuted' | 'themeAccent' | 'themeAccentForeground' | 'themeDestructive' | 'vitalsEnabled' | 'vitalsSampleRate' | 'vitalsCaptureSourceQuery' | 'releaseHealthEnabled' | 'releaseHealthLoadedBuildId' | 'releaseHealthUserId' | 'releaseHealthIncludeDebugBuilds'> {
234
+ interface RuntimeConfig extends Omit<ConfigOpts, 'sdkVersion' | 'interactionsJson' | 'installIdentifierDisabled' | 'crashReportingDisabled' | 'shakeToReportEnabled' | 'quickCaptureEnabled' | 'reporterDisabled' | 'themeBackground' | 'themeSurface' | 'themeBorder' | 'themeText' | 'themeTextMuted' | 'themeAccent' | 'themeAccentForeground' | 'themeDestructive' | 'vitalsEnabled' | 'vitalsSampleRate' | 'vitalsCaptureSourceQuery' | 'releaseHealthEnabled' | 'releaseHealthLoadedBuildId' | 'releaseHealthUserId' | 'releaseHealthIncludeDebugBuilds'> {
242
235
  /**
243
236
  * Per-app SDK key (publishable, not secret). Required on the host-facing
244
237
  * config — narrows the bridge `ConfigOpts.sdkKey?` to required so a missing
@@ -324,49 +317,56 @@ interface RuntimeConfig extends Omit<ConfigOpts, 'sdkVersion' | 'interactionsJso
324
317
  disabled?: boolean;
325
318
  };
326
319
  /**
327
- * Built-in attach-PIN surface mode (spec 2026-08-19). Narrows the bridge
328
- * `ConfigOpts.attachPinUi?: string` to a literal union here — the flat
329
- * `string` on `ConfigOpts` is a codegen constraint on the WIRE type only
330
- * (RN codegen can't express a string-literal union in a struct field, see
331
- * `NativeEverframe.ts`'s D-decision header note); this host-facing surface
332
- * doesn't cross codegen and gets normal DX. `extractBridgeConfig` passes
333
- * it through unchanged — the union is a subtype of `string`, so no
334
- * conversion is needed, same as `captureScreenshot` above.
320
+ * Accepted and ignored.
321
+ *
322
+ * @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture.
335
323
  */
336
324
  attachPinUi?: 'builtin' | 'custom' | 'off';
337
325
  /**
338
- * Companion on-screen name-badge visibility/position (naming spec
339
- * 2026-08-24, controller ruling / Task 6b) — lets a host that finds the
340
- * badge intrusive turn it off in one line: `companionBadge: { enabled:
341
- * false }`. Nested host-facing shape, unlike `attachPinUi` above: RN
342
- * codegen cannot express a nested object in a struct field at all (not
343
- * even a flat one with a narrowed literal-union member), so
344
- * `extractBridgeConfig` flattens both fields onto the wire `ConfigOpts`
345
- * (`companionBadgeEnabled`/`companionBadgePosition`) — the same
346
- * flattening idiom `networkBodies.disabled` → `networkBodiesDisabled`
347
- * above already uses for the same reason.
326
+ * Accepted and ignored.
327
+ *
328
+ * @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture.
329
+ */
330
+ companionDeviceId?: string;
331
+ /**
332
+ * Accepted and ignored.
333
+ *
334
+ * @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture.
348
335
  */
349
336
  companionBadge?: {
350
337
  enabled?: boolean;
351
338
  position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
352
339
  };
353
340
  /**
354
- * Native mobile shake gesture. Enabled by default; the dashboard remains
355
- * authoritative. React Native/Expo development builds should normally use
356
- * `{ enabled: !__DEV__ }` to avoid overlapping with the development menu.
341
+ * Whether a shake opens the reporter on an unlinked release build. Enabled
342
+ * by default; the dashboard remains authoritative. It does not stop shake
343
+ * from taking a quick capture on a linked phone or a debug build, nor from
344
+ * answering a dashboard link window: that is `quickCapture`'s job. React
345
+ * Native/Expo development builds should normally use `{ enabled: !__DEV__ }`
346
+ * to avoid opening the reporter over the development menu.
357
347
  */
358
348
  shakeToReport?: {
359
349
  enabled?: boolean;
360
350
  };
351
+ /**
352
+ * Quick capture: a report filed with no UI and titled on the dashboard.
353
+ * Simulators and emulators use ⇧B in debug builds. Real phones use shake
354
+ * when the device is linked on the dashboard (any build) or the build is a
355
+ * debug build (`__DEV__`, or `debugBuild`); Android TV uses the remote
356
+ * gesture the dashboard sets, under the same rule. Enabled by default; the
357
+ * dashboard remains authoritative. `{ enabled: false }` opts this app out
358
+ * of quick capture everywhere, and of device linking.
359
+ */
360
+ quickCapture?: {
361
+ enabled?: boolean;
362
+ };
361
363
  /**
362
364
  * Crash-only session switch (spec 2026-10-12). CLIENT VETO only.
363
365
  * `disabled: true` turns off every on-device way to open the reporter
364
366
  * (shake, `open()`, which then rejects with
365
367
  * `EverframeReporterDisabledError`), keeps network bodies off and samples
366
368
  * session replay with the server's crash-only rate (default 0) instead of
367
- * the normal one. A companion bond upgrades the session: replay and bodies
368
- * then follow the normal server rules for the rest of the session, and
369
- * reports come through the companion. Crash and error capture are
369
+ * the normal one. Crash and error capture are
370
370
  * unaffected. Flattened onto `ConfigOpts.reporterDisabled` by
371
371
  * `extractBridgeConfig`.
372
372
  */
@@ -378,8 +378,8 @@ interface RuntimeConfig extends Omit<ConfigOpts, 'sdkVersion' | 'interactionsJso
378
378
  * 8 optional `#rrggbb` role strings for the NATIVE report dialogs the RN
379
379
  * SDK presents (`open()`); RN itself renders no reporter UI. Nested
380
380
  * host-facing shape, flattened onto the 8 flat `ConfigOpts.theme*` wire
381
- * fields by `extractBridgeConfig` — the same idiom (and codegen reason) as
382
- * `companionBadge` above.
381
+ * fields by `extractBridgeConfig` (RN codegen cannot express nested
382
+ * objects).
383
383
  *
384
384
  * Rendering is entitlement-gated NATIVELY per the branding contract
385
385
  * (precedence server → inline → default): the theme applies only when the
@@ -509,151 +509,44 @@ declare function trackVitals(name: string, data?: unknown, player?: PlayerHandle
509
509
  */
510
510
  declare function useTrackPlayer(opts: TrackPlayerOptions): PlayerHandle;
511
511
 
512
- /**
513
- * SDK-facing listener surface. React Native 0.87 intentionally types raw
514
- * native payloads as `Object[]`; each Everframe event has a narrower bridge
515
- * contract, so the unchecked native boundary is centralized here instead of
516
- * repeated at every listener.
517
- */
518
- type EverframeNativeEventEmitter = {
519
- addListener<Args extends readonly unknown[]>(eventType: string, listener: (...args: Args) => unknown): EventSubscription;
520
- };
521
- /**
522
- * Resolve the platform's RN event emitter source. iOS hands listeners to a
523
- * dedicated `RCTEventEmitter` subclass (`EverframeEventEmitter`); Android
524
- * uses the default `RCTDeviceEventEmitter` which `NativeEventEmitter`
525
- * routes to when constructed with no argument.
526
- */
527
- declare function getEmitter(): EverframeNativeEventEmitter;
528
-
529
- /**
530
- * Companion runtime state — mirrors `CompanionState` in iOS (rawValue) +
531
- * Android (mapped from the enum via `toRnString`). Keep this union in
532
- * lock-step with both native sides.
533
- */
512
+ /** @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture. */
534
513
  type CompanionState = 'unpaired' | 'paired' | 'report_in_progress' | 'phone_disconnected';
535
- /**
536
- * A pending dashboard-initiated attach-PIN challenge (spec 2026-08-19).
537
- * Mirrors iOS `CompanionAttachChallenge` / Android `AttachChallengeInfo`.
538
- * The natives forward this event in every `attachPinUi` mode, including
539
- * `'builtin'` (which renders the PIN natively AND still fires the event) —
540
- * it's only NEEDED by hosts configured with `'custom'`, which must read it
541
- * to build their own surface.
542
- */
514
+ /** @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture. */
543
515
  interface CompanionAttachChallenge {
544
516
  code: string;
545
517
  requestedByName: string;
546
- /** Display lifetime — custom UIs should hide the code after this. */
547
518
  ttlMs: number;
548
519
  }
549
520
  /**
550
- * Open the relay WS connection. The native bridge owns at most one client
551
- * per process and `start()` is idempotent: calling it again while the
552
- * companion is already running is a no-op — the socket is NOT recreated.
553
- * Call `stop()` first, then `start()`, to tear the connection down and open
554
- * a fresh one.
521
+ * Logs the removal warning once. Reaches no native code and never throws.
555
522
  *
556
- * The ingest URL is no longer a JS-side argument — the native SDKs bake it
557
- * at compile time (Release: https://everframe.dev; Debug: optionally
558
- * overridden via EVERFRAME_DEV_INGEST_URL on each native build).
523
+ * @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture.
559
524
  */
560
525
  declare function start(): void;
561
526
  /**
562
- * Close the relay WS. The observable state retains its last value — hosts
563
- * can still read `useCompanion().state` afterwards to render a "paused"
564
- * indicator. Re-call `start(...)` to reconnect.
565
- */
566
- declare function stop(): void;
567
- /**
568
- * Subscribe to the "is a session wanted" intent flag (see `_running` above).
569
- * Returns an unsubscribe function. Use this directly from imperative code;
570
- * React components should prefer `useCompanion().running`.
571
- */
572
- declare function onRunning(handler: (running: boolean) => void): () => void;
573
- /**
574
- * Subscribe to companion-state changes. Returns an unsubscribe function.
575
- * Use this directly from imperative code (e.g. an Activity-lifecycle hook);
576
- * React components should prefer `useCompanion()`.
577
- */
578
- declare function onState(handler: (state: CompanionState) => void): () => void;
579
- /**
580
- * Subscribe to pairUrl changes. The URL is set on `pair.created` and retained
581
- * for the life of the relay socket — it's nulled only when the socket closes
582
- * (terminal/permanent close). It does NOT flip to null on bond or expiry; drive
583
- * QR teardown off `state` (e.g. hide once `state === 'paired'`) instead, since
584
- * `state` is the reliably-delivered signal across the native bridge.
585
- */
586
- declare function onPairUrl(handler: (url: string | null) => void): () => void;
587
- /**
588
- * Subscribe to the announce display code — the short string the dashboard
589
- * shows next to this device in the project's Companion list, so a team member
590
- * can match what they read on the TV screen to a row in the list.
527
+ * Does nothing.
591
528
  *
592
- * `null` when companion discovery was never attempted (no SDK key configured
593
- * on the native side), when the announce call failed, and after the relay
594
- * socket closes terminally. A null code costs discovery only — pairing by QR
595
- * and report submission are unaffected, so never gate the QR on it.
529
+ * @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture.
596
530
  */
597
- declare function onCode(handler: (code: string | null) => void): () => void;
598
- /**
599
- * Subscribe to the attached dashboard member's display name. Populated only
600
- * when someone attached to this device FROM the dashboard; an ordinary QR
601
- * bond carries no such name and leaves this `null`. Render it as e.g.
602
- * "Paired with <name>" — but drive the paired/unpaired chrome itself off
603
- * `state`, which is the reliably-delivered signal.
604
- */
605
- declare function onAttachedUserName(handler: (name: string | null) => void): () => void;
606
- /**
607
- * Subscribe to the server-resolved device display name (naming spec
608
- * 2026-08-24) — e.g. an org-configured friendly name for this device.
609
- * `null` before the first successful announce, and when discovery never ran
610
- * (no SDK key configured on the native side).
611
- *
612
- * REPLAY SEMANTIC (external review, finding N5): RN events don't replay to
613
- * listeners attached after they fired, so a name resolved by an announce
614
- * that ran before this call would otherwise be invisible to it until the
615
- * NEXT announce. If `start()` has already cached a resolved name, `handler`
616
- * is invoked synchronously, immediately, with that cached value — before
617
- * this function returns, in addition to firing on every later event. Mirrors
618
- * `onAttachChallenge`'s replay idiom exactly, minus the ttlMs
619
- * recomputation (a resolved name has no lifetime to recompute).
620
- */
621
- declare function onResolvedName(handler: (name: string | null) => void): () => void;
622
- /**
623
- * Subscribe to attach-PIN challenges (spec 2026-08-19). Fires with the live
624
- * challenge when a dashboard member requests attach, and null when it
625
- * clears (redeemed, expired, burned, superseded, socket closed). The
626
- * natives fire this event in every `attachPinUi` mode, including
627
- * `'builtin'` (which renders the PIN natively AND still fires the event) —
628
- * it's only NEEDED for `'custom'` hosts, which must read it to build their
629
- * own surface.
630
- *
631
- * REPLAY SEMANTIC: RN events don't replay to listeners attached after they
632
- * fired, so a challenge that arrived before this call would otherwise be
633
- * invisible to it. If `start()` has already cached a still-live challenge,
634
- * `handler` is invoked synchronously, immediately, with that cached value —
635
- * `ttlMs` recomputed as the time REMAINING until its deadline, never the
636
- * original duration (review finding 4) — before this function returns, in
637
- * addition to firing on every later event. A cached challenge whose deadline
638
- * has already passed replays nothing (`attachChallengeReplayValue()` returns
639
- * null), matching the semantics of a challenge that was never cached at all.
640
- */
641
- declare function onAttachChallenge(handler: (challenge: CompanionAttachChallenge | null) => void): () => void;
531
+ declare function stop(): void;
532
+ /** @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture. */
533
+ declare function onRunning(_handler: (running: boolean) => void): () => void;
534
+ /** @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture. */
535
+ declare function onState(_handler: (state: CompanionState) => void): () => void;
536
+ /** @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture. */
537
+ declare function onPairUrl(_handler: (url: string | null) => void): () => void;
538
+ /** @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture. */
539
+ declare function onCode(_handler: (code: string | null) => void): () => void;
540
+ /** @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture. */
541
+ declare function onAttachedUserName(_handler: (name: string | null) => void): () => void;
542
+ /** @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture. */
543
+ declare function onResolvedName(_handler: (name: string | null) => void): () => void;
544
+ /** @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture. */
545
+ declare function onAttachChallenge(_handler: (challenge: CompanionAttachChallenge | null) => void): () => void;
642
546
  /**
643
- * React hook returning the latest `{ state, pairUrl, code, attachedUserName, attachChallenge }`
644
- * snapshot. Mounts one NativeEventEmitter subscription per value and tears
645
- * them all down on unmount.
646
- *
647
- * Subscribing is safe to tie to a component; the SESSION is not. Binding
648
- * `stop()` to unmount means the device stops advertising the moment the
649
- * screen goes away — including when the user navigates off to the dashboard
650
- * to attach to it — so prefer starting on mount and ending on an explicit
651
- * user action. `examples/react-native/src/screens/Companion.tsx` shows that
652
- * shape, with a module-scoped flag carrying the user's intent across mounts.
547
+ * Returns the idle Companion snapshot — the same object on every render.
653
548
  *
654
- * Note that `stop()` retains the last `state` and `pairUrl` rather than
655
- * clearing them, so a stopped session must be rendered from your own flag —
656
- * rendering off `state` alone leaves a dead QR on screen.
549
+ * @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture.
657
550
  */
658
551
  declare function useCompanion(): {
659
552
  state: CompanionState;
@@ -667,7 +560,6 @@ declare function useCompanion(): {
667
560
 
668
561
  type companion_CompanionAttachChallenge = CompanionAttachChallenge;
669
562
  type companion_CompanionState = CompanionState;
670
- declare const companion_getEmitter: typeof getEmitter;
671
563
  declare const companion_onAttachChallenge: typeof onAttachChallenge;
672
564
  declare const companion_onAttachedUserName: typeof onAttachedUserName;
673
565
  declare const companion_onCode: typeof onCode;
@@ -679,7 +571,7 @@ declare const companion_start: typeof start;
679
571
  declare const companion_stop: typeof stop;
680
572
  declare const companion_useCompanion: typeof useCompanion;
681
573
  declare namespace companion {
682
- 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 };
574
+ export { type companion_CompanionAttachChallenge as CompanionAttachChallenge, type companion_CompanionState as CompanionState, 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 };
683
575
  }
684
576
 
685
577
  /** Optional semantic metadata on an existing native host ref. Reporting works without it. */