@page-speed/agent-everywhere 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.
package/dist/index.d.cts CHANGED
@@ -91,7 +91,16 @@ interface ExecutionStep {
91
91
  code?: string;
92
92
  output?: string;
93
93
  }
94
- type LayoutMode = 'panel' | 'widget' | 'overlay' | 'fullscreen' | 'split' | 'mobile';
94
+ type LayoutMode = 'panel' | 'widget' | 'overlay' | 'fullscreen' | 'split' | 'mobile' | 'native';
95
+ /**
96
+ * When the underlying agent session should open its WebSocket connection.
97
+ *
98
+ * - 'lazy' → connect on first submit (idle pages hold no connection). Default
99
+ * for the `native` variant, where the composer sits idle on most
100
+ * page loads.
101
+ * - 'eager' → connect as soon as the session provider mounts.
102
+ */
103
+ type ConnectionStrategy = 'lazy' | 'eager';
95
104
  type WidgetPosition = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | 'center';
96
105
  interface LayoutConfig {
97
106
  mode: LayoutMode;
@@ -952,6 +961,13 @@ interface UseSemanticBuilderOptions<TBlock = AgentBlock> {
952
961
  pageName: string;
953
962
  hasContentBrief: boolean;
954
963
  }) => string;
964
+ /**
965
+ * Seed the synthetic "welcome" system message on mount and whenever the
966
+ * page/brief context changes. Default `true` (existing behavior). Set `false`
967
+ * to start with an empty transcript — used by the native variant so its idle
968
+ * composer is not preceded by a connection notice.
969
+ */
970
+ seedWelcomeMessage?: boolean;
955
971
  /** Optional WebSocket implementation (SSR/tests). */
956
972
  webSocketImpl?: typeof WebSocket;
957
973
  }
@@ -969,8 +985,10 @@ interface UseSemanticBuilderResult {
969
985
  isStreaming: boolean;
970
986
  sendMessage: (content: string, options?: SendMessageOptions) => Promise<boolean>;
971
987
  retry: () => void;
988
+ /** Clear the transcript and reset to an empty conversation. */
989
+ reset: () => void;
972
990
  }
973
- declare function useSemanticBuilder<TBlock = AgentBlock>({ socketUrl, resolveSocketUrl, websiteId, pageCategoryId, pageName, pageSlug, blocks, contentBrief, enabled, onGeneratedBlocks, onUndoRequest, buildWelcomeMessage, webSocketImpl, }: UseSemanticBuilderOptions<TBlock>): UseSemanticBuilderResult;
991
+ declare function useSemanticBuilder<TBlock = AgentBlock>({ socketUrl, resolveSocketUrl, websiteId, pageCategoryId, pageName, pageSlug, blocks, contentBrief, enabled, onGeneratedBlocks, onUndoRequest, buildWelcomeMessage, seedWelcomeMessage, webSocketImpl, }: UseSemanticBuilderOptions<TBlock>): UseSemanticBuilderResult;
974
992
 
