@wireai/activation 0.9.1 → 0.10.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.
@@ -175,6 +175,17 @@ declare const makeSessionId: () => string;
175
175
  declare const reportClientEvents: (target: ClientEventTarget | undefined, events: ClientEvent[]) => void;
176
176
  /** Convenience single-event wrapper around {@link reportClientEvents}. */
177
177
  declare const reportClientEvent: (target: ClientEventTarget | undefined, event: ClientEvent) => void;
178
+ /**
179
+ * AWAITABLE sibling of {@link reportClientEvents}: POST one or more client events through the SAME
180
+ * `/v1/events` path, but resolve only once the server has RESPONDED — so a decision re-fetch fired
181
+ * immediately after is guaranteed to see the event in the session stream (this is the guarantee
182
+ * `wire.track` needs before it triggers decision revalidation). Never throws: a missing/invalid
183
+ * target, a missing `fetch`, a network error, or a non-2xx status all resolve to `false`. Resolves
184
+ * `true` only on a 2xx response.
185
+ */
186
+ declare const reportClientEventsAwait: (target: ClientEventTarget | undefined, events: ClientEvent[]) => Promise<boolean>;
187
+ /** Convenience single-event wrapper around {@link reportClientEventsAwait}. */
188
+ declare const reportClientEventAwait: (target: ClientEventTarget | undefined, event: ClientEvent) => Promise<boolean>;
178
189
 
179
190
  /** Transport + tenant config for the managed Wire AI onboarding backend (A2A). */
