@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,139 @@
1
+ import type { AgentsConversationClient, AgentsConversationOperation } from "../AgentsConversationClient";
2
+ import { type AgentsConversation, type AgentsConversationMessage, type ChangedConversationMessages, type ChangedMessagesRequest, type ConversationActivity, type ConversationAttachmentReference, type ConversationChangeSignal, type ConversationListQueryOptions, type ConversationMessageSearchHit, type ConversationMessageSentPayload, type ConversationMessagesPage, type ConversationRunStatus, type ConversationSearchGroup, type ConversationSearchOptions, type ConversationSignal, type ConversationSubscriptionEndReason, type PostedMessage, type SelectableModel, type StartedConversation } from "../../contract/conversation";
3
+ /** One recorded conversation handed to the in-memory client: plain data, as a fixture file holds it. */
4
+ export interface RecordedConversation {
5
+ conversation: AgentsConversation;
6
+ messages: AgentsConversationMessage[];
7
+ /** What `getConversationActivity` answers for this conversation; an empty, finished turn when omitted. */
8
+ activity?: ConversationActivity;
9
+ }
10
+ export interface InMemoryAgentsConversationClientData {
11
+ conversations: RecordedConversation[];
12
+ /**
13
+ * The assistant's answers to a post, an injected signal, a start or a retry, used in order; the last one repeats.
14
+ * Default: one answer, "Done.".
15
+ */
16
+ scriptedAssistantAnswers?: string[];
17
+ /** What `getSelectableModels` answers; the client has no `getSelectableModels` when omitted. */
18
+ selectableModels?: SelectableModel[];
19
+ /** The page size of `getChangedMessages` when the request names none. Default 50. */
20
+ defaultPageSize?: number;
21
+ /** What `getMessageSentPayload` answers, by message id; the client has no `getMessageSentPayload` when omitted. */
22
+ sentPayloadsByMessageId?: Record<number, ConversationMessageSentPayload>;
23
+ /**
24
+ * The assistant answers this many milliseconds after the send, like a server's turn: the run state is RUNNING
25
+ * meanwhile, then the answer is stored and the run state goes back to IDLE — no `emit()` involved, so a poller sees it.
26
+ * Default 0: the answer is stored together with the send.
27
+ */
28
+ assistantAnswerDelayMs?: number;
29
+ /**
30
+ * The client has no `subscribeToConversationChanges` — a backend without push. The chat then follows the
31
+ * conversation through the polling default (`withPollingChangeSubscription`). Default false.
32
+ */
33
+ withoutChangeSubscription?: boolean;
34
+ }
35
+ /** A subscriber of one conversation's live updates. */
36
+ interface ConversationChangeSubscriber {
37
+ onChange: (signal: ConversationChangeSignal) => void;
38
+ onEnded: (reason: ConversationSubscriptionEndReason) => void;
39
+ }
40
+ /** The live-update state of one conversation. */
41
+ interface ConversationSignalState {
42
+ changeCounter: number;
43
+ summaryUpdatedAt: number | null;
44
+ }
45
+ /**
46
+ * The conversation client over recorded conversations, for specs, stories and the reference app
47
+ * (`./testing`). Behaves like the server where the chat can see it: a post stores the owner's message and, at once,
48
+ * the next scripted assistant answer — but live updates are driven by hand: `emit()` sends the conversation's next
49
+ * signal to its subscribers (counter advanced, newest message id, the run status), `end()` ends the subscriptions.
50
+ * With `assistantAnswerDelayMs` the answer is stored later, as a server turn would (RUNNING meanwhile); with
51
+ * `withoutChangeSubscription` the client has no subscription at all and the chat polls it.
52
+ */
53
+ export declare class InMemoryAgentsConversationClient implements AgentsConversationClient {
54
+ protected readonly recordsByConversationId: Map<number, RecordedConversation>;
55
+ protected readonly subscribersByConversationId: Map<number, Set<ConversationChangeSubscriber>>;
56
+ protected readonly signalStateByConversationId: Map<number, ConversationSignalState>;
57
+ protected readonly scriptedAssistantAnswers: string[];
58
+ protected readonly defaultPageSize: number;
59
+ protected readonly selectableModels: SelectableModel[] | undefined;
60
+ protected readonly sentPayloadsByMessageId: Record<number, ConversationMessageSentPayload> | undefined;
61
+ protected readonly assistantAnswerDelayMs: number;
62
+ protected readonly requestCountsByOperation: Map<AgentsConversationOperation, number>;
63
+ protected scriptedAssistantAnswersUsed: number;
64
+ protected nextMessageId: number;
65
+ protected nextConversationId: number;
66
+ /** Present only when the data names selectable models (the port function is optional). */
67
+ readonly getSelectableModels?: () => Promise<SelectableModel[]>;
68
+ /** Present only when the data names sent payloads (the port function is optional). */
69
+ readonly getMessageSentPayload?: (conversationId: number, messageId: number) => Promise<ConversationMessageSentPayload>;
70
+ /** Present unless the data asks for a client without push (`withoutChangeSubscription`). */
71
+ readonly subscribeToConversationChanges?: (conversationId: number, onChange: (signal: ConversationChangeSignal) => void, onEnded: (reason: ConversationSubscriptionEndReason) => void) => () => void;
72
+ constructor(data: InMemoryAgentsConversationClientData);
73
+ listConversations: (agentSpaceKey: number, options?: ConversationListQueryOptions) => Promise<AgentsConversation[]>;
74
+ /** Account-wide, like the server: every recorded conversation is searched. */
75
+ searchConversations: (text: string, options?: ConversationSearchOptions) => Promise<ConversationSearchGroup[]>;
76
+ /** The stored conversation with `lastMessageId` (the newest stored message), as a backend without push answers it. */
77
+ getConversationMetadata: (conversationId: number) => Promise<AgentsConversation>;
78
+ getNewestMessagesPage: (conversationId: number, pageSize: number) => Promise<ConversationMessagesPage>;
79
+ getOlderMessagesPage: (conversationId: number, beforeIndex: number, pageSize: number) => Promise<ConversationMessagesPage>;
80
+ getChangedMessages: (conversationId: number, request: ChangedMessagesRequest) => Promise<ChangedConversationMessages>;
81
+ searchConversationMessages: (conversationId: number, text: string, options?: ConversationSearchOptions) => Promise<ConversationMessageSearchHit[]>;
82
+ getConversationActivity: (conversationId: number) => Promise<ConversationActivity>;
83
+ startConversation: (request: {
84
+ agentSpaceKey: number;
85
+ text: string;
86
+ startSignalText?: string;
87
+ entryPointKey?: string;
88
+ model?: string;
89
+ attachments?: ConversationAttachmentReference[];
90
+ }) => Promise<StartedConversation>;
91
+ postMessage: (conversationId: number, message: {
92
+ text: string;
93
+ model?: string;
94
+ attachments?: ConversationAttachmentReference[];
95
+ }) => Promise<PostedMessage>;
96
+ injectSignal: (conversationId: number, signal: ConversationSignal) => Promise<void>;
97
+ retryConversation: (conversationId: number) => Promise<void>;
98
+ renameConversation: (conversationId: number, title: string) => Promise<AgentsConversation>;
99
+ deleteConversation: (conversationId: number) => Promise<void>;
100
+ /** The port's `subscribeToConversationChanges` unless `withoutChangeSubscription`; signals come from `emit()`. */
101
+ protected subscribeToRecordedConversationChanges: (conversationId: number, onChange: (signal: ConversationChangeSignal) => void, onEnded: (reason: ConversationSubscriptionEndReason) => void) => (() => void);
102
+ /**
103
+ * Sends the conversation's next signal to its subscribers: the counter advances, `lastMessageId` is the newest
104
+ * stored message, the run status follows the stored run state unless `runStatus` is given. `summaryChanged` also
105
+ * advances `summaryUpdatedAt`. Returns the sent signal.
106
+ */
107
+ emit: (conversationId: number, change?: {
108
+ runStatus?: ConversationRunStatus;
109
+ summaryChanged?: boolean;
110
+ }) => ConversationChangeSignal;
111
+ /** Ends every subscription of the conversation with `reason`, as the server's deletion or a lost access would. */
112
+ end: (conversationId: number, reason: ConversationSubscriptionEndReason) => void;
113
+ /** Sets a conversation's stored run state (a turn that runs, fails, or a conversation that closes). */
114
+ setRunState: (conversationId: number, runState: AgentsConversation["runState"]) => void;
115
+ /**
116
+ * How many requests the client answered — of one port function, or of all when `operation` is omitted (the
117
+ * subscription is no request). For assertions such as "no read after the chat unmounted".
118
+ */
119
+ readRequestCount: (operation?: AgentsConversationOperation) => number;
120
+ /** Every stored message of a conversation in index order — for assertions. */
121
+ readStoredMessages: (conversationId: number) => AgentsConversationMessage[];
122
+ protected countRequest(operation: AgentsConversationOperation): void;
123
+ protected readSelectableModels: () => Promise<SelectableModel[]>;
124
+ protected readMessageSentPayload: (conversationId: number, messageId: number) => Promise<ConversationMessageSentPayload>;
125
+ protected readMessagesNewestFirst(conversationId: number): AgentsConversationMessage[];
126
+ protected readRecord(conversationId: number): RecordedConversation;
127
+ /** The record of a conversation that still takes input; a completed or cancelled one refuses like the server. */
128
+ protected readOpenRecord(conversationId: number): RecordedConversation;
129
+ protected readSignalState(conversationId: number): ConversationSignalState;
130
+ protected buildSignal(recorded: RecordedConversation, signalState: ConversationSignalState, runStatus: ConversationRunStatus | null): ConversationChangeSignal;
131
+ protected appendMessage(recorded: RecordedConversation, fields: Pick<AgentsConversationMessage, "role" | "messageType" | "authorType" | "message"> & Partial<Pick<AgentsConversationMessage, "signalSource">>): AgentsConversationMessage;
132
+ /** The next scripted answer: stored at once, or after `assistantAnswerDelayMs` with the run state RUNNING meanwhile. */
133
+ protected appendScriptedAssistantAnswer(recorded: RecordedConversation): void;
134
+ protected storeAssistantAnswer: (recorded: RecordedConversation, answerText: string) => void;
135
+ protected findMessageSearchHits(recorded: RecordedConversation, text: string): ConversationMessageSearchHit[];
136
+ }
137
+ /** The in-memory conversation client over recorded conversations (plain data). */
138
+ export declare const createInMemoryAgentsConversationClient: (data: InMemoryAgentsConversationClientData) => InMemoryAgentsConversationClient;
139
+ export {};
@@ -0,0 +1,370 @@
1
+ /**
2
+ * The conversation contract of the package: plain TypeScript types the conversation client port
3
+ * (`client/AgentsConversationClient.ts`) returns and the chat reads. Every field is derived from what the chat files and
4
+ * the chat controller read from the server today (the host application's generated `AIConversation`, `AIConversationMessage`,
5
+ * `AgentActivityLine`, `SemanticSearchHit`, `AIConversationSearchGroup`, `AgentCustomerSelectableModel`); nothing the
6
+ * chat does not read is here.
7
+ *
8
+ * Naming: a field keeps the wire name where the name is neutral (`message`, `indexInConversation`, `role`, `status`,
9
+ * `toolCall`); a name that carries an app's vocabulary is renamed (`aiConversationId` → `conversationId`,
10
+ * the app's own key of the thing the agent works for → `agentSpaceKey`, `summary.title` → `title`). Each field carries a
11
+ * one-line note:
12
+ * - `generic` — every app that runs the agent conversation backend has it;
13
+ * - `app extension` — read by the chat today but specific to one app's backend or debug surface; optional, and a
14
+ * binding may leave it out.
15
+ *
16
+ * Client-side state is NOT part of the contract: the `fresh` tag of a live-arrived message, the optimistic user
17
+ * message without an id and the `isNewConversation` / `isReopenedConversation` flags belong to the package store.
18
+ */
19
+ /** The run state of a conversation as the server stores it (`AIConversationRunState`). */
20
+ export type ConversationRunState = "IDLE" | "QUEUED" | "RUNNING" | "AWAITING_DELEGATES" | "FAILED" | "COMPLETED" | "CANCELLED";
21
+ /** The three-value run status the live-update signal speaks; the chat keys its indicator and error card off it. */
22
+ export type ConversationRunStatus = "running" | "idle" | "failed";
23
+ export type ConversationMessageRole = "SYSTEM" | "USER" | "ASSISTANT";
24
+ export type ConversationMessageType = "TEXT" | "TOOL_CALL" | "CHECKPOINT" | "ERROR" | "SIGNAL" | "TOOL_MESSAGE";
25
+ export type ConversationMessageStatus = "PENDING" | "RUNNING" | "CANCEL_REQUESTED" | "CANCELLED" | "COMPLETED" | "FAILED";
26
+ export type ConversationMessageAuthorType = "USER" | "ASSISTANT" | "AGENT" | "TOOL";
27
+ /** Run states after which nothing runs any more and the server refuses further customer input. */
28
+ export declare const CONVERSATION_RUN_STATES_THAT_END_THE_CONVERSATION: readonly ConversationRunState[];
29
+ /** Maps a stored run state onto the signal's three-value status (`runStateToSignalStatus` of the live-update hook). */
30
+ export declare const readConversationRunStatusOfRunState: (runState: string | null | undefined) => ConversationRunStatus | null;
31
+ /** One step of the progress stepper a purposed conversation declares (`CustomerProgressStep`). */
32
+ export interface ConversationProgressStep {
33
+ /** generic */
34
+ key: string;
35
+ /** generic — already in the owner's language */
36
+ label: string;
37
+ /** generic */
38
+ status: "done" | "active" | "upcoming";
39
+ }
40
+ /** A conversation as the chat, the conversation list and the window around the chat read it. */
41
+ export interface AgentsConversation {
42
+ /** generic */
43
+ id: number;
44
+ /** generic — the key of the agent space the conversation belongs to */
45
+ agentSpaceKey: number | null;
46
+ /** generic */
47
+ runState: ConversationRunState | null;
48
+ /**
49
+ * generic — set while the server owes a turn on an IDLE conversation (a failed hand-over the recovery re-drives);
50
+ * an IDLE conversation with this set counts as running (`effectiveRunState`)
51
+ */
52
+ agentTurnOwedAt: string | null;
53
+ /** generic — the display title (`summary.title`); null until the first title was generated */
54
+ title: string | null;
55
+ /** generic — the owner set the title by hand; the generated title never replaces it then */
56
+ titleManuallyEdited: boolean;
57
+ /** generic — the generated summary of what the conversation is about (`summary.text`); null until generated */
58
+ summary: string | null;
59
+ /** generic — when the conversation was created, in the server's date-time format */
60
+ created: string | null;
61
+ /** generic — when the conversation was last modified, in the server's date-time format */
62
+ updated: string | null;
63
+ /** generic — the purpose of a purposed conversation (e.g. `Example.Build`, a first-run setup purpose); null otherwise */
64
+ purposeName: string | null;
65
+ /** generic — who started the conversation (`SCHEDULE` for a run of a scheduled task) */
66
+ initiatorType: string | null;
67
+ /** generic — the scheduled task a `SCHEDULE` conversation is a run of */
68
+ scheduleId: number | null;
69
+ /** generic — the entry point a start came from; a start from the same entry point reopens this conversation */
70
+ entryPointKey: string | null;
71
+ /** generic — empty unless the purpose declares a progress stepper */
72
+ progressSteps: ConversationProgressStep[];
73
+ /**
74
+ * generic — the id of the newest stored message; null before the first. The polling default of the live updates
75
+ * (`client/polling/`) reads it to see a new message while the run status stays the same, and hands it to the rules as
76
+ * the signal's `lastMessageId`. Optional: a binding with a push transport may leave it out (the host application's metadata
77
+ * read does not carry it); without it the poller treats every poll of a running turn as a change.
78
+ */
79
+ lastMessageId?: number | null;
80
+ /** app extension — the prompt extension of the host application's older AI-Extensions chat */
81
+ promptExtensionId?: number | null;
82
+ /** app extension — the category of that prompt extension (its colour and product name in the conversation list) */
83
+ promptExtensionCategory?: {
84
+ alias: string | null;
85
+ name: string | null;
86
+ } | null;
87
+ }
88
+ /** A sub-agent conversation a delegation started, as far as the chat reads it (`delegatedConversations(select=id,runState)`). */
89
+ export interface ConversationDelegatedConversation {
90
+ /** generic */
91
+ id: number;
92
+ /** generic */
93
+ runState: ConversationRunState | null;
94
+ }
95
+ /** One run of a sub-agent, as the activity derivation reads it (`DelegationSubAgentRun`). */
96
+ export interface ConversationSubAgentRun {
97
+ /** generic */
98
+ runNumber: number | null;
99
+ /** generic */
100
+ status: string | null;
101
+ }
102
+ /** The sub-agent record a newer `delegate` call row carries instead of expanded children (`DelegationSubAgentRecord`). */
103
+ export interface ConversationSubAgent {
104
+ /** generic */
105
+ currentRunNumber: number | null;
106
+ /** generic */
107
+ runs: ConversationSubAgentRun[];
108
+ }
109
+ /** The tool call a `TOOL_CALL` row carries, as far as the chat reads it. */
110
+ export interface ConversationToolCall {
111
+ /** generic */
112
+ toolCallId: string | null;
113
+ /** generic */
114
+ name: string | null;
115
+ /** generic — the call's arguments as the model wrote them (the `delegate` call's `tasks` is read) */
116
+ arguments: unknown;
117
+ /** generic — the call's own progress; a row's `status` says nothing about it */
118
+ status: string | null;
119
+ }
120
+ /** The admin debug numbers of one message (the message forensics panel). */
121
+ export interface ConversationMessageForensics {
122
+ /** app extension */
123
+ inputTokens: number | null;
124
+ /** app extension */
125
+ outputTokens: number | null;
126
+ /** app extension */
127
+ costInUSD: number | null;
128
+ /** app extension — the stored request snapshot of the model call (model name, reasoning effort, sent at) */
129
+ requestSnapshot: unknown;
130
+ }
131
+ /** One stored message of a conversation. */
132
+ export interface AgentsConversationMessage {
133
+ /** generic */
134
+ id: number;
135
+ /** generic */
136
+ conversationId: number | null;
137
+ /** generic — the position in the conversation; the merge key of every page */
138
+ indexInConversation: number | null;
139
+ /** generic */
140
+ role: ConversationMessageRole | null;
141
+ /** generic */
142
+ messageType: ConversationMessageType | null;
143
+ /** generic — non-final only on a waiting signal row */
144
+ status: ConversationMessageStatus | null;
145
+ /** generic */
146
+ authorType: ConversationMessageAuthorType | null;
147
+ /** generic — the source of a SIGNAL or ERROR row (`AI_BUDGET_REACHED`, `FRONTEND_WIDGET_CLICK`, …) */
148
+ signalSource: string | null;
149
+ /** generic — the text in markdown, widget blocks included */
150
+ message: string;
151
+ /** generic */
152
+ createdDate: string | null;
153
+ /** generic */
154
+ toolCall: ConversationToolCall | null;
155
+ /** generic — the sub-agent conversations a `delegate` call started (older rows) */
156
+ delegatedConversations: ConversationDelegatedConversation[];
157
+ /** generic — the sub-agent record of a `delegate` call (newer rows) */
158
+ subAgent: ConversationSubAgent | null;
159
+ /** app extension — admin debug numbers; absent outside the admin surfaces */
160
+ forensics?: ConversationMessageForensics;
161
+ }
162
+ /** A file from the app's media library that rides along with a message. */
163
+ export interface ConversationAttachmentReference {
164
+ /** generic — the app's id of the file (host application: the media manager file id) */
165
+ fileId: string | number | null;
166
+ /** generic */
167
+ fileName: string | null;
168
+ /** generic — a URL the model and the tools can fetch */
169
+ publicUrl: string | null;
170
+ }
171
+ /** A page of messages read newest first (the newest page on open, an older page on scroll-up). */
172
+ export interface ConversationMessagesPage {
173
+ /** generic — in any order; the store merges by `indexInConversation` */
174
+ messages: AgentsConversationMessage[];
175
+ /** generic — an older page exists */
176
+ hasMoreOlder: boolean;
177
+ }
178
+ /**
179
+ * What a live update reads: every message written since the newest known id, plus every message from the lowest
180
+ * loaded index that can still change (`build-live-refetch-query.ts`). The package computes both values.
181
+ */
182
+ export interface ChangedMessagesRequest {
183
+ /** generic — the highest message id loaded */
184
+ highestKnownId: number;
185
+ /** generic — the lowest index that can still change, never below the newest page */
186
+ fromIndex: number;
187
+ /** generic — the page size of the read; the binding's default (host application: 50, as the chat sends) when omitted */
188
+ pageSize?: number;
189
+ }
190
+ /** The answer of a changed-messages read; it says nothing about older pages (the store keeps `hasMoreOlder`). */
191
+ export interface ChangedConversationMessages {
192
+ /** generic */
193
+ messages: AgentsConversationMessage[];
194
+ }
195
+ /** The answer of a start: the new conversation with what it holds so far, or the reopened one of the entry point. */
196
+ export interface StartedConversation {
197
+ /** generic */
198
+ conversation: AgentsConversation;
199
+ /** generic — the stored messages of a new conversation; empty for a reopened one (the chat reads its newest page) */
200
+ messages: AgentsConversationMessage[];
201
+ /** generic — the start returned the recent conversation of its entry point; nothing was appended, no turn started */
202
+ reopenedExisting: boolean;
203
+ }
204
+ /** The answer of a post: the conversation's messages so far (the reply arrives through live updates). */
205
+ export interface PostedMessage {
206
+ /** generic */
207
+ messages: AgentsConversationMessage[];
208
+ }
209
+ /** A model-visible, owner-invisible note into a conversation (a widget click, a render report, a correction). */
210
+ export interface ConversationSignal {
211
+ /** generic */
212
+ text: string;
213
+ /** generic — the signal source; the server's default applies when omitted (a widget click) */
214
+ source?: string;
215
+ }
216
+ /** How a list read pages and which conversations it includes. */
217
+ export interface ConversationListQueryOptions {
218
+ /** generic — include conversations that have no summary (title) yet, e.g. a just-started one */
219
+ includeUnsummarized?: boolean;
220
+ /** generic — the host application's history reads the newest 50 */
221
+ paging?: {
222
+ top?: number;
223
+ skip?: number;
224
+ };
225
+ }
226
+ /** The size of a search answer. */
227
+ export interface ConversationSearchOptions {
228
+ /** generic — the most groups (or hits) returned; the host application's chat asks for 10 */
229
+ limit?: number;
230
+ /** generic — the excerpt length in characters; the host application's chat asks for 420 */
231
+ excerptLength?: number;
232
+ }
233
+ /** app extension — the reconstructed request a model call was sent with (the admin details panel); opaque data. */
234
+ export type ConversationMessageSentPayload = unknown[];
235
+ /** One matched message of a message search (`SemanticSearchHit`). */
236
+ export interface ConversationMessageSearchHit {
237
+ /** generic */
238
+ messageId: number | null;
239
+ /** generic */
240
+ conversationId: number | null;
241
+ /** generic */
242
+ indexInConversation: number | null;
243
+ /** generic */
244
+ role: string | null;
245
+ /** generic */
246
+ excerpt: string;
247
+ /** generic */
248
+ relevance: number;
249
+ /** generic */
250
+ created: string | null;
251
+ /** generic */
252
+ updated: string | null;
253
+ /** generic — the conversation's title */
254
+ title: string | null;
255
+ }
256
+ /** One conversation of a search across conversations, with its matched messages (`AIConversationSearchGroup`). */
257
+ export interface ConversationSearchGroup {
258
+ /** generic */
259
+ conversationId: number | null;
260
+ /** generic */
261
+ title: string | null;
262
+ /** generic */
263
+ summary: string | null;
264
+ /** generic */
265
+ created: string | null;
266
+ /** generic */
267
+ updated: string | null;
268
+ /** generic */
269
+ relevance: number;
270
+ /** generic */
271
+ hits: ConversationMessageSearchHit[];
272
+ }
273
+ /** One generated line of what the agent is doing (`AgentActivityLine`). */
274
+ export interface ConversationActivityElement {
275
+ /** generic — the row the line narrates; the merge key */
276
+ toolCallMessageId: number;
277
+ /** generic */
278
+ batchId: string | null;
279
+ /** generic */
280
+ state: "queued" | "running" | "finished" | "failed" | "skipped" | null;
281
+ /** generic */
282
+ kind: "tool" | "delegation" | "background" | "long" | "turnStart" | null;
283
+ /** generic */
284
+ childCount: number | null;
285
+ /** generic — the 1-based delegation helper that ran the step; null for the assistant's own steps */
286
+ helperIndex: number | null;
287
+ /** generic — the sentence; null while the narrator has not answered */
288
+ line: string | null;
289
+ }
290
+ /** The activity of one turn (`GET …/activity`). */
291
+ export interface ConversationActivity {
292
+ /** generic — the message that started the narrated turn */
293
+ turnMessageId: number | null;
294
+ /** generic */
295
+ turnRunning: boolean;
296
+ /** generic */
297
+ elements: ConversationActivityElement[];
298
+ }
299
+ /** A model the owner (host application: an impersonating admin) may pick for the next turns (`AgentCustomerSelectableModel`). */
300
+ export interface SelectableModel {
301
+ /** generic — the name a send carries */
302
+ name: string;
303
+ /** generic */
304
+ displayName: string;
305
+ /** generic */
306
+ description: string;
307
+ /** generic */
308
+ strengthLevel: number | null;
309
+ /** generic */
310
+ speedLevel: number | null;
311
+ /** app extension — the host application's credit multiplier of the model */
312
+ creditsMultiplier?: number | null;
313
+ }
314
+ /**
315
+ * What a live update carries: a claim check, never content. The chat reads the conversation again when
316
+ * `changeCounter` advances, at once on a terminal status, and until `lastMessageId` is loaded.
317
+ */
318
+ export interface ConversationChangeSignal {
319
+ /** generic — advances on every change of the conversation */
320
+ changeCounter: number;
321
+ /** generic — the newest message the server wrote; null before the first */
322
+ lastMessageId: number | null;
323
+ /** generic */
324
+ runStatus: ConversationRunStatus | null;
325
+ /** generic — advances when the title or summary was generated again (a light metadata read is enough then) */
326
+ summaryUpdatedAt: number | null;
327
+ /**
328
+ * generic — the binding produced this emission from a run-state read, not from a pushed change (a binding without
329
+ * push, or a push transport whose path is not proven readable, or a check that corrects a stale status). It carries
330
+ * only `runStatus` as news: `changeCounter`, `lastMessageId` and `summaryUpdatedAt` repeat the last pushed values
331
+ * (before any push: a counter that counts down from -1, never equal to a pushed one). The package sets the status
332
+ * from it and reads the conversation again on a status change while the push path is not alive (`isPushPathAlive`).
333
+ */
334
+ isStatusCheck?: boolean;
335
+ /**
336
+ * generic, on a status-check emission — the binding's push path delivers: a pushed change arrived and the path was not
337
+ * denied since. False after a denied read until a push arrives again; then the status checks are the live path and a
338
+ * status change reads the conversation again. A binding without push leaves it out: the package then counts the
339
+ * pushed changes it saw itself.
340
+ */
341
+ isPushPathAlive?: boolean;
342
+ }
343
+ /** Why a subscription ended for good: the conversation was deleted or is no longer readable, or the account lost access. */
344
+ export type ConversationSubscriptionEndReason = "gone" | "forbidden";
345
+ /**
346
+ * What went wrong, as the chat tells the owner. The codes the chat's error handling reads today map
347
+ * onto it: `AI_BUDGET_REACHED` → `budget`, HTTP 429 / `RATE_LIMIT_EXCEEDED` → `rateLimit`, `CONVERSATION_CLOSED` →
348
+ * `closed`, the not-found and no-access answers → `notFound` / `forbidden` (`conversation-not-found.ts`), no answer or a
349
+ * server failure → `network`, everything else (a refused retry, a cancelled request) → `other` with its `code`.
350
+ */
351
+ export type AgentsClientErrorKind = "budget" | "rateLimit" | "closed" | "notFound" | "forbidden" | "network" | "other";
352
+ /** The code `other` carries for a request the client cancelled; the chat shows no error card for it. */
353
+ export declare const AGENTS_CLIENT_ERROR_CODE_REQUEST_ABORTED = "REQUEST_ABORTED";
354
+ /** The one error shape every port function rejects with. */
355
+ export declare class AgentsClientError extends Error {
356
+ readonly kind: AgentsClientErrorKind;
357
+ /** The server's stable error code, or the client's own code (`REQUEST_ABORTED`); null when none arrived. */
358
+ readonly code: string | null;
359
+ /** Seconds until a quota frees up again; set only for `rateLimit`. */
360
+ readonly retryAfterSeconds: number | null;
361
+ /** The HTTP status when one arrived (not part of the contract's shape; kept for diagnostics). */
362
+ readonly httpStatus: number | null;
363
+ constructor(kind: AgentsClientErrorKind, details?: {
364
+ message?: string;
365
+ code?: string | null;
366
+ retryAfterSeconds?: number | null;
367
+ httpStatus?: number | null;
368
+ });
369
+ }
370
+ export declare const isAgentsClientError: (value: unknown) => value is AgentsClientError;
@@ -0,0 +1,21 @@
1
+ export { AgentChat, type AgentChatProps } from "../chat/AgentChat/AgentChat";
2
+ export { AgentChatController, type AgentChatActivityHistoryProps, type AgentChatActivityProps, type AgentChatControllerProps, type AgentChatSendModelSource, } from "../chat/controller/AgentChatController";
3
+ export { AgentChatActivityIndicator } from "../chat/AgentChatActivityIndicator/AgentChatActivityIndicator";
4
+ export { AgentChatActivityHistory } from "../chat/AgentChatActivityHistory/AgentChatActivityHistory";
5
+ export { ConversationClosedBar, type ConversationClosedBarProps } from "../chat/ConversationClosedBar/ConversationClosedBar";
6
+ export * from "../chat/store";
7
+ export { useAgentsConversationRunStatus } from "../chat/controller/use-conversation-live-updates";
8
+ export { useConversationMessageSearch, useConversationsSearch, type ConversationMessageSearchState, type ConversationsSearchState, } from "../chat/controller/use-conversation-search";
9
+ export { deriveAgentActivity, type AgentActivity } from "../chat/controller/derive-agent-activity";
10
+ export type { ActivityTicker, ActivityTickerTurn } from "../chat/controller/use-activity-ticker";
11
+ export type { ChatScrollTarget } from "../chat/controller/chat-scroll-target";
12
+ export type { ChatMessage } from "../chat/chat-message";
13
+ export type { ChatAssistantCategory, ChatAssistantIdentity, ChatAssistantOpening } from "../chat/chat-assistant-identity";
14
+ export type { SendMessageHandler, SendMessageOptions } from "../chat/conversation-send-message";
15
+ export { ConversationView, type ConversationViewProps } from "../chat/ConversationView";
16
+ export { ConversationErrorCard, type ConversationErrorCardProps } from "../chat/ConversationErrorCard/ConversationErrorCard";
17
+ export { ConversationMessageInputAttachmentsErrorBox } from "../chat/ConversationMessageInput/ConversationMessageInputAttachments/ConversationMessageInputAttachmentsErrorBox";
18
+ export { ConversationMessageInputAttachmentsPreviewStrip } from "../chat/ConversationMessageInput/ConversationMessageInputAttachments/ConversationMessageInputAttachmentsPreviewStrip";
19
+ export { normalizeServerMessageToMarkdown } from "../chat/normalize-server-message-to-markdown";
20
+ export { ConversationWidgetProvider, type ConversationWidgetProviderProps } from "../renderer/ConversationWidgetContext";
21
+ export { CanvasRestoreOnMount, type CanvasRestoreOnMountProps } from "../renderer/canvas/CanvasRestoreOnMount";
@@ -0,0 +1 @@
1
+ export * from "../client/testing/createInMemoryAgentsConversationClient";
@@ -0,0 +1,4 @@
1
+ export * from "../client/AgentsConversationClient";
2
+ export * from "../client/AgentsConversationClientContext";
3
+ export * from "../client/polling/createPollingConversationChangeSubscription";
4
+ export * from "../client/polling/withPollingChangeSubscription";
@@ -0,0 +1 @@
1
+ export * from "../contract/conversation";
@@ -0,0 +1,9 @@
1
+ export { WidgetImageRender, WidgetImageCaptureBoundary, followWidgetHydrationReadiness, registerStaticWidgetImageComponents, staticWidgetImageComponents, } from "../image-render/WidgetImageRender";
2
+ export * from "../image-render/WidgetImageRenderContext";
3
+ export * from "../image-render/widget-image-render.types";
4
+ export { createWidgetImageReadiness } from "../image-render/widget-image-readiness";
5
+ export { publishWidgetImageReadiness, readWidgetImageReadiness, readWidgetImageReadinessGlobalNames, WIDGET_IMAGE_READINESS_GLOBAL_NAME, } from "../image-render/widget-image-readiness-signal";
6
+ export { installFrozenWidgetRequests } from "../image-render/frozen-widget-requests";
7
+ export { installLiveWidgetRequests } from "../image-render/live-widget-requests";
8
+ export { isGoogleMapCapture } from "../image-render/widget-image-google-map";
9
+ export { readComposedViewDataTimes, type ComposedViewDataTimes } from "../image-render/composed-view-data-times";
@@ -0,0 +1,9 @@
1
+ import "../styles/agents.scss";
2
+ export * from "../provider";
3
+ export { registerConversationWidgets, type ConversationWidgetEntry, } from "../renderer/conversationWidgetRegistry";
4
+ export { registerCanvasBodies } from "../renderer/canvas/canvasBodies";
5
+ export { registerCanvasFeatureFlags } from "../renderer/canvas/canvas-feature-flags";
6
+ export { registerWidgetHydrator } from "../renderer/widget-hydration/widget-hydration.registry";
7
+ export { registerComposedViewDataSourceFetcher } from "../renderer/widget-tree/composed-view-data-sources";
8
+ export { registerEntityDetailBodies } from "../kit/entity-detail/entity-detail-bodies";
9
+ export { registerConceptExplainerTypes } from "../widgets/ConceptExplainerConversationWidget/shared/concept-explainer-types";
@@ -0,0 +1,4 @@
1
+ export { ComposedViewConversationWidget } from "../kit/ComposedViewConversationWidget";
2
+ export { ComposedViewRenderer } from "../kit/ComposedViewRenderer";
3
+ export * from "../kit/composed-view-component-types";
4
+ export * from "../kit/composed-view-tones";
@@ -0,0 +1,8 @@
1
+ export { WidgetPreview, PREVIEW_AGENT_SPACE_KEY, type WidgetPreviewProps } from "../preview/WidgetPreviewHost";
2
+ export * from "../preview/widget-preview.types";
3
+ export { buildWidgetPreviewFence, findWidgetPreviewFixture, findWidgetPreviewFixtures, registerWidgetPreviewFixtureFiles, widgetPreviewFixtureFiles, } from "../preview/widget-preview-fixtures";
4
+ export { createWidgetPreviewReadiness, observeWidgetPreviewState, type WidgetPreviewReadiness, } from "../preview/widget-preview-readiness";
5
+ export { publishWidgetPreviewSignal, readWidgetPreviewSignalGlobalNames, WIDGET_PREVIEW_SIGNAL_GLOBAL_NAME, } from "../preview/widget-preview-signal";
6
+ export { installWidgetPreviewRequests, isPendingResponse, widgetPreviewRequestKey } from "../preview/widget-preview-requests";
7
+ export { installWidgetPreviewHydration } from "../preview/widget-preview-hydration";
8
+ export { buildPreviewComposedViewComponents } from "../preview/preview-stub-components";
@@ -0,0 +1,15 @@
1
+ export { ConversationMarkdown, type ConversationMarkdownProps } from "../renderer/ConversationMarkdown";
2
+ export { ConversationWidgetHost, type ConversationWidgetRenderProps } from "../renderer/ConversationWidgetHost";
3
+ export { ConversationWidgetErrorBoundary } from "../renderer/ConversationWidgetErrorBoundary";
4
+ export { type ConversationWidgetUpsellProps, ConversationWidgetFeatureGate, } from "../renderer/_access/ConversationWidgetFeatureGate";
5
+ export * from "../renderer/ConversationWidgetCallbacksContext";
6
+ export type { BaseConversationWidgetProps, ComposerConversationWidgetProps, PayloadConversationWidgetProps, } from "../renderer/conversation-widget-props";
7
+ export { conversationWidgetRegistry, getConversationWidgetRegistryRevision, readConversationWidgetRegistrations, } from "../renderer/conversationWidgetRegistry";
8
+ export { closestWidgetNames, resolveCanonicalWidgetName, resolveWidgetName } from "../renderer/widget-name-resolver";
9
+ export * from "../renderer/render-report/widget-render-report";
10
+ export * from "../renderer/widget-hydration";
11
+ export * from "../renderer/canvas/canvas-behaviours";
12
+ export * from "../renderer/canvas/canvas-state";
13
+ export { canvasBodies, canvasFeatureFlagOf, type CanvasBodyProps } from "../renderer/canvas/canvasBodies";
14
+ export { readComposedViewTree } from "../renderer/widget-tree/composed-view-tree";
15
+ export { addComposedNodeSchemaApplicationPart, composedNodeSchema, getComposedNodeSchema, type ComposedNodeSchema, type ComposedNodeSchemaApplicationPart, } from "../renderer/widget-tree/composed-node-schema";
@@ -0,0 +1,16 @@
1
+ export { CanvasWidgetCard, type CanvasWidgetCardProps } from "../widgets/CanvasWidgetCard/CanvasWidgetCard";
2
+ export { CanvasWidgetSwitch } from "../widgets/CanvasWidgetCard/CanvasWidgetSwitch";
3
+ export { canvasForMessageWidget } from "../widgets/CanvasWidgetCard/canvas-for-message-widget";
4
+ export { ClockConversationWidget } from "../widgets/ClockConversationWidget/ClockConversationWidget";
5
+ export { ConceptExplainerConversationWidget } from "../widgets/ConceptExplainerConversationWidget/ConceptExplainerConversationWidget";
6
+ export { ConversationSearchResultsConversationWidget } from "../widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsConversationWidget";
7
+ export { CurrencyConverterConversationWidget } from "../widgets/CurrencyConverterConversationWidget/CurrencyConverterConversationWidget";
8
+ export { CustomVisualizationConversationWidget } from "../widgets/CustomVisualizationConversationWidget/CustomVisualizationConversationWidget";
9
+ export { EntityMentionConversationWidget } from "../widgets/EntityMentionConversationWidget/EntityMentionConversationWidget";
10
+ export { MultiChoiceConversationWidget } from "../widgets/MultiChoiceConversationWidget/MultiChoiceConversationWidget";
11
+ export { QuickRepliesConversationWidget } from "../widgets/QuickRepliesConversationWidget/QuickRepliesConversationWidget";
12
+ export { SuggestedActions } from "../widgets/SuggestedActions/SuggestedActions";
13
+ export { ToolTraceConversationWidget } from "../widgets/ToolTraceConversationWidget/ToolTraceConversationWidget";
14
+ export { WebSearchResultsConversationWidget } from "../widgets/WebSearchResultsConversationWidget/WebSearchResultsConversationWidget";
15
+ export { WritingDraftConversationWidget } from "../widgets/WritingDraftConversationWidget/WritingDraftConversationWidget";
16
+ export * from "../widgets/_shared/modern";
@@ -0,0 +1,15 @@
1
+ import type { ComposedViewTree } from "../../renderer/widget-tree/composed-view-tree";
2
+ /** A moment in the owner's date locale and zone (`25.10.2026, 08:00`); without a usable zone, the capture's own. */
3
+ export declare const formatDataTime: (moment: Date, dateLocale: string, timeZone: string | null | undefined) => string;
4
+ export interface ComposedViewEmailDataTimesProps {
5
+ tree: ComposedViewTree;
6
+ }
7
+ /**
8
+ * The time of each data path of an e-mailed `ComposedView`, as ONE caption line under the tree: a report
9
+ * mail mixes the tool results written into the block at turn time (`$from`) with data read live while the mail is
10
+ * captured (`$source`, embedded domain widgets) — the reader must know which numbers are from when. The turn time is
11
+ * the `resolvedAt` the resolution wrote into the snapshot; the mail time is the capture moment, fixed at the first
12
+ * render. Each phrase is its own translation key; the phrases are joined by a middle dot. A tree with inline data only
13
+ * shows no line.
14
+ */
15
+ export declare const ComposedViewEmailDataTimes: (props: ComposedViewEmailDataTimesProps) => import("react/jsx-runtime").JSX.Element | null;