@mgamadeus/ddd-agents 0.0.1-stage → 0.1.0-alpha.22

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.
Files changed (314) hide show
  1. package/README.md +11 -3
  2. package/dist/chat.js +5263 -0
  3. package/dist/chat.js.map +1 -0
  4. package/dist/chunks/AgentsConversationClientContext-C4T7g_Qk.js +22 -0
  5. package/dist/chunks/AgentsConversationClientContext-C4T7g_Qk.js.map +1 -0
  6. package/dist/chunks/ConversationMarkdown-W7NHglmL.js +399 -0
  7. package/dist/chunks/ConversationMarkdown-W7NHglmL.js.map +1 -0
  8. package/dist/chunks/WebSearchResultsConversationWidget-BvnLWHyi.js +5059 -0
  9. package/dist/chunks/WebSearchResultsConversationWidget-BvnLWHyi.js.map +1 -0
  10. package/dist/chunks/canvas-behaviours-BRFR1ALE.js +45 -0
  11. package/dist/chunks/canvas-behaviours-BRFR1ALE.js.map +1 -0
  12. package/dist/chunks/canvas-feature-flags-BmmxC3bz.js +11 -0
  13. package/dist/chunks/canvas-feature-flags-BmmxC3bz.js.map +1 -0
  14. package/dist/chunks/canvasBodies-9SuF6NAB.js +289 -0
  15. package/dist/chunks/canvasBodies-9SuF6NAB.js.map +1 -0
  16. package/dist/chunks/d3-7.6.1.min.js-DTmPafrl.js +6 -0
  17. package/dist/chunks/d3-7.6.1.min.js-DTmPafrl.js.map +1 -0
  18. package/dist/chunks/decide-canvas-open-Ct-wnNEJ.js +20 -0
  19. package/dist/chunks/decide-canvas-open-Ct-wnNEJ.js.map +1 -0
  20. package/dist/chunks/widget-image-readiness-signal-DeOuL89j.js +25 -0
  21. package/dist/chunks/widget-image-readiness-signal-DeOuL89j.js.map +1 -0
  22. package/dist/chunks/widget-name-resolver-DyIY6Zu4.js +9736 -0
  23. package/dist/chunks/widget-name-resolver-DyIY6Zu4.js.map +1 -0
  24. package/dist/chunks/withPollingChangeSubscription-BLDAWF-o.js +251 -0
  25. package/dist/chunks/withPollingChangeSubscription-BLDAWF-o.js.map +1 -0
  26. package/dist/client-testing.js +346 -0
  27. package/dist/client-testing.js.map +1 -0
  28. package/dist/client.js +16 -0
  29. package/dist/client.js.map +1 -0
  30. package/dist/contract.js +31 -0
  31. package/dist/contract.js.map +1 -0
  32. package/dist/image-render.js +334 -0
  33. package/dist/image-render.js.map +1 -0
  34. package/dist/index.js +80 -0
  35. package/dist/index.js.map +1 -0
  36. package/dist/kit.js +13 -0
  37. package/dist/kit.js.map +1 -0
  38. package/dist/preview.js +733 -0
  39. package/dist/preview.js.map +1 -0
  40. package/dist/renderer.js +115 -0
  41. package/dist/renderer.js.map +1 -0
  42. package/dist/styles.css +6768 -0
  43. package/dist/types/chat/AgentChat/AgentChat.d.ts +37 -0
  44. package/dist/types/chat/AgentChatActivityHistory/AgentChatActivityHistory.d.ts +6 -0
  45. package/dist/types/chat/AgentChatActivityIndicator/AgentChatActivityIndicator.d.ts +8 -0
  46. package/dist/types/chat/CanvasPane/CanvasPane.d.ts +15 -0
  47. package/dist/types/chat/CanvasResizeHandle/CanvasResizeHandle.d.ts +10 -0
  48. package/dist/types/chat/CanvasResizeHandle/use-canvas-resize.d.ts +43 -0
  49. package/dist/types/chat/ConversationClosedBar/ConversationClosedBar.d.ts +10 -0
  50. package/dist/types/chat/ConversationErrorCard/ConversationErrorCard.d.ts +13 -0
  51. package/dist/types/chat/ConversationIntroCard/ConversationIntroCard.d.ts +10 -0
  52. package/dist/types/chat/ConversationLoadingStates.d.ts +2 -0
  53. package/dist/types/chat/ConversationMessage/ConversationCallMarkerChip/ConversationCallMarkerChip.d.ts +14 -0
  54. package/dist/types/chat/ConversationMessage/ConversationCallMarkerChip/VoiceBarsIcon/VoiceBarsIcon.d.ts +8 -0
  55. package/dist/types/chat/ConversationMessage/ConversationMessageSystem/ConversationMessageSystem.d.ts +8 -0
  56. package/dist/types/chat/ConversationMessage/ConversationMessageSystem/ConversationMessageSystemHeader/ConversationMessageSystemHeader.d.ts +9 -0
  57. package/dist/types/chat/ConversationMessage/ConversationMessageUser/ConversationMessageUser.d.ts +7 -0
  58. package/dist/types/chat/ConversationMessage/ConversationMessageUser/ConversationMessageUserWidgets.d.ts +14 -0
  59. package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/ConversationMessageHeader/ConversationMessageHeader.d.ts +7 -0
  60. package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/ConversationMessageThinking/ConversationMessageThinking.d.ts +7 -0
  61. package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/ConversationMessageWidgets.d.ts +29 -0
  62. package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/copyRichToClipboard.d.ts +1 -0
  63. package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/hooks/useFreshMessageBlockReveal.d.ts +14 -0
  64. package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/hooks/useStreamingText.d.ts +8 -0
  65. package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/hooks/useTypewriter.d.ts +12 -0
  66. package/dist/types/chat/ConversationMessage/ConversationTaskInstructionDisclosure/ConversationTaskInstructionDisclosure.d.ts +12 -0
  67. package/dist/types/chat/ConversationMessageInput/ConversationMessageInput.d.ts +111 -0
  68. package/dist/types/chat/ConversationMessageInput/ConversationMessageInputAttachments/ConversationMessageInputAttachmentPreviewCard.d.ts +34 -0
  69. package/dist/types/chat/ConversationMessageInput/ConversationMessageInputAttachments/ConversationMessageInputAttachmentsErrorBox.d.ts +22 -0
  70. package/dist/types/chat/ConversationMessageInput/ConversationMessageInputAttachments/ConversationMessageInputAttachmentsPreviewStrip.d.ts +12 -0
  71. package/dist/types/chat/ConversationMessageInput/ConversationMessageInputAttachments/convert-bytes-to-size-string.d.ts +2 -0
  72. package/dist/types/chat/ConversationMessageInput/ConversationMessageInputComposerWidgets/ConversationMessageInputComposerWidgets.d.ts +12 -0
  73. package/dist/types/chat/ConversationMessageList/ConversationMessageList.d.ts +75 -0
  74. package/dist/types/chat/ConversationScrollToLatestMessageButton/ConversationScrollToLatestMessageButton.d.ts +6 -0
  75. package/dist/types/chat/ConversationSuggestionCard/ConversationSuggestionCard.d.ts +7 -0
  76. package/dist/types/chat/ConversationView.d.ts +216 -0
  77. package/dist/types/chat/ConversationViewBody/ConversationViewBody.d.ts +214 -0
  78. package/dist/types/chat/ConversationViewBody/hooks/useIsMessagesBottomOutOfView.d.ts +2 -0
  79. package/dist/types/chat/ConversationViewBody/hooks/usePinQuestionOnSend.d.ts +24 -0
  80. package/dist/types/chat/assistant-message-has-renderable-markdown.d.ts +13 -0
  81. package/dist/types/chat/chat-assistant-identity.d.ts +24 -0
  82. package/dist/types/chat/chat-message.d.ts +11 -0
  83. package/dist/types/chat/controller/AgentChatController.d.ts +97 -0
  84. package/dist/types/chat/controller/activity-ticker.d.ts +120 -0
  85. package/dist/types/chat/controller/changed-messages-request.d.ts +12 -0
  86. package/dist/types/chat/controller/chat-scroll-target.d.ts +10 -0
  87. package/dist/types/chat/controller/conversation-change-signal-rules.d.ts +64 -0
  88. package/dist/types/chat/controller/derive-agent-activity.d.ts +31 -0
  89. package/dist/types/chat/controller/merge-activity-elements.d.ts +25 -0
  90. package/dist/types/chat/controller/pending-start-request.d.ts +38 -0
  91. package/dist/types/chat/controller/use-activity-ticker.d.ts +60 -0
  92. package/dist/types/chat/controller/use-conversation-activity.d.ts +38 -0
  93. package/dist/types/chat/controller/use-conversation-live-updates.d.ts +30 -0
  94. package/dist/types/chat/controller/use-conversation-message-pages.d.ts +24 -0
  95. package/dist/types/chat/controller/use-conversation-scroll-jump.d.ts +47 -0
  96. package/dist/types/chat/controller/use-conversation-search.d.ts +31 -0
  97. package/dist/types/chat/controller/use-conversation-signals.d.ts +44 -0
  98. package/dist/types/chat/controller/use-debounced-semantic-search.d.ts +15 -0
  99. package/dist/types/chat/conversation-send-message.d.ts +43 -0
  100. package/dist/types/chat/last-wire-message-is-unanswered-user-message.d.ts +22 -0
  101. package/dist/types/chat/normalize-server-message-to-markdown.d.ts +23 -0
  102. package/dist/types/chat/store/agents-chat-state.d.ts +132 -0
  103. package/dist/types/chat/store/conversation-error-type.d.ts +32 -0
  104. package/dist/types/chat/store/create-agents-chat-store.d.ts +23 -0
  105. package/dist/types/chat/store/index.d.ts +5 -0
  106. package/dist/types/chat/store/merge-chat-messages.d.ts +20 -0
  107. package/dist/types/chat/store/reduce-agents-chat-state.d.ts +7 -0
  108. package/dist/types/chat/store/use-agents-chat-store.d.ts +22 -0
  109. package/dist/types/chat/strip-pre-call-message-marker.d.ts +12 -0
  110. package/dist/types/chat/use-canvas-shell-transitions.d.ts +25 -0
  111. package/dist/types/client/AgentsConversationClient.d.ts +93 -0
  112. package/dist/types/client/AgentsConversationClientContext.d.ts +17 -0
  113. package/dist/types/client/polling/createPollingConversationChangeSubscription.d.ts +62 -0
  114. package/dist/types/client/polling/withPollingChangeSubscription.d.ts +11 -0
  115. package/dist/types/client/testing/createInMemoryAgentsConversationClient.d.ts +139 -0
  116. package/dist/types/contract/conversation.d.ts +370 -0
  117. package/dist/types/entries/chat.d.ts +21 -0
  118. package/dist/types/entries/client-testing.d.ts +1 -0
  119. package/dist/types/entries/client.d.ts +4 -0
  120. package/dist/types/entries/contract.d.ts +1 -0
  121. package/dist/types/entries/image-render.d.ts +9 -0
  122. package/dist/types/entries/index.d.ts +9 -0
  123. package/dist/types/entries/kit.d.ts +4 -0
  124. package/dist/types/entries/preview.d.ts +8 -0
  125. package/dist/types/entries/renderer.d.ts +15 -0
  126. package/dist/types/entries/widgets.d.ts +16 -0
  127. package/dist/types/image-render/ComposedViewEmailDataTimes/ComposedViewEmailDataTimes.d.ts +15 -0
  128. package/dist/types/image-render/WidgetImageRender.d.ts +55 -0
  129. package/dist/types/image-render/WidgetImageRenderContext.d.ts +14 -0
  130. package/dist/types/image-render/composed-view-data-times.d.ts +20 -0
  131. package/dist/types/image-render/frozen-widget-requests.d.ts +2 -0
  132. package/dist/types/image-render/live-widget-requests.d.ts +4 -0
  133. package/dist/types/image-render/widget-image-google-map.d.ts +7 -0
  134. package/dist/types/image-render/widget-image-readiness-signal.d.ts +16 -0
  135. package/dist/types/image-render/widget-image-readiness.d.ts +9 -0
  136. package/dist/types/image-render/widget-image-render.types.d.ts +47 -0
  137. package/dist/types/kit/ComposedViewConversationWidget.d.ts +14 -0
  138. package/dist/types/kit/ComposedViewDataSourceLoader.d.ts +20 -0
  139. package/dist/types/kit/ComposedViewRenderer.d.ts +30 -0
  140. package/dist/types/kit/ComposedViewSlotErrorBoundary.d.ts +23 -0
  141. package/dist/types/kit/ModelText/ModelText.d.ts +12 -0
  142. package/dist/types/kit/components/embedding/EmbeddedConversationWidget.d.ts +26 -0
  143. package/dist/types/kit/components/map/map-full-screen-instance.d.ts +26 -0
  144. package/dist/types/kit/components/map/map-presentation-context.d.ts +8 -0
  145. package/dist/types/kit/components/text/shared/text-node-values.d.ts +39 -0
  146. package/dist/types/kit/composed-view-component-types.d.ts +61 -0
  147. package/dist/types/kit/composed-view-components.d.ts +7 -0
  148. package/dist/types/kit/composed-view-tones.d.ts +20 -0
  149. package/dist/types/kit/entity-detail/EntityDetailCanvasBody.d.ts +9 -0
  150. package/dist/types/kit/entity-detail/entity-detail-bodies.d.ts +32 -0
  151. package/dist/types/kit/entity-detail/entity-detail-name.d.ts +9 -0
  152. package/dist/types/kit/hooks/use-debounced-value.d.ts +2 -0
  153. package/dist/types/kit/map-full-screen/MapFullScreenCanvasBody.d.ts +11 -0
  154. package/dist/types/preview/WidgetPreviewHost.d.ts +20 -0
  155. package/dist/types/preview/preview-stub-components.d.ts +3 -0
  156. package/dist/types/preview/widget-preview-fixtures.d.ts +17 -0
  157. package/dist/types/preview/widget-preview-hydration.d.ts +10 -0
  158. package/dist/types/preview/widget-preview-readiness.d.ts +27 -0
  159. package/dist/types/preview/widget-preview-requests.d.ts +16 -0
  160. package/dist/types/preview/widget-preview-signal.d.ts +10 -0
  161. package/dist/types/preview/widget-preview.types.d.ts +134 -0
  162. package/dist/types/provider/AgentsProvider.d.ts +33 -0
  163. package/dist/types/provider/class-names.d.ts +7 -0
  164. package/dist/types/provider/components/default-components.d.ts +3 -0
  165. package/dist/types/provider/components/icon-names.d.ts +9 -0
  166. package/dist/types/provider/components/index.d.ts +39 -0
  167. package/dist/types/provider/components/types.d.ts +463 -0
  168. package/dist/types/provider/environment.d.ts +262 -0
  169. package/dist/types/provider/index.d.ts +4 -0
  170. package/dist/types/renderer/ConversationDeepLinkedWidget.d.ts +18 -0
  171. package/dist/types/renderer/ConversationMarkdown.d.ts +21 -0
  172. package/dist/types/renderer/ConversationWidgetActions/ConversationWidgetActions.d.ts +7 -0
  173. package/dist/types/renderer/ConversationWidgetCallbacksContext.d.ts +234 -0
  174. package/dist/types/renderer/ConversationWidgetContext.d.ts +32 -0
  175. package/dist/types/renderer/ConversationWidgetErrorBoundary.d.ts +25 -0
  176. package/dist/types/renderer/ConversationWidgetHost.d.ts +36 -0
  177. package/dist/types/renderer/ConversationWidgetRenderContext.d.ts +3 -0
  178. package/dist/types/renderer/MarkdownLink.d.ts +6 -0
  179. package/dist/types/renderer/WindowedWidget/WindowedWidget.d.ts +16 -0
  180. package/dist/types/renderer/_access/ConversationWidgetFeatureGate.d.ts +21 -0
  181. package/dist/types/renderer/_agent-space/ConversationWidgetAgentSpaceFrame.d.ts +12 -0
  182. package/dist/types/renderer/_agent-space/ConversationWidgetAgentSpaceHeader.d.ts +15 -0
  183. package/dist/types/renderer/_agent-space/agent-space-name.hydrator.d.ts +7 -0
  184. package/dist/types/renderer/_agent-space/declared-agent-space-key-field-name.d.ts +8 -0
  185. package/dist/types/renderer/_agent-space/use-resolved-conversation-widget-agent-space-key.d.ts +16 -0
  186. package/dist/types/renderer/_agent-space/widget-agent-space-key-attribute.d.ts +13 -0
  187. package/dist/types/renderer/balanced-json-object.d.ts +12 -0
  188. package/dist/types/renderer/canvas/CanvasRestoreOnMount.d.ts +19 -0
  189. package/dist/types/renderer/canvas/canvas-behaviours.d.ts +84 -0
  190. package/dist/types/renderer/canvas/canvas-body-props.d.ts +18 -0
  191. package/dist/types/renderer/canvas/canvas-feature-flags.d.ts +11 -0
  192. package/dist/types/renderer/canvas/canvas-reducers.d.ts +46 -0
  193. package/dist/types/renderer/canvas/canvas-state.d.ts +107 -0
  194. package/dist/types/renderer/canvas/canvasBodies.d.ts +19 -0
  195. package/dist/types/renderer/canvas/canvasStorage.d.ts +25 -0
  196. package/dist/types/renderer/canvas/decide-canvas-open.d.ts +32 -0
  197. package/dist/types/renderer/canvas/entity-detail-instance.d.ts +27 -0
  198. package/dist/types/renderer/canvas/find-widget-fences-in-markdown.d.ts +32 -0
  199. package/dist/types/renderer/canvas/use-anchor-widget-payload.d.ts +8 -0
  200. package/dist/types/renderer/composer-widget-fence.d.ts +30 -0
  201. package/dist/types/renderer/conversation-composer-widget.d.ts +13 -0
  202. package/dist/types/renderer/conversation-widget-props.d.ts +54 -0
  203. package/dist/types/renderer/conversation-widget-state-partition.d.ts +31 -0
  204. package/dist/types/renderer/conversationWidgetAstPlugin.d.ts +11 -0
  205. package/dist/types/renderer/conversationWidgetRegistry.d.ts +74 -0
  206. package/dist/types/renderer/detect-unrendered-widgets.d.ts +42 -0
  207. package/dist/types/renderer/markdown-contains-widget.d.ts +13 -0
  208. package/dist/types/renderer/reference-naked-widget-json.d.ts +1 -0
  209. package/dist/types/renderer/remarkWidgetFencePlugin.d.ts +22 -0
  210. package/dist/types/renderer/render-report/widget-render-report-collector.d.ts +57 -0
  211. package/dist/types/renderer/render-report/widget-render-report.d.ts +29 -0
  212. package/dist/types/renderer/repair-malformed-widget-fences.d.ts +11 -0
  213. package/dist/types/renderer/resolve-deep-linkable-widget.d.ts +25 -0
  214. package/dist/types/renderer/restoreTextDirectivesPlugin.d.ts +12 -0
  215. package/dist/types/renderer/widget-click-signal-sources.d.ts +15 -0
  216. package/dist/types/renderer/widget-fence-json.d.ts +16 -0
  217. package/dist/types/renderer/widget-fence-syntax.d.ts +25 -0
  218. package/dist/types/renderer/widget-hydration/index.d.ts +8 -0
  219. package/dist/types/renderer/widget-hydration/section-hydration.d.ts +41 -0
  220. package/dist/types/renderer/widget-hydration/use-widget-hydration.d.ts +27 -0
  221. package/dist/types/renderer/widget-hydration/widget-hydration-state-store.d.ts +27 -0
  222. package/dist/types/renderer/widget-hydration/widget-hydration.reducer.d.ts +39 -0
  223. package/dist/types/renderer/widget-hydration/widget-hydration.registry.d.ts +7 -0
  224. package/dist/types/renderer/widget-hydration/widget-hydration.slice.d.ts +8 -0
  225. package/dist/types/renderer/widget-hydration/widget-hydration.types.d.ts +27 -0
  226. package/dist/types/renderer/widget-name-resolver.d.ts +22 -0
  227. package/dist/types/renderer/widget-tree/bounded-json.d.ts +23 -0
  228. package/dist/types/renderer/widget-tree/composed-node-schema.d.ts +143 -0
  229. package/dist/types/renderer/widget-tree/composed-view-data-sources.d.ts +41 -0
  230. package/dist/types/renderer/widget-tree/composed-view-tree.d.ts +111 -0
  231. package/dist/types/renderer/widget-tree/expression/evaluate-expression.d.ts +65 -0
  232. package/dist/types/renderer/widget-tree/expression/parse-expression.d.ts +71 -0
  233. package/dist/types/renderer/widget-tree/resolve-composed-view-values.d.ts +49 -0
  234. package/dist/types/renderer/widget-tree/use-composed-view-state.d.ts +16 -0
  235. package/dist/types/renderer/widget-windowing.d.ts +25 -0
  236. package/dist/types/widgets/CanvasWidgetCard/CanvasWidgetCard.d.ts +79 -0
  237. package/dist/types/widgets/CanvasWidgetCard/CanvasWidgetSwitch.d.ts +61 -0
  238. package/dist/types/widgets/CanvasWidgetCard/canvas-for-message-widget.d.ts +8 -0
  239. package/dist/types/widgets/CanvasWidgetCard/use-canvas-viable.d.ts +15 -0
  240. package/dist/types/widgets/ClockConversationWidget/ClockConversationWidget.d.ts +11 -0
  241. package/dist/types/widgets/ClockConversationWidget/ClockWidget/AnalogClockFace.d.ts +12 -0
  242. package/dist/types/widgets/ClockConversationWidget/ClockWidget/ClockRow.d.ts +23 -0
  243. package/dist/types/widgets/ClockConversationWidget/ClockWidget/ClockWidget.d.ts +21 -0
  244. package/dist/types/widgets/ClockConversationWidget/ClockWidget/DayNightGlyph.d.ts +8 -0
  245. package/dist/types/widgets/ClockConversationWidget/shared/clock-time.d.ts +52 -0
  246. package/dist/types/widgets/ClockConversationWidget/shared/clock-widget-payload.d.ts +23 -0
  247. package/dist/types/widgets/ClockConversationWidget/shared/use-clock-settings.d.ts +18 -0
  248. package/dist/types/widgets/ConceptExplainerConversationWidget/ConceptExplainerConversationWidget.d.ts +14 -0
  249. package/dist/types/widgets/ConceptExplainerConversationWidget/ConceptExplainerWidget/ConceptExplainerWidget.d.ts +27 -0
  250. package/dist/types/widgets/ConceptExplainerConversationWidget/shared/ConceptExplainerTextView.d.ts +11 -0
  251. package/dist/types/widgets/ConceptExplainerConversationWidget/shared/concept-explainer-type.d.ts +89 -0
  252. package/dist/types/widgets/ConceptExplainerConversationWidget/shared/concept-explainer-types.d.ts +17 -0
  253. package/dist/types/widgets/ConceptExplainerConversationWidget/shared/concept-explainer-widget-payload.d.ts +25 -0
  254. package/dist/types/widgets/ConceptExplainerConversationWidget/shared/use-concept-explainer-language.d.ts +8 -0
  255. package/dist/types/widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsCanvas.d.ts +9 -0
  256. package/dist/types/widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsCanvasBody.d.ts +7 -0
  257. package/dist/types/widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsConversationWidget.d.ts +15 -0
  258. package/dist/types/widgets/ConversationSearchResultsConversationWidget/shared/conversation-search-results-widget-payload.d.ts +42 -0
  259. package/dist/types/widgets/ConversationSearchResultsConversationWidget/shared/search-hit-excerpt.d.ts +1 -0
  260. package/dist/types/widgets/CurrencyConverterConversationWidget/CurrencyConverterConversationWidget.d.ts +8 -0
  261. package/dist/types/widgets/CurrencyConverterConversationWidget/CurrencyConverterWidget/CurrencyConverterWidget.d.ts +17 -0
  262. package/dist/types/widgets/CurrencyConverterConversationWidget/CurrencyConverterWidget/CurrencyLabel/CurrencyLabel.d.ts +9 -0
  263. package/dist/types/widgets/CurrencyConverterConversationWidget/shared/currency-converter-widget-payload.d.ts +22 -0
  264. package/dist/types/widgets/CurrencyConverterConversationWidget/shared/currency-display.d.ts +30 -0
  265. package/dist/types/widgets/CustomVisualizationConversationWidget/CustomVisualizationConversationWidget.d.ts +11 -0
  266. package/dist/types/widgets/CustomVisualizationConversationWidget/CustomVisualizationWidget/CustomVisualizationFrame.d.ts +14 -0
  267. package/dist/types/widgets/CustomVisualizationConversationWidget/CustomVisualizationWidget/CustomVisualizationWidget.d.ts +15 -0
  268. package/dist/types/widgets/CustomVisualizationConversationWidget/shared/custom-visualization-frame-protocol.d.ts +77 -0
  269. package/dist/types/widgets/CustomVisualizationConversationWidget/shared/custom-visualization-libraries.d.ts +25 -0
  270. package/dist/types/widgets/CustomVisualizationConversationWidget/shared/custom-visualization-sandbox-config.d.ts +21 -0
  271. package/dist/types/widgets/CustomVisualizationConversationWidget/shared/custom-visualization-widget-payload.d.ts +55 -0
  272. package/dist/types/widgets/CustomVisualizationConversationWidget/shared/read-custom-visualization-theme.d.ts +5 -0
  273. package/dist/types/widgets/EntityMentionConversationWidget/EntityMentionAskButton/EntityMentionAskButton.d.ts +13 -0
  274. package/dist/types/widgets/EntityMentionConversationWidget/EntityMentionCard/EntityMentionCard.d.ts +11 -0
  275. package/dist/types/widgets/EntityMentionConversationWidget/EntityMentionConversationWidget.d.ts +9 -0
  276. package/dist/types/widgets/EntityMentionConversationWidget/shared/entity-mention-presentation.d.ts +4 -0
  277. package/dist/types/widgets/EntityMentionConversationWidget/shared/entity-mention.d.ts +33 -0
  278. package/dist/types/widgets/EntityMentionConversationWidget/shared/use-entity-mention-composer.d.ts +17 -0
  279. package/dist/types/widgets/MultiChoiceConversationWidget/MultiChoiceConversationWidget.d.ts +2 -0
  280. package/dist/types/widgets/MultiChoiceConversationWidget/shared/multi-choice-widget-payload.d.ts +16 -0
  281. package/dist/types/widgets/QuickRepliesConversationWidget/QuickRepliesConversationWidget.d.ts +38 -0
  282. package/dist/types/widgets/QuickRepliesConversationWidget/shared/quick-replies-widget-payload.d.ts +20 -0
  283. package/dist/types/widgets/SuggestedActions/SuggestedActions.d.ts +10 -0
  284. package/dist/types/widgets/ToolTraceConversationWidget/ToolTraceConversationWidget.d.ts +8 -0
  285. package/dist/types/widgets/WebSearchResultsConversationWidget/SourceFavicon.d.ts +10 -0
  286. package/dist/types/widgets/WebSearchResultsConversationWidget/WebSearchAnswer.d.ts +6 -0
  287. package/dist/types/widgets/WebSearchResultsConversationWidget/WebSearchReferences.d.ts +12 -0
  288. package/dist/types/widgets/WebSearchResultsConversationWidget/WebSearchResultsCanvas.d.ts +10 -0
  289. package/dist/types/widgets/WebSearchResultsConversationWidget/WebSearchResultsCanvasBody.d.ts +7 -0
  290. package/dist/types/widgets/WebSearchResultsConversationWidget/WebSearchResultsConversationWidget.d.ts +14 -0
  291. package/dist/types/widgets/WebSearchResultsConversationWidget/WebSearchSourcesList.d.ts +10 -0
  292. package/dist/types/widgets/WebSearchResultsConversationWidget/shared/display-hostname.d.ts +9 -0
  293. package/dist/types/widgets/WebSearchResultsConversationWidget/shared/web-search-results-widget-payload.d.ts +30 -0
  294. package/dist/types/widgets/WritingDraftConversationWidget/WritingDraftConversationWidget.d.ts +14 -0
  295. package/dist/types/widgets/WritingDraftConversationWidget/WritingDraftWidget/WritingDraftBody.d.ts +9 -0
  296. package/dist/types/widgets/WritingDraftConversationWidget/WritingDraftWidget/WritingDraftWidget.d.ts +44 -0
  297. package/dist/types/widgets/WritingDraftConversationWidget/shared/draft-mail-link.d.ts +17 -0
  298. package/dist/types/widgets/WritingDraftConversationWidget/shared/draft-plain-text.d.ts +7 -0
  299. package/dist/types/widgets/WritingDraftConversationWidget/shared/remark-draft-line-breaks.d.ts +13 -0
  300. package/dist/types/widgets/WritingDraftConversationWidget/shared/writing-draft-widget-payload.d.ts +23 -0
  301. package/dist/types/widgets/_shared/ConversationWidgetButton.d.ts +4 -0
  302. package/dist/types/widgets/_shared/DonePill.d.ts +14 -0
  303. package/dist/types/widgets/_shared/modern/WidgetKpiValue.d.ts +24 -0
  304. package/dist/types/widgets/_shared/modern/WidgetListRow.d.ts +14 -0
  305. package/dist/types/widgets/_shared/modern/WidgetStatusChip.d.ts +8 -0
  306. package/dist/types/widgets/_shared/modern/WidgetSurface.d.ts +13 -0
  307. package/dist/types/widgets/_shared/modern/WidgetSurfaceSkeleton.d.ts +11 -0
  308. package/dist/types/widgets/_shared/modern/index.d.ts +16 -0
  309. package/dist/types/widgets/_shared/skeleton-primitives.d.ts +20 -0
  310. package/dist/types/widgets/_shared/use-stack-when-wrapped.d.ts +6 -0
  311. package/dist/types/widgets/_shared/widget-payload-validation.d.ts +22 -0
  312. package/dist/widgets.js +84 -0
  313. package/dist/widgets.js.map +1 -0
  314. package/package.json +120 -3