180
191
  type WireOnboardingConfig = {
@@ -391,6 +402,22 @@ type WireOnboardingProps = {
391
402
  * accounts mid-flow. Only meaningful with `storage`.
392
403
  */
393
404
  persistKey?: string;
405
+ /**
406
+ * OPT-IN: keep the persisted session seed alive ACROSS completion, so a multi-stage or
407
+ * replay-after-complete re-entry WITHIN one signup (typically a `key=` remount) resumes the
408
+ * SAME session instead of minting a fresh `metadata.sessionId` — which the backend would adopt
409
+ * as a second `contextId`, double-counting a `session_started` on the funnel.
410
+ *
411
+ * Default (omitted / `false`): a completion CLEARS the seed, so the next onboarding on this
412
+ * device starts fresh — the legacy single-stage behavior. Leave it unset and NOTHING changes.
413
+ *
414
+ * When `true`: the seed survives completion, and freshness for a genuinely new run is governed
415
+ * by the TTL (past `sessionTtlMs` → a fresh seed is minted) and an explicit new-run signal
416
+ * (scope a new `persistKey`, e.g. a per-signup id, to force a fresh seed within the TTL).
417
+ *
418
+ * Only meaningful with `storage`. Dropped/degraded sessions are unaffected (they never clear).
419
+ */
420
+ retainSessionOnComplete?: boolean;
394
421
  };
395
422
  /** Backend-supplied progress, read off `response.props.progress` when present. */
396
423
  type OnboardingProgress = {
@@ -665,7 +692,7 @@ interface ResolveUserContextOptions {
665
692
  declare const resolveUserContext: (ctx?: WireUserContext, opts?: ResolveUserContextOptions) => ResolvedUserContext;
666
693
 
667
694
  /**
668
- * currentSession — a tiny module-level registry of the CURRENT per-open `session_id`.
695
+ * currentSession — a tiny registry of the CURRENT per-open `session_id`.
669
696
  *
670
697
  * WHY it exists (kills the phantom-session): the per-open emitters (`reportSessionStart` and the
671
698
  * `useSessionStart` / `useLifecycleEvents` hooks) mint a fresh `session_id` for each app-open and
@@ -678,8 +705,26 @@ declare const resolveUserContext: (ctx?: WireUserContext, opts?: ResolveUserCont
678
705
  * server already ingested. `reportSessionStart` writes the current id here on every open; the façade
679
706
  * reads it so `identify`/app-events correlate to the real session instead of minting a phantom.
680
707
  *
681
- * DEPENDENCY-FREE + PROCESS-LOCAL: a plain module variable. It is intentionally NOT persisted — it
682
- * tracks the CURRENT process's open, and a fresh open always overwrites it. No cross-launch state.
708
+ * ── WHY A globalThis SLOT, NOT A PLAIN MODULE VARIABLE ────────────────────────────────────────
709
+ * This module is exported from TWO package entry points the main `.` bundle (`src/index.ts`) and
710
+ * the `./analytics` subpath (`src/analytics/index.ts`). Under `dist` resolution (node `import`/
711
+ * `require`, which is how tests, SSR and some tooling load the kit) tsup inlines a SEPARATE copy of
712
+ * this module into each bundle, so a plain `let` would give the SETTER (reached via `.` →
713
+ * `reportSessionStart`) and the READER (reached via `./analytics` → façade / `userIdentity`) TWO
714
+ * different variables: the reader would see `undefined` even after an open set the id, and gating
715
+ * would fire under a null session id. On-device this was masked only because Metro's `react-native`
716
+ * export condition resolves both subpaths back to this one `src/` file (a single instance) — a
717
+ * bundler accident, not a guarantee.
718
+ *
719
+ * The bundler-agnostic fix: keep the ONE live value in a well-known `globalThis` slot keyed by a
720
+ * `Symbol.for(...)`. `Symbol.for` uses the runtime-global symbol registry, so every inlined copy of
721
+ * this module resolves the SAME symbol and reads/writes the SAME slot — one identity no matter how
722
+ * many times the module is duplicated across bundles. `globalThis` is present and identical in
723
+ * Hermes/React Native, Node and SSR (we never touch `window`), so this is safe on every host.
724
+ *
725
+ * PROCESS-LOCAL, NOT PERSISTED: the slot lives on the runtime global, so it tracks the CURRENT
726
+ * process's open and a fresh open overwrites it. There is no cross-launch state.
727
+ * `resetCurrentSessionId` clears the slot so a unit test starts from a clean registry.
683
728
  */
684
729
  /**
685
730
  * Record the current per-open `session_id`. Called by `reportSessionStart` when it emits an
@@ -691,4 +736,4 @@ declare const getCurrentSessionId: () => string | undefined;
691
736
  /** Test-only: forget the current session id so a unit test starts from a clean registry. */
692
737
  declare const resetCurrentSessionId: () => void;
693
738
 
694
- export { type AnalyticsEvent as A, collectDeviceContext as B, type ClientEvent as C, type DeviceContext as D, type EventQueueOptions as E, hashEmailFnv1a as F, isWireScalar as G, namespaceExtra as H, resolveUserContext as I, type OnboardingResult as O, RESERVED_USER_CONTEXT_KEYS as R, type StepValidator as S, type WireUserContext as W, type ClientEventTarget as a, type ClientEventType as b, type ContextEnvelope as c, type ContextEnvelopeInput as d, type EnvelopeSource as e, type EventQueue as f, WIRE_ONBOARDING_EVENTS as g, type WireOnboardingEventName as h, buildContextEnvelope as i, createEventQueue as j, getCurrentSessionId as k, reportClientEvents as l, makeSessionId as m, resetCurrentSessionId as n, type WireOnboardingProps as o, type WireOnboardingConfig as p, type OnboardingEvent as q, reportClientEvent as r, setCurrentSessionId as s, toAnalyticsEvent as t, type OnboardingCopy as u, type DeviceFormFactor as v, EXTRA_KEY_PREFIX as w, type OnboardingProgress as x, type ResolveUserContextOptions as y, type ResolvedUserContext as z };
739
+ export { type AnalyticsEvent as A, type ResolveUserContextOptions as B, type ClientEvent as C, type DeviceContext as D, type EventQueueOptions as E, type ResolvedUserContext as F, collectDeviceContext as G, hashEmailFnv1a as H, isWireScalar as I, namespaceExtra as J, resolveUserContext as K, type OnboardingResult as O, RESERVED_USER_CONTEXT_KEYS as R, type StepValidator as S, type WireUserContext as W, type ClientEventTarget as a, type ClientEventType as b, type ContextEnvelope as c, type ContextEnvelopeInput as d, type EnvelopeSource as e, type EventQueue as f, WIRE_ONBOARDING_EVENTS as g, type WireOnboardingEventName as h, buildContextEnvelope as i, createEventQueue as j, getCurrentSessionId as k, reportClientEventAwait as l, makeSessionId as m, reportClientEvents as n, reportClientEventsAwait as o, resetCurrentSessionId as p, type WireOnboardingProps as q, reportClientEvent as r, setCurrentSessionId as s, toAnalyticsEvent as t, type WireOnboardingConfig as u, type OnboardingEvent as v, type OnboardingCopy as w, type DeviceFormFactor as x, EXTRA_KEY_PREFIX as y, type OnboardingProgress as z };
@@ -175,6 +175,17 @@ declare const makeSessionId: () => string;
175
175
  declare const reportClientEvents: (target: ClientEventTarget | undefined, events: ClientEvent[]) => void;
176
176
  /** Convenience single-event wrapper around {@link reportClientEvents}. */
177
177
  declare const reportClientEvent: (target: ClientEventTarget | undefined, event: ClientEvent) => void;
178
+ /**
179
+ * AWAITABLE sibling of {@link reportClientEvents}: POST one or more client events through the SAME
180
+ * `/v1/events` path, but resolve only once the server has RESPONDED — so a decision re-fetch fired
181
+ * immediately after is guaranteed to see the event in the session stream (this is the guarantee
182
+ * `wire.track` needs before it triggers decision revalidation). Never throws: a missing/invalid
183
+ * target, a missing `fetch`, a network error, or a non-2xx status all resolve to `false`. Resolves
184
+ * `true` only on a 2xx response.
185
+ */
186
+ declare const reportClientEventsAwait: (target: ClientEventTarget | undefined, events: ClientEvent[]) => Promise<boolean>;
187
+ /** Convenience single-event wrapper around {@link reportClientEventsAwait}. */
188
+ declare const reportClientEventAwait: (target: ClientEventTarget | undefined, event: ClientEvent) => Promise<boolean>;
178
189
 
179
190
  /** Transport + tenant config for the managed Wire AI onboarding backend (A2A). */
180
191
  type WireOnboardingConfig = {
@@ -391,6 +402,22 @@ type WireOnboardingProps = {
391
402
  * accounts mid-flow. Only meaningful with `storage`.
392
403
  */
393
404
  persistKey?: string;
405
+ /**
406
+ * OPT-IN: keep the persisted session seed alive ACROSS completion, so a multi-stage or
407
+ * replay-after-complete re-entry WITHIN one signup (typically a `key=` remount) resumes the
408
+ * SAME session instead of minting a fresh `metadata.sessionId` — which the backend would adopt
409
+ * as a second `contextId`, double-counting a `session_started` on the funnel.
410
+ *
411
+ * Default (omitted / `false`): a completion CLEARS the seed, so the next onboarding on this
412
+ * device starts fresh — the legacy single-stage behavior. Leave it unset and NOTHING changes.
413
+ *
414
+ * When `true`: the seed survives completion, and freshness for a genuinely new run is governed
415
+ * by the TTL (past `sessionTtlMs` → a fresh seed is minted) and an explicit new-run signal
416
+ * (scope a new `persistKey`, e.g. a per-signup id, to force a fresh seed within the TTL).
417
+ *
418
+ * Only meaningful with `storage`. Dropped/degraded sessions are unaffected (they never clear).
419
+ */
420
+ retainSessionOnComplete?: boolean;
394
421
  };
395
422
  /** Backend-supplied progress, read off `response.props.progress` when present. */
396
423
  type OnboardingProgress = {
@@ -665,7 +692,7 @@ interface ResolveUserContextOptions {
665
692
  declare const resolveUserContext: (ctx?: WireUserContext, opts?: ResolveUserContextOptions) => ResolvedUserContext;
666
693
 
667
694
  /**
668
- * currentSession — a tiny module-level registry of the CURRENT per-open `session_id`.
695
+ * currentSession — a tiny registry of the CURRENT per-open `session_id`.
669
696
  *
670
697
  * WHY it exists (kills the phantom-session): the per-open emitters (`reportSessionStart` and the
671
698
  * `useSessionStart` / `useLifecycleEvents` hooks) mint a fresh `session_id` for each app-open and
@@ -678,8 +705,26 @@ declare const resolveUserContext: (ctx?: WireUserContext, opts?: ResolveUserCont
678
705
  * server already ingested. `reportSessionStart` writes the current id here on every open; the façade
679
706
  * reads it so `identify`/app-events correlate to the real session instead of minting a phantom.
680
707
  *
681
- * DEPENDENCY-FREE + PROCESS-LOCAL: a plain module variable. It is intentionally NOT persisted — it
682
- * tracks the CURRENT process's open, and a fresh open always overwrites it. No cross-launch state.
708
+ * ── WHY A globalThis SLOT, NOT A PLAIN MODULE VARIABLE ────────────────────────────────────────
709
+ * This module is exported from TWO package entry points the main `.` bundle (`src/index.ts`) and
710
+ * the `./analytics` subpath (`src/analytics/index.ts`). Under `dist` resolution (node `import`/
711
+ * `require`, which is how tests, SSR and some tooling load the kit) tsup inlines a SEPARATE copy of
712
+ * this module into each bundle, so a plain `let` would give the SETTER (reached via `.` →
713
+ * `reportSessionStart`) and the READER (reached via `./analytics` → façade / `userIdentity`) TWO
714
+ * different variables: the reader would see `undefined` even after an open set the id, and gating
715
+ * would fire under a null session id. On-device this was masked only because Metro's `react-native`
716
+ * export condition resolves both subpaths back to this one `src/` file (a single instance) — a
717
+ * bundler accident, not a guarantee.
718
+ *
719
+ * The bundler-agnostic fix: keep the ONE live value in a well-known `globalThis` slot keyed by a
720
+ * `Symbol.for(...)`. `Symbol.for` uses the runtime-global symbol registry, so every inlined copy of
721
+ * this module resolves the SAME symbol and reads/writes the SAME slot — one identity no matter how
722
+ * many times the module is duplicated across bundles. `globalThis` is present and identical in
723
+ * Hermes/React Native, Node and SSR (we never touch `window`), so this is safe on every host.
724
+ *
725
+ * PROCESS-LOCAL, NOT PERSISTED: the slot lives on the runtime global, so it tracks the CURRENT
726
+ * process's open and a fresh open overwrites it. There is no cross-launch state.
727
+ * `resetCurrentSessionId` clears the slot so a unit test starts from a clean registry.
683
728
  */
684
729
  /**
685
730
  * Record the current per-open `session_id`. Called by `reportSessionStart` when it emits an
@@ -691,4 +736,4 @@ declare const getCurrentSessionId: () => string | undefined;
691
736
  /** Test-only: forget the current session id so a unit test starts from a clean registry. */
692
737
  declare const resetCurrentSessionId: () => void;
693
738
 
694
- export { type AnalyticsEvent as A, collectDeviceContext as B, type ClientEvent as C, type DeviceContext as D, type EventQueueOptions as E, hashEmailFnv1a as F, isWireScalar as G, namespaceExtra as H, resolveUserContext as I, type OnboardingResult as O, RESERVED_USER_CONTEXT_KEYS as R, type StepValidator as S, type WireUserContext as W, type ClientEventTarget as a, type ClientEventType as b, type ContextEnvelope as c, type ContextEnvelopeInput as d, type EnvelopeSource as e, type EventQueue as f, WIRE_ONBOARDING_EVENTS as g, type WireOnboardingEventName as h, buildContextEnvelope as i, createEventQueue as j, getCurrentSessionId as k, reportClientEvents as l, makeSessionId as m, resetCurrentSessionId as n, type WireOnboardingProps as o, type WireOnboardingConfig as p, type OnboardingEvent as q, reportClientEvent as r, setCurrentSessionId as s, toAnalyticsEvent as t, type OnboardingCopy as u, type DeviceFormFactor as v, EXTRA_KEY_PREFIX as w, type OnboardingProgress as x, type ResolveUserContextOptions as y, type ResolvedUserContext as z };
739
+ export { type AnalyticsEvent as A, type ResolveUserContextOptions as B, type ClientEvent as C, type DeviceContext as D, type EventQueueOptions as E, type ResolvedUserContext as F, collectDeviceContext as G, hashEmailFnv1a as H, isWireScalar as I, namespaceExtra as J, resolveUserContext as K, type OnboardingResult as O, RESERVED_USER_CONTEXT_KEYS as R, type StepValidator as S, type WireUserContext as W, type ClientEventTarget as a, type ClientEventType as b, type ContextEnvelope as c, type ContextEnvelopeInput as d, type EnvelopeSource as e, type EventQueue as f, WIRE_ONBOARDING_EVENTS as g, type WireOnboardingEventName as h, buildContextEnvelope as i, createEventQueue as j, getCurrentSessionId as k, reportClientEventAwait as l, makeSessionId as m, reportClientEvents as n, reportClientEventsAwait as o, resetCurrentSessionId as p, type WireOnboardingProps as q, reportClientEvent as r, setCurrentSessionId as s, toAnalyticsEvent as t, type WireOnboardingConfig as u, type OnboardingEvent as v, type OnboardingCopy as w, type DeviceFormFactor as x, EXTRA_KEY_PREFIX as y, type OnboardingProgress as z };
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { ReactNode } from 'react';
3
- import { o as WireOnboardingProps, p as WireOnboardingConfig, O as OnboardingResult, S as StepValidator, q as OnboardingEvent, u as OnboardingCopy, a as ClientEventTarget, D as DeviceContext, C as ClientEvent, e as EnvelopeSource } from './currentSession-Bs2JfTJ8.mjs';
4
- export { A as AnalyticsEvent, b as ClientEventType, v as DeviceFormFactor, w as EXTRA_KEY_PREFIX, x as OnboardingProgress, R as RESERVED_USER_CONTEXT_KEYS, y as ResolveUserContextOptions, z as ResolvedUserContext, g as WIRE_ONBOARDING_EVENTS, h as WireOnboardingEventName, W as WireUserContext, B as collectDeviceContext, k as getCurrentSessionId, F as hashEmailFnv1a, G as isWireScalar, m as makeSessionId, H as namespaceExtra, r as reportClientEvent, l as reportClientEvents, n as resetCurrentSessionId, I as resolveUserContext, s as setCurrentSessionId, t as toAnalyticsEvent } from './currentSession-Bs2JfTJ8.mjs';
3
+ import { q as WireOnboardingProps, u as WireOnboardingConfig, O as OnboardingResult, S as StepValidator, v as OnboardingEvent, w as OnboardingCopy, a as ClientEventTarget, D as DeviceContext, W as WireUserContext, C as ClientEvent, e as EnvelopeSource } from './currentSession-DdDkprpM.mjs';
4
+ export { A as AnalyticsEvent, b as ClientEventType, x as DeviceFormFactor, y as EXTRA_KEY_PREFIX, z as OnboardingProgress, R as RESERVED_USER_CONTEXT_KEYS, B as ResolveUserContextOptions, F as ResolvedUserContext, g as WIRE_ONBOARDING_EVENTS, h as WireOnboardingEventName, G as collectDeviceContext, k as getCurrentSessionId, H as hashEmailFnv1a, I as isWireScalar, m as makeSessionId, J as namespaceExtra, r as reportClientEvent, l as reportClientEventAwait, n as reportClientEvents, o as reportClientEventsAwait, p as resetCurrentSessionId, K as resolveUserContext, s as setCurrentSessionId, t as toAnalyticsEvent } from './currentSession-DdDkprpM.mjs';
5
5
  import { O as OnboardingTheme } from './types-BKfpdZzX.mjs';
6
6
  export { a as OnboardingButtonStyle, b as OnboardingColors, c as OnboardingFonts, d as OnboardingRadius, e as OnboardingSpacing } from './types-BKfpdZzX.mjs';
7
7
  export { C as CenteredModal, a as CenteredModalHandle, b as CenteredModalProps } from './CenteredModal-C3qQBHsA.mjs';
@@ -1513,6 +1513,119 @@ declare const deviceIdStorageKey: (appId?: string) => string;
1513
1513
  */
1514
1514
  declare const mintDeviceId: () => string;
1515
1515
 
1516
+ /**
1517
+ * Tenant transport + context inputs for {@link createWireActivation}. `serverUrl`/`apiKey` are the
1518
+ * SAME creds as onboarding (never a second key); everything else is optional.
1519
+ */
1520
+ type WireActivationConfig = {
1521
+ /** Base server URL (same as `WireOnboardingConfig.serverUrl`); `/v1/events` is appended. */
1522
+ serverUrl: string;
1523
+ /** Tenant API key; sent as `Authorization: Bearer`. */
1524
+ apiKey: string;
1525
+ /**
1526
+ * A stable, non-PII device id → `user_context.device_key` (the server's review/questionnaire
1527
+ * gating + A/B stickiness key on it). When omitted, the kit auto-mints ONE per-install id, persists
1528
+ * it via `storage` when given, and reuses it — so `device_key` is ALWAYS present. Host-supplied wins.
1529
+ */
1530
+ deviceKey?: string;
1531
+ /**
1532
+ * Optional rich context stamped onto every tracked event's `user_context` (opaque `userId` →
1533
+ * top-level `user_id`, opt-in `userEmail`, namespaced `extra`). `deviceKey` here is equivalent to
1534
+ * the top-level one (top-level wins). Same shape the analytics façade accepts.
1535
+ */
1536
+ userContext?: WireUserContext;
1537
+ /** Tenant/app id — namespaces the auto-minted device-key storage slot. */
1538
+ appId?: string;
1539
+ /** Host app version → `user_context.app_version` when no explicit `userContext.appVersion` is set. */
1540
+ appVersion?: string;
1541
+ /** Host persistence (AsyncStorage-compatible subset) so the auto-minted device key survives launches. */
1542
+ storage?: WireOnboardingStorage;
1543
+ };
1544
+ /** The kit-owned activation surface. `sessionId` is a live getter (reads `getCurrentSessionId()`). */
1545
+ type WireActivation = {
1546
+ /**
1547
+ * Awaitable action report: POST `event_type='app_event'`, `question_key=<name>`, optional `meta`,
1548
+ * under the CURRENT session id + `user_context.device_key`. Resolves `true` once the server has
1549
+ * stored it (2xx) and THEN bumps decision revalidation; resolves `false` (no bump) when there is no
1550
+ * current session, a blank name, or the POST fails. Never throws.
1551
+ */
1552
+ track(name: string, meta?: Record<string, unknown>): Promise<boolean>;
1553
+ /** The CURRENT per-open session id (the kit's canonical `getCurrentSessionId()`), or `undefined`. */
1554
+ readonly sessionId: string | undefined;
1555
+ /** Subscribe to decision revalidation (bumped by a successful `track`). Returns an unsubscribe fn. */
1556
+ subscribeRevalidation(listener: () => void): () => void;
1557
+ /** The current revalidation version — include in a decision-fetch effect's deps to re-fetch on bump. */
1558
+ getRevalidationVersion(): number;
1559
+ };
1560
+ /**
1561
+ * Create a bound activation instance for a tenant transport. Resolves the device key once (explicit >
1562
+ * `userContext.deviceKey` > auto-minted + persisted). Pure + React-free.
1563
+ */
1564
+ declare const createWireActivation: (config: WireActivationConfig) => WireActivation;
1565
+
1566
+ /**
1567
+ * Subscribe a component to decision revalidation. Returns the current version; list it in a
1568
+ * decision-fetch effect's deps so a `bumpActivationRevalidation()` (which a successful `track` does)
1569
+ * re-runs the fetch. The kit-owned replacement for a host's hand-rolled `useActivationRevalidation`.
1570
+ */
1571
+ declare const useActivationRevalidation: () => number;
1572
+ /** What {@link useWireActivation} returns: the awaitable `track`, the live `sessionId`, and the tick. */
1573
+ type UseWireActivation = {
1574
+ /** Awaitable action report that auto-revalidates on success (see {@link WireActivation.track}). */
1575
+ track: WireActivation["track"];
1576
+ /** The CURRENT per-open session id (read fresh each render), or `undefined`. */
1577
+ sessionId: string | undefined;
1578
+ /** Monotonic counter that increments on every successful `track()` — a re-fetch trigger. */
1579
+ revalidation: number;
1580
+ };
1581
+ /**
1582
+ * Build a per-mount activation instance. `config` is read once at first render (the instance is
1583
+ * stable for the component's lifetime, keyed on the transport creds + device key); the returned
1584
+ * `revalidation` re-renders the component whenever any `track()` succeeds.
1585
+ */
1586
+ declare const useWireActivation: (config: WireActivationConfig) => UseWireActivation;
1587
+
1588
+ /**
1589
+ * activation revalidation — a tiny kit-owned pub/sub the review / questionnaire decision fetches
1590
+ * subscribe to, so they RE-FETCH their server decision AFTER a trigger action, not only on mount.
1591
+ *
1592
+ * WHY THIS EXISTS (subsumes Morrow's hand-rolled `activation-revalidation.ts`): a host mounts the
1593
+ * review / questionnaire gate on the home screen and fetches its `/decision` verdict once, in a
1594
+ * mount-scoped effect. But the screen stays mounted while the user goes elsewhere to perform the
1595
+ * triggering action (journal a win, complete a task); the server's firing rule is trigger-based AND
1596
+ * session-scoped, so the mount fetch ran BEFORE the trigger event existed and never re-runs. Bumping
1597
+ * this store after the action POSTs re-runs the gate's decision fetch (it lists the version in its
1598
+ * deps) → the server now sees the trigger → `{fire:true}`.
1599
+ *
1600
+ * `wire.track()` bumps this automatically on a successful POST, so a consumer no longer hand-rolls
1601
+ * an await-then-bump: it subscribes (via {@link useActivationRevalidation} in `useWireActivation`)
1602
+ * and re-fetches when the version changes.
1603
+ *
1604
+ * ── WHY A globalThis SLOT, NOT MODULE-LOCAL STATE (same reasoning as currentSession) ─────────────
1605
+ * This module can be reached from more than one package entry (the main `.` barrel exposes the
1606
+ * revalidation surface; the gates live under the `./reviews` / `./questionnaire` subpaths). Under
1607
+ * `dist` resolution tsup inlines a SEPARATE copy of a module into each bundle, so plain module-local
1608
+ * `version` + `listeners` would give the BUMPER (main entry, via `wire.track`) and a SUBSCRIBER a
1609
+ * different store — the bump would never reach the listener, exactly the defect-B failure mode. So
1610
+ * the ONE store lives in a `globalThis` slot keyed by `Symbol.for(...)`: every inlined copy resolves
1611
+ * the same symbol and shares one store, on Hermes/RN, Node and SSR alike.
1612
+ */
1613
+ /**
1614
+ * Signal every activation subscriber to re-fetch its server decision. `wire.track()` calls this on a
1615
+ * successful POST (await the post first so the re-fetch sees the event). A throwing subscriber never
1616
+ * breaks the notify loop — each listener is isolated.
1617
+ */
1618
+ declare const bumpActivationRevalidation: () => void;
1619
+ /**
1620
+ * Subscribe to revalidation. Returns an unsubscribe fn. Shaped for `useSyncExternalStore`
1621
+ * (see {@link useActivationRevalidation} in `useWireActivation`).
1622
+ */
1623
+ declare const subscribeActivationRevalidation: (listener: () => void) => (() => void);
1624
+ /** The current revalidation version — include it in a decision-fetch effect's deps to re-fetch on bump. */
1625
+ declare const getActivationRevalidationVersion: () => number;
1626
+ /** Test-only: reset the shared store between cases (clears version + listeners). */
1627
+ declare const resetActivationRevalidation: () => void;
1628
+
1516
1629
  /** The canonical event name for an app-open. A trigger keys off this exact string. */
1517
1630
  declare const SESSION_STARTED_EVENT: "app.session_started";
1518
1631
  /** Options for {@link reportSessionStart}. Everything except `target` is optional so a pre-auth
@@ -1739,4 +1852,4 @@ interface UseLifecycleEventsOptions {
1739
1852
  */
1740
1853
  declare const useLifecycleEvents: (config: LifecycleConfig | undefined, options?: UseLifecycleEventsOptions) => void;
1741
1854
 
1742
- export { AUTO_DEVICE_ID_PREFIX, AnimatedSparkle, BACKGROUND_SESSION_MS, type CachedFeatures, CardGridSelectCard, CardHandoff, type CardHandoffProps, type CardHandoffVariant, type CardOption, ChipSelectCard, ClientEvent, ClientEventTarget, CompletionView, DEFAULT_FEATURES_TTL_MS, DemoOnboarding, type DemoOnboardingProps, DeviceContext, DoneBlock, ErrorBlock, FIRST_OPEN_EVENT, IconRegistryProvider, type IdentifyOnboardingOptions, IllustrationProvider, type IllustrationRegistry, InterstitialCard, type LifecycleConfig, type LifecycleEventInput, LoadingBlock, LoadingScreen, NumberStepperCard, type OnboardingAttribution, Button as OnboardingButton, OnboardingCopy, OnboardingEvent, type OnboardingFlagOptions, OnboardingFlow, OnboardingResult, OnboardingScaffold, OnboardingTheme, OnboardingThemeProvider, type ReportFirstOpenOptions, type ReportSessionStartOptions, type ResolveFeaturesOptions, SESSION_STARTED_EVENT, SelectionCard, type SessionStartConfig, StatusCard, StepProgress, StepValidator, TextInputCard, type ThemeFromBrandInput, USER_ID_MAX_LENGTH, type UseLifecycleEventsOptions, type UseSessionStartOptions, WIRE_ICON_GLYPHS, WIRE_ICON_NAMES, type WireConfigOverrides, WireFeatures, WireFeaturesConfig, WireFeaturesProvider, type WireFeaturesProviderProps, WireIcon, type WireIconFamily, type WireIconGlyph, type WireIconName, type WireIconProps, type WireIconRegistry, type WireLifecycleOptions, WireOnboarding, WireOnboardingConfig, WireOnboardingProps, WireOnboardingStorage, attributionMetadata, defaultIllustrations, defaultOnboardingTheme, defaultWireFeatures, deriveAnswers, detectAppVersion, detectNativeModel, deviceIdStorageKey, featuresCacheKey, featuresEqual, fetchWireFeatures, firstOpenStorageKey, identifyOnboarding, isFeaturesFresh, isOnboardingEnabled, lookupIconGlyph, mergeTheme, mintDeviceId, motionSpec, onboardingComponents, parseWireFeatures, readCachedFeatures, readProgress, reportFirstOpen, reportSessionStart, resetFirstOpenLatch, resetSessionStartGuard, sanitizeUserId, themeFromBrand, useHostIcon, useIllustration, useLifecycleEvents, useOnboardingTheme, useReducedMotion, useResolvedFeatures, useSessionStart, useWireFeatures, useWireFeaturesContext, wireConfigFromEnv, wireLifecycleEvents, writeCachedFeatures };
1855
+ export { AUTO_DEVICE_ID_PREFIX, AnimatedSparkle, BACKGROUND_SESSION_MS, type CachedFeatures, CardGridSelectCard, CardHandoff, type CardHandoffProps, type CardHandoffVariant, type CardOption, ChipSelectCard, ClientEvent, ClientEventTarget, CompletionView, DEFAULT_FEATURES_TTL_MS, DemoOnboarding, type DemoOnboardingProps, DeviceContext, DoneBlock, ErrorBlock, FIRST_OPEN_EVENT, IconRegistryProvider, type IdentifyOnboardingOptions, IllustrationProvider, type IllustrationRegistry, InterstitialCard, type LifecycleConfig, type LifecycleEventInput, LoadingBlock, LoadingScreen, NumberStepperCard, type OnboardingAttribution, Button as OnboardingButton, OnboardingCopy, OnboardingEvent, type OnboardingFlagOptions, OnboardingFlow, OnboardingResult, OnboardingScaffold, OnboardingTheme, OnboardingThemeProvider, type ReportFirstOpenOptions, type ReportSessionStartOptions, type ResolveFeaturesOptions, SESSION_STARTED_EVENT, SelectionCard, type SessionStartConfig, StatusCard, StepProgress, StepValidator, TextInputCard, type ThemeFromBrandInput, USER_ID_MAX_LENGTH, type UseLifecycleEventsOptions, type UseSessionStartOptions, type UseWireActivation, WIRE_ICON_GLYPHS, WIRE_ICON_NAMES, type WireActivation, type WireActivationConfig, type WireConfigOverrides, WireFeatures, WireFeaturesConfig, WireFeaturesProvider, type WireFeaturesProviderProps, WireIcon, type WireIconFamily, type WireIconGlyph, type WireIconName, type WireIconProps, type WireIconRegistry, type WireLifecycleOptions, WireOnboarding, WireOnboardingConfig, WireOnboardingProps, WireOnboardingStorage, WireUserContext, attributionMetadata, bumpActivationRevalidation, createWireActivation, defaultIllustrations, defaultOnboardingTheme, defaultWireFeatures, deriveAnswers, detectAppVersion, detectNativeModel, deviceIdStorageKey, featuresCacheKey, featuresEqual, fetchWireFeatures, firstOpenStorageKey, getActivationRevalidationVersion, identifyOnboarding, isFeaturesFresh, isOnboardingEnabled, lookupIconGlyph, mergeTheme, mintDeviceId, motionSpec, onboardingComponents, parseWireFeatures, readCachedFeatures, readProgress, reportFirstOpen, reportSessionStart, resetActivationRevalidation, resetFirstOpenLatch, resetSessionStartGuard, sanitizeUserId, subscribeActivationRevalidation, themeFromBrand, useActivationRevalidation, useHostIcon, useIllustration, useLifecycleEvents, useOnboardingTheme, useReducedMotion, useResolvedFeatures, useSessionStart, useWireActivation, useWireFeatures, useWireFeaturesContext, wireConfigFromEnv, wireLifecycleEvents, writeCachedFeatures };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { ReactNode } from 'react';
3
- import { o as WireOnboardingProps, p as WireOnboardingConfig, O as OnboardingResult, S as StepValidator, q as OnboardingEvent, u as OnboardingCopy, a as ClientEventTarget, D as DeviceContext, C as ClientEvent, e as EnvelopeSource } from './currentSession-61dcm3V-.js';
4
- export { A as AnalyticsEvent, b as ClientEventType, v as DeviceFormFactor, w as EXTRA_KEY_PREFIX, x as OnboardingProgress, R as RESERVED_USER_CONTEXT_KEYS, y as ResolveUserContextOptions, z as ResolvedUserContext, g as WIRE_ONBOARDING_EVENTS, h as WireOnboardingEventName, W as WireUserContext, B as collectDeviceContext, k as getCurrentSessionId, F as hashEmailFnv1a, G as isWireScalar, m as makeSessionId, H as namespaceExtra, r as reportClientEvent, l as reportClientEvents, n as resetCurrentSessionId, I as resolveUserContext, s as setCurrentSessionId, t as toAnalyticsEvent } from './currentSession-61dcm3V-.js';
3
+ import { q as WireOnboardingProps, u as WireOnboardingConfig, O as OnboardingResult, S as StepValidator, v as OnboardingEvent, w as OnboardingCopy, a as ClientEventTarget, D as DeviceContext, W as WireUserContext, C as ClientEvent, e as EnvelopeSource } from './currentSession-D0Vq7_VE.js';
4
+ export { A as AnalyticsEvent, b as ClientEventType, x as DeviceFormFactor, y as EXTRA_KEY_PREFIX, z as OnboardingProgress, R as RESERVED_USER_CONTEXT_KEYS, B as ResolveUserContextOptions, F as ResolvedUserContext, g as WIRE_ONBOARDING_EVENTS, h as WireOnboardingEventName, G as collectDeviceContext, k as getCurrentSessionId, H as hashEmailFnv1a, I as isWireScalar, m as makeSessionId, J as namespaceExtra, r as reportClientEvent, l as reportClientEventAwait, n as reportClientEvents, o as reportClientEventsAwait, p as resetCurrentSessionId, K as resolveUserContext, s as setCurrentSessionId, t as toAnalyticsEvent } from './currentSession-D0Vq7_VE.js';
5
5
  import { O as OnboardingTheme } from './types-BKfpdZzX.js';
6
6
  export { a as OnboardingButtonStyle, b as OnboardingColors, c as OnboardingFonts, d as OnboardingRadius, e as OnboardingSpacing } from './types-BKfpdZzX.js';
7
7
  export { C as CenteredModal, a as CenteredModalHandle, b as CenteredModalProps } from './CenteredModal-Cdgns6--.js';
@@ -1513,6 +1513,119 @@ declare const deviceIdStorageKey: (appId?: string) => string;
1513
1513
  */
1514
1514
  declare const mintDeviceId: () => string;
1515
1515
 
1516
+ /**
1517
+ * Tenant transport + context inputs for {@link createWireActivation}. `serverUrl`/`apiKey` are the
1518
+ * SAME creds as onboarding (never a second key); everything else is optional.
1519
+ */
1520
+ type WireActivationConfig = {
1521
+ /** Base server URL (same as `WireOnboardingConfig.serverUrl`); `/v1/events` is appended. */
1522
+ serverUrl: string;
1523
+ /** Tenant API key; sent as `Authorization: Bearer`. */
1524
+ apiKey: string;
1525
+ /**
1526
+ * A stable, non-PII device id → `user_context.device_key` (the server's review/questionnaire
1527
+ * gating + A/B stickiness key on it). When omitted, the kit auto-mints ONE per-install id, persists
1528
+ * it via `storage` when given, and reuses it — so `device_key` is ALWAYS present. Host-supplied wins.
1529
+ */
1530
+ deviceKey?: string;
1531
+ /**
1532
+ * Optional rich context stamped onto every tracked event's `user_context` (opaque `userId` →
1533
+ * top-level `user_id`, opt-in `userEmail`, namespaced `extra`). `deviceKey` here is equivalent to
1534
+ * the top-level one (top-level wins). Same shape the analytics façade accepts.
1535
+ */
1536
+ userContext?: WireUserContext;
1537
+ /** Tenant/app id — namespaces the auto-minted device-key storage slot. */
1538
+ appId?: string;
1539
+ /** Host app version → `user_context.app_version` when no explicit `userContext.appVersion` is set. */
1540
+ appVersion?: string;
1541
+ /** Host persistence (AsyncStorage-compatible subset) so the auto-minted device key survives launches. */
1542
+ storage?: WireOnboardingStorage;
1543
+ };
1544
+ /** The kit-owned activation surface. `sessionId` is a live getter (reads `getCurrentSessionId()`). */
1545
+ type WireActivation = {
1546
+ /**
1547
+ * Awaitable action report: POST `event_type='app_event'`, `question_key=<name>`, optional `meta`,
1548
+ * under the CURRENT session id + `user_context.device_key`. Resolves `true` once the server has
1549
+ * stored it (2xx) and THEN bumps decision revalidation; resolves `false` (no bump) when there is no
1550
+ * current session, a blank name, or the POST fails. Never throws.
1551
+ */
1552
+ track(name: string, meta?: Record<string, unknown>): Promise<boolean>;
1553
+ /** The CURRENT per-open session id (the kit's canonical `getCurrentSessionId()`), or `undefined`. */
1554
+ readonly sessionId: string | undefined;
1555
+ /** Subscribe to decision revalidation (bumped by a successful `track`). Returns an unsubscribe fn. */
1556
+ subscribeRevalidation(listener: () => void): () => void;
1557
+ /** The current revalidation version — include in a decision-fetch effect's deps to re-fetch on bump. */
1558
+ getRevalidationVersion(): number;
1559
+ };
1560
+ /**
1561
+ * Create a bound activation instance for a tenant transport. Resolves the device key once (explicit >
1562
+ * `userContext.deviceKey` > auto-minted + persisted). Pure + React-free.
1563
+ */
1564
+ declare const createWireActivation: (config: WireActivationConfig) => WireActivation;
1565
+
1566
+ /**
1567
+ * Subscribe a component to decision revalidation. Returns the current version; list it in a
1568
+ * decision-fetch effect's deps so a `bumpActivationRevalidation()` (which a successful `track` does)
1569
+ * re-runs the fetch. The kit-owned replacement for a host's hand-rolled `useActivationRevalidation`.
1570
+ */
1571
+ declare const useActivationRevalidation: () => number;
1572
+ /** What {@link useWireActivation} returns: the awaitable `track`, the live `sessionId`, and the tick. */
1573
+ type UseWireActivation = {
1574
+ /** Awaitable action report that auto-revalidates on success (see {@link WireActivation.track}). */
1575
+ track: WireActivation["track"];
1576
+ /** The CURRENT per-open session id (read fresh each render), or `undefined`. */
1577
+ sessionId: string | undefined;
1578
+ /** Monotonic counter that increments on every successful `track()` — a re-fetch trigger. */
1579
+ revalidation: number;
1580
+ };
1581
+ /**
1582
+ * Build a per-mount activation instance. `config` is read once at first render (the instance is
1583
+ * stable for the component's lifetime, keyed on the transport creds + device key); the returned
1584
+ * `revalidation` re-renders the component whenever any `track()` succeeds.
1585
+ */
1586
+ declare const useWireActivation: (config: WireActivationConfig) => UseWireActivation;
1587
+
1588
+ /**
1589
+ * activation revalidation — a tiny kit-owned pub/sub the review / questionnaire decision fetches
1590
+ * subscribe to, so they RE-FETCH their server decision AFTER a trigger action, not only on mount.
1591
+ *
1592
+ * WHY THIS EXISTS (subsumes Morrow's hand-rolled `activation-revalidation.ts`): a host mounts the
1593
+ * review / questionnaire gate on the home screen and fetches its `/decision` verdict once, in a
1594
+ * mount-scoped effect. But the screen stays mounted while the user goes elsewhere to perform the
1595
+ * triggering action (journal a win, complete a task); the server's firing rule is trigger-based AND
1596
+ * session-scoped, so the mount fetch ran BEFORE the trigger event existed and never re-runs. Bumping
1597
+ * this store after the action POSTs re-runs the gate's decision fetch (it lists the version in its
1598
+ * deps) → the server now sees the trigger → `{fire:true}`.
1599
+ *
1600
+ * `wire.track()` bumps this automatically on a successful POST, so a consumer no longer hand-rolls
1601
+ * an await-then-bump: it subscribes (via {@link useActivationRevalidation} in `useWireActivation`)
1602
+ * and re-fetches when the version changes.
1603
+ *
1604
+ * ── WHY A globalThis SLOT, NOT MODULE-LOCAL STATE (same reasoning as currentSession) ─────────────
1605
+ * This module can be reached from more than one package entry (the main `.` barrel exposes the
1606
+ * revalidation surface; the gates live under the `./reviews` / `./questionnaire` subpaths). Under
1607
+ * `dist` resolution tsup inlines a SEPARATE copy of a module into each bundle, so plain module-local
1608
+ * `version` + `listeners` would give the BUMPER (main entry, via `wire.track`) and a SUBSCRIBER a
1609
+ * different store — the bump would never reach the listener, exactly the defect-B failure mode. So
1610
+ * the ONE store lives in a `globalThis` slot keyed by `Symbol.for(...)`: every inlined copy resolves
1611
+ * the same symbol and shares one store, on Hermes/RN, Node and SSR alike.
1612
+ */
1613
+ /**
1614
+ * Signal every activation subscriber to re-fetch its server decision. `wire.track()` calls this on a
1615
+ * successful POST (await the post first so the re-fetch sees the event). A throwing subscriber never
1616
+ * breaks the notify loop — each listener is isolated.
1617
+ */
1618
+ declare const bumpActivationRevalidation: () => void;
1619
+ /**
1620
+ * Subscribe to revalidation. Returns an unsubscribe fn. Shaped for `useSyncExternalStore`
1621
+ * (see {@link useActivationRevalidation} in `useWireActivation`).
1622
+ */
1623
+ declare const subscribeActivationRevalidation: (listener: () => void) => (() => void);
1624
+ /** The current revalidation version — include it in a decision-fetch effect's deps to re-fetch on bump. */
1625
+ declare const getActivationRevalidationVersion: () => number;
1626
+ /** Test-only: reset the shared store between cases (clears version + listeners). */
1627
+ declare const resetActivationRevalidation: () => void;
1628
+
1516
1629
  /** The canonical event name for an app-open. A trigger keys off this exact string. */
1517
1630
  declare const SESSION_STARTED_EVENT: "app.session_started";
1518
1631
  /** Options for {@link reportSessionStart}. Everything except `target` is optional so a pre-auth
@@ -1739,4 +1852,4 @@ interface UseLifecycleEventsOptions {
1739
1852
  */
1740
1853
  declare const useLifecycleEvents: (config: LifecycleConfig | undefined, options?: UseLifecycleEventsOptions) => void;
1741
1854
 
1742
- export { AUTO_DEVICE_ID_PREFIX, AnimatedSparkle, BACKGROUND_SESSION_MS, type CachedFeatures, CardGridSelectCard, CardHandoff, type CardHandoffProps, type CardHandoffVariant, type CardOption, ChipSelectCard, ClientEvent, ClientEventTarget, CompletionView, DEFAULT_FEATURES_TTL_MS, DemoOnboarding, type DemoOnboardingProps, DeviceContext, DoneBlock, ErrorBlock, FIRST_OPEN_EVENT, IconRegistryProvider, type IdentifyOnboardingOptions, IllustrationProvider, type IllustrationRegistry, InterstitialCard, type LifecycleConfig, type LifecycleEventInput, LoadingBlock, LoadingScreen, NumberStepperCard, type OnboardingAttribution, Button as OnboardingButton, OnboardingCopy, OnboardingEvent, type OnboardingFlagOptions, OnboardingFlow, OnboardingResult, OnboardingScaffold, OnboardingTheme, OnboardingThemeProvider, type ReportFirstOpenOptions, type ReportSessionStartOptions, type ResolveFeaturesOptions, SESSION_STARTED_EVENT, SelectionCard, type SessionStartConfig, StatusCard, StepProgress, StepValidator, TextInputCard, type ThemeFromBrandInput, USER_ID_MAX_LENGTH, type UseLifecycleEventsOptions, type UseSessionStartOptions, WIRE_ICON_GLYPHS, WIRE_ICON_NAMES, type WireConfigOverrides, WireFeatures, WireFeaturesConfig, WireFeaturesProvider, type WireFeaturesProviderProps, WireIcon, type WireIconFamily, type WireIconGlyph, type WireIconName, type WireIconProps, type WireIconRegistry, type WireLifecycleOptions, WireOnboarding, WireOnboardingConfig, WireOnboardingProps, WireOnboardingStorage, attributionMetadata, defaultIllustrations, defaultOnboardingTheme, defaultWireFeatures, deriveAnswers, detectAppVersion, detectNativeModel, deviceIdStorageKey, featuresCacheKey, featuresEqual, fetchWireFeatures, firstOpenStorageKey, identifyOnboarding, isFeaturesFresh, isOnboardingEnabled, lookupIconGlyph, mergeTheme, mintDeviceId, motionSpec, onboardingComponents, parseWireFeatures, readCachedFeatures, readProgress, reportFirstOpen, reportSessionStart, resetFirstOpenLatch, resetSessionStartGuard, sanitizeUserId, themeFromBrand, useHostIcon, useIllustration, useLifecycleEvents, useOnboardingTheme, useReducedMotion, useResolvedFeatures, useSessionStart, useWireFeatures, useWireFeaturesContext, wireConfigFromEnv, wireLifecycleEvents, writeCachedFeatures };
1855
+ export { AUTO_DEVICE_ID_PREFIX, AnimatedSparkle, BACKGROUND_SESSION_MS, type CachedFeatures, CardGridSelectCard, CardHandoff, type CardHandoffProps, type CardHandoffVariant, type CardOption, ChipSelectCard, ClientEvent, ClientEventTarget, CompletionView, DEFAULT_FEATURES_TTL_MS, DemoOnboarding, type DemoOnboardingProps, DeviceContext, DoneBlock, ErrorBlock, FIRST_OPEN_EVENT, IconRegistryProvider, type IdentifyOnboardingOptions, IllustrationProvider, type IllustrationRegistry, InterstitialCard, type LifecycleConfig, type LifecycleEventInput, LoadingBlock, LoadingScreen, NumberStepperCard, type OnboardingAttribution, Button as OnboardingButton, OnboardingCopy, OnboardingEvent, type OnboardingFlagOptions, OnboardingFlow, OnboardingResult, OnboardingScaffold, OnboardingTheme, OnboardingThemeProvider, type ReportFirstOpenOptions, type ReportSessionStartOptions, type ResolveFeaturesOptions, SESSION_STARTED_EVENT, SelectionCard, type SessionStartConfig, StatusCard, StepProgress, StepValidator, TextInputCard, type ThemeFromBrandInput, USER_ID_MAX_LENGTH, type UseLifecycleEventsOptions, type UseSessionStartOptions, type UseWireActivation, WIRE_ICON_GLYPHS, WIRE_ICON_NAMES, type WireActivation, type WireActivationConfig, type WireConfigOverrides, WireFeatures, WireFeaturesConfig, WireFeaturesProvider, type WireFeaturesProviderProps, WireIcon, type WireIconFamily, type WireIconGlyph, type WireIconName, type WireIconProps, type WireIconRegistry, type WireLifecycleOptions, WireOnboarding, WireOnboardingConfig, WireOnboardingProps, WireOnboardingStorage, WireUserContext, attributionMetadata, bumpActivationRevalidation, createWireActivation, defaultIllustrations, defaultOnboardingTheme, defaultWireFeatures, deriveAnswers, detectAppVersion, detectNativeModel, deviceIdStorageKey, featuresCacheKey, featuresEqual, fetchWireFeatures, firstOpenStorageKey, getActivationRevalidationVersion, identifyOnboarding, isFeaturesFresh, isOnboardingEnabled, lookupIconGlyph, mergeTheme, mintDeviceId, motionSpec, onboardingComponents, parseWireFeatures, readCachedFeatures, readProgress, reportFirstOpen, reportSessionStart, resetActivationRevalidation, resetFirstOpenLatch, resetSessionStartGuard, sanitizeUserId, subscribeActivationRevalidation, themeFromBrand, useActivationRevalidation, useHostIcon, useIllustration, useLifecycleEvents, useOnboardingTheme, useReducedMotion, useResolvedFeatures, useSessionStart, useWireActivation, useWireFeatures, useWireFeaturesContext, wireConfigFromEnv, wireLifecycleEvents, writeCachedFeatures };