@appilots/sdk 0.4.0 → 0.5.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.
@@ -1,2 +1,2 @@
1
- export { H as SuggestedPrompt, O as UseAppilotsFieldOptions, Q as UseAppilotsSliderOptions, V as UseAppilotsTargetOptions, W as UseAppilotsToggleOptions, X as UseSuggestedPromptsOptions, Y as UseSuggestedPromptsReturn, a8 as useAppilots, a9 as useAppilotsActions, aa as useAppilotsChat, ac as useAppilotsField, ad as useAppilotsNavigation, ae as useAppilotsSlider, af as useAppilotsTarget, ag as useAppilotsToggle, ah as useSuggestedPrompts } from '../index-Cb0D6uKH.mjs';
1
+ export { H as SuggestedPrompt, O as UseAppilotsFieldOptions, Q as UseAppilotsSliderOptions, V as UseAppilotsTargetOptions, W as UseAppilotsToggleOptions, X as UseSuggestedPromptsOptions, Y as UseSuggestedPromptsReturn, a8 as useAppilots, a9 as useAppilotsActions, aa as useAppilotsChat, ac as useAppilotsField, ad as useAppilotsNavigation, ae as useAppilotsSlider, af as useAppilotsTarget, ag as useAppilotsToggle, ah as useSuggestedPrompts } from '../index-GvF_FlwO.mjs';
2
2
  import 'react';
@@ -1,2 +1,2 @@
1
- export { H as SuggestedPrompt, O as UseAppilotsFieldOptions, Q as UseAppilotsSliderOptions, V as UseAppilotsTargetOptions, W as UseAppilotsToggleOptions, X as UseSuggestedPromptsOptions, Y as UseSuggestedPromptsReturn, a8 as useAppilots, a9 as useAppilotsActions, aa as useAppilotsChat, ac as useAppilotsField, ad as useAppilotsNavigation, ae as useAppilotsSlider, af as useAppilotsTarget, ag as useAppilotsToggle, ah as useSuggestedPrompts } from '../index-Cb0D6uKH.js';
1
+ export { H as SuggestedPrompt, O as UseAppilotsFieldOptions, Q as UseAppilotsSliderOptions, V as UseAppilotsTargetOptions, W as UseAppilotsToggleOptions, X as UseSuggestedPromptsOptions, Y as UseSuggestedPromptsReturn, a8 as useAppilots, a9 as useAppilotsActions, aa as useAppilotsChat, ac as useAppilotsField, ad as useAppilotsNavigation, ae as useAppilotsSlider, af as useAppilotsTarget, ag as useAppilotsToggle, ah as useSuggestedPrompts } from '../index-GvF_FlwO.js';
2
2
  import 'react';
@@ -1,43 +1,43 @@
1
1
  'use strict';
2
2
 
3
- var chunkY7EA6R2G_js = require('../chunk-Y7EA6R2G.js');
4
- require('../chunk-V3TUIIT2.js');
3
+ var chunkZWQUIDBZ_js = require('../chunk-ZWQUIDBZ.js');
4
+ require('../chunk-PQHZTAFG.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "useAppilots", {
9
9
  enumerable: true,
10
- get: function () { return chunkY7EA6R2G_js.useAppilots; }
10
+ get: function () { return chunkZWQUIDBZ_js.useAppilots; }
11
11
  });
12
12
  Object.defineProperty(exports, "useAppilotsActions", {
13
13
  enumerable: true,
14
- get: function () { return chunkY7EA6R2G_js.useAppilotsActions; }
14
+ get: function () { return chunkZWQUIDBZ_js.useAppilotsActions; }
15
15
  });
16
16
  Object.defineProperty(exports, "useAppilotsChat", {
17
17
  enumerable: true,
18
- get: function () { return chunkY7EA6R2G_js.useAppilotsChat; }
18
+ get: function () { return chunkZWQUIDBZ_js.useAppilotsChat; }
19
19
  });
20
20
  Object.defineProperty(exports, "useAppilotsField", {
21
21
  enumerable: true,
22
- get: function () { return chunkY7EA6R2G_js.useAppilotsField; }
22
+ get: function () { return chunkZWQUIDBZ_js.useAppilotsField; }
23
23
  });