975
993
  declare const buttonVariants: (props?: ({
976
994
  variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
@@ -2689,7 +2707,198 @@ interface AgentSurfaceProps {
2689
2707
  * - 'widget' → FloatingWidget (embeddable launcher + conversation)
2690
2708
  * - 'overlay' → OverlayModal (centered modal conversation)
2691
2709
  * - 'mobile' → MobileShell (full-height mobile layout)
2710
+ * - 'native' → NativeSurface (unpositioned, host-placed composer + conversation)
2711
+ *
2712
+ * Note: `mode="native"` here is the simple, fully controlled-props case. For the
2713
+ * decoupled, shared-session case (a composer and conversation in separate DOM
2714
+ * regions), use `NativeAgentProvider` + `<AgentComposer>` / `<AgentConversation>`.
2692
2715
  */
2693
2716
  declare function AgentSurface({ mode, messages, isLoading, inputValue, onInputChange, onSubmit, inputPlaceholder, input, title, subtitle, icon, headerActions, suggestions, showAvatars, renderMessage, onFeedback, onConfirmAction, report, dataPanel, isOpen, onToggle, onClose, onExitFullscreen, position, status, className, }: AgentSurfaceProps): react.JSX.Element;
2694
2717
 
2695
- export { type AgendaItem, type AgendaItemAction, type AgendaItemState, type AgendaSlotOption, type AgentAction, type AgentAttachment, AgentAvatar, type AgentBackend, type AgentBlock, type AgentConfig, type AgentContextValue, type AgentEvent, type AgentEventType, type AgentFeatures, AgentHandoff, type AgentHandoffProps, type AgentMessage, type AgentPersona, AgentProvider, type AgentProviderProps, type AgentReport, type AgentState, type AgentStreamChunk, AgentSurface, type AgentSurfaceProps, AllocationBreakdown, type AllocationSegment, type AllocationSummaryStat, type AnalyticsBreakdownRow, AnalyticsDashboard, type AnalyticsDashboardProps, type AnalyticsDistributionSegment, type AnalyticsHighlight, type AnalyticsMetric, type AnalyticsRankedRow, type AnalyticsRecentItem, type AnalyticsTrend, type AssistantMessageBlocksEnvelope, type AssistantMessageCompleteEnvelope, type AssistantMessageDeltaEnvelope, type AssistantMessageStartEnvelope, type AssistantMessageThinkingDeltaEnvelope, type Attachment, type AttachmentKind, type AttachmentMediaType, type AttachmentType, Avatar, AvatarFallback, AvatarImage, Badge, type BlockUpdateMode, Button, ChartContainer, type ChartData, type ChartDataPoint, type ChartType, type ChatMessageRole, ChatPanel, Collapsible, CollapsibleContent, CollapsibleTrigger, type ComponentCapability, type ComponentCategory, type ComponentManifestEntry, type ComponentSlot, type ConfirmationAction, type ConfirmationActionData, type ConfirmationData, ConfirmationPanel, type ConfirmationPanelProps, type ConnectionReadyEnvelope, type ConnectionState, ControlGrid, type ControlTile, type ControlTileType, ConversationAnalytics, ConversationArtifact, type ConversationArtifactProps, type ConversationHistoryItem, type DataPayload, DataPayloadView, DataTable, DynamicRenderer, type EditorAdjustment, type EditorTool, type EmotionScore, type EntityAction, EntityCard, type EntityCardData, type EntityField, type ErrorEnvelope, type ExecutionStep, type ExecutionStepStatus, type FeedbackCategory, type FeedbackSentiment, FileDropZone, FloatingWidget, FullBleedSurface, type FullBleedSurfaceProps, FullscreenDashboard, type GenerateReportOptions, GuidedLessonFlow, type HandoffAction, type HandoffAgent, type HandoffCandidate, type HandoffStatus, type HandoffVariant, ImageGenerator, type InlineSuggestion, InlineSuggestionsInput, Input, type LayoutConfig, type LayoutMode, type LessonStep, type LibraryPrompt, type Listing, type ListingAction, ListingFeed, type ListingField, type ManifestPropSpec, MediaEditorCanvas, MediaGallery, type MediaItem, type MediaKind, MessageActions, MessageBubble, type MessageBubbleProps, MessageContainer, type MessageContainerProps, MessageContent, type MessageContentProps, type MessageFeedback, MessageList, type MessageListProps, type MessageMetadata, type MessageRole, MessageWithAttachments, MessageWithFeedback, MessageWithReasoning, MessageWithSteps, type MetricData, MetricsGrid, MobileShell, type MockBackendConfig, MultimodalInput, OnboardingWizard, type OptionCardItem, OptionCards, type OrchestrationCommand, OverlayModal, PerformanceMetrics, PersonaSelector, Progress, ProgressTracker, PromptInput, PromptLibrary, type PromptTemplate, QuickReplies, type QuickReply, QuizCard, type QuizOption, type QuizQuestion, type QuizResult, type ReasoningStatus, type ReasoningStep, type Recommendation, type RecommendationAction, RecommendationCards, type RecommendationTone, type RenderInstruction, type ReportSection, ReportView, ScheduleTimeline, ScrollArea, ScrollBar, type SemanticBuilderChatMessage, SemanticBuilderSocketClient, type SendMessageOptions, type SendOptions, SentimentDisplay, type SentimentScore, type ServerEnvelope, type SettingControl, type SettingsGroup, SettingsPanel, SlotRenderer, type SocketClientOptions, type SocketSendPayload, type SocketUrlResolver, SplitView, StatusBadge, SystemMessage, type TableColumn, type TableData, TemplateSelector, type TemplateVariable, Textarea, type ThemeConfig, Timestamp, type ToolCall, type ToolDefinition, type ToolResult, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TrendDirection, type TrendTone, TypingIndicator, type UseSemanticBuilderOptions, type UseSemanticBuilderResult, type UserMessageEnvelope, type WidgetPosition, WritingAssistant, badgeVariants, buildSocketUrl, buttonVariants, calculatePercentage, cn, componentManifest, componentMap, componentRegistry, copyToClipboard, createMockBackend, debounce, delay, findComponentsByCapability, findComponentsByCategory, findComponentsBySurface, formatBytes, formatCurrency, formatNumber, formatRelativeTime, formatTime, generateId, getInitials, getManifestEntry, getSentimentBgColor, getSentimentColor, isBrowser, isInIframe, normalizeWebsiteId, parseTextWithBold, registerAllComponents, truncate, useAgent, useAgentBackend, useAgentInput, useAgentLayout, useAgentMessages, useSemanticBuilder };
2718
+ interface NativeAgentProviderProps {
2719
+ children: ReactNode;
2720
+ /** A fully-qualified `ws`/`wss` URL. Provide this OR `resolveSocketUrl`. */
2721
+ socketUrl?: string;
2722
+ /** Resolver that returns the socket URL for this conversation. */
2723
+ resolveSocketUrl?: SocketUrlResolver;
2724
+ /** Conversation/site identity used to establish the connection. */
2725
+ websiteId: string | number;
2726
+ /** Page/category identity used to establish the connection. */
2727
+ pageCategoryId: string;
2728
+ /** Display name for grounding/welcome (optional for general use). */
2729
+ pageName?: string;
2730
+ pageSlug?: string;
2731
+ /** Current page blocks forwarded to the agent for grounding. */
2732
+ blocks?: AgentBlock[];
2733
+ /** Optional content brief grounding context. */
2734
+ contentBrief?: Record<string, unknown> | null;
2735
+ /** Invoked when the agent returns generated blocks. */
2736
+ onGeneratedBlocks?: (blocks: AgentBlock[], updateMode?: BlockUpdateMode) => void;
2737
+ /** Optional WebSocket implementation (SSR/tests). */
2738
+ webSocketImpl?: typeof WebSocket;
2739
+ /** When to open the connection. Default 'lazy'. */
2740
+ connectionStrategy?: ConnectionStrategy;
2741
+ /**
2742
+ * Seed the synthetic "welcome" system message. Default `false` for the native
2743
+ * variant so the idle composer is not preceded by a connection notice.
2744
+ */
2745
+ seedWelcomeMessage?: boolean;
2746
+ /** Surfaced connection/processing errors. */
2747
+ onError?: (message: string) => void;
2748
+ /** Fired the first time the session is activated. */
2749
+ onActivate?: () => void;
2750
+ }
2751
+ /**
2752
+ * Provides a single shared agent session to any number of decoupled pieces.
2753
+ * Place `<AgentComposer>` and `<AgentConversation>` (or your own UI built on
2754
+ * `useNativeAgent()`) anywhere inside this provider.
2755
+ */
2756
+ declare function NativeAgentProvider({ children, socketUrl, resolveSocketUrl, websiteId, pageCategoryId, pageName, pageSlug, blocks, contentBrief, onGeneratedBlocks, webSocketImpl, connectionStrategy, seedWelcomeMessage, onError, onActivate, }: NativeAgentProviderProps): react.JSX.Element;
2757
+
2758
+ /** Online-status flavor used by header/status badges. */
2759
+ type NativeAgentStatus = 'online' | 'offline' | 'busy' | 'away';
2760
+ /**
2761
+ * The shared agent session broadcast by `NativeAgentProvider`. Every value is
2762
+ * derived from a single underlying WebSocket session, so any number of decoupled
2763
+ * pieces (composer, conversation, custom UI) stay in sync.
2764
+ */
2765
+ interface NativeAgentContextValue {
2766
+ /** Conversation transcript, mapped to the shared `AgentMessage` shape. */
2767
+ messages: AgentMessage[];
2768
+ /** True once the session has been engaged (first submit or `activate()`). */
2769
+ isActive: boolean;
2770
+ /** True when the socket is ready or streaming. */
2771
+ isConnected: boolean;
2772
+ /**
2773
+ * True while the agent is working: connecting after activation, a prompt is
2774
+ * queued awaiting connection, or a response is streaming. Drives the typing
2775
+ * indicator without the host having to compute it.
2776
+ */
2777
+ isResponding: boolean;
2778
+ /** True only while a response is actively streaming. */
2779
+ isStreaming: boolean;
2780
+ /** Raw connection state from the transport. */
2781
+ connectionState: ConnectionState;
2782
+ /** Human-readable connection label (e.g. "AI connected"). */
2783
+ statusLabel: string;
2784
+ /** Status badge flavor derived from `connectionState`. */
2785
+ status: NativeAgentStatus;
2786
+ /** Latest connection/processing error, or null. */
2787
+ error: string | null;
2788
+ /** Controlled composer draft value. */
2789
+ input: string;
2790
+ /** Update the controlled composer draft. */
2791
+ setInput: (value: string) => void;
2792
+ /**
2793
+ * Submit a prompt. Defaults to the current `input`. Activates the session and,
2794
+ * under the lazy strategy, opens the connection and queues the prompt until the
2795
+ * socket is ready.
2796
+ */
2797
+ submit: (content?: string) => void;
2798
+ /** Engage the session (open the connection) without sending a prompt. */
2799
+ activate: () => void;
2800
+ /** Clear the transcript and return to the idle state. */
2801
+ reset: () => void;
2802
+ /** Retry after a connection error. */
2803
+ retry: () => void;
2804
+ }
2805
+ /**
2806
+ * Read the shared agent session. Throws if used outside a
2807
+ * `<NativeAgentProvider>`. Use this for fully custom UI built on the session.
2808
+ */
2809
+ declare function useNativeAgent(): NativeAgentContextValue;
2810
+ /**
2811
+ * Internal: read the shared session if present, or `null` otherwise. Used by the
2812
+ * dual-mode pieces (`AgentComposer`, `AgentConversation`) so they can fall back
2813
+ * to fully prop-controlled (disconnected) operation when no provider is mounted.
2814
+ */
2815
+ declare function useNativeAgentOptional(): NativeAgentContextValue | null;
2816
+
2817
+ interface AgentComposerProps {
2818
+ /** Controlled draft value. Pair with `onChange` for caller-controlled editing. */
2819
+ value?: string;
2820
+ /** Draft change handler. Presence switches editing to caller-controlled. */
2821
+ onChange?: (value: string) => void;
2822
+ /** Submit handler, receives the current value. Overrides the shared `submit`. */
2823
+ onSubmit?: (value: string) => void;
2824
+ /** Loading/streaming state for the send affordance. */
2825
+ loading?: boolean;
2826
+ /** Force-disable the input. */
2827
+ disabled?: boolean;
2828
+ placeholder?: string;
2829
+ /** PromptInput styling variant. */
2830
+ variant?: 'default' | 'minimal' | 'bordered';
2831
+ /**
2832
+ * Drop the default rounded/bordered shell and render only the input + slots,
2833
+ * for hosts that want to supply all chrome themselves.
2834
+ */
2835
+ bare?: boolean;
2836
+ /** Node rendered above the input (e.g. suggestion chips). */
2837
+ suggestions?: ReactNode;
2838
+ /** Node rendered below the input (e.g. a hint line). */
2839
+ footer?: ReactNode;
2840
+ /** Actions rendered left of the textarea (e.g. an attach button). */
2841
+ leftActions?: ReactNode;
2842
+ /** Actions rendered right of the textarea, before send. */
2843
+ rightActions?: ReactNode;
2844
+ autoFocus?: boolean;
2845
+ className?: string;
2846
+ inputClassName?: string;
2847
+ }
2848
+ /**
2849
+ * The native composer. Renders unpositioned — apply layout (a fixed bottom bar,
2850
+ * a card, etc.) via `className`.
2851
+ */
2852
+ declare function AgentComposer({ value: valueProp, onChange, onSubmit, loading: loadingProp, disabled: disabledProp, placeholder, variant, bare, suggestions, footer, leftActions, rightActions, autoFocus, className, inputClassName, }: AgentComposerProps): react.JSX.Element;
2853
+
2854
+ interface AgentConversationProps {
2855
+ /** Explicit transcript. Overrides the shared session messages. */
2856
+ messages?: AgentMessage[];
2857
+ /** Explicit loading state. Overrides the shared session `isResponding`. */
2858
+ isLoading?: boolean;
2859
+ /** Optional node rendered above the scroll region. */
2860
+ header?: ReactNode;
2861
+ /** Shown when the transcript is empty and the agent is idle. */
2862
+ emptyState?: ReactNode;
2863
+ showAvatars?: boolean;
2864
+ renderMessage?: (message: AgentMessage) => ReactNode;
2865
+ onFeedback?: (messageId: string, vote: 'up' | 'down') => void;
2866
+ onConfirmAction?: (messageId: string, actionId: string) => void;
2867
+ /** Auto-scroll to the latest message. Default true. */
2868
+ autoScroll?: boolean;
2869
+ className?: string;
2870
+ contentClassName?: string;
2871
+ }
2872
+ /**
2873
+ * The native conversation surface. Fills its parent (`h-full`) — the host sizes
2874
+ * and positions it.
2875
+ */
2876
+ declare function AgentConversation({ messages: messagesProp, isLoading: isLoadingProp, header, emptyState, showAvatars, renderMessage, onFeedback, onConfirmAction, autoScroll, className, contentClassName, }: AgentConversationProps): react.JSX.Element;
2877
+
2878
+ interface NativeSurfaceProps {
2879
+ /** Conversation content (typically a MessageList). */
2880
+ children: React.ReactNode;
2881
+ /** Input slot rendered below the conversation. */
2882
+ input?: React.ReactNode;
2883
+ /** Header title. A header row renders only when a title or actions are given. */
2884
+ title?: string;
2885
+ /** Header subtitle/status. */
2886
+ subtitle?: string;
2887
+ /** Header icon. */
2888
+ icon?: React.ReactNode;
2889
+ /** Header actions (right side). */
2890
+ headerActions?: React.ReactNode;
2891
+ /** Suggestions/quick-replies above the input. */
2892
+ suggestions?: React.ReactNode;
2893
+ /** Footer below the input. */
2894
+ footer?: React.ReactNode;
2895
+ /** Typing/loading indicator state. */
2896
+ isLoading?: boolean;
2897
+ /** Auto-scroll to bottom on content change. Default true. */
2898
+ autoScroll?: boolean;
2899
+ className?: string;
2900
+ contentClassName?: string;
2901
+ }
2902
+ declare function NativeSurface({ children, input, title, subtitle, icon, headerActions, suggestions, footer, isLoading, autoScroll, className, contentClassName, }: NativeSurfaceProps): react.JSX.Element;
2903
+
2904
+ export { type AgendaItem, type AgendaItemAction, type AgendaItemState, type AgendaSlotOption, type AgentAction, type AgentAttachment, AgentAvatar, type AgentBackend, type AgentBlock, AgentComposer, type AgentComposerProps, type AgentConfig, type AgentContextValue, AgentConversation, type AgentConversationProps, type AgentEvent, type AgentEventType, type AgentFeatures, AgentHandoff, type AgentHandoffProps, type AgentMessage, type AgentPersona, AgentProvider, type AgentProviderProps, type AgentReport, type AgentState, type AgentStreamChunk, AgentSurface, type AgentSurfaceProps, AllocationBreakdown, type AllocationSegment, type AllocationSummaryStat, type AnalyticsBreakdownRow, AnalyticsDashboard, type AnalyticsDashboardProps, type AnalyticsDistributionSegment, type AnalyticsHighlight, type AnalyticsMetric, type AnalyticsRankedRow, type AnalyticsRecentItem, type AnalyticsTrend, type AssistantMessageBlocksEnvelope, type AssistantMessageCompleteEnvelope, type AssistantMessageDeltaEnvelope, type AssistantMessageStartEnvelope, type AssistantMessageThinkingDeltaEnvelope, type Attachment, type AttachmentKind, type AttachmentMediaType, type AttachmentType, Avatar, AvatarFallback, AvatarImage, Badge, type BlockUpdateMode, Button, ChartContainer, type ChartData, type ChartDataPoint, type ChartType, type ChatMessageRole, ChatPanel, Collapsible, CollapsibleContent, CollapsibleTrigger, type ComponentCapability, type ComponentCategory, type ComponentManifestEntry, type ComponentSlot, type ConfirmationAction, type ConfirmationActionData, type ConfirmationData, ConfirmationPanel, type ConfirmationPanelProps, type ConnectionReadyEnvelope, type ConnectionState, type ConnectionStrategy, ControlGrid, type ControlTile, type ControlTileType, ConversationAnalytics, ConversationArtifact, type ConversationArtifactProps, type ConversationHistoryItem, type DataPayload, DataPayloadView, DataTable, DynamicRenderer, type EditorAdjustment, type EditorTool, type EmotionScore, type EntityAction, EntityCard, type EntityCardData, type EntityField, type ErrorEnvelope, type ExecutionStep, type ExecutionStepStatus, type FeedbackCategory, type FeedbackSentiment, FileDropZone, FloatingWidget, FullBleedSurface, type FullBleedSurfaceProps, FullscreenDashboard, type GenerateReportOptions, GuidedLessonFlow, type HandoffAction, type HandoffAgent, type HandoffCandidate, type HandoffStatus, type HandoffVariant, ImageGenerator, type InlineSuggestion, InlineSuggestionsInput, Input, type LayoutConfig, type LayoutMode, type LessonStep, type LibraryPrompt, type Listing, type ListingAction, ListingFeed, type ListingField, type ManifestPropSpec, MediaEditorCanvas, MediaGallery, type MediaItem, type MediaKind, MessageActions, MessageBubble, type MessageBubbleProps, MessageContainer, type MessageContainerProps, MessageContent, type MessageContentProps, type MessageFeedback, MessageList, type MessageListProps, type MessageMetadata, type MessageRole, MessageWithAttachments, MessageWithFeedback, MessageWithReasoning, MessageWithSteps, type MetricData, MetricsGrid, MobileShell, type MockBackendConfig, MultimodalInput, type NativeAgentContextValue, NativeAgentProvider, type NativeAgentProviderProps, type NativeAgentStatus, NativeSurface, type NativeSurfaceProps, OnboardingWizard, type OptionCardItem, OptionCards, type OrchestrationCommand, OverlayModal, PerformanceMetrics, PersonaSelector, Progress, ProgressTracker, PromptInput, PromptLibrary, type PromptTemplate, QuickReplies, type QuickReply, QuizCard, type QuizOption, type QuizQuestion, type QuizResult, type ReasoningStatus, type ReasoningStep, type Recommendation, type RecommendationAction, RecommendationCards, type RecommendationTone, type RenderInstruction, type ReportSection, ReportView, ScheduleTimeline, ScrollArea, ScrollBar, type SemanticBuilderChatMessage, SemanticBuilderSocketClient, type SendMessageOptions, type SendOptions, SentimentDisplay, type SentimentScore, type ServerEnvelope, type SettingControl, type SettingsGroup, SettingsPanel, SlotRenderer, type SocketClientOptions, type SocketSendPayload, type SocketUrlResolver, SplitView, StatusBadge, SystemMessage, type TableColumn, type TableData, TemplateSelector, type TemplateVariable, Textarea, type ThemeConfig, Timestamp, type ToolCall, type ToolDefinition, type ToolResult, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TrendDirection, type TrendTone, TypingIndicator, type UseSemanticBuilderOptions, type UseSemanticBuilderResult, type UserMessageEnvelope, type WidgetPosition, WritingAssistant, badgeVariants, buildSocketUrl, buttonVariants, calculatePercentage, cn, componentManifest, componentMap, componentRegistry, copyToClipboard, createMockBackend, debounce, delay, findComponentsByCapability, findComponentsByCategory, findComponentsBySurface, formatBytes, formatCurrency, formatNumber, formatRelativeTime, formatTime, generateId, getInitials, getManifestEntry, getSentimentBgColor, getSentimentColor, isBrowser, isInIframe, normalizeWebsiteId, parseTextWithBold, registerAllComponents, truncate, useAgent, useAgentBackend, useAgentInput, useAgentLayout, useAgentMessages, useNativeAgent, useNativeAgentOptional, useSemanticBuilder };
package/dist/index.d.ts CHANGED
@@ -91,7 +91,16 @@ interface ExecutionStep {
91
91
  code?: string;
92
92
  output?: string;
93
93
  }
94
- type LayoutMode = 'panel' | 'widget' | 'overlay' | 'fullscreen' | 'split' | 'mobile';
94
+ type LayoutMode = 'panel' | 'widget' | 'overlay' | 'fullscreen' | 'split' | 'mobile' | 'native';
95
+ /**
96
+ * When the underlying agent session should open its WebSocket connection.
97
+ *
98
+ * - 'lazy' → connect on first submit (idle pages hold no connection). Default
99
+ * for the `native` variant, where the composer sits idle on most
100
+ * page loads.
101
+ * - 'eager' → connect as soon as the session provider mounts.
102
+ */
103
+ type ConnectionStrategy = 'lazy' | 'eager';
95
104
  type WidgetPosition = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | 'center';
96
105
  interface LayoutConfig {
97
106
  mode: LayoutMode;
@@ -952,6 +961,13 @@ interface UseSemanticBuilderOptions<TBlock = AgentBlock> {
952
961
  pageName: string;
953
962
  hasContentBrief: boolean;
954
963
  }) => string;
964
+ /**
965
+ * Seed the synthetic "welcome" system message on mount and whenever the
966
+ * page/brief context changes. Default `true` (existing behavior). Set `false`
967
+ * to start with an empty transcript — used by the native variant so its idle
968
+ * composer is not preceded by a connection notice.
969
+ */
970
+ seedWelcomeMessage?: boolean;
955
971
  /** Optional WebSocket implementation (SSR/tests). */
956
972
  webSocketImpl?: typeof WebSocket;
957
973
  }
@@ -969,8 +985,10 @@ interface UseSemanticBuilderResult {
969
985
  isStreaming: boolean;
970
986
  sendMessage: (content: string, options?: SendMessageOptions) => Promise<boolean>;
971
987
  retry: () => void;
988
+ /** Clear the transcript and reset to an empty conversation. */
989
+ reset: () => void;
972
990
  }
973
- declare function useSemanticBuilder<TBlock = AgentBlock>({ socketUrl, resolveSocketUrl, websiteId, pageCategoryId, pageName, pageSlug, blocks, contentBrief, enabled, onGeneratedBlocks, onUndoRequest, buildWelcomeMessage, webSocketImpl, }: UseSemanticBuilderOptions<TBlock>): UseSemanticBuilderResult;
991
+ declare function useSemanticBuilder<TBlock = AgentBlock>({ socketUrl, resolveSocketUrl, websiteId, pageCategoryId, pageName, pageSlug, blocks, contentBrief, enabled, onGeneratedBlocks, onUndoRequest, buildWelcomeMessage, seedWelcomeMessage, webSocketImpl, }: UseSemanticBuilderOptions<TBlock>): UseSemanticBuilderResult;
974
992
 
975
993
  declare const buttonVariants: (props?: ({
976
994
  variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
@@ -2689,7 +2707,198 @@ interface AgentSurfaceProps {
2689
2707
  * - 'widget' → FloatingWidget (embeddable launcher + conversation)
2690
2708
  * - 'overlay' → OverlayModal (centered modal conversation)
2691
2709
  * - 'mobile' → MobileShell (full-height mobile layout)
2710
+ * - 'native' → NativeSurface (unpositioned, host-placed composer + conversation)
2711
+ *
2712
+ * Note: `mode="native"` here is the simple, fully controlled-props case. For the
2713
+ * decoupled, shared-session case (a composer and conversation in separate DOM
2714
+ * regions), use `NativeAgentProvider` + `<AgentComposer>` / `<AgentConversation>`.
2692
2715
  */
2693
2716
  declare function AgentSurface({ mode, messages, isLoading, inputValue, onInputChange, onSubmit, inputPlaceholder, input, title, subtitle, icon, headerActions, suggestions, showAvatars, renderMessage, onFeedback, onConfirmAction, report, dataPanel, isOpen, onToggle, onClose, onExitFullscreen, position, status, className, }: AgentSurfaceProps): react.JSX.Element;
2694
2717
 
2695
- export { type AgendaItem, type AgendaItemAction, type AgendaItemState, type AgendaSlotOption, type AgentAction, type AgentAttachment, AgentAvatar, type AgentBackend, type AgentBlock, type AgentConfig, type AgentContextValue, type AgentEvent, type AgentEventType, type AgentFeatures, AgentHandoff, type AgentHandoffProps, type AgentMessage, type AgentPersona, AgentProvider, type AgentProviderProps, type AgentReport, type AgentState, type AgentStreamChunk, AgentSurface, type AgentSurfaceProps, AllocationBreakdown, type AllocationSegment, type AllocationSummaryStat, type AnalyticsBreakdownRow, AnalyticsDashboard, type AnalyticsDashboardProps, type AnalyticsDistributionSegment, type AnalyticsHighlight, type AnalyticsMetric, type AnalyticsRankedRow, type AnalyticsRecentItem, type AnalyticsTrend, type AssistantMessageBlocksEnvelope, type AssistantMessageCompleteEnvelope, type AssistantMessageDeltaEnvelope, type AssistantMessageStartEnvelope, type AssistantMessageThinkingDeltaEnvelope, type Attachment, type AttachmentKind, type AttachmentMediaType, type AttachmentType, Avatar, AvatarFallback, AvatarImage, Badge, type BlockUpdateMode, Button, ChartContainer, type ChartData, type ChartDataPoint, type ChartType, type ChatMessageRole, ChatPanel, Collapsible, CollapsibleContent, CollapsibleTrigger, type ComponentCapability, type ComponentCategory, type ComponentManifestEntry, type ComponentSlot, type ConfirmationAction, type ConfirmationActionData, type ConfirmationData, ConfirmationPanel, type ConfirmationPanelProps, type ConnectionReadyEnvelope, type ConnectionState, ControlGrid, type ControlTile, type ControlTileType, ConversationAnalytics, ConversationArtifact, type ConversationArtifactProps, type ConversationHistoryItem, type DataPayload, DataPayloadView, DataTable, DynamicRenderer, type EditorAdjustment, type EditorTool, type EmotionScore, type EntityAction, EntityCard, type EntityCardData, type EntityField, type ErrorEnvelope, type ExecutionStep, type ExecutionStepStatus, type FeedbackCategory, type FeedbackSentiment, FileDropZone, FloatingWidget, FullBleedSurface, type FullBleedSurfaceProps, FullscreenDashboard, type GenerateReportOptions, GuidedLessonFlow, type HandoffAction, type HandoffAgent, type HandoffCandidate, type HandoffStatus, type HandoffVariant, ImageGenerator, type InlineSuggestion, InlineSuggestionsInput, Input, type LayoutConfig, type LayoutMode, type LessonStep, type LibraryPrompt, type Listing, type ListingAction, ListingFeed, type ListingField, type ManifestPropSpec, MediaEditorCanvas, MediaGallery, type MediaItem, type MediaKind, MessageActions, MessageBubble, type MessageBubbleProps, MessageContainer, type MessageContainerProps, MessageContent, type MessageContentProps, type MessageFeedback, MessageList, type MessageListProps, type MessageMetadata, type MessageRole, MessageWithAttachments, MessageWithFeedback, MessageWithReasoning, MessageWithSteps, type MetricData, MetricsGrid, MobileShell, type MockBackendConfig, MultimodalInput, OnboardingWizard, type OptionCardItem, OptionCards, type OrchestrationCommand, OverlayModal, PerformanceMetrics, PersonaSelector, Progress, ProgressTracker, PromptInput, PromptLibrary, type PromptTemplate, QuickReplies, type QuickReply, QuizCard, type QuizOption, type QuizQuestion, type QuizResult, type ReasoningStatus, type ReasoningStep, type Recommendation, type RecommendationAction, RecommendationCards, type RecommendationTone, type RenderInstruction, type ReportSection, ReportView, ScheduleTimeline, ScrollArea, ScrollBar, type SemanticBuilderChatMessage, SemanticBuilderSocketClient, type SendMessageOptions, type SendOptions, SentimentDisplay, type SentimentScore, type ServerEnvelope, type SettingControl, type SettingsGroup, SettingsPanel, SlotRenderer, type SocketClientOptions, type SocketSendPayload, type SocketUrlResolver, SplitView, StatusBadge, SystemMessage, type TableColumn, type TableData, TemplateSelector, type TemplateVariable, Textarea, type ThemeConfig, Timestamp, type ToolCall, type ToolDefinition, type ToolResult, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TrendDirection, type TrendTone, TypingIndicator, type UseSemanticBuilderOptions, type UseSemanticBuilderResult, type UserMessageEnvelope, type WidgetPosition, WritingAssistant, badgeVariants, buildSocketUrl, buttonVariants, calculatePercentage, cn, componentManifest, componentMap, componentRegistry, copyToClipboard, createMockBackend, debounce, delay, findComponentsByCapability, findComponentsByCategory, findComponentsBySurface, formatBytes, formatCurrency, formatNumber, formatRelativeTime, formatTime, generateId, getInitials, getManifestEntry, getSentimentBgColor, getSentimentColor, isBrowser, isInIframe, normalizeWebsiteId, parseTextWithBold, registerAllComponents, truncate, useAgent, useAgentBackend, useAgentInput, useAgentLayout, useAgentMessages, useSemanticBuilder };
2718
+ interface NativeAgentProviderProps {
2719
+ children: ReactNode;
2720
+ /** A fully-qualified `ws`/`wss` URL. Provide this OR `resolveSocketUrl`. */
2721
+ socketUrl?: string;
2722
+ /** Resolver that returns the socket URL for this conversation. */
2723
+ resolveSocketUrl?: SocketUrlResolver;
2724
+ /** Conversation/site identity used to establish the connection. */
2725
+ websiteId: string | number;
2726
+ /** Page/category identity used to establish the connection. */
2727
+ pageCategoryId: string;
2728
+ /** Display name for grounding/welcome (optional for general use). */
2729
+ pageName?: string;
2730
+ pageSlug?: string;
2731
+ /** Current page blocks forwarded to the agent for grounding. */
2732
+ blocks?: AgentBlock[];
2733
+ /** Optional content brief grounding context. */
2734
+ contentBrief?: Record<string, unknown> | null;
2735
+ /** Invoked when the agent returns generated blocks. */
2736
+ onGeneratedBlocks?: (blocks: AgentBlock[], updateMode?: BlockUpdateMode) => void;
2737
+ /** Optional WebSocket implementation (SSR/tests). */
2738
+ webSocketImpl?: typeof WebSocket;
2739
+ /** When to open the connection. Default 'lazy'. */
2740
+ connectionStrategy?: ConnectionStrategy;
2741
+ /**
2742
+ * Seed the synthetic "welcome" system message. Default `false` for the native
2743
+ * variant so the idle composer is not preceded by a connection notice.
2744
+ */
2745
+ seedWelcomeMessage?: boolean;
2746
+ /** Surfaced connection/processing errors. */
2747
+ onError?: (message: string) => void;
2748
+ /** Fired the first time the session is activated. */
2749
+ onActivate?: () => void;
2750
+ }
2751
+ /**
2752
+ * Provides a single shared agent session to any number of decoupled pieces.
2753
+ * Place `<AgentComposer>` and `<AgentConversation>` (or your own UI built on
2754
+ * `useNativeAgent()`) anywhere inside this provider.
2755
+ */
2756
+ declare function NativeAgentProvider({ children, socketUrl, resolveSocketUrl, websiteId, pageCategoryId, pageName, pageSlug, blocks, contentBrief, onGeneratedBlocks, webSocketImpl, connectionStrategy, seedWelcomeMessage, onError, onActivate, }: NativeAgentProviderProps): react.JSX.Element;
2757
+
2758
+ /** Online-status flavor used by header/status badges. */
2759
+ type NativeAgentStatus = 'online' | 'offline' | 'busy' | 'away';
2760
+ /**
2761
+ * The shared agent session broadcast by `NativeAgentProvider`. Every value is
2762
+ * derived from a single underlying WebSocket session, so any number of decoupled
2763
+ * pieces (composer, conversation, custom UI) stay in sync.
2764
+ */
2765
+ interface NativeAgentContextValue {
2766
+ /** Conversation transcript, mapped to the shared `AgentMessage` shape. */
2767
+ messages: AgentMessage[];
2768
+ /** True once the session has been engaged (first submit or `activate()`). */
2769
+ isActive: boolean;
2770
+ /** True when the socket is ready or streaming. */
2771
+ isConnected: boolean;
2772
+ /**
2773
+ * True while the agent is working: connecting after activation, a prompt is
2774
+ * queued awaiting connection, or a response is streaming. Drives the typing
2775
+ * indicator without the host having to compute it.
2776
+ */
2777
+ isResponding: boolean;
2778
+ /** True only while a response is actively streaming. */
2779
+ isStreaming: boolean;
2780
+ /** Raw connection state from the transport. */
2781
+ connectionState: ConnectionState;
2782
+ /** Human-readable connection label (e.g. "AI connected"). */
2783
+ statusLabel: string;
2784
+ /** Status badge flavor derived from `connectionState`. */
2785
+ status: NativeAgentStatus;
2786
+ /** Latest connection/processing error, or null. */
2787
+ error: string | null;
2788
+ /** Controlled composer draft value. */
2789
+ input: string;
2790
+ /** Update the controlled composer draft. */
2791
+ setInput: (value: string) => void;
2792
+ /**
2793
+ * Submit a prompt. Defaults to the current `input`. Activates the session and,
2794
+ * under the lazy strategy, opens the connection and queues the prompt until the
2795
+ * socket is ready.
2796
+ */
2797
+ submit: (content?: string) => void;
2798
+ /** Engage the session (open the connection) without sending a prompt. */
2799
+ activate: () => void;
2800
+ /** Clear the transcript and return to the idle state. */
2801
+ reset: () => void;
2802
+ /** Retry after a connection error. */
2803
+ retry: () => void;
2804
+ }
2805
+ /**
2806
+ * Read the shared agent session. Throws if used outside a
2807
+ * `<NativeAgentProvider>`. Use this for fully custom UI built on the session.
2808
+ */
2809
+ declare function useNativeAgent(): NativeAgentContextValue;
2810
+ /**
2811
+ * Internal: read the shared session if present, or `null` otherwise. Used by the
2812
+ * dual-mode pieces (`AgentComposer`, `AgentConversation`) so they can fall back
2813
+ * to fully prop-controlled (disconnected) operation when no provider is mounted.
2814
+ */
2815
+ declare function useNativeAgentOptional(): NativeAgentContextValue | null;
2816
+
2817
+ interface AgentComposerProps {
2818
+ /** Controlled draft value. Pair with `onChange` for caller-controlled editing. */
2819
+ value?: string;
2820
+ /** Draft change handler. Presence switches editing to caller-controlled. */
2821
+ onChange?: (value: string) => void;
2822
+ /** Submit handler, receives the current value. Overrides the shared `submit`. */
2823
+ onSubmit?: (value: string) => void;
2824
+ /** Loading/streaming state for the send affordance. */
2825
+ loading?: boolean;
2826
+ /** Force-disable the input. */
2827
+ disabled?: boolean;
2828
+ placeholder?: string;
2829
+ /** PromptInput styling variant. */
2830
+ variant?: 'default' | 'minimal' | 'bordered';
2831
+ /**
2832
+ * Drop the default rounded/bordered shell and render only the input + slots,
2833
+ * for hosts that want to supply all chrome themselves.
2834
+ */
2835
+ bare?: boolean;
2836
+ /** Node rendered above the input (e.g. suggestion chips). */
2837
+ suggestions?: ReactNode;
2838
+ /** Node rendered below the input (e.g. a hint line). */
2839
+ footer?: ReactNode;
2840
+ /** Actions rendered left of the textarea (e.g. an attach button). */
2841
+ leftActions?: ReactNode;
2842
+ /** Actions rendered right of the textarea, before send. */
2843
+ rightActions?: ReactNode;
2844
+ autoFocus?: boolean;
2845
+ className?: string;
2846
+ inputClassName?: string;
2847
+ }
2848
+ /**
2849
+ * The native composer. Renders unpositioned — apply layout (a fixed bottom bar,
2850
+ * a card, etc.) via `className`.
2851
+ */
2852
+ declare function AgentComposer({ value: valueProp, onChange, onSubmit, loading: loadingProp, disabled: disabledProp, placeholder, variant, bare, suggestions, footer, leftActions, rightActions, autoFocus, className, inputClassName, }: AgentComposerProps): react.JSX.Element;
2853
+
2854
+ interface AgentConversationProps {
2855
+ /** Explicit transcript. Overrides the shared session messages. */
2856
+ messages?: AgentMessage[];
2857
+ /** Explicit loading state. Overrides the shared session `isResponding`. */
2858
+ isLoading?: boolean;
2859
+ /** Optional node rendered above the scroll region. */
2860
+ header?: ReactNode;
2861
+ /** Shown when the transcript is empty and the agent is idle. */
2862
+ emptyState?: ReactNode;
2863
+ showAvatars?: boolean;
2864
+ renderMessage?: (message: AgentMessage) => ReactNode;
2865
+ onFeedback?: (messageId: string, vote: 'up' | 'down') => void;
2866
+ onConfirmAction?: (messageId: string, actionId: string) => void;
2867
+ /** Auto-scroll to the latest message. Default true. */
2868
+ autoScroll?: boolean;
2869
+ className?: string;
2870
+ contentClassName?: string;
2871
+ }
2872
+ /**
2873
+ * The native conversation surface. Fills its parent (`h-full`) — the host sizes
2874
+ * and positions it.
2875
+ */
2876
+ declare function AgentConversation({ messages: messagesProp, isLoading: isLoadingProp, header, emptyState, showAvatars, renderMessage, onFeedback, onConfirmAction, autoScroll, className, contentClassName, }: AgentConversationProps): react.JSX.Element;
2877
+
2878
+ interface NativeSurfaceProps {
2879
+ /** Conversation content (typically a MessageList). */
2880
+ children: React.ReactNode;
2881
+ /** Input slot rendered below the conversation. */
2882
+ input?: React.ReactNode;
2883
+ /** Header title. A header row renders only when a title or actions are given. */
2884
+ title?: string;
2885
+ /** Header subtitle/status. */
2886
+ subtitle?: string;
2887
+ /** Header icon. */
2888
+ icon?: React.ReactNode;
2889
+ /** Header actions (right side). */
2890
+ headerActions?: React.ReactNode;
2891
+ /** Suggestions/quick-replies above the input. */
2892
+ suggestions?: React.ReactNode;
2893
+ /** Footer below the input. */
2894
+ footer?: React.ReactNode;
2895
+ /** Typing/loading indicator state. */
2896
+ isLoading?: boolean;
2897
+ /** Auto-scroll to bottom on content change. Default true. */
2898
+ autoScroll?: boolean;
2899
+ className?: string;
2900
+ contentClassName?: string;
2901
+ }
2902
+ declare function NativeSurface({ children, input, title, subtitle, icon, headerActions, suggestions, footer, isLoading, autoScroll, className, contentClassName, }: NativeSurfaceProps): react.JSX.Element;
2903
+
2904
+ export { type AgendaItem, type AgendaItemAction, type AgendaItemState, type AgendaSlotOption, type AgentAction, type AgentAttachment, AgentAvatar, type AgentBackend, type AgentBlock, AgentComposer, type AgentComposerProps, type AgentConfig, type AgentContextValue, AgentConversation, type AgentConversationProps, type AgentEvent, type AgentEventType, type AgentFeatures, AgentHandoff, type AgentHandoffProps, type AgentMessage, type AgentPersona, AgentProvider, type AgentProviderProps, type AgentReport, type AgentState, type AgentStreamChunk, AgentSurface, type AgentSurfaceProps, AllocationBreakdown, type AllocationSegment, type AllocationSummaryStat, type AnalyticsBreakdownRow, AnalyticsDashboard, type AnalyticsDashboardProps, type AnalyticsDistributionSegment, type AnalyticsHighlight, type AnalyticsMetric, type AnalyticsRankedRow, type AnalyticsRecentItem, type AnalyticsTrend, type AssistantMessageBlocksEnvelope, type AssistantMessageCompleteEnvelope, type AssistantMessageDeltaEnvelope, type AssistantMessageStartEnvelope, type AssistantMessageThinkingDeltaEnvelope, type Attachment, type AttachmentKind, type AttachmentMediaType, type AttachmentType, Avatar, AvatarFallback, AvatarImage, Badge, type BlockUpdateMode, Button, ChartContainer, type ChartData, type ChartDataPoint, type ChartType, type ChatMessageRole, ChatPanel, Collapsible, CollapsibleContent, CollapsibleTrigger, type ComponentCapability, type ComponentCategory, type ComponentManifestEntry, type ComponentSlot, type ConfirmationAction, type ConfirmationActionData, type ConfirmationData, ConfirmationPanel, type ConfirmationPanelProps, type ConnectionReadyEnvelope, type ConnectionState, type ConnectionStrategy, ControlGrid, type ControlTile, type ControlTileType, ConversationAnalytics, ConversationArtifact, type ConversationArtifactProps, type ConversationHistoryItem, type DataPayload, DataPayloadView, DataTable, DynamicRenderer, type EditorAdjustment, type EditorTool, type EmotionScore, type EntityAction, EntityCard, type EntityCardData, type EntityField, type ErrorEnvelope, type ExecutionStep, type ExecutionStepStatus, type FeedbackCategory, type FeedbackSentiment, FileDropZone, FloatingWidget, FullBleedSurface, type FullBleedSurfaceProps, FullscreenDashboard, type GenerateReportOptions, GuidedLessonFlow, type HandoffAction, type HandoffAgent, type HandoffCandidate, type HandoffStatus, type HandoffVariant, ImageGenerator, type InlineSuggestion, InlineSuggestionsInput, Input, type LayoutConfig, type LayoutMode, type LessonStep, type LibraryPrompt, type Listing, type ListingAction, ListingFeed, type ListingField, type ManifestPropSpec, MediaEditorCanvas, MediaGallery, type MediaItem, type MediaKind, MessageActions, MessageBubble, type MessageBubbleProps, MessageContainer, type MessageContainerProps, MessageContent, type MessageContentProps, type MessageFeedback, MessageList, type MessageListProps, type MessageMetadata, type MessageRole, MessageWithAttachments, MessageWithFeedback, MessageWithReasoning, MessageWithSteps, type MetricData, MetricsGrid, MobileShell, type MockBackendConfig, MultimodalInput, type NativeAgentContextValue, NativeAgentProvider, type NativeAgentProviderProps, type NativeAgentStatus, NativeSurface, type NativeSurfaceProps, OnboardingWizard, type OptionCardItem, OptionCards, type OrchestrationCommand, OverlayModal, PerformanceMetrics, PersonaSelector, Progress, ProgressTracker, PromptInput, PromptLibrary, type PromptTemplate, QuickReplies, type QuickReply, QuizCard, type QuizOption, type QuizQuestion, type QuizResult, type ReasoningStatus, type ReasoningStep, type Recommendation, type RecommendationAction, RecommendationCards, type RecommendationTone, type RenderInstruction, type ReportSection, ReportView, ScheduleTimeline, ScrollArea, ScrollBar, type SemanticBuilderChatMessage, SemanticBuilderSocketClient, type SendMessageOptions, type SendOptions, SentimentDisplay, type SentimentScore, type ServerEnvelope, type SettingControl, type SettingsGroup, SettingsPanel, SlotRenderer, type SocketClientOptions, type SocketSendPayload, type SocketUrlResolver, SplitView, StatusBadge, SystemMessage, type TableColumn, type TableData, TemplateSelector, type TemplateVariable, Textarea, type ThemeConfig, Timestamp, type ToolCall, type ToolDefinition, type ToolResult, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TrendDirection, type TrendTone, TypingIndicator, type UseSemanticBuilderOptions, type UseSemanticBuilderResult, type UserMessageEnvelope, type WidgetPosition, WritingAssistant, badgeVariants, buildSocketUrl, buttonVariants, calculatePercentage, cn, componentManifest, componentMap, componentRegistry, copyToClipboard, createMockBackend, debounce, delay, findComponentsByCapability, findComponentsByCategory, findComponentsBySurface, formatBytes, formatCurrency, formatNumber, formatRelativeTime, formatTime, generateId, getInitials, getManifestEntry, getSentimentBgColor, getSentimentColor, isBrowser, isInIframe, normalizeWebsiteId, parseTextWithBold, registerAllComponents, truncate, useAgent, useAgentBackend, useAgentInput, useAgentLayout, useAgentMessages, useNativeAgent, useNativeAgentOptional, useSemanticBuilder };