@page-speed/agent-everywhere 0.3.0 → 0.4.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/README.md +36 -1
- package/dist/index.cjs +164 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +115 -7
- package/dist/index.d.ts +115 -7
- package/dist/index.js +163 -58
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -22,6 +22,36 @@ interface AgentMessage {
|
|
|
22
22
|
feedback?: MessageFeedback;
|
|
23
23
|
/** For chart/data messages */
|
|
24
24
|
data?: DataPayload;
|
|
25
|
+
/**
|
|
26
|
+
* An inline confirmation / proposed-plan / action panel attached to this
|
|
27
|
+
* message. Rendered in the transcript flow (after the message content) so it
|
|
28
|
+
* never covers the assistant response. See `ConfirmationData`.
|
|
29
|
+
*/
|
|
30
|
+
confirmation?: ConfirmationData;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Data-only description of an inline confirmation / proposed-plan panel. The
|
|
34
|
+
* `MessageList` renders this with the `ConfirmationPanel` component, reusing the
|
|
35
|
+
* shared markdown rendering for the body so long plans keep readable spacing.
|
|
36
|
+
*/
|
|
37
|
+
interface ConfirmationData {
|
|
38
|
+
/** Panel heading, e.g. "Proposed plan". */
|
|
39
|
+
title?: string;
|
|
40
|
+
/** Short scope/summary label, e.g. "3 pages to change". */
|
|
41
|
+
summary?: string;
|
|
42
|
+
/** Plan / confirmation body. Rendered as markdown by default. */
|
|
43
|
+
body?: string;
|
|
44
|
+
/** Render the body verbatim instead of as markdown. */
|
|
45
|
+
markdown?: boolean;
|
|
46
|
+
/** Action buttons (confirm / cancel / regenerate, …). */
|
|
47
|
+
actions?: ConfirmationActionData[];
|
|
48
|
+
}
|
|
49
|
+
interface ConfirmationActionData {
|
|
50
|
+
id: string;
|
|
51
|
+
label: string;
|
|
52
|
+
variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
busy?: boolean;
|
|
25
55
|
}
|
|
26
56
|
interface MessageMetadata {
|
|
27
57
|
model?: string;
|
|
@@ -943,8 +973,8 @@ interface UseSemanticBuilderResult {
|
|
|
943
973
|
declare function useSemanticBuilder<TBlock = AgentBlock>({ socketUrl, resolveSocketUrl, websiteId, pageCategoryId, pageName, pageSlug, blocks, contentBrief, enabled, onGeneratedBlocks, onUndoRequest, buildWelcomeMessage, webSocketImpl, }: UseSemanticBuilderOptions<TBlock>): UseSemanticBuilderResult;
|
|
944
974
|
|
|
945
975
|
declare const buttonVariants: (props?: ({
|
|
946
|
-
variant?: "
|
|
947
|
-
size?: "
|
|
976
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
977
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
948
978
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
949
979
|
interface ButtonProps extends react.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
950
980
|
asChild?: boolean;
|
|
@@ -956,7 +986,7 @@ declare const Input: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
|
|
|
956
986
|
declare const Textarea: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & react.RefAttributes<HTMLTextAreaElement>>;
|
|
957
987
|
|
|
958
988
|
declare const badgeVariants: (props?: ({
|
|
959
|
-
variant?: "
|
|
989
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "error" | "success" | "warning" | null | undefined;
|
|
960
990
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
961
991
|
interface BadgeProps extends react.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
962
992
|
}
|
|
@@ -988,6 +1018,23 @@ interface MessageBubbleProps {
|
|
|
988
1018
|
unstyled?: boolean;
|
|
989
1019
|
}
|
|
990
1020
|
declare function MessageBubble({ role, children, className, unstyled }: MessageBubbleProps): react.JSX.Element;
|
|
1021
|
+
interface MessageContentProps {
|
|
1022
|
+
children: React.ReactNode;
|
|
1023
|
+
className?: string;
|
|
1024
|
+
/**
|
|
1025
|
+
* When the content is a plain string, render it as markdown (headings,
|
|
1026
|
+
* lists, bold/italic, code, links) instead of raw text. Defaults to true.
|
|
1027
|
+
* Set false for content that should be shown verbatim.
|
|
1028
|
+
*/
|
|
1029
|
+
markdown?: boolean;
|
|
1030
|
+
}
|
|
1031
|
+
declare function MessageContent({ children, className, markdown, }: MessageContentProps): react.JSX.Element;
|
|
1032
|
+
interface MessageContainerProps {
|
|
1033
|
+
role: MessageRole;
|
|
1034
|
+
children: React.ReactNode;
|
|
1035
|
+
className?: string;
|
|
1036
|
+
}
|
|
1037
|
+
declare function MessageContainer({ role, children, className }: MessageContainerProps): react.JSX.Element;
|
|
991
1038
|
|
|
992
1039
|
interface AgentAvatarProps {
|
|
993
1040
|
role: MessageRole;
|
|
@@ -1090,7 +1137,7 @@ interface PromptInputProps {
|
|
|
1090
1137
|
/** Input class */
|
|
1091
1138
|
inputClassName?: string;
|
|
1092
1139
|
/** Variant styling */
|
|
1093
|
-
variant?:
|
|
1140
|
+
variant?: "default" | "minimal" | "bordered";
|
|
1094
1141
|
/**
|
|
1095
1142
|
* Minimum number of visible text rows. Default 1 (grows as the user types).
|
|
1096
1143
|
*/
|
|
@@ -1316,6 +1363,11 @@ interface MessageListProps {
|
|
|
1316
1363
|
renderMessage?: (message: AgentMessage) => React.ReactNode;
|
|
1317
1364
|
/** Feedback handler passed to feedback-capable messages. */
|
|
1318
1365
|
onFeedback?: (messageId: string, vote: 'up' | 'down') => void;
|
|
1366
|
+
/**
|
|
1367
|
+
* Invoked when an inline confirmation-panel action is activated. Receives the
|
|
1368
|
+
* owning message id and the action id.
|
|
1369
|
+
*/
|
|
1370
|
+
onConfirmAction?: (messageId: string, actionId: string) => void;
|
|
1319
1371
|
className?: string;
|
|
1320
1372
|
}
|
|
1321
1373
|
/**
|
|
@@ -1324,7 +1376,7 @@ interface MessageListProps {
|
|
|
1324
1376
|
* content, attachments, and any structured data payload. This is the default
|
|
1325
1377
|
* conversation body shared by every surface.
|
|
1326
1378
|
*/
|
|
1327
|
-
declare function MessageList({ messages, showAvatars, renderMessage, className, }: MessageListProps): react.JSX.Element;
|
|
1379
|
+
declare function MessageList({ messages, showAvatars, renderMessage, onConfirmAction, className, }: MessageListProps): react.JSX.Element;
|
|
1328
1380
|
|
|
1329
1381
|
interface PersonaSelectorProps {
|
|
1330
1382
|
/** Available personas to choose from. */
|
|
@@ -1601,6 +1653,56 @@ interface SettingsPanelProps {
|
|
|
1601
1653
|
}
|
|
1602
1654
|
declare function SettingsPanel({ groups, onChange, className }: SettingsPanelProps): react.JSX.Element;
|
|
1603
1655
|
|
|
1656
|
+
interface ConfirmationAction {
|
|
1657
|
+
id: string;
|
|
1658
|
+
label: string;
|
|
1659
|
+
/** Button variant; defaults to 'default' for the first action, 'outline' otherwise. */
|
|
1660
|
+
variant?: ButtonProps['variant'];
|
|
1661
|
+
/** Disable this action. */
|
|
1662
|
+
disabled?: boolean;
|
|
1663
|
+
/** Render a loading/busy state and disable the button. */
|
|
1664
|
+
busy?: boolean;
|
|
1665
|
+
}
|
|
1666
|
+
interface ConfirmationPanelProps {
|
|
1667
|
+
/** Panel heading, e.g. "Proposed plan". */
|
|
1668
|
+
title?: string;
|
|
1669
|
+
/**
|
|
1670
|
+
* Short label shown beside the title (e.g. "0 pages to change"). Rendered as
|
|
1671
|
+
* a badge so scope/summary metadata reads at a glance.
|
|
1672
|
+
*/
|
|
1673
|
+
summary?: string;
|
|
1674
|
+
/**
|
|
1675
|
+
* The plan / confirmation body. When a string is passed it is rendered
|
|
1676
|
+
* through the same markdown pipeline as assistant messages, so headings,
|
|
1677
|
+
* paragraphs, and bullet/numbered lists keep their spacing and line breaks.
|
|
1678
|
+
* Pass `markdown={false}` to render verbatim, or pass a node for custom body.
|
|
1679
|
+
*/
|
|
1680
|
+
body?: React.ReactNode;
|
|
1681
|
+
/**
|
|
1682
|
+
* Render the string body as markdown. Defaults to true. Ignored for node
|
|
1683
|
+
* bodies (which are rendered as-is).
|
|
1684
|
+
*/
|
|
1685
|
+
markdown?: boolean;
|
|
1686
|
+
/** Leading icon for the header. Defaults to a clipboard list icon. */
|
|
1687
|
+
icon?: React.ReactNode;
|
|
1688
|
+
/** Action buttons (confirm / cancel / regenerate, …). */
|
|
1689
|
+
actions?: ConfirmationAction[];
|
|
1690
|
+
/** Invoked with the action id when an action button is activated. */
|
|
1691
|
+
onAction?: (id: string) => void;
|
|
1692
|
+
/** Accessible label for the panel region. Defaults to the title. */
|
|
1693
|
+
ariaLabel?: string;
|
|
1694
|
+
className?: string;
|
|
1695
|
+
}
|
|
1696
|
+
/**
|
|
1697
|
+
* An inline confirmation / proposed-plan / action panel.
|
|
1698
|
+
*
|
|
1699
|
+
* It is designed to flow inside the transcript like any other message — NOT to
|
|
1700
|
+
* be pinned above the input — so it never covers the latest assistant response.
|
|
1701
|
+
* The body reuses {@link MessageContent}, giving long plans the same markdown
|
|
1702
|
+
* rendering, typography, and spacing as normal assistant messages.
|
|
1703
|
+
*/
|
|
1704
|
+
declare function ConfirmationPanel({ title, summary, body, markdown, icon, actions, onAction, ariaLabel, className, }: ConfirmationPanelProps): react.JSX.Element;
|
|
1705
|
+
|
|
1604
1706
|
/**
|
|
1605
1707
|
* Lifecycle of an agent-to-agent handoff.
|
|
1606
1708
|
* - 'connecting' → the target agent is being brought online / routed to.
|
|
@@ -2543,6 +2645,12 @@ interface AgentSurfaceProps {
|
|
|
2543
2645
|
renderMessage?: (message: AgentMessage) => ReactNode;
|
|
2544
2646
|
/** Feedback handler passed to MessageList. */
|
|
2545
2647
|
onFeedback?: (messageId: string, vote: 'up' | 'down') => void;
|
|
2648
|
+
/**
|
|
2649
|
+
* Handler for inline confirmation-panel actions. Receives the owning message
|
|
2650
|
+
* id and the activated action id. Confirmation panels render inline in the
|
|
2651
|
+
* transcript (via `message.confirmation`), never pinned over the response.
|
|
2652
|
+
*/
|
|
2653
|
+
onConfirmAction?: (messageId: string, actionId: string) => void;
|
|
2546
2654
|
/**
|
|
2547
2655
|
* Structured report rendered in the data region. Used by the
|
|
2548
2656
|
* dashboard/split surfaces (sidebar or data panel). If omitted, a custom
|
|
@@ -2582,6 +2690,6 @@ interface AgentSurfaceProps {
|
|
|
2582
2690
|
* - 'overlay' → OverlayModal (centered modal conversation)
|
|
2583
2691
|
* - 'mobile' → MobileShell (full-height mobile layout)
|
|
2584
2692
|
*/
|
|
2585
|
-
declare function AgentSurface({ mode, messages, isLoading, inputValue, onInputChange, onSubmit, inputPlaceholder, input, title, subtitle, icon, headerActions, suggestions, showAvatars, renderMessage, onFeedback, report, dataPanel, isOpen, onToggle, onClose, onExitFullscreen, position, status, className, }: AgentSurfaceProps): react.JSX.Element;
|
|
2693
|
+
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;
|
|
2586
2694
|
|
|
2587
|
-
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 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 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 };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,36 @@ interface AgentMessage {
|
|
|
22
22
|
feedback?: MessageFeedback;
|
|
23
23
|
/** For chart/data messages */
|
|
24
24
|
data?: DataPayload;
|
|
25
|
+
/**
|
|
26
|
+
* An inline confirmation / proposed-plan / action panel attached to this
|
|
27
|
+
* message. Rendered in the transcript flow (after the message content) so it
|
|
28
|
+
* never covers the assistant response. See `ConfirmationData`.
|
|
29
|
+
*/
|
|
30
|
+
confirmation?: ConfirmationData;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Data-only description of an inline confirmation / proposed-plan panel. The
|
|
34
|
+
* `MessageList` renders this with the `ConfirmationPanel` component, reusing the
|
|
35
|
+
* shared markdown rendering for the body so long plans keep readable spacing.
|
|
36
|
+
*/
|
|
37
|
+
interface ConfirmationData {
|
|
38
|
+
/** Panel heading, e.g. "Proposed plan". */
|
|
39
|
+
title?: string;
|
|
40
|
+
/** Short scope/summary label, e.g. "3 pages to change". */
|
|
41
|
+
summary?: string;
|
|
42
|
+
/** Plan / confirmation body. Rendered as markdown by default. */
|
|
43
|
+
body?: string;
|
|
44
|
+
/** Render the body verbatim instead of as markdown. */
|
|
45
|
+
markdown?: boolean;
|
|
46
|
+
/** Action buttons (confirm / cancel / regenerate, …). */
|
|
47
|
+
actions?: ConfirmationActionData[];
|
|
48
|
+
}
|
|
49
|
+
interface ConfirmationActionData {
|
|
50
|
+
id: string;
|
|
51
|
+
label: string;
|
|
52
|
+
variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
busy?: boolean;
|
|
25
55
|
}
|
|
26
56
|
interface MessageMetadata {
|
|
27
57
|
model?: string;
|
|
@@ -943,8 +973,8 @@ interface UseSemanticBuilderResult {
|
|
|
943
973
|
declare function useSemanticBuilder<TBlock = AgentBlock>({ socketUrl, resolveSocketUrl, websiteId, pageCategoryId, pageName, pageSlug, blocks, contentBrief, enabled, onGeneratedBlocks, onUndoRequest, buildWelcomeMessage, webSocketImpl, }: UseSemanticBuilderOptions<TBlock>): UseSemanticBuilderResult;
|
|
944
974
|
|
|
945
975
|
declare const buttonVariants: (props?: ({
|
|
946
|
-
variant?: "
|
|
947
|
-
size?: "
|
|
976
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
977
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
948
978
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
949
979
|
interface ButtonProps extends react.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
950
980
|
asChild?: boolean;
|
|
@@ -956,7 +986,7 @@ declare const Input: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
|
|
|
956
986
|
declare const Textarea: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & react.RefAttributes<HTMLTextAreaElement>>;
|
|
957
987
|
|
|
958
988
|
declare const badgeVariants: (props?: ({
|
|
959
|
-
variant?: "
|
|
989
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "error" | "success" | "warning" | null | undefined;
|
|
960
990
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
961
991
|
interface BadgeProps extends react.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
962
992
|
}
|
|
@@ -988,6 +1018,23 @@ interface MessageBubbleProps {
|
|
|
988
1018
|
unstyled?: boolean;
|
|
989
1019
|
}
|
|
990
1020
|
declare function MessageBubble({ role, children, className, unstyled }: MessageBubbleProps): react.JSX.Element;
|
|
1021
|
+
interface MessageContentProps {
|
|
1022
|
+
children: React.ReactNode;
|
|
1023
|
+
className?: string;
|
|
1024
|
+
/**
|
|
1025
|
+
* When the content is a plain string, render it as markdown (headings,
|
|
1026
|
+
* lists, bold/italic, code, links) instead of raw text. Defaults to true.
|
|
1027
|
+
* Set false for content that should be shown verbatim.
|
|
1028
|
+
*/
|
|
1029
|
+
markdown?: boolean;
|
|
1030
|
+
}
|
|
1031
|
+
declare function MessageContent({ children, className, markdown, }: MessageContentProps): react.JSX.Element;
|
|
1032
|
+
interface MessageContainerProps {
|
|
1033
|
+
role: MessageRole;
|
|
1034
|
+
children: React.ReactNode;
|
|
1035
|
+
className?: string;
|
|
1036
|
+
}
|
|
1037
|
+
declare function MessageContainer({ role, children, className }: MessageContainerProps): react.JSX.Element;
|
|
991
1038
|
|
|
992
1039
|
interface AgentAvatarProps {
|
|
993
1040
|
role: MessageRole;
|
|
@@ -1090,7 +1137,7 @@ interface PromptInputProps {
|
|
|
1090
1137
|
/** Input class */
|
|
1091
1138
|
inputClassName?: string;
|
|
1092
1139
|
/** Variant styling */
|
|
1093
|
-
variant?:
|
|
1140
|
+
variant?: "default" | "minimal" | "bordered";
|
|
1094
1141
|
/**
|
|
1095
1142
|
* Minimum number of visible text rows. Default 1 (grows as the user types).
|
|
1096
1143
|
*/
|
|
@@ -1316,6 +1363,11 @@ interface MessageListProps {
|
|
|
1316
1363
|
renderMessage?: (message: AgentMessage) => React.ReactNode;
|
|
1317
1364
|
/** Feedback handler passed to feedback-capable messages. */
|
|
1318
1365
|
onFeedback?: (messageId: string, vote: 'up' | 'down') => void;
|
|
1366
|
+
/**
|
|
1367
|
+
* Invoked when an inline confirmation-panel action is activated. Receives the
|
|
1368
|
+
* owning message id and the action id.
|
|
1369
|
+
*/
|
|
1370
|
+
onConfirmAction?: (messageId: string, actionId: string) => void;
|
|
1319
1371
|
className?: string;
|
|
1320
1372
|
}
|
|
1321
1373
|
/**
|
|
@@ -1324,7 +1376,7 @@ interface MessageListProps {
|
|
|
1324
1376
|
* content, attachments, and any structured data payload. This is the default
|
|
1325
1377
|
* conversation body shared by every surface.
|
|
1326
1378
|
*/
|
|
1327
|
-
declare function MessageList({ messages, showAvatars, renderMessage, className, }: MessageListProps): react.JSX.Element;
|
|
1379
|
+
declare function MessageList({ messages, showAvatars, renderMessage, onConfirmAction, className, }: MessageListProps): react.JSX.Element;
|
|
1328
1380
|
|
|
1329
1381
|
interface PersonaSelectorProps {
|
|
1330
1382
|
/** Available personas to choose from. */
|
|
@@ -1601,6 +1653,56 @@ interface SettingsPanelProps {
|
|
|
1601
1653
|
}
|
|
1602
1654
|
declare function SettingsPanel({ groups, onChange, className }: SettingsPanelProps): react.JSX.Element;
|
|
1603
1655
|
|
|
1656
|
+
interface ConfirmationAction {
|
|
1657
|
+
id: string;
|
|
1658
|
+
label: string;
|
|
1659
|
+
/** Button variant; defaults to 'default' for the first action, 'outline' otherwise. */
|
|
1660
|
+
variant?: ButtonProps['variant'];
|
|
1661
|
+
/** Disable this action. */
|
|
1662
|
+
disabled?: boolean;
|
|
1663
|
+
/** Render a loading/busy state and disable the button. */
|
|
1664
|
+
busy?: boolean;
|
|
1665
|
+
}
|
|
1666
|
+
interface ConfirmationPanelProps {
|
|
1667
|
+
/** Panel heading, e.g. "Proposed plan". */
|
|
1668
|
+
title?: string;
|
|
1669
|
+
/**
|
|
1670
|
+
* Short label shown beside the title (e.g. "0 pages to change"). Rendered as
|
|
1671
|
+
* a badge so scope/summary metadata reads at a glance.
|
|
1672
|
+
*/
|
|
1673
|
+
summary?: string;
|
|
1674
|
+
/**
|
|
1675
|
+
* The plan / confirmation body. When a string is passed it is rendered
|
|
1676
|
+
* through the same markdown pipeline as assistant messages, so headings,
|
|
1677
|
+
* paragraphs, and bullet/numbered lists keep their spacing and line breaks.
|
|
1678
|
+
* Pass `markdown={false}` to render verbatim, or pass a node for custom body.
|
|
1679
|
+
*/
|
|
1680
|
+
body?: React.ReactNode;
|
|
1681
|
+
/**
|
|
1682
|
+
* Render the string body as markdown. Defaults to true. Ignored for node
|
|
1683
|
+
* bodies (which are rendered as-is).
|
|
1684
|
+
*/
|
|
1685
|
+
markdown?: boolean;
|
|
1686
|
+
/** Leading icon for the header. Defaults to a clipboard list icon. */
|
|
1687
|
+
icon?: React.ReactNode;
|
|
1688
|
+
/** Action buttons (confirm / cancel / regenerate, …). */
|
|
1689
|
+
actions?: ConfirmationAction[];
|
|
1690
|
+
/** Invoked with the action id when an action button is activated. */
|
|
1691
|
+
onAction?: (id: string) => void;
|
|
1692
|
+
/** Accessible label for the panel region. Defaults to the title. */
|
|
1693
|
+
ariaLabel?: string;
|
|
1694
|
+
className?: string;
|
|
1695
|
+
}
|
|
1696
|
+
/**
|
|
1697
|
+
* An inline confirmation / proposed-plan / action panel.
|
|
1698
|
+
*
|
|
1699
|
+
* It is designed to flow inside the transcript like any other message — NOT to
|
|
1700
|
+
* be pinned above the input — so it never covers the latest assistant response.
|
|
1701
|
+
* The body reuses {@link MessageContent}, giving long plans the same markdown
|
|
1702
|
+
* rendering, typography, and spacing as normal assistant messages.
|
|
1703
|
+
*/
|
|
1704
|
+
declare function ConfirmationPanel({ title, summary, body, markdown, icon, actions, onAction, ariaLabel, className, }: ConfirmationPanelProps): react.JSX.Element;
|
|
1705
|
+
|
|
1604
1706
|
/**
|
|
1605
1707
|
* Lifecycle of an agent-to-agent handoff.
|
|
1606
1708
|
* - 'connecting' → the target agent is being brought online / routed to.
|
|
@@ -2543,6 +2645,12 @@ interface AgentSurfaceProps {
|
|
|
2543
2645
|
renderMessage?: (message: AgentMessage) => ReactNode;
|
|
2544
2646
|
/** Feedback handler passed to MessageList. */
|
|
2545
2647
|
onFeedback?: (messageId: string, vote: 'up' | 'down') => void;
|
|
2648
|
+
/**
|
|
2649
|
+
* Handler for inline confirmation-panel actions. Receives the owning message
|
|
2650
|
+
* id and the activated action id. Confirmation panels render inline in the
|
|
2651
|
+
* transcript (via `message.confirmation`), never pinned over the response.
|
|
2652
|
+
*/
|
|
2653
|
+
onConfirmAction?: (messageId: string, actionId: string) => void;
|
|
2546
2654
|
/**
|
|
2547
2655
|
* Structured report rendered in the data region. Used by the
|
|
2548
2656
|
* dashboard/split surfaces (sidebar or data panel). If omitted, a custom
|
|
@@ -2582,6 +2690,6 @@ interface AgentSurfaceProps {
|
|
|
2582
2690
|
* - 'overlay' → OverlayModal (centered modal conversation)
|
|
2583
2691
|
* - 'mobile' → MobileShell (full-height mobile layout)
|
|
2584
2692
|
*/
|
|
2585
|
-
declare function AgentSurface({ mode, messages, isLoading, inputValue, onInputChange, onSubmit, inputPlaceholder, input, title, subtitle, icon, headerActions, suggestions, showAvatars, renderMessage, onFeedback, report, dataPanel, isOpen, onToggle, onClose, onExitFullscreen, position, status, className, }: AgentSurfaceProps): react.JSX.Element;
|
|
2693
|
+
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;
|
|
2586
2694
|
|
|
2587
|
-
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 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 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 };
|
|
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 };
|