24
24
  Object.defineProperty(exports, "useAppilotsNavigation", {
25
25
  enumerable: true,
26
- get: function () { return chunkY7EA6R2G_js.useAppilotsNavigation; }
26
+ get: function () { return chunkZWQUIDBZ_js.useAppilotsNavigation; }
27
27
  });
28
28
  Object.defineProperty(exports, "useAppilotsSlider", {
29
29
  enumerable: true,
30
- get: function () { return chunkY7EA6R2G_js.useAppilotsSlider; }
30
+ get: function () { return chunkZWQUIDBZ_js.useAppilotsSlider; }
31
31
  });
32
32
  Object.defineProperty(exports, "useAppilotsTarget", {
33
33
  enumerable: true,
34
- get: function () { return chunkY7EA6R2G_js.useAppilotsTarget; }
34
+ get: function () { return chunkZWQUIDBZ_js.useAppilotsTarget; }
35
35
  });
36
36
  Object.defineProperty(exports, "useAppilotsToggle", {
37
37
  enumerable: true,
38
- get: function () { return chunkY7EA6R2G_js.useAppilotsToggle; }
38
+ get: function () { return chunkZWQUIDBZ_js.useAppilotsToggle; }
39
39
  });
40
40
  Object.defineProperty(exports, "useSuggestedPrompts", {
41
41
  enumerable: true,
42
- get: function () { return chunkY7EA6R2G_js.useSuggestedPrompts; }
42
+ get: function () { return chunkZWQUIDBZ_js.useSuggestedPrompts; }
43
43
  });
@@ -1,2 +1,2 @@
1
- export { useAppilots, useAppilotsActions, useAppilotsChat, useAppilotsField, useAppilotsNavigation, useAppilotsSlider, useAppilotsTarget, useAppilotsToggle, useSuggestedPrompts } from '../chunk-42WI3UDB.mjs';
2
- import '../chunk-JBOLV5AM.mjs';
1
+ export { useAppilots, useAppilotsActions, useAppilotsChat, useAppilotsField, useAppilotsNavigation, useAppilotsSlider, useAppilotsTarget, useAppilotsToggle, useSuggestedPrompts } from '../chunk-3D7PHOV7.mjs';
2
+ import '../chunk-BIEF6MNR.mjs';
@@ -281,7 +281,7 @@ interface AgentPermissions {
281
281
  blockedScreens?: string[];
282
282
  allowedActions?: AgentActionType[];
283
283
  }
