@percena/weft-react 0.1.4 → 0.1.5-next.1

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
@@ -5,7 +5,7 @@ export { CreateFlitroEmbedRuntimeOptions, createFlitroEmbedRuntime };
5
5
  * useAgentSession — the official L1 runtime-configuration API.
6
6
  *
7
7
  * Wraps `createFlitroEmbedRuntime` in a hook: the host backend mints
8
- * `{ server, token, sessionId }` (e.g. with `@percena/weft-node`) and the
8
+ * `{ server, token, sessionId }` via `POST /v1/embed/sessions` and the
9
9
  * component renders `<TimelineAgentChatPanel runtime={session.runtime} />`.
10
10
  */
11
11
 
@@ -2943,6 +2943,48 @@ interface PermissionRequestCardProps {
2943
2943
  }
2944
2944
  declare function PermissionRequestCard({ requestId, toolName, scope, input, reason, isActive, previousResolution, onAllow, onDeny, className, }: PermissionRequestCardProps): react_jsx_runtime.JSX.Element;
2945
2945
 
2946
+ /**
2947
+ * Standard assistant-turn presentation: a TurnCard with local expand state that
2948
+ * stays open while the turn streams, the detailed display mode, and a click
2949
+ * handler that surfaces a step for inspection. Shared so the web app and the
2950
+ * embeddable chat panel render thinking steps identically.
2951
+ */
2952
+ declare function AssistantTurnCard({ sessionId, turn, isLast, onInspectActivity, }: {
2953
+ sessionId: string;
2954
+ turn: Extract<Turn, {
2955
+ type: 'assistant';
2956
+ }>;
2957
+ isLast: boolean;
2958
+ onInspectActivity: (activity: ActivityItem) => void;
2959
+ }): react_jsx_runtime.JSX.Element;
2960
+
2961
+ /**
2962
+ * Renders a single activity's input / output / error for inspection. Shared by
2963
+ * the web app's side panel and the embeddable chat panel's detail popup so the
2964
+ * step-detail view stays identical across hosts.
2965
+ */
2966
+ declare function ActivityInspector({ activity, onClose, }: {
2967
+ activity: ActivityItem | null;
2968
+ onClose?: () => void;
2969
+ }): react_jsx_runtime.JSX.Element;
2970
+
2971
+ /**
2972
+ * Modal popup wrapping ActivityInspector: centered, dismissable via backdrop
2973
+ * click or Escape. Open it from a TurnCard's onOpenActivityDetails callback.
2974
+ */
2975
+ declare function ActivityDetailsPanel({ activity, onClose, }: {
2976
+ activity: ActivityItem | null;
2977
+ onClose: () => void;
2978
+ }): react_jsx_runtime.JSX.Element | null;
2979
+
2980
+ declare function PermissionModeMenu({ value, onChange, onClose, isOpen, onToggle, }: {
2981
+ value: PermissionMode;
2982
+ onChange: (mode: PermissionMode) => void;
2983
+ onClose?: () => void;
2984
+ isOpen: boolean;
2985
+ onToggle: () => void;
2986
+ }): react_jsx_runtime.JSX.Element;
2987
+
2946
2988
  interface CodeBlockProps {
2947
2989
  code: string;
2948
2990
  language?: string;
@@ -3219,6 +3261,8 @@ interface TextDeltaEvent {
3219
3261
  turnId?: string;
3220
3262
  /** Timestamp from canonical timeline for stable ordering */
3221
3263
  timestamp?: number;
3264
+ /** When true, this delta belongs to a reasoning/thinking block (intermediate content). */
3265
+ isIntermediate?: boolean;
3222
3266
  }
3223
3267
  /**
3224
3268
  * Text complete event - finalizes streaming text
@@ -3910,7 +3954,7 @@ interface UseEventProcessorResult {
3910
3954
  */
3911
3955
  declare function useEventProcessor(options: UseEventProcessorOptions): UseEventProcessorResult;
3912
3956
 
3913
- export { type ActivityItem, type ActivityStatus, AnnotationIslandMenu, type AnnotationIslandMenuProps, type AnnotationOverlayChip, type AnnotationOverlayGeometryResult, AnnotationOverlayLayer, type AnnotationOverlayLayerProps, type AnnotationOverlayRect, type AssistantTurn, type AuthRequestTurn, type ChatEvent, ChatTranscript, type ChatTranscriptProps, CodeBlock, CollapsibleMarkdownProvider, type Effect, type EventSource, type EventSourceCallback, type EventSourceCloseCallback, type EventSourceErrorCallback, InProcessEventSource, type InlineActivityItem, InlineCode, InlineExecution, type InlineExecutionProps, type InlineExecutionStatus, type IslandTransitionConfig, Markdown, type MarkdownProps, MemoizedMarkdown, PendingIndicator, type PendingIndicatorProps, PermissionRequestCard, type PermissionRequestCardProps, type PlatformActions, PlatformProvider, type PointerSnapshot, type ProcessResult, type RenderMode, ResponseCard, type ResponseCardProps, type ResponseContent, SIZE_CONFIG, SSEEventSource, type Session, type SessionState, SessionViewer, type SessionViewerMode, type SessionViewerProps, type StreamingState, SystemMessage, type SystemMessageProps, type SystemMessageType, type SystemTurn, type TextSegment, type TodoItem, type Turn, TurnCard, type TurnCardProps, UserMessageBubble, type UserMessageBubbleProps, type UserTurn, WebSocketEventSource, appendMessage, buildAnnotationChipEntryTransition, buildSelectionEntryTransition, collectTextSegments, computeAnnotationOverlayGeometry, createSelectionPreviewAnnotation, createTextSelectionAnnotation, findAssistantMessage, findStreamingMessage, findToolMessage, generateMessageId, getAssistantTurnUiKey, getCanonicalText, groupMessagesByTurn, hasExistingTextRangeAnnotation, mapCoreEventToProcessorEvent, mapTimelineEnvelopeToProcessorEvent, processEvent, resolveNodeOffset, shouldShowStreamingContent, updateMessageAt, useEventProcessor };
3957
+ export { ActivityDetailsPanel, ActivityInspector, type ActivityItem, type ActivityStatus, AnnotationIslandMenu, type AnnotationIslandMenuProps, type AnnotationOverlayChip, type AnnotationOverlayGeometryResult, AnnotationOverlayLayer, type AnnotationOverlayLayerProps, type AnnotationOverlayRect, type AssistantTurn, AssistantTurnCard, type AuthRequestTurn, type ChatEvent, ChatTranscript, type ChatTranscriptProps, CodeBlock, CollapsibleMarkdownProvider, type Effect, type EventSource, type EventSourceCallback, type EventSourceCloseCallback, type EventSourceErrorCallback, InProcessEventSource, type InlineActivityItem, InlineCode, InlineExecution, type InlineExecutionProps, type InlineExecutionStatus, type IslandTransitionConfig, Markdown, type MarkdownProps, MemoizedMarkdown, PendingIndicator, type PendingIndicatorProps, PermissionModeMenu, PermissionRequestCard, type PermissionRequestCardProps, type PlatformActions, PlatformProvider, type PointerSnapshot, type ProcessResult, type RenderMode, ResponseCard, type ResponseCardProps, type ResponseContent, SIZE_CONFIG, SSEEventSource, type Session, type SessionState, SessionViewer, type SessionViewerMode, type SessionViewerProps, type StreamingState, SystemMessage, type SystemMessageProps, type SystemMessageType, type SystemTurn, type TextSegment, type TodoItem, type Turn, TurnCard, type TurnCardProps, UserMessageBubble, type UserMessageBubbleProps, type UserTurn, WebSocketEventSource, appendMessage, buildAnnotationChipEntryTransition, buildSelectionEntryTransition, collectTextSegments, computeAnnotationOverlayGeometry, createSelectionPreviewAnnotation, createTextSelectionAnnotation, findAssistantMessage, findStreamingMessage, findToolMessage, generateMessageId, getAssistantTurnUiKey, getCanonicalText, groupMessagesByTurn, hasExistingTextRangeAnnotation, mapCoreEventToProcessorEvent, mapTimelineEnvelopeToProcessorEvent, processEvent, resolveNodeOffset, shouldShowStreamingContent, updateMessageAt, useEventProcessor };
3914
3958
 
3915
3959
  // -- @weft/ui/lib/en-fallback.d.ts --
3916
3960
  /**
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { CreateFlitroEmbedRuntimeOptions, createFlitroEmbedRuntime };
5
5
  * useAgentSession — the official L1 runtime-configuration API.
6
6
  *
7
7
  * Wraps `createFlitroEmbedRuntime` in a hook: the host backend mints
8
- * `{ server, token, sessionId }` (e.g. with `@percena/weft-node`) and the
8
+ * `{ server, token, sessionId }` via `POST /v1/embed/sessions` and the
9
9
  * component renders `<TimelineAgentChatPanel runtime={session.runtime} />`.
10
10
  */
11
11
 
@@ -2943,6 +2943,48 @@ interface PermissionRequestCardProps {
2943
2943
  }
2944
2944
  declare function PermissionRequestCard({ requestId, toolName, scope, input, reason, isActive, previousResolution, onAllow, onDeny, className, }: PermissionRequestCardProps): react_jsx_runtime.JSX.Element;
2945
2945
 
2946
+ /**
2947
+ * Standard assistant-turn presentation: a TurnCard with local expand state that
2948
+ * stays open while the turn streams, the detailed display mode, and a click
2949
+ * handler that surfaces a step for inspection. Shared so the web app and the
2950
+ * embeddable chat panel render thinking steps identically.
2951
+ */
2952
+ declare function AssistantTurnCard({ sessionId, turn, isLast, onInspectActivity, }: {
2953
+ sessionId: string;
2954
+ turn: Extract<Turn, {
2955
+ type: 'assistant';
2956
+ }>;
2957
+ isLast: boolean;
2958
+ onInspectActivity: (activity: ActivityItem) => void;
2959
+ }): react_jsx_runtime.JSX.Element;
2960
+
2961
+ /**
2962
+ * Renders a single activity's input / output / error for inspection. Shared by
2963
+ * the web app's side panel and the embeddable chat panel's detail popup so the
2964
+ * step-detail view stays identical across hosts.
2965
+ */
2966
+ declare function ActivityInspector({ activity, onClose, }: {
2967
+ activity: ActivityItem | null;
2968
+ onClose?: () => void;
2969
+ }): react_jsx_runtime.JSX.Element;
2970
+
2971
+ /**
2972
+ * Modal popup wrapping ActivityInspector: centered, dismissable via backdrop
2973
+ * click or Escape. Open it from a TurnCard's onOpenActivityDetails callback.
2974
+ */
2975
+ declare function ActivityDetailsPanel({ activity, onClose, }: {
2976
+ activity: ActivityItem | null;
2977
+ onClose: () => void;
2978
+ }): react_jsx_runtime.JSX.Element | null;
2979
+
2980
+ declare function PermissionModeMenu({ value, onChange, onClose, isOpen, onToggle, }: {
2981
+ value: PermissionMode;
2982
+ onChange: (mode: PermissionMode) => void;
2983
+ onClose?: () => void;
2984
+ isOpen: boolean;
2985
+ onToggle: () => void;
2986
+ }): react_jsx_runtime.JSX.Element;
2987
+
2946
2988
  interface CodeBlockProps {
2947
2989
  code: string;
2948
2990
  language?: string;
@@ -3219,6 +3261,8 @@ interface TextDeltaEvent {
3219
3261
  turnId?: string;
3220
3262
  /** Timestamp from canonical timeline for stable ordering */
3221
3263
  timestamp?: number;
3264
+ /** When true, this delta belongs to a reasoning/thinking block (intermediate content). */
3265
+ isIntermediate?: boolean;
3222
3266
  }
3223
3267
  /**
3224
3268
  * Text complete event - finalizes streaming text
@@ -3910,7 +3954,7 @@ interface UseEventProcessorResult {
3910
3954
  */
3911
3955
  declare function useEventProcessor(options: UseEventProcessorOptions): UseEventProcessorResult;
3912
3956
 
3913
- export { type ActivityItem, type ActivityStatus, AnnotationIslandMenu, type AnnotationIslandMenuProps, type AnnotationOverlayChip, type AnnotationOverlayGeometryResult, AnnotationOverlayLayer, type AnnotationOverlayLayerProps, type AnnotationOverlayRect, type AssistantTurn, type AuthRequestTurn, type ChatEvent, ChatTranscript, type ChatTranscriptProps, CodeBlock, CollapsibleMarkdownProvider, type Effect, type EventSource, type EventSourceCallback, type EventSourceCloseCallback, type EventSourceErrorCallback, InProcessEventSource, type InlineActivityItem, InlineCode, InlineExecution, type InlineExecutionProps, type InlineExecutionStatus, type IslandTransitionConfig, Markdown, type MarkdownProps, MemoizedMarkdown, PendingIndicator, type PendingIndicatorProps, PermissionRequestCard, type PermissionRequestCardProps, type PlatformActions, PlatformProvider, type PointerSnapshot, type ProcessResult, type RenderMode, ResponseCard, type ResponseCardProps, type ResponseContent, SIZE_CONFIG, SSEEventSource, type Session, type SessionState, SessionViewer, type SessionViewerMode, type SessionViewerProps, type StreamingState, SystemMessage, type SystemMessageProps, type SystemMessageType, type SystemTurn, type TextSegment, type TodoItem, type Turn, TurnCard, type TurnCardProps, UserMessageBubble, type UserMessageBubbleProps, type UserTurn, WebSocketEventSource, appendMessage, buildAnnotationChipEntryTransition, buildSelectionEntryTransition, collectTextSegments, computeAnnotationOverlayGeometry, createSelectionPreviewAnnotation, createTextSelectionAnnotation, findAssistantMessage, findStreamingMessage, findToolMessage, generateMessageId, getAssistantTurnUiKey, getCanonicalText, groupMessagesByTurn, hasExistingTextRangeAnnotation, mapCoreEventToProcessorEvent, mapTimelineEnvelopeToProcessorEvent, processEvent, resolveNodeOffset, shouldShowStreamingContent, updateMessageAt, useEventProcessor };
3957
+ export { ActivityDetailsPanel, ActivityInspector, type ActivityItem, type ActivityStatus, AnnotationIslandMenu, type AnnotationIslandMenuProps, type AnnotationOverlayChip, type AnnotationOverlayGeometryResult, AnnotationOverlayLayer, type AnnotationOverlayLayerProps, type AnnotationOverlayRect, type AssistantTurn, AssistantTurnCard, type AuthRequestTurn, type ChatEvent, ChatTranscript, type ChatTranscriptProps, CodeBlock, CollapsibleMarkdownProvider, type Effect, type EventSource, type EventSourceCallback, type EventSourceCloseCallback, type EventSourceErrorCallback, InProcessEventSource, type InlineActivityItem, InlineCode, InlineExecution, type InlineExecutionProps, type InlineExecutionStatus, type IslandTransitionConfig, Markdown, type MarkdownProps, MemoizedMarkdown, PendingIndicator, type PendingIndicatorProps, PermissionModeMenu, PermissionRequestCard, type PermissionRequestCardProps, type PlatformActions, PlatformProvider, type PointerSnapshot, type ProcessResult, type RenderMode, ResponseCard, type ResponseCardProps, type ResponseContent, SIZE_CONFIG, SSEEventSource, type Session, type SessionState, SessionViewer, type SessionViewerMode, type SessionViewerProps, type StreamingState, SystemMessage, type SystemMessageProps, type SystemMessageType, type SystemTurn, type TextSegment, type TodoItem, type Turn, TurnCard, type TurnCardProps, UserMessageBubble, type UserMessageBubbleProps, type UserTurn, WebSocketEventSource, appendMessage, buildAnnotationChipEntryTransition, buildSelectionEntryTransition, collectTextSegments, computeAnnotationOverlayGeometry, createSelectionPreviewAnnotation, createTextSelectionAnnotation, findAssistantMessage, findStreamingMessage, findToolMessage, generateMessageId, getAssistantTurnUiKey, getCanonicalText, groupMessagesByTurn, hasExistingTextRangeAnnotation, mapCoreEventToProcessorEvent, mapTimelineEnvelopeToProcessorEvent, processEvent, resolveNodeOffset, shouldShowStreamingContent, updateMessageAt, useEventProcessor };
3914
3958
 
3915
3959
  // -- @weft/ui/lib/en-fallback.d.ts --
3916
3960
  /**