@@ -0,0 +1,37 @@
1
+ import { type ComponentType, type RefObject } from "react";
2
+ import type { AgentsConversationClient } from "../../client/AgentsConversationClient";
3
+ import type { PollingConversationChangeSubscriptionOptions } from "../../client/polling/createPollingConversationChangeSubscription";
4
+ import { type AgentChatActivityHistoryProps, type AgentChatActivityProps, type AgentChatControllerProps } from "../controller/AgentChatController";
5
+ import { type AgentsChatStore } from "../store/create-agents-chat-store";
6
+ /** The controller's inputs that `AgentChat` fills itself when the app leaves them out. */
7
+ type DefaultedControllerProps = "chatStore" | "client" | "agentSpaceKey" | "chatScrollRef" | "ThinkingIndicator";
8
+ export interface AgentChatProps extends Omit<AgentChatControllerProps, DefaultedControllerProps> {
9
+ /** This chat instance's state handle. Default: a store of its own, created on mount and dropped on unmount. */
10
+ chatStore?: AgentsChatStore;
11
+ /**
12
+ * The conversation client. Default: the one `AgentsProvider` (or `AgentsConversationClientProvider`) mounted. A client
13
+ * without `subscribeToConversationChanges` gets the polling default (`withPollingChangeSubscription`).
14
+ */
15
+ client?: AgentsConversationClient;
16
+ /**
17
+ * The intervals of the polling default, for a client without a subscription of its own. Read once per client (when
18
+ * the chat wraps it); ignored for a client that brings its own subscription.
19
+ */
20
+ pollingOptions?: PollingConversationChangeSubscriptionOptions;
21
+ /** The key of the agent space new conversations start in. Default: `AgentsEnvironment.useActiveAgentSpaceKey()`, else 0 (no agent space). */
22
+ agentSpaceKey?: number;
23
+ /** The scroll container of the message list, when the app needs it (a scroll-linked background). Default: internal. */
24
+ chatScrollRef?: RefObject<HTMLDivElement | null>;
25
+ /** The agent's activity at the tail of the thread. Default: `AgentChatActivityIndicator` (dots and the ticker line). */
26
+ ThinkingIndicator?: ComponentType<AgentChatActivityProps>;
27
+ }
28
+ /**
29
+ * The agent chat with the package defaults (`./chat`): `<AgentsProvider client={client}><AgentChat
30
+ * /></AgentsProvider>` is a working chat — message list, composer, activity indicator, error card with retry, canvas
31
+ * pane, quick replies, older pages on scroll-up, the closed bar, live updates over the client's own subscription or,
32
+ * without one, the polling default. Every slot and input of `AgentChatController` can still
33
+ * be passed; what is left out gets its default here. Without `conversationId` the chat starts empty, lazy-starts a
34
+ * conversation on the first send and then follows that conversation by itself (`onNewConversation` reports it).
35
+ */
36
+ export declare const AgentChat: (props: AgentChatProps) => import("react/jsx-runtime").JSX.Element;
37
+ export type { AgentChatActivityHistoryProps, AgentChatActivityProps };
@@ -0,0 +1,6 @@
1
+ import type { AgentChatActivityHistoryProps } from "../controller/AgentChatController";
2
+ /**
3
+ * The package default of a finished turn's kept activity lines under the message that started the turn (`AgentChat`
4
+ * with `keepActivityHistoryAfterAnswer`): one muted line per step, oldest first.
5
+ */
6
+ export declare const AgentChatActivityHistory: (props: AgentChatActivityHistoryProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,8 @@
1
+ import type { AgentChatActivityProps } from "../controller/AgentChatController";
2
+ /**
3
+ * The package default of the agent's activity at the tail of the thread (`AgentChat`'s `ThinkingIndicator`): three
4
+ * dots and the line the activity ticker shows right now — the step the agent works on — while a turn runs; nothing
5
+ * between turns or after a failed one (the error card speaks then). An app with an agent avatar replaces it
6
+ * (host application: the agent's face beside the same ticker lines).
7
+ */
8
+ export declare const AgentChatActivityIndicator: (props: AgentChatActivityProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,15 @@
1
+ import type { ChatMessage } from "../chat-message";
2
+ interface CanvasPaneProps {
3
+ /** The host's loaded messages — a message-anchored canvas body parses its fence out of its anchor message. */
4
+ messages: ChatMessage[] | null;
5
+ /** Render as a rounded surface card (agent side-split — the pane is inset below the floating top bar). */
6
+ boxed?: boolean;
7
+ }
8
+ /**
9
+ * The CANVAS PANE — renders the canvas the chat's slice points at (`canvas`, a pointer to its anchor): the body from
10
+ * `canvasBodies`, keyed on `mountGeneration`, geometry from its behaviour (`canvasBehaviourOf`), the canvas's own feature gate and the
11
+ * shared error boundary. A message-anchored body receives its anchor message's markdown and re-reads its widget's
12
+ * payload from it — nothing but the pointer is stored anywhere.
13
+ */
14
+ export declare const CanvasPane: ({ messages, boxed }: CanvasPaneProps) => import("react/jsx-runtime").JSX.Element | null;
15
+ export {};
@@ -0,0 +1,10 @@
1
+ import { RefObject } from "react";
2
+ export interface CanvasResizeHandleProps {
3
+ rootRef: RefObject<HTMLElement | null>;
4
+ inset: number;
5
+ width: number | null;
6
+ onWidthChange: (width: number | null) => void;
7
+ onClose: () => void;
8
+ }
9
+ /** The pull tab on the canvas's left edge: drag to resize, pull past the narrowest and hold to close. */
10
+ export declare const CanvasResizeHandle: (props: CanvasResizeHandleProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,43 @@
1
+ import { KeyboardEvent, PointerEvent as ReactPointerEvent, RefObject } from "react";
2
+ /** `idle` (hidden until the pointer comes near), `hover`, `drag`, `armed` (pulled past the narrowest and held: release closes). */
3
+ export type CanvasResizeTab = "idle" | "hover" | "drag" | "armed";
4
+ export declare const rubberBand: (distance: number) => number;
5
+ export declare const canvasWidthLimits: (rootWidth: number, inset: number) => {
6
+ min: number;
7
+ max: number;
8
+ };
9
+ export declare const clampCanvasWidth: (width: number, rootWidth: number, inset: number) => number;
10
+ interface UseCanvasResizeOptions {
11
+ /** The split's root: the canvas pane's right edge is its right edge, and `--agents-canvas-width-drag` is written onto it while dragging. */
12
+ rootRef: RefObject<HTMLElement | null>;
13
+ /** The canvas card's inset from its pane edge — the handle sits on the card's edge. */
14
+ inset: number;
15
+ /** The pane width the customer set (px), or `null` for the canvas's default split. */
16
+ width: number | null;
17
+ onWidthChange: (width: number | null) => void;
18
+ onClose: () => void;
19
+ }
20
+ /**
21
+ * The canvas's left edge drags. The edge follows the pointer through a CSS variable on the split's root (no render per
22
+ * move); the width is committed once on release. Pulled `CLOSE_PULL_PX` past the narrowest and held, the tab arms and
23
+ * release closes the canvas.
24
+ */
25
+ export declare const useCanvasResize: (options: UseCanvasResizeOptions) => {
26
+ tab: CanvasResizeTab;
27
+ tabX: number;
28
+ handleProps: {
29
+ ref: RefObject<HTMLDivElement | null>;
30
+ role: string;
31
+ "aria-orientation": "vertical";
32
+ "aria-valuemin": number;
33
+ "aria-valuemax": number;
34
+ "aria-valuenow": number | undefined;
35
+ tabIndex: number;
36
+ onPointerDown: (event: ReactPointerEvent<HTMLElement>) => void;
37
+ onPointerEnter: () => void;
38
+ onPointerLeave: () => void;
39
+ onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
40
+ onDoubleClick: () => void;
41
+ };
42
+ };
43
+ export {};
@@ -0,0 +1,10 @@
1
+ export interface ConversationClosedBarProps {
2
+ /** The status line; a text key. Default "This conversation is closed.". */
3
+ text?: string;
4
+ }
5
+ /**
6
+ * The package default in place of the composer on a closed conversation (its run state ended it: COMPLETED or
7
+ * CANCELLED; the server refuses further input). A status line, no action — an app that offers one replaces the bar
8
+ * through `AgentChat`'s `inputReplacementSlot`.
9
+ */
10
+ export declare const ConversationClosedBar: (props: ConversationClosedBarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { ConversationErrorType } from "../store/conversation-error-type";
2
+ export interface ConversationErrorCardProps {
3
+ errorType: ConversationErrorType;
4
+ /** Retry-After seconds of the 429 — only meaningful for RATE_LIMIT; picks the "try again in …" wording. */
5
+ rateLimitRetryAfterSeconds?: number | null;
6
+ /**
7
+ * Retry action for a generic run failure whose customer message is persisted but unanswered: the HOST decides eligibility and binds the call to ITS chat slice (the AI-extensions chat and the agent
8
+ * widget mount this card on separate Redux partitions), so the card only renders the action when it is given one.
9
+ * Resolves when the retry was accepted; rejects when there is nothing to retry — the card then keeps showing.
10
+ */
11
+ onRetry?: () => Promise<void>;
12
+ }
13
+ export declare const ConversationErrorCard: (props: ConversationErrorCardProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type { ChatAssistantIdentity, ChatAssistantOpening } from "../chat-assistant-identity";
2
+ interface ConversationIntroCardProps {
3
+ aiPromptExtension: ChatAssistantIdentity;
4
+ /** The icon class of the extension, an icon of the app's icon set. */
5
+ aiPromptExtensionIcon: string;
6
+ suggestions?: ChatAssistantOpening[];
7
+ onSuggestionClick: (text: string) => void;
8
+ }
9
+ export declare const ConversationIntroCard: ({ aiPromptExtension, aiPromptExtensionIcon, suggestions, onSuggestionClick, }: ConversationIntroCardProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const NoConversationLoading: () => import("react/jsx-runtime").JSX.Element;
2
+ export declare const ConversationLoading: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ export interface ConversationCallMarkerChipProps {
3
+ /** PHONE_CALL_STARTED | PHONE_CALL_ENDED — the lifecycle signal's source. */
4
+ signalSource: string;
5
+ /** The signal's model-visible text — carries the duration as `NNNs` and the end reason as `reason <value>`. */
6
+ signalText: string;
7
+ }
8
+ /**
9
+ * Centered marker for a call's lifecycle inside the chat timeline: started, ended (with its duration), declined, missed
10
+ * or not connected; an in-app call is a voice chat with the agent (its voice bars), a phone call keeps the phone. Rendered
11
+ * from the otherwise user-invisible PHONE_CALL_* SIGNAL messages — the label derives from the signal source + the small text contract of AgentVoiceCall::buildLifecycleSignalText (`In-app call …` vs
12
+ * `Phone call …`, duration `NNNs`, reason `reason <value>`); an unparsable text degrades to the plain label.
13
+ */
14
+ export declare const ConversationCallMarkerChip: React.MemoExoticComponent<({ signalSource, signalText }: ConversationCallMarkerChipProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,8 @@
1
+ export interface VoiceBarsIconProps {
2
+ /** Edge length in px; the bars take the current text colour. */
3
+ size?: number;
4
+ }
5
+ /**
6
+ * Five sound bars, the tallest in the middle — the mark of an in-app voice call with the agent.
7
+ */
8
+ export declare const VoiceBarsIcon: (props: VoiceBarsIconProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import type { ChatAssistantCategory } from "../../chat-assistant-identity";
3
+ export interface ConversationMessageSystemProps {
4
+ aiPromptExtensionCategory?: ChatAssistantCategory;
5
+ aiPromptExtension?: ChatAssistantCategory;
6
+ message: string;
7
+ }
8
+ export declare const ConversationMessageSystem: React.MemoExoticComponent<(props: ConversationMessageSystemProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,9 @@
1
+ import type { ChatAssistantCategory, ChatAssistantIdentity } from "../../../chat-assistant-identity";
2
+ import React from "react";
3
+ export interface ConversationMessageSystemHeaderProps {
4
+ aiPromptExtensionCategory?: ChatAssistantCategory;
5
+ aiPromptExtension?: ChatAssistantIdentity;
6
+ onExpandContentClick?: () => void;
7
+ isContentExpanded?: boolean;
8
+ }
9
+ export declare const ConversationMessageSystemHeader: React.MemoExoticComponent<(props: ConversationMessageSystemHeaderProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,7 @@
1
+ export type ConversationMessageUserTheme = "default" | "light" | "dark" | "primary";
2
+ export interface ConversationMessageUserProps {
3
+ text: string;
4
+ theme?: ConversationMessageUserTheme;
5
+ isGenericChat?: boolean;
6
+ }
7
+ export declare const ConversationMessageUser: (props: ConversationMessageUserProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { ConversationComposerWidget } from "../../../renderer/conversation-composer-widget";
2
+ export interface ConversationMessageUserWidgetsProps {
3
+ /** Composer-widget fences extracted from the customer's own message text (see `splitComposerWidgetFencesFromMessageText`). */
4
+ widgets: ConversationComposerWidget[];
5
+ }
6
+ /**
7
+ * Read-only echo of the composer widgets the customer sent inside their OWN message — rendered above the prose. Reuses each widget's registered message `component` (the same one an
8
+ * assistant reply would mount via the remark pipeline) directly with the fence's fields as `payload` — NOT the
9
+ * remark/markdown pipeline itself, which never runs for user text (interpreting the customer's own prose as
10
+ * Markdown would change every user bubble). `fresh={false}`: this is always a replay of content already sent, never
11
+ * a live delivery. Each widget renders inside its own `ConversationWidgetErrorBoundary` so a malformed fence never
12
+ * blanks the whole bubble.
13
+ */
14
+ export declare const ConversationMessageUserWidgets: (props: ConversationMessageUserWidgetsProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,7 @@
1
+ import type { ChatAssistantCategory, ChatAssistantIdentity } from "../../../chat-assistant-identity";
2
+ import React from "react";
3
+ export interface ConversationMessageHeaderProps {
4
+ aiPromptExtensionCategory?: ChatAssistantCategory;
5
+ aiPromptExtension?: ChatAssistantIdentity;
6
+ }
7
+ export declare const ConversationMessageHeader: React.MemoExoticComponent<(props: ConversationMessageHeaderProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,7 @@
1
+ import type { ChatAssistantCategory, ChatAssistantIdentity } from "../../../chat-assistant-identity";
2
+ import React from "react";
3
+ export interface ConversationMessageThinkingProps {
4
+ aiPromptExtensionCategory?: ChatAssistantCategory;
5
+ aiPromptExtension?: ChatAssistantIdentity;
6
+ }
7
+ export declare const ConversationMessageThinking: React.MemoExoticComponent<(props: ConversationMessageThinkingProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,29 @@
1
+ import type { ChatAssistantCategory, ChatAssistantIdentity } from "../../chat-assistant-identity";
2
+ import React from "react";
3
+ export interface ConversationMessageWidgetsProps {
4
+ aiPromptExtensionCategory?: ChatAssistantCategory;
5
+ aiPromptExtension?: ChatAssistantIdentity;
6
+ eventSource?: EventSource;
7
+ message?: unknown;
8
+ /**
9
+ * The reply's widgets may be used (buttons, forms, hydration refresh): a live-delivered reply, and the newest reply
10
+ * after a reload. Forwarded to every widget as `interactive` (+ the deprecated alias `fresh`).
11
+ */
12
+ interactive?: boolean;
13
+ /**
14
+ * The reply was delivered live right now — never after a reload. Forwarded to every widget as `justDelivered`, the
15
+ * only gate for one-shot side effects (canvas open, draft creation), and the gate of the block reveal.
16
+ */
17
+ justDelivered?: boolean;
18
+ hideWidgets?: boolean;
19
+ /** Id of the host message: once-only guard of the block reveal, and the identity of a canvas opened from it. */
20
+ messageId?: string | number | null;
21
+ /**
22
+ * Hide the assistant header (icon + name + "Assistant") and the copy button.
23
+ * Used by a host, which renders bare assistant messages.
24
+ */
25
+ hideAssistantMeta?: boolean;
26
+ /** Opt-in staggered fade-in of this fresh reply's markdown blocks (see useFreshMessageBlockReveal). Default off. */
27
+ enableFreshMessageBlockReveal?: boolean;
28
+ }
29
+ export declare const ConversationMessageWidgets: React.MemoExoticComponent<(props: ConversationMessageWidgetsProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1 @@
1
+ export declare function copyRichToClipboard(plainText: string, html: string): Promise<void>;
@@ -0,0 +1,14 @@
1
+ import { RefObject } from "react";
2
+ export declare const VISIBILITY_DEADLINE_MS = 2500;
3
+ export declare const useFreshMessageBlockReveal: (options: {
4
+ /**
5
+ * The rendered-message container — ConversationMessageWidgets's existing renderedRef. Its DIRECT child must be
6
+ * the reply's own `[data-markdown-blocks-root]` div (ConversationMarkdown renders exactly one Markdown,
7
+ * whose context provider adds no DOM node); the hook queries only that direct child.
8
+ */
9
+ containerRef: RefObject<HTMLDivElement | null>;
10
+ /** fresh && message != null — static fresh assistant replies only. */
11
+ enabled: boolean;
12
+ /** Once-only guard key; when null/undefined the reply animates but is not recorded. */
13
+ messageId?: string | number | null;
14
+ }) => void;
@@ -0,0 +1,8 @@
1
+ interface UseStreamingTextOptions {
2
+ eventSource?: EventSource;
3
+ onTextChunk?: (chunk: string) => void;
4
+ onError?: () => void;
5
+ onDone?: () => void;
6
+ }
7
+ export declare const useStreamingText: ({ eventSource, onTextChunk, onError, onDone }: UseStreamingTextOptions) => void;
8
+ export {};
@@ -0,0 +1,12 @@
1
+ interface UseTypewriterOptions {
2
+ speed?: number;
3
+ commitIntervalMs?: number;
4
+ }
5
+ export declare const useTypewriter: (options?: UseTypewriterOptions) => {
6
+ displayedText: string;
7
+ appendText: (text: string) => void;
8
+ stopTypewriter: () => void;
9
+ finishTypewriter: () => void;
10
+ isFinished: boolean;
11
+ };
12
+ export {};
@@ -0,0 +1,12 @@
1
+ export interface ConversationTaskInstructionDisclosureProps {
2
+ /** The machine-composed seed instruction of a schedule-spawned run — the full text revealed on expand. */
3
+ instructionText: string;
4
+ }
5
+ /**
6
+ * Replaces the owner bubble for the FIRST user message of a SCHEDULE-spawned run conversation (UX overhaul W4
7
+ * item 19). That message is the machine-composed task instruction (the schedule's task text + the previous run's
8
+ * outcome line, see AIConversationSchedule::composeSeedUserMessageText) — NOT something the owner typed, so an
9
+ * owner bubble would misattribute it as the owner's own words. Collapsed by default to a muted
10
+ * "Show task instruction" disclosure; expanding reveals the full instruction text for inspection.
11
+ */
12
+ export declare const ConversationTaskInstructionDisclosure: ({ instructionText, }: ConversationTaskInstructionDisclosureProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,111 @@
1
+ import React from "react";
2
+ import type { ConversationAttachmentReference } from "../../contract/conversation";
3
+ import { SendMessageHandler } from "../conversation-send-message";
4
+ import { ConversationComposerWidget } from "../../renderer/conversation-composer-widget";
5
+ /**
6
+ * Cap on the message a user can send. Covers the longest legitimate business
7
+ * inputs (pasted homepage copy, article drafts, menus ≈ 8k chars) while blocking
8
+ * accidental huge dumps. Typing and pasting past it stay possible — the text is
9
+ * never trimmed — but sending is blocked until the user edits back under the cap.
10
+ */
11
+ export declare const MAX_MESSAGE_LENGTH = 10000;
12
+ /** The character counter stays hidden until the message approaches the cap. */
13
+ export declare const CHARACTER_COUNTER_SHOWN_FROM_LENGTH: number;
14
+ /**
15
+ * Imperative handle so a host-owned control (e.g. the agent "+" menu's "Generate image" entry)
16
+ * can put text into the input without owning the contentEditable itself.
17
+ */
18
+ export interface ConversationMessageInputHandle {
19
+ /** Replaces the input's text and focuses the caret at the end. */
20
+ insertTextIntoInput: (text: string) => void;
21
+ }
22
+ export interface ConversationMessageInputProps {
23
+ /**
24
+ * Callback when a message is submitted. `options.attachments` echoes `outgoingAttachmentImages`
25
+ * when the host provided any — ConversationMessageInput itself never builds attachments, it only rides them along.
26
+ */
27
+ onSendMessage?: SendMessageHandler;
28
+ /**
29
+ * Placeholder text for the input
30
+ */
31
+ placeholder?: string;
32
+ /**
33
+ * Whether the input is disabled
34
+ */
35
+ disabled?: boolean;
36
+ /**
37
+ * Theme color for the input
38
+ */
39
+ themeColor?: string;
40
+ /**
41
+ * One-line form: text and send button on the same row inside a pill, growing with the text. The agent dashboard's
42
+ * input; the chat keeps the full form.
43
+ */
44
+ compact?: boolean;
45
+ /**
46
+ * Compact only: shrunk to a small glowing pill showing one line, the placeholder or the start of a draft, its buttons
47
+ * hidden but kept (the agent dashboard while the page is scrolled). The host expands it again on hover, focus or at the
48
+ * top of the page.
49
+ */
50
+ collapsed?: boolean;
51
+ /**
52
+ * Compact only: called with the width in px the collapsed pill needs to show the whole translated placeholder on one
53
+ * line, its side padding included, and again whenever that width changes (a font loading, another language). The
54
+ * host gives the pill this width, so the placeholder fits in every language.
55
+ */
56
+ onCollapsedPillWidthChange?: (collapsedPillWidthPx: number) => void;
57
+ /**
58
+ * Whether the AI is currently processing a response
59
+ */
60
+ isProcessing?: boolean;
61
+ /**
62
+ * Test ID for the component
63
+ */
64
+ testId?: string;
65
+ /**
66
+ * Additional CSS classes to apply to the component
67
+ */
68
+ className?: string;
69
+ /**
70
+ * Extra action controls rendered inside the input's bottom action row, left of the send button —
71
+ * e.g. the agent model picker pill.
72
+ */
73
+ actionsSlot?: React.ReactNode;
74
+ /**
75
+ * Action controls pinned to the LEFT edge of the bottom action row (the `actionsSlot` cluster
76
+ * stays right, next to the send button) — e.g. the agent "+" attachments menu.
77
+ */
78
+ actionsSlotStart?: React.ReactNode;
79
+ /**
80
+ * Host-owned content rendered above the editable text area, inside the input container —
81
+ * attachment preview cards, validation error boxes, selection chips. Each injected block owns
82
+ * its reveal/collapse animation.
83
+ */
84
+ topSlot?: React.ReactNode;
85
+ /** Shown in place of the send button while there is nothing to send — e.g. the button that starts a voice chat. */
86
+ sendReplacementWhenEmpty?: React.ReactNode;
87
+ /** Painted behind the input, over its whole box — e.g. the voice glow of a running voice chat. */
88
+ glowUnderlay?: React.ReactNode;
89
+ /**
90
+ * Hard send gate: blocks the send button AND Enter while true, but keeps the text editable
91
+ * (unlike `disabled`/`isProcessing`). The host sets it e.g. while attachment uploads run.
92
+ */
93
+ sendDisabled?: boolean;
94
+ /**
95
+ * Uploaded media-library images that ride along in `onSendMessage`'s options object (`attachments`)
96
+ * on the next send. Owned and cleared by the host; ConversationMessageInput only forwards them.
97
+ */
98
+ outgoingAttachmentImages?: ConversationAttachmentReference[];
99
+ /**
100
+ * Composer widgets that ride along on the next send — mirrors `outgoingAttachmentImages`. On send their fences
101
+ * are appended to the typed text (`buildMessageTextWithComposerWidgets`) and they ride along in `onSendMessage`'s
102
+ * options object (`composerWidgets`); a widget-only send (empty typed text) is allowed. Backspace on an empty
103
+ * input removes the last part / widget via the widget context directly (`useConversationWidgetContext`).
104
+ */
105
+ outgoingComposerWidgets?: ConversationComposerWidget[];
106
+ /** Called right after a successful send — the host clears the composer widgets it owns. */
107
+ onComposerWidgetsSent?: () => void;
108
+ /** Imperative handle for host-owned controls to put text into the input. */
109
+ apiRef?: React.Ref<ConversationMessageInputHandle>;
110
+ }
111
+ export declare const ConversationMessageInput: (props: ConversationMessageInputProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,34 @@
1
+ export type ConversationMessageInputAttachmentUploadStatus = "uploading" | "uploaded" | "failed";
2
+ /**
3
+ * Presentational shape of one attachment above the chat input. The host's attachment state
4
+ * (e.g. `useAgentChatAttachments`' `AgentChatAttachment`) is a superset of this.
5
+ */
6
+ export type ConversationMessageInputAttachmentPreview = {
7
+ attachmentId: string;
8
+ /** Data-URI of the image — renders the thumbnail card. Absent → generic file card. */
9
+ previewImageSrc?: string;
10
+ /** Generic-card fields (image cards show the thumbnail instead). */
11
+ fileName?: string;
12
+ fileSizeBytes?: number;
13
+ mimeType?: string;
14
+ uploadStatus: ConversationMessageInputAttachmentUploadStatus;
15
+ /** 0-100; only meaningful while `uploadStatus` is "uploading". */
16
+ uploadProgressPercent: number;
17
+ };
18
+ export interface ConversationMessageInputAttachmentPreviewCardProps {
19
+ attachment: ConversationMessageInputAttachmentPreview;
20
+ /** The card's ✕ — the host drops the attachment (and discards its in-flight upload result). */
21
+ onRemove: () => void;
22
+ testId?: string;
23
+ }
24
+ /**
25
+ * One attachment card above the chat input: an image thumbnail (or a generic name/type/size card
26
+ * for future non-image types), an upload progress bar while the media-library upload runs, a
27
+ * failed state, and a ✕ to remove.
28
+ *
29
+ * While uploading, a white caption with a black shadow sits over the image bottom:
30
+ * "Uploading (45%)..." while bytes are still going out, "Processing..." once all bytes are sent
31
+ * (progress 100%) but the media-library call hasn't resolved — the bar goes indeterminate for that
32
+ * stretch. Both disappear when the upload settles.
33
+ */
34
+ export declare const ConversationMessageInputAttachmentPreviewCard: (props: ConversationMessageInputAttachmentPreviewCardProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { type AgentsTextReplacements } from "../../../provider/components";
2
+ export declare const ERROR_BOX_AUTO_DISMISS_AFTER_MS = 5000;
3
+ export interface ConversationMessageInputAttachmentsErrorBoxProps {
4
+ /** Validation errors of ONE invalid selection, straight from `MediaItemFile.validationErrors`. */
5
+ errors: {
6
+ text: string;
7
+ replacements?: AgentsTextReplacements;
8
+ }[];
9
+ onDismiss: () => void;
10
+ /** Stories pass a short value so play-tests don't wait 5 real seconds. */
11
+ autoDismissAfterMs?: number;
12
+ testId?: string;
13
+ }
14
+ /**
15
+ * The single error box above the chat input for an invalid file selection. Auto-dismisses after
16
+ * `autoDismissAfterMs` with a visible countdown bar (CSS animation — the timeout and the bar share
17
+ * the duration and pause/resume together), or immediately via the ✕. Hovering the box pauses the
18
+ * countdown (timer AND bar) so the user can finish reading; leaving resumes with the remaining
19
+ * time. The HOST re-arms it for a new invalid selection by remounting (`key` bump) — mount is the
20
+ * only moment the timer starts.
21
+ */
22
+ export declare const ConversationMessageInputAttachmentsErrorBox: (props: ConversationMessageInputAttachmentsErrorBoxProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { ConversationMessageInputAttachmentPreview } from "./ConversationMessageInputAttachmentPreviewCard";
2
+ export interface ConversationMessageInputAttachmentsPreviewStripProps {
3
+ attachments: ConversationMessageInputAttachmentPreview[];
4
+ onRemoveAttachment: (attachmentId: string) => void;
5
+ testId?: string;
6
+ }
7
+ /**
8
+ * Horizontal strip of attachment cards above the chat input's text area. Grows in / shrinks out
9
+ * with the grid-rows 0fr→1fr reveal (same trick as the selection chip) instead of popping; scrolls
10
+ * horizontally when the cards outgrow the input's width.
11
+ */
12
+ export declare const ConversationMessageInputAttachmentsPreviewStrip: (props: ConversationMessageInputAttachmentsPreviewStripProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /** A file size as the attachment card shows it ("1.5 MB"); the same wording as the app's file helpers. */
2
+ export declare const convertBytesToSizeString: (bytes: number) => string;
@@ -0,0 +1,12 @@
1
+ export interface ConversationMessageInputComposerWidgetsProps {
2
+ testId?: string;
3
+ }
4
+ /**
5
+ * Generic strip of composer widgets above the chat input's text area — the composer-side twin of
6
+ * `ConversationMessageInputAttachmentsPreviewStrip`, same grid-rows 0fr→1fr reveal. Reads `composerWidgets` from the
7
+ * widget context itself (so every ConversationView host gets it for free, mirroring the deleted selection chip),
8
+ * and for each widget resolves the registry entry by `widgetName` and renders its `composerComponent` with
9
+ * `{ composerWidgetId, fields, replaceFields, remove }`. An unknown name, or an entry without a `composerComponent`,
10
+ * renders nothing for that widget — the same kill switch the fence plugin applies.
11
+ */
12
+ export declare const ConversationMessageInputComposerWidgets: (props: ConversationMessageInputComposerWidgetsProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,75 @@
1
+ import type { ChatAssistantCategory, ChatAssistantIdentity } from "../chat-assistant-identity";
2
+ import React from "react";
3
+ import { ConversationMessageUserTheme } from "../ConversationMessage/ConversationMessageUser/ConversationMessageUser";
4
+ import { ConversationErrorType } from "../store/conversation-error-type";
5
+ import type { ChatMessage } from "../chat-message";
6
+ import { Ref, RefObject } from "react";
7
+ interface ConversationMessageListProps {
8
+ className?: string;
9
+ messages: ChatMessage[] | null;
10
+ currentCategory?: ChatAssistantCategory;
11
+ aiPromptExtension?: ChatAssistantIdentity;
12
+ isDebugMode: boolean;
13
+ aiThinking: boolean;
14
+ /**
15
+ * Custom node mounted at the tail of the message list instead of the default
16
+ * (thinking-only) ConversationMessageThinking. Rendered permanently — used by
17
+ * A host to show the animated agent face, which idles between turns.
18
+ */
19
+ thinkingIndicator?: React.ReactNode;
20
+ /**
21
+ * Hide the assistant header (icon + name + "Assistant") and the copy button
22
+ * on assistant messages. Used by a host, which renders bare messages.
23
+ */
24
+ hideAssistantMeta?: boolean;
25
+ /**
26
+ * Theme for user-message bubbles. When omitted, falls back to the legacy
27
+ * behavior: "light" for generic (no-agent) chat, "default" otherwise. A host
28
+ * forces "dark".
29
+ */
30
+ userMessageTheme?: ConversationMessageUserTheme;
31
+ error: ConversationErrorType | null;
32
+ /** Retry-After seconds of a 429 quota rejection — forwarded to the error card for the "try again in …" wording. */
33
+ rateLimitRetryAfterSeconds?: number | null;
34
+ /**
35
+ * Host-bound retry of a FAILED run. Offered on the error card only while the newest wire
36
+ * message is the customer's own, still unanswered — the persisted message is re-driven server-side.
37
+ */
38
+ onRetryFailedRun?: () => Promise<void>;
39
+ messagesBottomRef: RefObject<HTMLDivElement | null>;
40
+ messagesListRef?: Ref<HTMLDivElement | null>;
41
+ /**
42
+ * Opt-in staggered fade-in of a fresh reply's markdown blocks — see useFreshMessageBlockReveal;
43
+ * forwarded to ConversationMessageWidgets. Default off.
44
+ */
45
+ enableFreshMessageBlockReveal?: boolean;
46
+ /**
47
+ * Id of the ONE user message to render as a collapsed task-instruction disclosure instead of an owner bubble:
48
+ * the machine-composed seed instruction of a SCHEDULE-spawned run (UX overhaul W4 item 19). The host resolves
49
+ * the id (AgentChat: first USER message once the history is loaded to its start); undefined renders every
50
+ * user message normally.
51
+ */
52
+ taskInstructionMessageId?: number;
53
+ /**
54
+ * Host content rendered right after one message of the thread — also after a message the list itself does not show
55
+ * (a work signal that started an agent turn). The agent chat puts each turn's activity card under the message that
56
+ * started the turn. The content is a row of the list's flex column, so the list's gap stands above it; the list
57
+ * publishes that gap as `--chat-messages-gap`. Undefined (every other host) renders the rows exactly as before.
58
+ */
59
+ renderAfterMessage?: (message: ChatMessage) => React.ReactNode;
60
+ /** The backend refuses every widget signal of a closed conversation, so no widget renders its controls. */
61
+ isConversationClosed?: boolean;
62
+ }
63
+ /**
64
+ * The id of the newest widget-carrying assistant-role message the owner has not answered yet — null when the newest
65
+ * such message is followed by a USER message or by a widget-click signal (the owner moved on; its controls stay
66
+ * read-only after a reload, as before). Walks from the end so the first widget hit is the newest.
67
+ */
68
+ export declare const findUnansweredWidgetMessageId: (messages: ChatMessage[]) => string | number | null;
69
+ /**
70
+ * The ids of every widget-carrying assistant-role message that a LATER assistant-role message supersedes with a
71
+ * widget of the same name. Pure, order-based: the newest widget of a type is the live one.
72
+ */
73
+ export declare const findSupersededWidgetMessageIds: (messages: ChatMessage[]) => Set<string | number>;
74
+ export declare const ConversationMessageList: ({ className, messages, currentCategory, aiPromptExtension, isDebugMode, aiThinking, thinkingIndicator, hideAssistantMeta, userMessageTheme, error, rateLimitRetryAfterSeconds, onRetryFailedRun, messagesBottomRef, messagesListRef, enableFreshMessageBlockReveal, taskInstructionMessageId, renderAfterMessage, isConversationClosed, }: ConversationMessageListProps) => import("react/jsx-runtime").JSX.Element;
75
+ export {};