284
- type AppilotsEventType = 'agent:action:start' | 'agent:action:complete' | 'agent:action:error' | 'agent:message' | 'navigation:change' | 'chat:open' | 'chat:close' | 'chat:escalation:start' | 'chat:escalation:message' | 'chat:escalation:end';
284
+ type AppilotsEventType = 'agent:action:start' | 'agent:action:complete' | 'agent:action:error' | 'agent:message' | 'navigation:change' | 'chat:open' | 'chat:close' | 'chat:escalation:start' | 'chat:escalation:message' | 'chat:escalation:end' | 'sdk:introspection:unavailable';
285
285
  interface AppilotsEvent {
286
286
  type: AppilotsEventType;
287
287
  timestamp: number;
@@ -300,6 +300,17 @@ interface EscalationState {
300
300
  operatorName?: string;
301
301
  }
302
302
 
303
+ /**
304
+ * Mirrors `introspectionDiagnosticsSchema` on the wire. Declared here
305
+ * rather than imported so client-core stays free of the server's
306
+ * validator package.
307
+ */
308
+ interface IntrospectionDiagnosticsInput {
309
+ captured: boolean;
310
+ failureReason?: 'sentinel-missing-internals' | 'never-mounted' | null;
311
+ reactVersion?: string | null;
312
+ failureCount?: number;
313
+ }
303
314
  interface AppilotsClientOptions {
304
315
  projectId: string;
305
316
  apiBaseUrl?: string;
@@ -318,6 +329,17 @@ interface AppilotsClientOptions {
318
329
  * from your app's package.json so it stays in lockstep with releases.
319
330
  */
320
331
  mcpVersion?: string;
332
+ /**
333
+ * Reports whether the platform binding could read the host app's UI
334
+ * tree. Called once per message; return `null` (or omit the option)
335
+ * when there is nothing to report.
336
+ *
337
+ * Only a FAILED reading is put on the wire. When introspection is
338
+ * dead every observation is empty but perfectly well-formed, so the
339
+ * server cannot tell a blind session from a user looking at empty
340
+ * screens — this is the only signal that distinguishes them.
341
+ */
342
+ introspectionReporter?: () => IntrospectionDiagnosticsInput | null | undefined;
321
343
  /**
322
344
  * The host app's version (e.g. from package.json or
323
345
  * react-native-device-info). Sent as `X-App-Version` on every request
@@ -417,6 +439,7 @@ declare class AppilotsClient {
417
439
  private readonly timeout;
418
440
  private readonly debug;
419
441
  private readonly mcpVersion;
442
+ private readonly introspectionReporter;
420
443
  private readonly user;
421
444
  private sessionId;
422
445
  /** Guard so identify fires at most once per client instance. */
@@ -434,6 +457,13 @@ declare class AppilotsClient {
434
457
  private identifyConfiguredUser;
435
458
  destroySession(): Promise<void>;
436
459
  getSessionId(): string | null;
460
+ /**
461
+ * Wire fragment for introspection health. Empty on the happy path —
462
+ * a working client sends nothing, so the field costs a byte only
463
+ * when something is actually wrong. Never throws: a broken reporter
464
+ * must not take the message down with it.
465
+ */
466
+ private introspectionFragment;
437
467
  sendMessage(content: string, context?: SendMessageContext): Promise<SendMessageResponse>;
438
468
  /**
439
469
  * Streaming variant of `sendMessage` — consumes the server's SSE
@@ -281,7 +281,7 @@ interface AgentPermissions {
281
281
  blockedScreens?: string[];
282
282
  allowedActions?: AgentActionType[];
283
283
  }
284
- type AppilotsEventType = 'agent:action:start' | 'agent:action:complete' | 'agent:action:error' | 'agent:message' | 'navigation:change' | 'chat:open' | 'chat:close' | 'chat:escalation:start' | 'chat:escalation:message' | 'chat:escalation:end';
284
+ type AppilotsEventType = 'agent:action:start' | 'agent:action:complete' | 'agent:action:error' | 'agent:message' | 'navigation:change' | 'chat:open' | 'chat:close' | 'chat:escalation:start' | 'chat:escalation:message' | 'chat:escalation:end' | 'sdk:introspection:unavailable';
285
285
  interface AppilotsEvent {
286
286
  type: AppilotsEventType;
287
287
  timestamp: number;
@@ -300,6 +300,17 @@ interface EscalationState {
300
300
  operatorName?: string;
301
301
  }
302
302
 
303
+ /**
304
+ * Mirrors `introspectionDiagnosticsSchema` on the wire. Declared here
305
+ * rather than imported so client-core stays free of the server's
306
+ * validator package.
307
+ */
308
+ interface IntrospectionDiagnosticsInput {
309
+ captured: boolean;
310
+ failureReason?: 'sentinel-missing-internals' | 'never-mounted' | null;
311
+ reactVersion?: string | null;
312
+ failureCount?: number;
313
+ }
303
314
  interface AppilotsClientOptions {
304
315
  projectId: string;
305
316
  apiBaseUrl?: string;
@@ -318,6 +329,17 @@ interface AppilotsClientOptions {
318
329
  * from your app's package.json so it stays in lockstep with releases.
319
330
  */
320
331
  mcpVersion?: string;
332
+ /**
333
+ * Reports whether the platform binding could read the host app's UI
334
+ * tree. Called once per message; return `null` (or omit the option)
335
+ * when there is nothing to report.
336
+ *
337
+ * Only a FAILED reading is put on the wire. When introspection is
338
+ * dead every observation is empty but perfectly well-formed, so the
339
+ * server cannot tell a blind session from a user looking at empty
340
+ * screens — this is the only signal that distinguishes them.
341
+ */
342
+ introspectionReporter?: () => IntrospectionDiagnosticsInput | null | undefined;
321
343
  /**
322
344
  * The host app's version (e.g. from package.json or
323
345
  * react-native-device-info). Sent as `X-App-Version` on every request
@@ -417,6 +439,7 @@ declare class AppilotsClient {
417
439
  private readonly timeout;
418
440
  private readonly debug;
419
441
  private readonly mcpVersion;
442
+ private readonly introspectionReporter;
420
443
  private readonly user;
421
444
  private sessionId;
422
445
  /** Guard so identify fires at most once per client instance. */
@@ -434,6 +457,13 @@ declare class AppilotsClient {
434
457
  private identifyConfiguredUser;
435
458
  destroySession(): Promise<void>;
436
459
  getSessionId(): string | null;
460
+ /**
461
+ * Wire fragment for introspection health. Empty on the happy path —
462
+ * a working client sends nothing, so the field costs a byte only
463
+ * when something is actually wrong. Never throws: a broken reporter
464
+ * must not take the message down with it.
465
+ */
466
+ private introspectionFragment;
437
467
  sendMessage(content: string, context?: SendMessageContext): Promise<SendMessageResponse>;
438
468
  /**
439
469
  * Streaming variant of `sendMessage` — consumes the server's SSE
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PartialThemeTokens, A as AppilotsThemeTokens, a as AppilotsLocale, b as AgentAction, I as InteractionElementSnapshot, C as ComponentRegistry, c as AgentPermissions, S as ScreenSnapshot, F as FieldEntry, d as AppilotsEvent } from './index-Cb0D6uKH.mjs';
2
- export { e as AgentActionType, f as AgentMessage, g as AppilotsClient, h as AppilotsClientOptions, i as AppilotsConfig, j as AppilotsEventHandler, k as AppilotsEventType, l as AppilotsProvider, m as AppilotsProviderProps, n as AppilotsTraceEntry, o as AppilotsUser, B as BreadcrumbItem, p as BreadcrumbState, q as ButtonSnapshot, r as ChatMessage, s as ChoiceGroupSnapshot, t as ChoiceOptionSnapshot, u as ComponentEntry, v as ComponentKind, E as EscalationState, w as FormFillPayload, x as InputSnapshot, y as InteractionElementListContext, L as ListItemSnapshot, z as ListSnapshot, M as MessageRole, N as NavigationPayload, R as RemotePersonalization, D as SDK_VERSION, G as SliderEntry, H as SuggestedPrompt, T as TargetEntry, J as ToggleEntry, K as ToggleSnapshot, U as UIInteractionPayload, O as UseAppilotsFieldOptions, Q as UseAppilotsSliderOptions, V as UseAppilotsTargetOptions, W as UseAppilotsToggleOptions, X as UseSuggestedPromptsOptions, Y as UseSuggestedPromptsReturn, Z as clearAppilotsDebugTraces, _ as componentRegistry, $ as createComponentRegistry, a0 as defaultDarkTheme, a1 as defaultLightTheme, a2 as describeAction, a3 as getAppilotsDebugTraces, a4 as humanizeError, a5 as mergeThemeTokens, a6 as recordAppilotsDebugTrace, a7 as subscribeAppilotsDebugTraces, a8 as useAppilots, a9 as useAppilotsActions, aa as useAppilotsChat, ab as useAppilotsContext, ac as useAppilotsField, ad as useAppilotsNavigation, ae as useAppilotsSlider, af as useAppilotsTarget, ag as useAppilotsToggle, ah as useSuggestedPrompts } from './index-Cb0D6uKH.mjs';
1
+ import { P as PartialThemeTokens, A as AppilotsThemeTokens, a as AppilotsLocale, b as AgentAction, I as InteractionElementSnapshot, C as ComponentRegistry, c as AgentPermissions, S as ScreenSnapshot, F as FieldEntry, d as AppilotsEvent } from './index-GvF_FlwO.mjs';
2
+ export { e as AgentActionType, f as AgentMessage, g as AppilotsClient, h as AppilotsClientOptions, i as AppilotsConfig, j as AppilotsEventHandler, k as AppilotsEventType, l as AppilotsProvider, m as AppilotsProviderProps, n as AppilotsTraceEntry, o as AppilotsUser, B as BreadcrumbItem, p as BreadcrumbState, q as ButtonSnapshot, r as ChatMessage, s as ChoiceGroupSnapshot, t as ChoiceOptionSnapshot, u as ComponentEntry, v as ComponentKind, E as EscalationState, w as FormFillPayload, x as InputSnapshot, y as InteractionElementListContext, L as ListItemSnapshot, z as ListSnapshot, M as MessageRole, N as NavigationPayload, R as RemotePersonalization, D as SDK_VERSION, G as SliderEntry, H as SuggestedPrompt, T as TargetEntry, J as ToggleEntry, K as ToggleSnapshot, U as UIInteractionPayload, O as UseAppilotsFieldOptions, Q as UseAppilotsSliderOptions, V as UseAppilotsTargetOptions, W as UseAppilotsToggleOptions, X as UseSuggestedPromptsOptions, Y as UseSuggestedPromptsReturn, Z as clearAppilotsDebugTraces, _ as componentRegistry, $ as createComponentRegistry, a0 as defaultDarkTheme, a1 as defaultLightTheme, a2 as describeAction, a3 as getAppilotsDebugTraces, a4 as humanizeError, a5 as mergeThemeTokens, a6 as recordAppilotsDebugTrace, a7 as subscribeAppilotsDebugTraces, a8 as useAppilots, a9 as useAppilotsActions, aa as useAppilotsChat, ab as useAppilotsContext, ac as useAppilotsField, ad as useAppilotsNavigation, ae as useAppilotsSlider, af as useAppilotsTarget, ag as useAppilotsToggle, ah as useSuggestedPrompts } from './index-GvF_FlwO.mjs';
3
3
  import * as React$1 from 'react';
4
4
  import React__default from 'react';
5
5
  export { A as AppilotsNavigationContainer, N as NavigationConfig, b as ScreenMetadata, r as registerScreen } from './registerScreen-D1oGm28T.mjs';
@@ -698,6 +698,43 @@ declare function isAutoTrackingEnabled(): boolean;
698
698
 
699
699
  declare function captureSnapshot(): ScreenSnapshot;
700
700
 
701
+ /**
702
+ * fiberRoot — module-level holder for the root fiber captured by
703
+ * AppilotsFiberRoot. The fiber reference is set during the first render
704
+ * and is used by captureSnapshot() to walk the React tree on demand.
705
+ *
706
+ * Fiber nodes are mutable: React updates their .child/.sibling pointers
707
+ * as the tree re-renders. Storing a reference once is sufficient — we
708
+ * always see the latest tree when we walk.
709
+ */
710
+ /**
711
+ * Why capture failed, when it did.
712
+ *
713
+ * - `sentinel-missing-internals`: the class sentinel mounted but its
714
+ * instance had neither `_reactInternals` nor `_reactInternalFiber`.
715
+ * This is the React-version incompatibility we cannot detect any
716
+ * other way — the app renders fine and only introspection is blind.
717
+ * - `never-mounted`: something asked for a snapshot before
718
+ * `<AppilotsProvider>` committed (or outside it entirely).
719
+ */
720
+ type IntrospectionFailureReason = 'sentinel-missing-internals' | 'never-mounted';
721
+ interface IntrospectionDiagnostics {
722
+ /** True once a root fiber has been captured. */
723
+ captured: boolean;
724
+ /** Set on the first failure and kept, even if a later attempt succeeds. */
725
+ failureReason: IntrospectionFailureReason | null;
726
+ /** React version seen at failure time — the field we actually want in a bug report. */
727
+ reactVersion: string | null;
728
+ /** How many times a capture attempt has failed. */
729
+ failureCount: number;
730
+ }
731
+ /**
732
+ * Introspection health, for host apps that want to ship it to their own
733
+ * crash/analytics tooling. `captured: false` with a `failureReason`
734
+ * means every snapshot this session is empty.
735
+ */
736
+ declare function getIntrospectionDiagnostics(): IntrospectionDiagnostics;
737
+
701
738
  /**
702
739
  * createAppilotsInput — HOC factory that wraps any TextInput-like component
703
740
  * and auto-registers it with the ComponentRegistry.
@@ -921,4 +958,4 @@ interface ExecutorContext {
921
958
  }
922
959
  declare function executeAction(action: AgentAction, context: ExecutorContext): Promise<ActionResult>;
923
960
 
924
- export { ActionBreadcrumb, type ActionBreadcrumbProps, type ActionResult, AgentAction, AgentPermissions, type AppilotsButtonProps, AppilotsChat, type AppilotsChatMode, type AppilotsChatPosition, type AppilotsChatProps, type AppilotsChatTheme, AppilotsEvent, AppilotsI18nProvider, type AppilotsI18nProviderProps, type AppilotsInputProps, AppilotsLocale, type AppilotsRC, AppilotsRegistryProvider, type AppilotsStringKey, type AppilotsStrings, type AppilotsSwitchProps, AppilotsThemeProvider, type AppilotsThemeProviderProps, AppilotsThemeTokens, ChatIcon, type ChatIconProps, ComponentRegistry, ConfirmDialog, type ConfirmDialogProps, type ElementRegistry, type ExecutorContext, FieldEntry, HeadsetIcon, type HeadsetIconProps, type InteractionElementEntry, InteractionElementSnapshot, type ListEntry, type ListRegistry, PartialThemeTokens, ScreenSnapshot, type TailwindResolvedConfig, _patchJsxRuntimes, appilotsTheme, appilotsThemeFromTailwind, captureSnapshot, createAppilotsButton, createAppilotsInput, createAppilotsSwitch, createElementRegistry, createListRegistry, detectDeviceLocale, elementRegistry, enableAppilotsAutoTracking, executeAction, getGlobalConfig, initAppilots, isAutoTrackingEnabled, listRegistry, resolveLocale, useAppilotsI18n, useAppilotsTheme, useResolvedRegistry };
961
+ export { ActionBreadcrumb, type ActionBreadcrumbProps, type ActionResult, AgentAction, AgentPermissions, type AppilotsButtonProps, AppilotsChat, type AppilotsChatMode, type AppilotsChatPosition, type AppilotsChatProps, type AppilotsChatTheme, AppilotsEvent, AppilotsI18nProvider, type AppilotsI18nProviderProps, type AppilotsInputProps, AppilotsLocale, type AppilotsRC, AppilotsRegistryProvider, type AppilotsStringKey, type AppilotsStrings, type AppilotsSwitchProps, AppilotsThemeProvider, type AppilotsThemeProviderProps, AppilotsThemeTokens, ChatIcon, type ChatIconProps, ComponentRegistry, ConfirmDialog, type ConfirmDialogProps, type ElementRegistry, type ExecutorContext, FieldEntry, HeadsetIcon, type HeadsetIconProps, type InteractionElementEntry, InteractionElementSnapshot, type IntrospectionDiagnostics, type IntrospectionFailureReason, type ListEntry, type ListRegistry, PartialThemeTokens, ScreenSnapshot, type TailwindResolvedConfig, _patchJsxRuntimes, appilotsTheme, appilotsThemeFromTailwind, captureSnapshot, createAppilotsButton, createAppilotsInput, createAppilotsSwitch, createElementRegistry, createListRegistry, detectDeviceLocale, elementRegistry, enableAppilotsAutoTracking, executeAction, getGlobalConfig, getIntrospectionDiagnostics, initAppilots, isAutoTrackingEnabled, listRegistry, resolveLocale, useAppilotsI18n, useAppilotsTheme, useResolvedRegistry };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PartialThemeTokens, A as AppilotsThemeTokens, a as AppilotsLocale, b as AgentAction, I as InteractionElementSnapshot, C as ComponentRegistry, c as AgentPermissions, S as ScreenSnapshot, F as FieldEntry, d as AppilotsEvent } from './index-Cb0D6uKH.js';
2
- export { e as AgentActionType, f as AgentMessage, g as AppilotsClient, h as AppilotsClientOptions, i as AppilotsConfig, j as AppilotsEventHandler, k as AppilotsEventType, l as AppilotsProvider, m as AppilotsProviderProps, n as AppilotsTraceEntry, o as AppilotsUser, B as BreadcrumbItem, p as BreadcrumbState, q as ButtonSnapshot, r as ChatMessage, s as ChoiceGroupSnapshot, t as ChoiceOptionSnapshot, u as ComponentEntry, v as ComponentKind, E as EscalationState, w as FormFillPayload, x as InputSnapshot, y as InteractionElementListContext, L as ListItemSnapshot, z as ListSnapshot, M as MessageRole, N as NavigationPayload, R as RemotePersonalization, D as SDK_VERSION, G as SliderEntry, H as SuggestedPrompt, T as TargetEntry, J as ToggleEntry, K as ToggleSnapshot, U as UIInteractionPayload, O as UseAppilotsFieldOptions, Q as UseAppilotsSliderOptions, V as UseAppilotsTargetOptions, W as UseAppilotsToggleOptions, X as UseSuggestedPromptsOptions, Y as UseSuggestedPromptsReturn, Z as clearAppilotsDebugTraces, _ as componentRegistry, $ as createComponentRegistry, a0 as defaultDarkTheme, a1 as defaultLightTheme, a2 as describeAction, a3 as getAppilotsDebugTraces, a4 as humanizeError, a5 as mergeThemeTokens, a6 as recordAppilotsDebugTrace, a7 as subscribeAppilotsDebugTraces, a8 as useAppilots, a9 as useAppilotsActions, aa as useAppilotsChat, ab as useAppilotsContext, ac as useAppilotsField, ad as useAppilotsNavigation, ae as useAppilotsSlider, af as useAppilotsTarget, ag as useAppilotsToggle, ah as useSuggestedPrompts } from './index-Cb0D6uKH.js';
1
+ import { P as PartialThemeTokens, A as AppilotsThemeTokens, a as AppilotsLocale, b as AgentAction, I as InteractionElementSnapshot, C as ComponentRegistry, c as AgentPermissions, S as ScreenSnapshot, F as FieldEntry, d as AppilotsEvent } from './index-GvF_FlwO.js';
2
+ export { e as AgentActionType, f as AgentMessage, g as AppilotsClient, h as AppilotsClientOptions, i as AppilotsConfig, j as AppilotsEventHandler, k as AppilotsEventType, l as AppilotsProvider, m as AppilotsProviderProps, n as AppilotsTraceEntry, o as AppilotsUser, B as BreadcrumbItem, p as BreadcrumbState, q as ButtonSnapshot, r as ChatMessage, s as ChoiceGroupSnapshot, t as ChoiceOptionSnapshot, u as ComponentEntry, v as ComponentKind, E as EscalationState, w as FormFillPayload, x as InputSnapshot, y as InteractionElementListContext, L as ListItemSnapshot, z as ListSnapshot, M as MessageRole, N as NavigationPayload, R as RemotePersonalization, D as SDK_VERSION, G as SliderEntry, H as SuggestedPrompt, T as TargetEntry, J as ToggleEntry, K as ToggleSnapshot, U as UIInteractionPayload, O as UseAppilotsFieldOptions, Q as UseAppilotsSliderOptions, V as UseAppilotsTargetOptions, W as UseAppilotsToggleOptions, X as UseSuggestedPromptsOptions, Y as UseSuggestedPromptsReturn, Z as clearAppilotsDebugTraces, _ as componentRegistry, $ as createComponentRegistry, a0 as defaultDarkTheme, a1 as defaultLightTheme, a2 as describeAction, a3 as getAppilotsDebugTraces, a4 as humanizeError, a5 as mergeThemeTokens, a6 as recordAppilotsDebugTrace, a7 as subscribeAppilotsDebugTraces, a8 as useAppilots, a9 as useAppilotsActions, aa as useAppilotsChat, ab as useAppilotsContext, ac as useAppilotsField, ad as useAppilotsNavigation, ae as useAppilotsSlider, af as useAppilotsTarget, ag as useAppilotsToggle, ah as useSuggestedPrompts } from './index-GvF_FlwO.js';
3
3
  import * as React$1 from 'react';
4
4
  import React__default from 'react';
5
5
  export { A as AppilotsNavigationContainer, N as NavigationConfig, b as ScreenMetadata, r as registerScreen } from './registerScreen-D1oGm28T.js';
@@ -698,6 +698,43 @@ declare function isAutoTrackingEnabled(): boolean;
698
698
 
699
699
  declare function captureSnapshot(): ScreenSnapshot;
700
700
 
701
+ /**
702
+ * fiberRoot — module-level holder for the root fiber captured by
703
+ * AppilotsFiberRoot. The fiber reference is set during the first render
704
+ * and is used by captureSnapshot() to walk the React tree on demand.
705
+ *
706
+ * Fiber nodes are mutable: React updates their .child/.sibling pointers
707
+ * as the tree re-renders. Storing a reference once is sufficient — we
708
+ * always see the latest tree when we walk.
709
+ */
710
+ /**
711
+ * Why capture failed, when it did.
712
+ *
713
+ * - `sentinel-missing-internals`: the class sentinel mounted but its
714
+ * instance had neither `_reactInternals` nor `_reactInternalFiber`.
715
+ * This is the React-version incompatibility we cannot detect any
716
+ * other way — the app renders fine and only introspection is blind.
717
+ * - `never-mounted`: something asked for a snapshot before
718
+ * `<AppilotsProvider>` committed (or outside it entirely).
719
+ */
720
+ type IntrospectionFailureReason = 'sentinel-missing-internals' | 'never-mounted';
721
+ interface IntrospectionDiagnostics {
722
+ /** True once a root fiber has been captured. */
723
+ captured: boolean;
724
+ /** Set on the first failure and kept, even if a later attempt succeeds. */
725
+ failureReason: IntrospectionFailureReason | null;
726
+ /** React version seen at failure time — the field we actually want in a bug report. */
727
+ reactVersion: string | null;
728
+ /** How many times a capture attempt has failed. */
729
+ failureCount: number;
730
+ }
731
+ /**
732
+ * Introspection health, for host apps that want to ship it to their own
733
+ * crash/analytics tooling. `captured: false` with a `failureReason`
734
+ * means every snapshot this session is empty.
735
+ */
736
+ declare function getIntrospectionDiagnostics(): IntrospectionDiagnostics;
737
+
701
738
  /**
702
739
  * createAppilotsInput — HOC factory that wraps any TextInput-like component
703
740
  * and auto-registers it with the ComponentRegistry.
@@ -921,4 +958,4 @@ interface ExecutorContext {
921
958
  }
922
959
  declare function executeAction(action: AgentAction, context: ExecutorContext): Promise<ActionResult>;
923
960
 
924
- export { ActionBreadcrumb, type ActionBreadcrumbProps, type ActionResult, AgentAction, AgentPermissions, type AppilotsButtonProps, AppilotsChat, type AppilotsChatMode, type AppilotsChatPosition, type AppilotsChatProps, type AppilotsChatTheme, AppilotsEvent, AppilotsI18nProvider, type AppilotsI18nProviderProps, type AppilotsInputProps, AppilotsLocale, type AppilotsRC, AppilotsRegistryProvider, type AppilotsStringKey, type AppilotsStrings, type AppilotsSwitchProps, AppilotsThemeProvider, type AppilotsThemeProviderProps, AppilotsThemeTokens, ChatIcon, type ChatIconProps, ComponentRegistry, ConfirmDialog, type ConfirmDialogProps, type ElementRegistry, type ExecutorContext, FieldEntry, HeadsetIcon, type HeadsetIconProps, type InteractionElementEntry, InteractionElementSnapshot, type ListEntry, type ListRegistry, PartialThemeTokens, ScreenSnapshot, type TailwindResolvedConfig, _patchJsxRuntimes, appilotsTheme, appilotsThemeFromTailwind, captureSnapshot, createAppilotsButton, createAppilotsInput, createAppilotsSwitch, createElementRegistry, createListRegistry, detectDeviceLocale, elementRegistry, enableAppilotsAutoTracking, executeAction, getGlobalConfig, initAppilots, isAutoTrackingEnabled, listRegistry, resolveLocale, useAppilotsI18n, useAppilotsTheme, useResolvedRegistry };
961
+ export { ActionBreadcrumb, type ActionBreadcrumbProps, type ActionResult, AgentAction, AgentPermissions, type AppilotsButtonProps, AppilotsChat, type AppilotsChatMode, type AppilotsChatPosition, type AppilotsChatProps, type AppilotsChatTheme, AppilotsEvent, AppilotsI18nProvider, type AppilotsI18nProviderProps, type AppilotsInputProps, AppilotsLocale, type AppilotsRC, AppilotsRegistryProvider, type AppilotsStringKey, type AppilotsStrings, type AppilotsSwitchProps, AppilotsThemeProvider, type AppilotsThemeProviderProps, AppilotsThemeTokens, ChatIcon, type ChatIconProps, ComponentRegistry, ConfirmDialog, type ConfirmDialogProps, type ElementRegistry, type ExecutorContext, FieldEntry, HeadsetIcon, type HeadsetIconProps, type InteractionElementEntry, InteractionElementSnapshot, type IntrospectionDiagnostics, type IntrospectionFailureReason, type ListEntry, type ListRegistry, PartialThemeTokens, ScreenSnapshot, type TailwindResolvedConfig, _patchJsxRuntimes, appilotsTheme, appilotsThemeFromTailwind, captureSnapshot, createAppilotsButton, createAppilotsInput, createAppilotsSwitch, createElementRegistry, createListRegistry, detectDeviceLocale, elementRegistry, enableAppilotsAutoTracking, executeAction, getGlobalConfig, getIntrospectionDiagnostics, initAppilots, isAutoTrackingEnabled, listRegistry, resolveLocale, useAppilotsI18n, useAppilotsTheme, useResolvedRegistry };