@memberjunction/ng-conversations 6.2.0-edge.0 → 6.2.0-edge.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/README.md +35 -2
  2. package/dist/lib/components/active-tasks/active-tasks-panel.component.d.ts +19 -3
  3. package/dist/lib/components/active-tasks/active-tasks-panel.component.d.ts.map +1 -1
  4. package/dist/lib/components/active-tasks/active-tasks-panel.component.js +39 -7
  5. package/dist/lib/components/active-tasks/active-tasks-panel.component.js.map +1 -1
  6. package/dist/lib/components/agent/active-agent-indicator.component.d.ts +74 -6
  7. package/dist/lib/components/agent/active-agent-indicator.component.d.ts.map +1 -1
  8. package/dist/lib/components/agent/active-agent-indicator.component.js +111 -21
  9. package/dist/lib/components/agent/active-agent-indicator.component.js.map +1 -1
  10. package/dist/lib/components/agent/agent-process-panel.component.d.ts +31 -5
  11. package/dist/lib/components/agent/agent-process-panel.component.d.ts.map +1 -1
  12. package/dist/lib/components/agent/agent-process-panel.component.js +71 -15
  13. package/dist/lib/components/agent/agent-process-panel.component.js.map +1 -1
  14. package/dist/lib/components/artifact/artifact-share-modal.component.d.ts +65 -9
  15. package/dist/lib/components/artifact/artifact-share-modal.component.d.ts.map +1 -1
  16. package/dist/lib/components/artifact/artifact-share-modal.component.js +169 -57
  17. package/dist/lib/components/artifact/artifact-share-modal.component.js.map +1 -1
  18. package/dist/lib/components/attachment/image-viewer.component.d.ts +77 -11
  19. package/dist/lib/components/attachment/image-viewer.component.d.ts.map +1 -1
  20. package/dist/lib/components/attachment/image-viewer.component.js +181 -47
  21. package/dist/lib/components/attachment/image-viewer.component.js.map +1 -1
  22. package/dist/lib/components/collection/artifact-collection-picker-modal.component.d.ts +129 -19
  23. package/dist/lib/components/collection/artifact-collection-picker-modal.component.d.ts.map +1 -1
  24. package/dist/lib/components/collection/artifact-collection-picker-modal.component.js +350 -116
  25. package/dist/lib/components/collection/artifact-collection-picker-modal.component.js.map +1 -1
  26. package/dist/lib/components/collection/artifact-create-modal.component.d.ts +60 -8
  27. package/dist/lib/components/collection/artifact-create-modal.component.d.ts.map +1 -1
  28. package/dist/lib/components/collection/artifact-create-modal.component.js +130 -46
  29. package/dist/lib/components/collection/artifact-create-modal.component.js.map +1 -1
  30. package/dist/lib/components/collection/collection-artifact-card.component.d.ts +63 -3
  31. package/dist/lib/components/collection/collection-artifact-card.component.d.ts.map +1 -1
  32. package/dist/lib/components/collection/collection-artifact-card.component.js +113 -19
  33. package/dist/lib/components/collection/collection-artifact-card.component.js.map +1 -1
  34. package/dist/lib/components/collection/collection-form-modal.component.d.ts +54 -8
  35. package/dist/lib/components/collection/collection-form-modal.component.d.ts.map +1 -1
  36. package/dist/lib/components/collection/collection-form-modal.component.js +130 -46
  37. package/dist/lib/components/collection/collection-form-modal.component.js.map +1 -1
  38. package/dist/lib/components/collection/collection-share-modal.component.d.ts +70 -10
  39. package/dist/lib/components/collection/collection-share-modal.component.d.ts.map +1 -1
  40. package/dist/lib/components/collection/collection-share-modal.component.js +175 -53
  41. package/dist/lib/components/collection/collection-share-modal.component.js.map +1 -1
  42. package/dist/lib/components/collection/collection-tree.component.d.ts +89 -9
  43. package/dist/lib/components/collection/collection-tree.component.d.ts.map +1 -1
  44. package/dist/lib/components/collection/collection-tree.component.js +220 -70
  45. package/dist/lib/components/collection/collection-tree.component.js.map +1 -1
  46. package/dist/lib/components/collection/collection-view.component.d.ts +89 -11
  47. package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
  48. package/dist/lib/components/collection/collection-view.component.js +154 -40
  49. package/dist/lib/components/collection/collection-view.component.js.map +1 -1
  50. package/dist/lib/components/collection/collections-full-view.component.d.ts +390 -38
  51. package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
  52. package/dist/lib/components/collection/collections-full-view.component.js +951 -367
  53. package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
  54. package/dist/lib/components/composer/ai-composer.component.d.ts +213 -18
  55. package/dist/lib/components/composer/ai-composer.component.d.ts.map +1 -1
  56. package/dist/lib/components/composer/ai-composer.component.js +388 -44
  57. package/dist/lib/components/composer/ai-composer.component.js.map +1 -1
  58. package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts +12 -1
  59. package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts.map +1 -1
  60. package/dist/lib/components/conversation/conversation-agent-picker.component.js +26 -4
  61. package/dist/lib/components/conversation/conversation-agent-picker.component.js.map +1 -1
  62. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +1090 -123
  63. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
  64. package/dist/lib/components/conversation/conversation-chat-area.component.js +2399 -706
  65. package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
  66. package/dist/lib/components/conversation/conversation-empty-state.component.d.ts +139 -19
  67. package/dist/lib/components/conversation/conversation-empty-state.component.d.ts.map +1 -1
  68. package/dist/lib/components/conversation/conversation-empty-state.component.js +296 -59
  69. package/dist/lib/components/conversation/conversation-empty-state.component.js.map +1 -1
  70. package/dist/lib/components/conversation/conversation-list.component.d.ts +579 -78
  71. package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
  72. package/dist/lib/components/conversation/conversation-list.component.js +2322 -823
  73. package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
  74. package/dist/lib/components/conversation/pinned-messages-panel.component.d.ts +40 -4
  75. package/dist/lib/components/conversation/pinned-messages-panel.component.d.ts.map +1 -1
  76. package/dist/lib/components/conversation/pinned-messages-panel.component.js +72 -14
  77. package/dist/lib/components/conversation/pinned-messages-panel.component.js.map +1 -1
  78. package/dist/lib/components/dialogs/input-dialog.component.d.ts +57 -11
  79. package/dist/lib/components/dialogs/input-dialog.component.d.ts.map +1 -1
  80. package/dist/lib/components/dialogs/input-dialog.component.js +128 -16
  81. package/dist/lib/components/dialogs/input-dialog.component.js.map +1 -1
  82. package/dist/lib/components/dialogs/rating-dialog.component.d.ts +68 -10
  83. package/dist/lib/components/dialogs/rating-dialog.component.d.ts.map +1 -1
  84. package/dist/lib/components/dialogs/rating-dialog.component.js +151 -27
  85. package/dist/lib/components/dialogs/rating-dialog.component.js.map +1 -1
  86. package/dist/lib/components/export/export-modal.component.d.ts +84 -10
  87. package/dist/lib/components/export/export-modal.component.d.ts.map +1 -1
  88. package/dist/lib/components/export/export-modal.component.js +173 -49
  89. package/dist/lib/components/export/export-modal.component.js.map +1 -1
  90. package/dist/lib/components/global-tasks/global-tasks-panel.component.d.ts +29 -3
  91. package/dist/lib/components/global-tasks/global-tasks-panel.component.d.ts.map +1 -1
  92. package/dist/lib/components/global-tasks/global-tasks-panel.component.js +58 -12
  93. package/dist/lib/components/global-tasks/global-tasks-panel.component.js.map +1 -1
  94. package/dist/lib/components/library/library-full-view.component.d.ts +57 -8
  95. package/dist/lib/components/library/library-full-view.component.d.ts.map +1 -1
  96. package/dist/lib/components/library/library-full-view.component.js +119 -35
  97. package/dist/lib/components/library/library-full-view.component.js.map +1 -1
  98. package/dist/lib/components/members/members-modal.component.d.ts +76 -10
  99. package/dist/lib/components/members/members-modal.component.d.ts.map +1 -1
  100. package/dist/lib/components/members/members-modal.component.js +164 -50
  101. package/dist/lib/components/members/members-modal.component.js.map +1 -1
  102. package/dist/lib/components/message/actionable-commands.component.d.ts +37 -5
  103. package/dist/lib/components/message/actionable-commands.component.d.ts.map +1 -1
  104. package/dist/lib/components/message/actionable-commands.component.js +82 -16
  105. package/dist/lib/components/message/actionable-commands.component.js.map +1 -1
  106. package/dist/lib/components/message/conversation-message-rating.component.d.ts +46 -10
  107. package/dist/lib/components/message/conversation-message-rating.component.d.ts.map +1 -1
  108. package/dist/lib/components/message/conversation-message-rating.component.js +120 -36
  109. package/dist/lib/components/message/conversation-message-rating.component.js.map +1 -1
  110. package/dist/lib/components/message/message-input.component.d.ts +549 -74
  111. package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
  112. package/dist/lib/components/message/message-input.component.js +1250 -421
  113. package/dist/lib/components/message/message-input.component.js.map +1 -1
  114. package/dist/lib/components/message/message-item.component.d.ts +411 -29
  115. package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
  116. package/dist/lib/components/message/message-item.component.js +896 -222
  117. package/dist/lib/components/message/message-item.component.js.map +1 -1
  118. package/dist/lib/components/message/message-list.component.d.ts +288 -29
  119. package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
  120. package/dist/lib/components/message/message-list.component.js +561 -123
  121. package/dist/lib/components/message/message-list.component.js.map +1 -1
  122. package/dist/lib/components/navigation/conversation-navigation.component.d.ts +64 -5
  123. package/dist/lib/components/navigation/conversation-navigation.component.d.ts.map +1 -1
  124. package/dist/lib/components/navigation/conversation-navigation.component.js +101 -11
  125. package/dist/lib/components/navigation/conversation-navigation.component.js.map +1 -1
  126. package/dist/lib/components/notification/activity-indicator.component.d.ts +6 -2
  127. package/dist/lib/components/notification/activity-indicator.component.d.ts.map +1 -1
  128. package/dist/lib/components/notification/activity-indicator.component.js +13 -3
  129. package/dist/lib/components/notification/activity-indicator.component.js.map +1 -1
  130. package/dist/lib/components/notification/notification-badge.component.d.ts +15 -3
  131. package/dist/lib/components/notification/notification-badge.component.d.ts.map +1 -1
  132. package/dist/lib/components/notification/notification-badge.component.js +36 -8
  133. package/dist/lib/components/notification/notification-badge.component.js.map +1 -1
  134. package/dist/lib/components/overlay/chat-overlay.component.d.ts +1 -1
  135. package/dist/lib/components/overlay/chat-overlay.component.js +4 -4
  136. package/dist/lib/components/overlay/chat-overlay.component.js.map +1 -1
  137. package/dist/lib/components/project/project-form-modal.component.d.ts +93 -11
  138. package/dist/lib/components/project/project-form-modal.component.d.ts.map +1 -1
  139. package/dist/lib/components/project/project-form-modal.component.js +348 -87
  140. package/dist/lib/components/project/project-form-modal.component.js.map +1 -1
  141. package/dist/lib/components/project/project-selector.component.d.ts +78 -8
  142. package/dist/lib/components/project/project-selector.component.d.ts.map +1 -1
  143. package/dist/lib/components/project/project-selector.component.js +177 -46
  144. package/dist/lib/components/project/project-selector.component.js.map +1 -1
  145. package/dist/lib/components/realtime/realtime-activity-rail.component.d.ts +1 -1
  146. package/dist/lib/components/realtime/realtime-activity-rail.component.js +2 -2
  147. package/dist/lib/components/realtime/realtime-activity-rail.component.js.map +1 -1
  148. package/dist/lib/components/realtime/realtime-delegation-card.component.d.ts +1 -1
  149. package/dist/lib/components/realtime/realtime-delegation-card.component.js +2 -2
  150. package/dist/lib/components/realtime/realtime-delegation-card.component.js.map +1 -1
  151. package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +2 -2
  152. package/dist/lib/components/realtime/realtime-session-overlay.component.js +18 -18
  153. package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
  154. package/dist/lib/components/realtime/realtime-session-timeline-card.component.d.ts +47 -23
  155. package/dist/lib/components/realtime/realtime-session-timeline-card.component.d.ts.map +1 -1
  156. package/dist/lib/components/realtime/realtime-session-timeline-card.component.js +136 -92
  157. package/dist/lib/components/realtime/realtime-session-timeline-card.component.js.map +1 -1
  158. package/dist/lib/components/realtime/realtime-surface-tabs.component.d.ts +2 -2
  159. package/dist/lib/components/realtime/realtime-surface-tabs.component.js +4 -4
  160. package/dist/lib/components/realtime/realtime-surface-tabs.component.js.map +1 -1
  161. package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts +1 -1
  162. package/dist/lib/components/realtime/realtime-surface-tabs.model.js +3 -3
  163. package/dist/lib/components/realtime/realtime-surface-tabs.model.js.map +1 -1
  164. package/dist/lib/components/realtime/realtime-ui-config.d.ts +13 -11
  165. package/dist/lib/components/realtime/realtime-ui-config.d.ts.map +1 -1
  166. package/dist/lib/components/realtime/realtime-ui-config.js +29 -25
  167. package/dist/lib/components/realtime/realtime-ui-config.js.map +1 -1
  168. package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts +3 -1
  169. package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts.map +1 -1
  170. package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js +6 -2
  171. package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js.map +1 -1
  172. package/dist/lib/components/search/search-panel.component.d.ts +133 -22
  173. package/dist/lib/components/search/search-panel.component.d.ts.map +1 -1
  174. package/dist/lib/components/search/search-panel.component.js +312 -83
  175. package/dist/lib/components/search/search-panel.component.js.map +1 -1
  176. package/dist/lib/components/share/share-modal.component.d.ts +69 -9
  177. package/dist/lib/components/share/share-modal.component.d.ts.map +1 -1
  178. package/dist/lib/components/share/share-modal.component.js +139 -31
  179. package/dist/lib/components/share/share-modal.component.js.map +1 -1
  180. package/dist/lib/components/shared/user-picker.component.d.ts +48 -8
  181. package/dist/lib/components/shared/user-picker.component.d.ts.map +1 -1
  182. package/dist/lib/components/shared/user-picker.component.js +110 -30
  183. package/dist/lib/components/shared/user-picker.component.js.map +1 -1
  184. package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts +114 -11
  185. package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts.map +1 -1
  186. package/dist/lib/components/sidebar/conversation-sidebar.component.js +199 -21
  187. package/dist/lib/components/sidebar/conversation-sidebar.component.js.map +1 -1
  188. package/dist/lib/components/sidebar/routines-section.component.d.ts +20 -1
  189. package/dist/lib/components/sidebar/routines-section.component.d.ts.map +1 -1
  190. package/dist/lib/components/sidebar/routines-section.component.js +25 -5
  191. package/dist/lib/components/sidebar/routines-section.component.js.map +1 -1
  192. package/dist/lib/components/slots/slot-interfaces.d.ts +19 -0
  193. package/dist/lib/components/slots/slot-interfaces.d.ts.map +1 -1
  194. package/dist/lib/components/slots/slot-interfaces.js.map +1 -1
  195. package/dist/lib/components/task/tasks-full-view.component.d.ts +95 -13
  196. package/dist/lib/components/task/tasks-full-view.component.d.ts.map +1 -1
  197. package/dist/lib/components/task/tasks-full-view.component.js +223 -75
  198. package/dist/lib/components/task/tasks-full-view.component.js.map +1 -1
  199. package/dist/lib/components/tasks/task-widget.component.d.ts +46 -6
  200. package/dist/lib/components/tasks/task-widget.component.d.ts.map +1 -1
  201. package/dist/lib/components/tasks/task-widget.component.js +100 -16
  202. package/dist/lib/components/tasks/task-widget.component.js.map +1 -1
  203. package/dist/lib/components/tasks/tasks-dropdown.component.d.ts +64 -7
  204. package/dist/lib/components/tasks/tasks-dropdown.component.d.ts.map +1 -1
  205. package/dist/lib/components/tasks/tasks-dropdown.component.js +127 -27
  206. package/dist/lib/components/tasks/tasks-dropdown.component.js.map +1 -1
  207. package/dist/lib/components/thread/thread-panel.component.d.ts +66 -8
  208. package/dist/lib/components/thread/thread-panel.component.d.ts.map +1 -1
  209. package/dist/lib/components/thread/thread-panel.component.js +146 -36
  210. package/dist/lib/components/thread/thread-panel.component.js.map +1 -1
  211. package/dist/lib/components/toast/toast.component.d.ts +11 -1
  212. package/dist/lib/components/toast/toast.component.d.ts.map +1 -1
  213. package/dist/lib/components/toast/toast.component.js +25 -5
  214. package/dist/lib/components/toast/toast.component.js.map +1 -1
  215. package/dist/lib/components/workspace/conversation-workspace.component.d.ts +385 -42
  216. package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
  217. package/dist/lib/components/workspace/conversation-workspace.component.js +887 -291
  218. package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
  219. package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts +8 -0
  220. package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts.map +1 -1
  221. package/dist/lib/composer-plugins/base-conversation-mention.provider.js +8 -1
  222. package/dist/lib/composer-plugins/base-conversation-mention.provider.js.map +1 -1
  223. package/dist/lib/directives/chat-slot.directive.d.ts +5 -1
  224. package/dist/lib/directives/chat-slot.directive.d.ts.map +1 -1
  225. package/dist/lib/directives/chat-slot.directive.js.map +1 -1
  226. package/dist/lib/directives/search-shortcut.directive.d.ts +9 -1
  227. package/dist/lib/directives/search-shortcut.directive.d.ts.map +1 -1
  228. package/dist/lib/directives/search-shortcut.directive.js +14 -4
  229. package/dist/lib/directives/search-shortcut.directive.js.map +1 -1
  230. package/dist/lib/events/chat-events.d.ts +34 -7
  231. package/dist/lib/events/chat-events.d.ts.map +1 -1
  232. package/dist/lib/events/chat-events.js +37 -7
  233. package/dist/lib/events/chat-events.js.map +1 -1
  234. package/dist/lib/models/agent-turn.model.d.ts +103 -0
  235. package/dist/lib/models/agent-turn.model.d.ts.map +1 -0
  236. package/dist/lib/models/agent-turn.model.js +12 -0
  237. package/dist/lib/models/agent-turn.model.js.map +1 -0
  238. package/dist/lib/models/collection-view.model.js.map +1 -1
  239. package/dist/lib/models/conversation-state.model.d.ts +8 -0
  240. package/dist/lib/models/conversation-state.model.d.ts.map +1 -1
  241. package/dist/lib/models/conversation-state.model.js.map +1 -1
  242. package/dist/lib/models/lazy-artifact-info.d.ts +44 -12
  243. package/dist/lib/models/lazy-artifact-info.d.ts.map +1 -1
  244. package/dist/lib/models/lazy-artifact-info.js +98 -34
  245. package/dist/lib/models/lazy-artifact-info.js.map +1 -1
  246. package/dist/lib/services/active-tasks.service.d.ts +30 -4
  247. package/dist/lib/services/active-tasks.service.d.ts.map +1 -1
  248. package/dist/lib/services/active-tasks.service.js +71 -19
  249. package/dist/lib/services/active-tasks.service.js.map +1 -1
  250. package/dist/lib/services/agent-state.service.d.ts +17 -1
  251. package/dist/lib/services/agent-state.service.d.ts.map +1 -1
  252. package/dist/lib/services/agent-state.service.js +48 -16
  253. package/dist/lib/services/agent-state.service.js.map +1 -1
  254. package/dist/lib/services/artifact-permission.service.d.ts +39 -0
  255. package/dist/lib/services/artifact-permission.service.d.ts.map +1 -1
  256. package/dist/lib/services/artifact-permission.service.js +152 -17
  257. package/dist/lib/services/artifact-permission.service.js.map +1 -1
  258. package/dist/lib/services/artifact-state.service.d.ts +58 -5
  259. package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
  260. package/dist/lib/services/artifact-state.service.js +135 -35
  261. package/dist/lib/services/artifact-state.service.js.map +1 -1
  262. package/dist/lib/services/collection-permission.service.d.ts +28 -0
  263. package/dist/lib/services/collection-permission.service.d.ts.map +1 -1
  264. package/dist/lib/services/collection-permission.service.js +88 -32
  265. package/dist/lib/services/collection-permission.service.js.map +1 -1
  266. package/dist/lib/services/collection-state.service.d.ts +11 -1
  267. package/dist/lib/services/collection-state.service.d.ts.map +1 -1
  268. package/dist/lib/services/collection-state.service.js +25 -5
  269. package/dist/lib/services/collection-state.service.js.map +1 -1
  270. package/dist/lib/services/conversation-agent.service.d.ts +26 -4
  271. package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
  272. package/dist/lib/services/conversation-agent.service.js +57 -18
  273. package/dist/lib/services/conversation-agent.service.js.map +1 -1
  274. package/dist/lib/services/conversation-attachment.service.d.ts +17 -0
  275. package/dist/lib/services/conversation-attachment.service.d.ts.map +1 -1
  276. package/dist/lib/services/conversation-attachment.service.js +38 -10
  277. package/dist/lib/services/conversation-attachment.service.js.map +1 -1
  278. package/dist/lib/services/conversation-streaming.service.d.ts +22 -0
  279. package/dist/lib/services/conversation-streaming.service.d.ts.map +1 -1
  280. package/dist/lib/services/conversation-streaming.service.js +50 -10
  281. package/dist/lib/services/conversation-streaming.service.js.map +1 -1
  282. package/dist/lib/services/data-cache.service.d.ts +31 -0
  283. package/dist/lib/services/data-cache.service.d.ts.map +1 -1
  284. package/dist/lib/services/data-cache.service.js +71 -15
  285. package/dist/lib/services/data-cache.service.js.map +1 -1
  286. package/dist/lib/services/dialog.service.d.ts +13 -0
  287. package/dist/lib/services/dialog.service.d.ts.map +1 -1
  288. package/dist/lib/services/dialog.service.js +25 -5
  289. package/dist/lib/services/dialog.service.js.map +1 -1
  290. package/dist/lib/services/export.service.d.ts +2 -0
  291. package/dist/lib/services/export.service.d.ts.map +1 -1
  292. package/dist/lib/services/export.service.js +5 -1
  293. package/dist/lib/services/export.service.js.map +1 -1
  294. package/dist/lib/services/mention-parser.service.d.ts +10 -0
  295. package/dist/lib/services/mention-parser.service.d.ts.map +1 -1
  296. package/dist/lib/services/mention-parser.service.js +25 -5
  297. package/dist/lib/services/mention-parser.service.js.map +1 -1
  298. package/dist/lib/services/notification.service.d.ts +54 -6
  299. package/dist/lib/services/notification.service.d.ts.map +1 -1
  300. package/dist/lib/services/notification.service.js +123 -27
  301. package/dist/lib/services/notification.service.js.map +1 -1
  302. package/dist/lib/services/realtime-audio-recorder.d.ts +4 -4
  303. package/dist/lib/services/realtime-audio-recorder.js +12 -12
  304. package/dist/lib/services/realtime-audio-recorder.js.map +1 -1
  305. package/dist/lib/services/realtime-pcm-wav.d.ts +4 -0
  306. package/dist/lib/services/realtime-pcm-wav.d.ts.map +1 -1
  307. package/dist/lib/services/realtime-pcm-wav.js +10 -2
  308. package/dist/lib/services/realtime-pcm-wav.js.map +1 -1
  309. package/dist/lib/services/search.service.d.ts +42 -9
  310. package/dist/lib/services/search.service.d.ts.map +1 -1
  311. package/dist/lib/services/search.service.js +103 -23
  312. package/dist/lib/services/search.service.js.map +1 -1
  313. package/dist/lib/services/toast.service.d.ts +19 -1
  314. package/dist/lib/services/toast.service.d.ts.map +1 -1
  315. package/dist/lib/services/toast.service.js +45 -9
  316. package/dist/lib/services/toast.service.js.map +1 -1
  317. package/dist/lib/services/ui-command-handler.service.d.ts +16 -2
  318. package/dist/lib/services/ui-command-handler.service.d.ts.map +1 -1
  319. package/dist/lib/services/ui-command-handler.service.js +36 -8
  320. package/dist/lib/services/ui-command-handler.service.js.map +1 -1
  321. package/dist/lib/utils/agent-artifact-summary.d.ts +2 -2
  322. package/dist/lib/utils/agent-artifact-summary.js +3 -3
  323. package/dist/lib/utils/agent-artifact-summary.js.map +1 -1
  324. package/dist/lib/utils/agent-turn-routing.d.ts +69 -0
  325. package/dist/lib/utils/agent-turn-routing.d.ts.map +1 -0
  326. package/dist/lib/utils/agent-turn-routing.js +96 -0
  327. package/dist/lib/utils/agent-turn-routing.js.map +1 -0
  328. package/dist/lib/utils/artifact-panel-action.d.ts +15 -4
  329. package/dist/lib/utils/artifact-panel-action.d.ts.map +1 -1
  330. package/dist/lib/utils/artifact-panel-action.js +10 -2
  331. package/dist/lib/utils/artifact-panel-action.js.map +1 -1
  332. package/dist/lib/utils/distinct-artifacts.d.ts +2 -0
  333. package/dist/lib/utils/distinct-artifacts.d.ts.map +1 -1
  334. package/dist/lib/utils/distinct-artifacts.js +5 -1
  335. package/dist/lib/utils/distinct-artifacts.js.map +1 -1
  336. package/dist/lib/utils/plan-mode-preference.d.ts +2 -2
  337. package/dist/lib/utils/plan-mode-preference.js +6 -6
  338. package/dist/lib/utils/plan-mode-preference.js.map +1 -1
  339. package/dist/public-api.d.ts +3 -0
  340. package/dist/public-api.d.ts.map +1 -1
  341. package/dist/public-api.js +3 -0
  342. package/dist/public-api.js.map +1 -1
  343. package/package.json +32 -32
@@ -33,8 +33,12 @@ import * as i0 from "@angular/core";
33
33
  * ADDITIVE — it renders the projected template inside the DEFAULT header's
34
34
  * action strip, after the stock buttons. Projecting `header` suppresses
35
35
  * `headerActions` (the replacement owns the whole header, actions included).
36
+ *
37
+ * `composerExtra` is ADDITIVE too: host UI rendered directly above the composer (a
38
+ * "who will see this" line, a visibility toggle, a note about which agents answer here),
39
+ * wherever the chat area shows one — the new-conversation composer included.
36
40
  */
37
- export type MJChatSlotName = 'emptyState' | 'agentPresence' | 'header' | 'headerActions' | 'messageExtra' | 'demonstrationSurface' | 'messageRenderer';
41
+ export type MJChatSlotName = 'emptyState' | 'agentPresence' | 'header' | 'headerActions' | 'composerExtra' | 'messageExtra' | 'demonstrationSurface' | 'messageRenderer';
38
42
  /**
39
43
  * Marks an `<ng-template>` as a slot fill for the chat-area.
40
44
  *
@@ -1 +1 @@
1
- {"version":3,"file":"chat-slot.directive.d.ts","sourceRoot":"","sources":["../../../src/lib/directives/chat-slot.directive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAoB,WAAW,EAAE,MAAM,eAAe,CAAC;;AAE9D;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GACpB,YAAY,GACZ,eAAe,GACf,QAAQ,GACR,eAAe,GACf,cAAc,GACd,sBAAsB,GACtB,iBAAiB,CAAC;AAExB;;;;;GAKG;AACH,qBAIa,iBAAiB;aAIE,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC;IAH1D,sCAAsC;IACV,QAAQ,EAAG,cAAc,CAAC;gBAE1B,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC;yCAJjD,iBAAiB;2CAAjB,iBAAiB;CAK7B"}
1
+ {"version":3,"file":"chat-slot.directive.d.ts","sourceRoot":"","sources":["../../../src/lib/directives/chat-slot.directive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAoB,WAAW,EAAE,MAAM,eAAe,CAAC;;AAE9D;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,cAAc,GACpB,YAAY,GACZ,eAAe,GACf,QAAQ,GACR,eAAe,GACf,eAAe,GACf,cAAc,GACd,sBAAsB,GACtB,iBAAiB,CAAC;AAExB;;;;;GAKG;AACH,qBAIa,iBAAiB;aAIE,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC;IAH1D,sCAAsC;IACV,QAAQ,EAAG,cAAc,CAAC;gBAE1B,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC;yCAJjD,iBAAiB;2CAAjB,iBAAiB;CAK7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"chat-slot.directive.js","sourceRoot":"","sources":["../../../src/lib/directives/chat-slot.directive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAe,MAAM,eAAe,CAAC;;AAoB9D;;;;;GAKG;AAKH,MAAM,OAAO,iBAAiB;IAIE;IAH5B,sCAAsC;IACV,QAAQ,CAAkB;IAEtD,YAA4B,QAA8B;QAA9B,aAAQ,GAAR,QAAQ,CAAsB;IAAG,CAAC;2GAJrD,iBAAiB;6DAAjB,iBAAiB;;iFAAjB,iBAAiB;cAJ7B,SAAS;eAAC;gBACP,QAAQ,EAAE,cAAc;gBACxB,UAAU,EAAE,IAAI;aACnB;;kBAGI,KAAK;mBAAC,YAAY","sourcesContent":["/**\n * @fileoverview ChatSlotDirective — content-projection lookup for chat-area slots.\n *\n * Consumers project a template into a specific slot by attaching this directive:\n *\n * ```html\n * <mj-conversation-chat-area>\n * <ng-template mjChatSlot=\"emptyState\">\n * <warm-tutor-welcome />\n * </ng-template>\n *\n * <ng-template mjChatSlot=\"agentPresence\" let-state>\n * <my-character-presence [State]=\"state\" />\n * </ng-template>\n * </mj-conversation-chat-area>\n * ```\n *\n * The chat-area component queries `@ContentChildren(ChatSlotDirective)` and\n * looks up the `TemplateRef` for each known slot name. When a consumer template\n * is present for a slot, the component renders it via `*ngTemplateOutlet`\n * (with a typed context); when absent, the component falls back to its\n * exported standalone default component for that slot.\n *\n * @module @memberjunction/ng-conversations\n */\n\nimport { Directive, Input, TemplateRef } from '@angular/core';\n\n/**\n * Named slots the chat-area exposes. Keep in sync with the slot-interfaces module.\n *\n * Note the header pair: `header` REPLACES the entire chat header (the consumer\n * owns title, badges, and every action button), while `headerActions` is\n * ADDITIVE — it renders the projected template inside the DEFAULT header's\n * action strip, after the stock buttons. Projecting `header` suppresses\n * `headerActions` (the replacement owns the whole header, actions included).\n */\nexport type MJChatSlotName =\n | 'emptyState'\n | 'agentPresence'\n | 'header'\n | 'headerActions'\n | 'messageExtra'\n | 'demonstrationSurface'\n | 'messageRenderer';\n\n/**\n * Marks an `<ng-template>` as a slot fill for the chat-area.\n *\n * Standalone — no module declaration required; consumers import it as part of\n * the conversations module's exports.\n */\n@Directive({\n selector: '[mjChatSlot]',\n standalone: true,\n})\nexport class ChatSlotDirective {\n /** Which slot this template fills. */\n @Input('mjChatSlot') public SlotName!: MJChatSlotName;\n\n constructor(public readonly Template: TemplateRef<unknown>) {}\n}\n"]}
1
+ {"version":3,"file":"chat-slot.directive.js","sourceRoot":"","sources":["../../../src/lib/directives/chat-slot.directive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAe,MAAM,eAAe,CAAC;;AAyB9D;;;;;GAKG;AAKH,MAAM,OAAO,iBAAiB;IAIE;IAH5B,sCAAsC;IACV,QAAQ,CAAkB;IAEtD,YAA4B,QAA8B;QAA9B,aAAQ,GAAR,QAAQ,CAAsB;IAAG,CAAC;2GAJrD,iBAAiB;6DAAjB,iBAAiB;;iFAAjB,iBAAiB;cAJ7B,SAAS;eAAC;gBACP,QAAQ,EAAE,cAAc;gBACxB,UAAU,EAAE,IAAI;aACnB;;kBAGI,KAAK;mBAAC,YAAY","sourcesContent":["/**\n * @fileoverview ChatSlotDirective — content-projection lookup for chat-area slots.\n *\n * Consumers project a template into a specific slot by attaching this directive:\n *\n * ```html\n * <mj-conversation-chat-area>\n * <ng-template mjChatSlot=\"emptyState\">\n * <warm-tutor-welcome />\n * </ng-template>\n *\n * <ng-template mjChatSlot=\"agentPresence\" let-state>\n * <my-character-presence [State]=\"state\" />\n * </ng-template>\n * </mj-conversation-chat-area>\n * ```\n *\n * The chat-area component queries `@ContentChildren(ChatSlotDirective)` and\n * looks up the `TemplateRef` for each known slot name. When a consumer template\n * is present for a slot, the component renders it via `*ngTemplateOutlet`\n * (with a typed context); when absent, the component falls back to its\n * exported standalone default component for that slot.\n *\n * @module @memberjunction/ng-conversations\n */\n\nimport { Directive, Input, TemplateRef } from '@angular/core';\n\n/**\n * Named slots the chat-area exposes. Keep in sync with the slot-interfaces module.\n *\n * Note the header pair: `header` REPLACES the entire chat header (the consumer\n * owns title, badges, and every action button), while `headerActions` is\n * ADDITIVE — it renders the projected template inside the DEFAULT header's\n * action strip, after the stock buttons. Projecting `header` suppresses\n * `headerActions` (the replacement owns the whole header, actions included).\n *\n * `composerExtra` is ADDITIVE too: host UI rendered directly above the composer (a\n * \"who will see this\" line, a visibility toggle, a note about which agents answer here),\n * wherever the chat area shows one — the new-conversation composer included.\n */\nexport type MJChatSlotName =\n | 'emptyState'\n | 'agentPresence'\n | 'header'\n | 'headerActions'\n | 'composerExtra'\n | 'messageExtra'\n | 'demonstrationSurface'\n | 'messageRenderer';\n\n/**\n * Marks an `<ng-template>` as a slot fill for the chat-area.\n *\n * Standalone — no module declaration required; consumers import it as part of\n * the conversations module's exports.\n */\n@Directive({\n selector: '[mjChatSlot]',\n standalone: true,\n})\nexport class ChatSlotDirective {\n /** Which slot this template fills. */\n @Input('mjChatSlot') public SlotName!: MJChatSlotName;\n\n constructor(public readonly Template: TemplateRef<unknown>) {}\n}\n"]}
@@ -6,12 +6,20 @@ import * as i0 from "@angular/core";
6
6
  * <div mjSearchShortcut (searchTriggered)="openSearch()">
7
7
  */
8
8
  export declare class SearchShortcutDirective {
9
+ SearchTriggered: EventEmitter<void>;
10
+ /**
11
+ * @deprecated Use {@link SearchTriggered}.
12
+ *
13
+ * The same emitter under the old binding name, so a template still binding
14
+ * (searchTriggered) keeps working. Must stay AFTER SearchTriggered: class fields
15
+ * initialise in order, and the other way round this captures undefined.
16
+ */
9
17
  searchTriggered: EventEmitter<void>;
10
18
  /**
11
19
  * Listen for Ctrl+K or Cmd+K
12
20
  */
13
21
  handleKeyboardEvent(event: KeyboardEvent): void;
14
22
  static ɵfac: i0.ɵɵFactoryDeclaration<SearchShortcutDirective, never>;
15
- static ɵdir: i0.ɵɵDirectiveDeclaration<SearchShortcutDirective, "[mjSearchShortcut]", never, {}, { "searchTriggered": "searchTriggered"; }, never, never, false, never>;
23
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SearchShortcutDirective, "[mjSearchShortcut]", never, {}, { "SearchTriggered": "SearchTriggered"; "searchTriggered": "searchTriggered"; }, never, never, false, never>;
16
24
  }
17
25
  //# sourceMappingURL=search-shortcut.directive.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"search-shortcut.directive.d.ts","sourceRoot":"","sources":["../../../src/lib/directives/search-shortcut.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,YAAY,EAAE,MAAM,eAAe,CAAC;;AAE9E;;;;GAIG;AACH,qBAIa,uBAAuB;IACxB,eAAe,qBAA4B;IAErD;;OAEG;IAEH,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;yCAPpC,uBAAuB;2CAAvB,uBAAuB;CAkBnC"}
1
+ {"version":3,"file":"search-shortcut.directive.d.ts","sourceRoot":"","sources":["../../../src/lib/directives/search-shortcut.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,YAAY,EAAE,MAAM,eAAe,CAAC;;AAE9E;;;;GAIG;AACH,qBAIa,uBAAuB;IACxB,eAAe,qBAA4B;IAErD;;;;;;OAMG;IACO,eAAe,qBAAwB;IAEjD;;OAEG;IAEH,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;yCAhBpC,uBAAuB;2CAAvB,uBAAuB;CA2BnC"}
@@ -6,7 +6,15 @@ import * as i0 from "@angular/core";
6
6
  * <div mjSearchShortcut (searchTriggered)="openSearch()">
7
7
  */
8
8
  export class SearchShortcutDirective {
9
- searchTriggered = new EventEmitter();
9
+ SearchTriggered = new EventEmitter();
10
+ /**
11
+ * @deprecated Use {@link SearchTriggered}.
12
+ *
13
+ * The same emitter under the old binding name, so a template still binding
14
+ * (searchTriggered) keeps working. Must stay AFTER SearchTriggered: class fields
15
+ * initialise in order, and the other way round this captures undefined.
16
+ */
17
+ searchTriggered = this.SearchTriggered;
10
18
  /**
11
19
  * Listen for Ctrl+K or Cmd+K
12
20
  */
@@ -17,13 +25,13 @@ export class SearchShortcutDirective {
17
25
  if (isCtrlOrCmd && event.key === 'k') {
18
26
  event.preventDefault();
19
27
  event.stopPropagation();
20
- this.searchTriggered.emit();
28
+ this.SearchTriggered.emit();
21
29
  }
22
30
  }
23
31
  static ɵfac = function SearchShortcutDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SearchShortcutDirective)(); };
24
32
  static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: SearchShortcutDirective, selectors: [["", "mjSearchShortcut", ""]], hostBindings: function SearchShortcutDirective_HostBindings(rf, ctx) { if (rf & 1) {
25
33
  i0.ɵɵlistener("keydown", function SearchShortcutDirective_keydown_HostBindingHandler($event) { return ctx.handleKeyboardEvent($event); }, i0.ɵɵresolveDocument);
26
- } }, outputs: { searchTriggered: "searchTriggered" }, standalone: false });
34
+ } }, outputs: { SearchTriggered: "SearchTriggered", searchTriggered: "searchTriggered" }, standalone: false });
27
35
  }
28
36
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchShortcutDirective, [{
29
37
  type: Directive,
@@ -31,7 +39,9 @@ export class SearchShortcutDirective {
31
39
  standalone: false,
32
40
  selector: '[mjSearchShortcut]'
33
41
  }]
34
- }], null, { searchTriggered: [{
42
+ }], null, { SearchTriggered: [{
43
+ type: Output
44
+ }], searchTriggered: [{
35
45
  type: Output
36
46
  }], handleKeyboardEvent: [{
37
47
  type: HostListener,
@@ -1 +1 @@
1
- {"version":3,"file":"search-shortcut.directive.js","sourceRoot":"","sources":["../../../src/lib/directives/search-shortcut.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;;AAE9E;;;;GAIG;AAKH,MAAM,OAAO,uBAAuB;IACxB,eAAe,GAAG,IAAI,YAAY,EAAQ,CAAC;IAErD;;OAEG;IAEH,mBAAmB,CAAC,KAAoB;QACtC,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACnE,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;QAE1D,4BAA4B;QAC5B,IAAI,WAAW,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;YACrC,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;QAC9B,CAAC;IACH,CAAC;iHAjBU,uBAAuB;6DAAvB,uBAAuB;YAAvB,sGAAA,+BACZ,0BADmC;;;iFAAvB,uBAAuB;cAJnC,SAAS;eAAC;gBACT,UAAU,EAAE,KAAK;gBACjB,QAAQ,EAAE,oBAAoB;aAC/B;;kBAEE,MAAM;;kBAKN,YAAY;mBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC","sourcesContent":["import { Directive, HostListener, Output, EventEmitter } from '@angular/core';\n\n/**\n * Directive to handle global search keyboard shortcut (Ctrl+K or Cmd+K)\n * Usage: Add to your main app component or workspace component\n * <div mjSearchShortcut (searchTriggered)=\"openSearch()\">\n */\n@Directive({\n standalone: false,\n selector: '[mjSearchShortcut]'\n})\nexport class SearchShortcutDirective {\n @Output() searchTriggered = new EventEmitter<void>();\n\n /**\n * Listen for Ctrl+K or Cmd+K\n */\n @HostListener('document:keydown', ['$event'])\n handleKeyboardEvent(event: KeyboardEvent): void {\n const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;\n const isCtrlOrCmd = isMac ? event.metaKey : event.ctrlKey;\n\n // Check for Ctrl+K or Cmd+K\n if (isCtrlOrCmd && event.key === 'k') {\n event.preventDefault();\n event.stopPropagation();\n this.searchTriggered.emit();\n }\n }\n}\n"]}
1
+ {"version":3,"file":"search-shortcut.directive.js","sourceRoot":"","sources":["../../../src/lib/directives/search-shortcut.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;;AAE9E;;;;GAIG;AAKH,MAAM,OAAO,uBAAuB;IACxB,eAAe,GAAG,IAAI,YAAY,EAAQ,CAAC;IAErD;;;;;;OAMG;IACO,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;IAEjD;;OAEG;IAEH,mBAAmB,CAAC,KAAoB;QACtC,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACnE,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;QAE1D,4BAA4B;QAC5B,IAAI,WAAW,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;YACrC,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;QAC9B,CAAC;IACH,CAAC;iHA1BU,uBAAuB;6DAAvB,uBAAuB;YAAvB,sGAAA,+BACZ,0BADmC;;;iFAAvB,uBAAuB;cAJnC,SAAS;eAAC;gBACT,UAAU,EAAE,KAAK;gBACjB,QAAQ,EAAE,oBAAoB;aAC/B;;kBAEE,MAAM;;kBASN,MAAM;;kBAKN,YAAY;mBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC","sourcesContent":["import { Directive, HostListener, Output, EventEmitter } from '@angular/core';\n\n/**\n * Directive to handle global search keyboard shortcut (Ctrl+K or Cmd+K)\n * Usage: Add to your main app component or workspace component\n * <div mjSearchShortcut (searchTriggered)=\"openSearch()\">\n */\n@Directive({\n standalone: false,\n selector: '[mjSearchShortcut]'\n})\nexport class SearchShortcutDirective {\n @Output() SearchTriggered = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link SearchTriggered}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (searchTriggered) keeps working. Must stay AFTER SearchTriggered: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() searchTriggered = this.SearchTriggered;\n\n /**\n * Listen for Ctrl+K or Cmd+K\n */\n @HostListener('document:keydown', ['$event'])\n handleKeyboardEvent(event: KeyboardEvent): void {\n const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;\n const isCtrlOrCmd = isMac ? event.metaKey : event.ctrlKey;\n\n // Check for Ctrl+K or Cmd+K\n if (isCtrlOrCmd && event.key === 'k') {\n event.preventDefault();\n event.stopPropagation();\n this.SearchTriggered.emit();\n }\n }\n}\n"]}
@@ -17,6 +17,7 @@
17
17
  * @module @memberjunction/ng-conversations
18
18
  */
19
19
  import type { ExecuteAgentResult } from '@memberjunction/ai-core-plus';
20
+ import type { AgentTurnInfo, AgentTurnRoute } from '../models/agent-turn.model';
20
21
  /**
21
22
  * Base class for cancelable chat events. Listeners flip `Cancel = true` to
22
23
  * halt the default behavior; the matching `After*` event will NOT fire.
@@ -27,20 +28,46 @@ export declare class CancellableChatEventArgs {
27
28
  CancelReason?: string;
28
29
  }
29
30
  /**
30
- * Fired BEFORE a user message is sent to the agent. Listeners can cancel
31
- * (e.g., a guardrail that blocks empty messages or messages matching a
32
- * forbidden pattern).
31
+ * Fired once per agent turn, BEFORE any reply row exists: the person's message is saved and the
32
+ * chat area has picked the agent that will answer it, on whichever route chose it (a tagged
33
+ * agent, the last agent that answered, a pinned or host default agent, or the conversation
34
+ * manager). A message that starts no turn (see `AgentReplyMode`) fires nothing.
35
+ *
36
+ * A listener can:
37
+ * - cancel the turn (`Cancel = true`). Nothing more is written: no placeholder, no reply row,
38
+ * and `AfterAgentTurn` does not fire. `CancelReason` is logged, not shown.
39
+ * - send the turn to a different agent by setting {@link RedirectAgentId}. The agent must be
40
+ * one the chat allows (`AllowedAgentIDs`); otherwise the turn is refused with a notice.
41
+ *
42
+ * Listeners run synchronously: the chat area reads `Cancel` and `RedirectAgentId` as soon as
43
+ * `emit()` returns.
44
+ *
45
+ * Earlier releases fired this event only on the conversation-manager route, after that route's
46
+ * placeholder row was saved, so a cancel left the row behind marked "Turn canceled".
33
47
  */
34
48
  export declare class BeforeAgentTurnEventArgs extends CancellableChatEventArgs {
35
49
  readonly ConversationId: string;
36
50
  readonly MessageText: string;
37
51
  readonly ApplicationId: string | null;
38
- constructor(ConversationId: string, MessageText: string, ApplicationId?: string | null);
52
+ /** The agent the turn resolved to. Null only when the args were built without turn details. */
53
+ readonly AgentId: string | null;
54
+ /** The agent's name, when known. */
55
+ readonly AgentName: string | null;
56
+ /** How the agent was chosen. */
57
+ readonly Route: AgentTurnRoute | null;
58
+ /** The person's saved message the turn answers. */
59
+ readonly UserMessageId: string | null;
60
+ /**
61
+ * Set to send the turn to a different agent instead. Null (the default) keeps
62
+ * {@link AgentId}. The turn then runs with `Route` `'Redirect'`.
63
+ */
64
+ RedirectAgentId: string | null;
65
+ constructor(ConversationId: string, MessageText: string, ApplicationId?: string | null, turn?: AgentTurnInfo | null);
39
66
  }
40
67
  /**
41
- * Fired AFTER a successful agent turn completes. Carries the agent run id
42
- * and the underlying `ExecuteAgentResult`. NOT fired when the corresponding
43
- * `BeforeAgentTurnEventArgs` was canceled or the turn errored.
68
+ * Fired AFTER a successful agent turn, on every route. Carries the agent run id and the
69
+ * underlying `ExecuteAgentResult`. NOT fired when the corresponding `BeforeAgentTurnEventArgs`
70
+ * was canceled, when the turn failed, or when a host `AgentTurnHandler` reported no `Result`.
44
71
  */
45
72
  export declare class AfterAgentTurnEventArgs {
46
73
  readonly ConversationId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"chat-events.d.ts","sourceRoot":"","sources":["../../../src/lib/events/chat-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvE;;;;GAIG;AACH,qBAAa,wBAAwB;IAC1B,MAAM,EAAE,OAAO,CAAS;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAMD;;;;GAIG;AACH,qBAAa,wBAAyB,SAAQ,wBAAwB;aAE9C,cAAc,EAAE,MAAM;aACtB,WAAW,EAAE,MAAM;aACnB,aAAa,EAAE,MAAM,GAAG,IAAI;gBA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YAAY,EAAE,SAAS,MAAM,EAAE;CAEtD;AAED;;;GAGG;AACH,qBAAa,mCAAmC;aAExB,SAAS,EAAE,MAAM;aACjB,WAAW,EAAE,MAAM;aACnB,KAAK,EAAE,MAAM,GAAG,QAAQ;gBAFxB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,GAAG,QAAQ;CAE/C;AAED;;;GAGG;AACH,qBAAa,qBAAqB;aAEV,SAAS,EAAE,MAAM;aACjB,MAAM,EAAE,UAAU,GAAG,OAAO,GAAG,SAAS;gBADxC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,UAAU,GAAG,OAAO,GAAG,SAAS;CAE/D"}
@@ -29,25 +29,55 @@ export class CancellableChatEventArgs {
29
29
  // Agent-turn lifecycle
30
30
  // ────────────────────────────────────────────────────────────────────
31
31
  /**
32
- * Fired BEFORE a user message is sent to the agent. Listeners can cancel
33
- * (e.g., a guardrail that blocks empty messages or messages matching a
34
- * forbidden pattern).
32
+ * Fired once per agent turn, BEFORE any reply row exists: the person's message is saved and the
33
+ * chat area has picked the agent that will answer it, on whichever route chose it (a tagged
34
+ * agent, the last agent that answered, a pinned or host default agent, or the conversation
35
+ * manager). A message that starts no turn (see `AgentReplyMode`) fires nothing.
36
+ *
37
+ * A listener can:
38
+ * - cancel the turn (`Cancel = true`). Nothing more is written: no placeholder, no reply row,
39
+ * and `AfterAgentTurn` does not fire. `CancelReason` is logged, not shown.
40
+ * - send the turn to a different agent by setting {@link RedirectAgentId}. The agent must be
41
+ * one the chat allows (`AllowedAgentIDs`); otherwise the turn is refused with a notice.
42
+ *
43
+ * Listeners run synchronously: the chat area reads `Cancel` and `RedirectAgentId` as soon as
44
+ * `emit()` returns.
45
+ *
46
+ * Earlier releases fired this event only on the conversation-manager route, after that route's
47
+ * placeholder row was saved, so a cancel left the row behind marked "Turn canceled".
35
48
  */
36
49
  export class BeforeAgentTurnEventArgs extends CancellableChatEventArgs {
37
50
  ConversationId;
38
51
  MessageText;
39
52
  ApplicationId;
40
- constructor(ConversationId, MessageText, ApplicationId = null) {
53
+ /** The agent the turn resolved to. Null only when the args were built without turn details. */
54
+ AgentId;
55
+ /** The agent's name, when known. */
56
+ AgentName;
57
+ /** How the agent was chosen. */
58
+ Route;
59
+ /** The person's saved message the turn answers. */
60
+ UserMessageId;
61
+ /**
62
+ * Set to send the turn to a different agent instead. Null (the default) keeps
63
+ * {@link AgentId}. The turn then runs with `Route` `'Redirect'`.
64
+ */
65
+ RedirectAgentId = null;
66
+ constructor(ConversationId, MessageText, ApplicationId = null, turn = null) {
41
67
  super();
42
68
  this.ConversationId = ConversationId;
43
69
  this.MessageText = MessageText;
44
70
  this.ApplicationId = ApplicationId;
71
+ this.AgentId = turn?.AgentId ?? null;
72
+ this.AgentName = turn?.AgentName ?? null;
73
+ this.Route = turn?.Route ?? null;
74
+ this.UserMessageId = turn?.UserMessageId ?? null;
45
75
  }
46
76
  }
47
77
  /**
48
- * Fired AFTER a successful agent turn completes. Carries the agent run id
49
- * and the underlying `ExecuteAgentResult`. NOT fired when the corresponding
50
- * `BeforeAgentTurnEventArgs` was canceled or the turn errored.
78
+ * Fired AFTER a successful agent turn, on every route. Carries the agent run id and the
79
+ * underlying `ExecuteAgentResult`. NOT fired when the corresponding `BeforeAgentTurnEventArgs`
80
+ * was canceled, when the turn failed, or when a host `AgentTurnHandler` reported no `Result`.
51
81
  */
52
82
  export class AfterAgentTurnEventArgs {
53
83
  ConversationId;
@@ -1 +1 @@
1
- {"version":3,"file":"chat-events.js","sourceRoot":"","sources":["../../../src/lib/events/chat-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH;;;;GAIG;AACH,MAAM,OAAO,wBAAwB;IAC1B,MAAM,GAAY,KAAK,CAAC;IACxB,YAAY,CAAU;CAChC;AAED,uEAAuE;AACvE,uBAAuB;AACvB,uEAAuE;AAEvE;;;;GAIG;AACH,MAAM,OAAO,wBAAyB,SAAQ,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YACoB,MAAc,EACd,MAA+B;QAD/B,WAAM,GAAN,MAAM,CAAQ;QACd,WAAM,GAAN,MAAM,CAAyB;IAChD,CAAC;CACP;AAED,uEAAuE;AACvE,qDAAqD;AACrD,uEAAuE;AACvE,EAAE;AACF,+DAA+D;AAC/D,6EAA6E;AAC7E,+EAA+E;AAC/E,+EAA+E;AAC/E,wEAAwE;AACxE,8DAA8D;AAE9D;;;;;GAKG;AACH,MAAM,OAAO,uBAAuB;IAEZ;IACA;IAFpB,YACoB,SAAiB,EACjB,YAA+B;QAD/B,cAAS,GAAT,SAAS,CAAQ;QACjB,iBAAY,GAAZ,YAAY,CAAmB;IAChD,CAAC;CACP;AAED;;;GAGG;AACH,MAAM,OAAO,mCAAmC;IAExB;IACA;IACA;IAHpB,YACoB,SAAiB,EACjB,WAAmB,EACnB,KAAwB;QAFxB,cAAS,GAAT,SAAS,CAAQ;QACjB,gBAAW,GAAX,WAAW,CAAQ;QACnB,UAAK,GAAL,KAAK,CAAmB;IACzC,CAAC;CACP;AAED;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IAEV;IACA;IAFpB,YACoB,SAAiB,EACjB,MAAwC;QADxC,cAAS,GAAT,SAAS,CAAQ;QACjB,WAAM,GAAN,MAAM,CAAkC;IACzD,CAAC;CACP","sourcesContent":["/**\n * @fileoverview Before/After cancelable event argument classes for the\n * conversations widget.\n *\n * Follows MJ's established Before/After cancelable event pattern (see\n * `packages/Angular/Generic/trees/src/lib/events/tree-events.ts` and\n * `packages/Angular/Generic/base-forms/src/lib/types/form-events.ts`).\n *\n * **Contract:** Action events come as `Before*` / `After*` pairs. The\n * `Before*` event carries an args object extending {@link CancellableChatEventArgs}\n * with a `Cancel: boolean` property the listener can flip. The component\n * checks `if (event.Cancel) return;` before proceeding and emits the\n * corresponding `After*` only on the non-canceled path. Informational\n * events (progress, shown-notifications, session lifecycle) stay as single\n * emitters without a Before-pair.\n *\n * @module @memberjunction/ng-conversations\n */\n\nimport type { ExecuteAgentResult } from '@memberjunction/ai-core-plus';\n\n/**\n * Base class for cancelable chat events. Listeners flip `Cancel = true` to\n * halt the default behavior; the matching `After*` event will NOT fire.\n * The optional `CancelReason` is a free-form string for telemetry / debug.\n */\nexport class CancellableChatEventArgs {\n public Cancel: boolean = false;\n public CancelReason?: string;\n}\n\n// ────────────────────────────────────────────────────────────────────\n// Agent-turn lifecycle\n// ────────────────────────────────────────────────────────────────────\n\n/**\n * Fired BEFORE a user message is sent to the agent. Listeners can cancel\n * (e.g., a guardrail that blocks empty messages or messages matching a\n * forbidden pattern).\n */\nexport class BeforeAgentTurnEventArgs extends CancellableChatEventArgs {\n constructor(\n public readonly ConversationId: string,\n public readonly MessageText: string,\n public readonly ApplicationId: string | null = null\n ) {\n super();\n }\n}\n\n/**\n * Fired AFTER a successful agent turn completes. Carries the agent run id\n * and the underlying `ExecuteAgentResult`. NOT fired when the corresponding\n * `BeforeAgentTurnEventArgs` was canceled or the turn errored.\n */\nexport class AfterAgentTurnEventArgs {\n constructor(\n public readonly ConversationId: string,\n public readonly AgentRunId: string,\n public readonly Result: ExecuteAgentResult\n ) {}\n}\n\n// ────────────────────────────────────────────────────────────────────\n// Tool invocations\n// ────────────────────────────────────────────────────────────────────\n\n/**\n * Fired BEFORE the agent invokes a registered client tool. Listeners can veto\n * the dispatch by setting `event.Cancel = true` — `AgentClientSession`\n * short-circuits, the tool handler does NOT run, `afterToolInvoked` does NOT\n * fire, and the server receives a failure response carrying the optional\n * `CancelReason`.\n *\n * @example Confirm before a destructive tool runs\n * ```typescript\n * onBeforeToolInvoked(event: BeforeToolInvokedEventArgs) {\n * if (event.ToolName === 'deleteRecord') {\n * if (!confirm('Agent wants to delete a record. Allow?')) {\n * event.Cancel = true;\n * event.CancelReason = 'User declined deletion';\n * }\n * }\n * }\n * ```\n */\nexport class BeforeToolInvokedEventArgs extends CancellableChatEventArgs {\n constructor(\n public readonly ToolName: string,\n public readonly Args: unknown\n ) {\n super();\n }\n}\n\n/**\n * Fired AFTER a tool invocation completes. Carries the tool name, the\n * arguments it was called with, and the result it produced. NOT fired when\n * the corresponding `BeforeToolInvokedEventArgs` was canceled — the contract\n * is enforced in `AgentClientSession.handleToolRequest`.\n */\nexport class AfterToolInvokedEventArgs {\n constructor(\n public readonly ToolName: string,\n public readonly Args: unknown,\n public readonly Result: unknown\n ) {}\n}\n\n// ────────────────────────────────────────────────────────────────────\n// Response forms\n// ────────────────────────────────────────────────────────────────────\n\n/**\n * Fired BEFORE a response form's submitted values are sent back to the\n * agent. Listeners can cancel (e.g., a validation pass that blocks\n * submission until certain fields are populated).\n */\nexport class BeforeResponseFormSubmittedEventArgs extends CancellableChatEventArgs {\n constructor(\n public readonly FormId: string,\n public readonly Values: Record<string, unknown>\n ) {\n super();\n }\n}\n\n/**\n * Fired AFTER a response form's submitted values have been sent. NOT fired\n * when the corresponding `BeforeResponseFormSubmittedEventArgs` was\n * canceled.\n */\nexport class AfterResponseFormSubmittedEventArgs {\n constructor(\n public readonly FormId: string,\n public readonly Values: Record<string, unknown>\n ) {}\n}\n\n// ────────────────────────────────────────────────────────────────────\n// Session lifecycle (informational — no Before-pair)\n// ────────────────────────────────────────────────────────────────────\n//\n// These re-broadcast the `SessionLifecycleEvent` variants from\n// `@memberjunction/conversations-runtime`'s `SessionsObserver`. State/Reason\n// union types are intentionally narrowed to what's distinguishable client-side\n// today — see the `ISessionsAdapter` JSDoc in the runtime package for the full\n// rationale (no per-channel `opening`/`closing` observable, server-only\n// `Janitor`/`Shutdown` reasons that never reach the browser).\n\n/**\n * Informational event — fired when a realtime session has fully started\n * (server-issued `sessionId` is set AND the realtime client is connected).\n * Cancellation of voice/realtime activity lives at the Sessions layer\n * (PR #2787), not here.\n */\nexport class SessionStartedEventArgs {\n constructor(\n public readonly SessionId: string,\n public readonly ChannelKinds: readonly string[]\n ) {}\n}\n\n/**\n * Informational. A channel inside a session opened or closed. Narrowed to\n * `open | closed` — see {@link SessionStartedEventArgs} module comment.\n */\nexport class SessionChannelStateChangedEventArgs {\n constructor(\n public readonly SessionId: string,\n public readonly ChannelKind: string,\n public readonly State: 'open' | 'closed'\n ) {}\n}\n\n/**\n * Informational. A session ended client-side. Narrowed to\n * `explicit | error | unknown` — see {@link SessionStartedEventArgs} module comment.\n */\nexport class SessionEndedEventArgs {\n constructor(\n public readonly SessionId: string,\n public readonly Reason: 'explicit' | 'error' | 'unknown'\n ) {}\n}\n"]}
1
+ {"version":3,"file":"chat-events.js","sourceRoot":"","sources":["../../../src/lib/events/chat-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH;;;;GAIG;AACH,MAAM,OAAO,wBAAwB;IAC1B,MAAM,GAAY,KAAK,CAAC;IACxB,YAAY,CAAU;CAChC;AAED,uEAAuE;AACvE,uBAAuB;AACvB,uEAAuE;AAEvE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,wBAAyB,SAAQ,wBAAwB;IAgB9C;IACA;IACA;IAjBpB,+FAA+F;IAC/E,OAAO,CAAgB;IACvC,oCAAoC;IACpB,SAAS,CAAgB;IACzC,gCAAgC;IAChB,KAAK,CAAwB;IAC7C,mDAAmD;IACnC,aAAa,CAAgB;IAC7C;;;OAGG;IACI,eAAe,GAAkB,IAAI,CAAC;IAE7C,YACoB,cAAsB,EACtB,WAAmB,EACnB,gBAA+B,IAAI,EACnD,OAA6B,IAAI;QAEjC,KAAK,EAAE,CAAC;QALQ,mBAAc,GAAd,cAAc,CAAQ;QACtB,gBAAW,GAAX,WAAW,CAAQ;QACnB,kBAAa,GAAb,aAAa,CAAsB;QAInD,IAAI,CAAC,OAAO,GAAG,IAAI,EAAE,OAAO,IAAI,IAAI,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,IAAI,EAAE,SAAS,IAAI,IAAI,CAAC;QACzC,IAAI,CAAC,KAAK,GAAG,IAAI,EAAE,KAAK,IAAI,IAAI,CAAC;QACjC,IAAI,CAAC,aAAa,GAAG,IAAI,EAAE,aAAa,IAAI,IAAI,CA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;AAC/E,+EAA+E;AAC/E,wEAAwE;AACxE,8DAA8D;AAE9D;;;;;GAKG;AACH,MAAM,OAAO,uBAAuB;IAEZ;IACA;IAFpB,YACoB,SAAiB,EACjB,YAA+B;QAD/B,cAAS,GAAT,SAAS,CAAQ;QACjB,iBAAY,GAAZ,YAAY,CAAmB;IAChD,CAAC;CACP;AAED;;;GAGG;AACH,MAAM,OAAO,mCAAmC;IAExB;IACA;IACA;IAHpB,YACoB,SAAiB,EACjB,WAAmB,EACnB,KAAwB;QAFxB,cAAS,GAAT,SAAS,CAAQ;QACjB,gBAAW,GAAX,WAAW,CAAQ;QACnB,UAAK,GAAL,KAAK,CAAmB;IACzC,CAAC;CACP;AAED;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IAEV;IACA;IAFpB,YACoB,SAAiB,EACjB,MAAwC;QADxC,cAAS,GAAT,SAAS,CAAQ;QACjB,WAAM,GAAN,MAAM,CAAkC;IACzD,CAAC;CACP","sourcesContent":["/**\n * @fileoverview Before/After cancelable event argument classes for the\n * conversations widget.\n *\n * Follows MJ's established Before/After cancelable event pattern (see\n * `packages/Angular/Generic/trees/src/lib/events/tree-events.ts` and\n * `packages/Angular/Generic/base-forms/src/lib/types/form-events.ts`).\n *\n * **Contract:** Action events come as `Before*` / `After*` pairs. The\n * `Before*` event carries an args object extending {@link CancellableChatEventArgs}\n * with a `Cancel: boolean` property the listener can flip. The component\n * checks `if (event.Cancel) return;` before proceeding and emits the\n * corresponding `After*` only on the non-canceled path. Informational\n * events (progress, shown-notifications, session lifecycle) stay as single\n * emitters without a Before-pair.\n *\n * @module @memberjunction/ng-conversations\n */\n\nimport type { ExecuteAgentResult } from '@memberjunction/ai-core-plus';\nimport type { AgentTurnInfo, AgentTurnRoute } from '../models/agent-turn.model';\n\n/**\n * Base class for cancelable chat events. Listeners flip `Cancel = true` to\n * halt the default behavior; the matching `After*` event will NOT fire.\n * The optional `CancelReason` is a free-form string for telemetry / debug.\n */\nexport class CancellableChatEventArgs {\n public Cancel: boolean = false;\n public CancelReason?: string;\n}\n\n// ────────────────────────────────────────────────────────────────────\n// Agent-turn lifecycle\n// ────────────────────────────────────────────────────────────────────\n\n/**\n * Fired once per agent turn, BEFORE any reply row exists: the person's message is saved and the\n * chat area has picked the agent that will answer it, on whichever route chose it (a tagged\n * agent, the last agent that answered, a pinned or host default agent, or the conversation\n * manager). A message that starts no turn (see `AgentReplyMode`) fires nothing.\n *\n * A listener can:\n * - cancel the turn (`Cancel = true`). Nothing more is written: no placeholder, no reply row,\n * and `AfterAgentTurn` does not fire. `CancelReason` is logged, not shown.\n * - send the turn to a different agent by setting {@link RedirectAgentId}. The agent must be\n * one the chat allows (`AllowedAgentIDs`); otherwise the turn is refused with a notice.\n *\n * Listeners run synchronously: the chat area reads `Cancel` and `RedirectAgentId` as soon as\n * `emit()` returns.\n *\n * Earlier releases fired this event only on the conversation-manager route, after that route's\n * placeholder row was saved, so a cancel left the row behind marked \"Turn canceled\".\n */\nexport class BeforeAgentTurnEventArgs extends CancellableChatEventArgs {\n /** The agent the turn resolved to. Null only when the args were built without turn details. */\n public readonly AgentId: string | null;\n /** The agent's name, when known. */\n public readonly AgentName: string | null;\n /** How the agent was chosen. */\n public readonly Route: AgentTurnRoute | null;\n /** The person's saved message the turn answers. */\n public readonly UserMessageId: string | null;\n /**\n * Set to send the turn to a different agent instead. Null (the default) keeps\n * {@link AgentId}. The turn then runs with `Route` `'Redirect'`.\n */\n public RedirectAgentId: string | null = null;\n\n constructor(\n public readonly ConversationId: string,\n public readonly MessageText: string,\n public readonly ApplicationId: string | null = null,\n turn: AgentTurnInfo | null = null\n ) {\n super();\n this.AgentId = turn?.AgentId ?? null;\n this.AgentName = turn?.AgentName ?? null;\n this.Route = turn?.Route ?? null;\n this.UserMessageId = turn?.UserMessageId ?? null;\n }\n}\n\n/**\n * Fired AFTER a successful agent turn, on every route. Carries the agent run id and the\n * underlying `ExecuteAgentResult`. NOT fired when the corresponding `BeforeAgentTurnEventArgs`\n * was canceled, when the turn failed, or when a host `AgentTurnHandler` reported no `Result`.\n */\nexport class AfterAgentTurnEventArgs {\n constructor(\n public readonly ConversationId: string,\n public readonly AgentRunId: string,\n public readonly Result: ExecuteAgentResult\n ) {}\n}\n\n// ────────────────────────────────────────────────────────────────────\n// Tool invocations\n// ────────────────────────────────────────────────────────────────────\n\n/**\n * Fired BEFORE the agent invokes a registered client tool. Listeners can veto\n * the dispatch by setting `event.Cancel = true` — `AgentClientSession`\n * short-circuits, the tool handler does NOT run, `afterToolInvoked` does NOT\n * fire, and the server receives a failure response carrying the optional\n * `CancelReason`.\n *\n * @example Confirm before a destructive tool runs\n * ```typescript\n * onBeforeToolInvoked(event: BeforeToolInvokedEventArgs) {\n * if (event.ToolName === 'deleteRecord') {\n * if (!confirm('Agent wants to delete a record. Allow?')) {\n * event.Cancel = true;\n * event.CancelReason = 'User declined deletion';\n * }\n * }\n * }\n * ```\n */\nexport class BeforeToolInvokedEventArgs extends CancellableChatEventArgs {\n constructor(\n public readonly ToolName: string,\n public readonly Args: unknown\n ) {\n super();\n }\n}\n\n/**\n * Fired AFTER a tool invocation completes. Carries the tool name, the\n * arguments it was called with, and the result it produced. NOT fired when\n * the corresponding `BeforeToolInvokedEventArgs` was canceled — the contract\n * is enforced in `AgentClientSession.handleToolRequest`.\n */\nexport class AfterToolInvokedEventArgs {\n constructor(\n public readonly ToolName: string,\n public readonly Args: unknown,\n public readonly Result: unknown\n ) {}\n}\n\n// ────────────────────────────────────────────────────────────────────\n// Response forms\n// ────────────────────────────────────────────────────────────────────\n\n/**\n * Fired BEFORE a response form's submitted values are sent back to the\n * agent. Listeners can cancel (e.g., a validation pass that blocks\n * submission until certain fields are populated).\n */\nexport class BeforeResponseFormSubmittedEventArgs extends CancellableChatEventArgs {\n constructor(\n public readonly FormId: string,\n public readonly Values: Record<string, unknown>\n ) {\n super();\n }\n}\n\n/**\n * Fired AFTER a response form's submitted values have been sent. NOT fired\n * when the corresponding `BeforeResponseFormSubmittedEventArgs` was\n * canceled.\n */\nexport class AfterResponseFormSubmittedEventArgs {\n constructor(\n public readonly FormId: string,\n public readonly Values: Record<string, unknown>\n ) {}\n}\n\n// ────────────────────────────────────────────────────────────────────\n// Session lifecycle (informational — no Before-pair)\n// ────────────────────────────────────────────────────────────────────\n//\n// These re-broadcast the `SessionLifecycleEvent` variants from\n// `@memberjunction/conversations-runtime`'s `SessionsObserver`. State/Reason\n// union types are intentionally narrowed to what's distinguishable client-side\n// today — see the `ISessionsAdapter` JSDoc in the runtime package for the full\n// rationale (no per-channel `opening`/`closing` observable, server-only\n// `Janitor`/`Shutdown` reasons that never reach the browser).\n\n/**\n * Informational event — fired when a realtime session has fully started\n * (server-issued `sessionId` is set AND the realtime client is connected).\n * Cancellation of voice/realtime activity lives at the Sessions layer\n * (PR #2787), not here.\n */\nexport class SessionStartedEventArgs {\n constructor(\n public readonly SessionId: string,\n public readonly ChannelKinds: readonly string[]\n ) {}\n}\n\n/**\n * Informational. A channel inside a session opened or closed. Narrowed to\n * `open | closed` — see {@link SessionStartedEventArgs} module comment.\n */\nexport class SessionChannelStateChangedEventArgs {\n constructor(\n public readonly SessionId: string,\n public readonly ChannelKind: string,\n public readonly State: 'open' | 'closed'\n ) {}\n}\n\n/**\n * Informational. A session ended client-side. Narrowed to\n * `explicit | error | unknown` — see {@link SessionStartedEventArgs} module comment.\n */\nexport class SessionEndedEventArgs {\n constructor(\n public readonly SessionId: string,\n public readonly Reason: 'explicit' | 'error' | 'unknown'\n ) {}\n}\n"]}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * @fileoverview The host-facing contract for an agent turn in `mj-conversation-chat-area`.
3
+ *
4
+ * An agent turn is what may follow a person's saved message. The chat area picks one agent by a
5
+ * fixed order of routes, announces the turn with `BeforeAgentTurn` (which a host can cancel or
6
+ * redirect), and then runs it: on MJ's own path, or on the host's server through an
7
+ * {@link AgentTurnHandler}. These types are what a host reads and writes along the way.
8
+ *
9
+ * @module @memberjunction/ng-conversations
10
+ */
11
+ import type { ExecuteAgentResult } from '@memberjunction/ai-core-plus';
12
+ /**
13
+ * When a message starts an agent turn.
14
+ *
15
+ * - `Always` (the default): every message does, as it always has.
16
+ * - `MentionOnly`: only a message that tags an agent does. Any other message is posted with no
17
+ * turn at all: no reply row, no placeholder and no turn events.
18
+ */
19
+ export type AgentReplyMode = 'Always' | 'MentionOnly';
20
+ /**
21
+ * How the turn's agent was chosen. MJ tries the routes in this order and takes the first that
22
+ * applies; under `MentionOnly`, only `Mention` applies.
23
+ *
24
+ * - `Mention`: the message tags the agent.
25
+ * - `Continuity`: the last agent that answered in the conversation, other than the
26
+ * conversation manager.
27
+ * - `ConversationDefault`: the agent pinned on the conversation (`Conversation.DefaultAgentID`).
28
+ * - `HostDefault`: the host's `DefaultAgentId` input.
29
+ * - `ConversationManager`: MJ's conversation manager agent (Sage unless configured otherwise),
30
+ * which may delegate to another agent.
31
+ * - `Redirect`: a `BeforeAgentTurn` listener sent the turn to a different agent.
32
+ */
33
+ export type AgentTurnRoute = 'Mention' | 'Continuity' | 'ConversationDefault' | 'HostDefault' | 'ConversationManager' | 'Redirect';
34
+ /** The agent a turn resolved to, and the route that chose it. */
35
+ export interface AgentTurnTarget {
36
+ /** The agent that takes the turn. */
37
+ AgentId: string;
38
+ /** How the agent was chosen. */
39
+ Route: AgentTurnRoute;
40
+ }
41
+ /** What `BeforeAgentTurn` tells its listeners about the turn it announces. */
42
+ export interface AgentTurnInfo extends AgentTurnTarget {
43
+ /** The agent's name, when MJ knows it. */
44
+ AgentName: string | null;
45
+ /** The person's saved message that the turn answers. */
46
+ UserMessageId: string | null;
47
+ }
48
+ /**
49
+ * Everything the chat area knows about a turn it hands to an {@link AgentTurnHandler}.
50
+ * No reply row exists yet when the handler is called.
51
+ */
52
+ export interface AgentTurnRequest {
53
+ /** The conversation the message was posted in. */
54
+ ConversationId: string;
55
+ /** The person's saved message (`MJ: Conversation Details`, Role `User`). */
56
+ UserMessageId: string;
57
+ /** The message text, with mentions in their stored JSON form. */
58
+ MessageText: string;
59
+ /** The agent the turn resolved to, after any redirect. */
60
+ AgentId: string;
61
+ /** The agent's name, when MJ knows it. */
62
+ AgentName: string | null;
63
+ /** How the agent was chosen. */
64
+ Route: AgentTurnRoute;
65
+ /** The chat area's `ApplicationId` input. */
66
+ ApplicationId: string | null;
67
+ /** The chat area's `AppContext` input. */
68
+ AppContext: Record<string, unknown> | null;
69
+ /** The chat area's `AgentHistoryFrom` input: the first moment of the conversation the turn may read. */
70
+ AgentHistoryFrom: Date | null;
71
+ /**
72
+ * The agent configuration preset (`MJ: AI Agent Configurations.ID`) the person chose: the one
73
+ * on the mention for a `Mention` turn, otherwise the header mode picker's selection.
74
+ */
75
+ ConfigurationPresetId: string | null;
76
+ /** Skills the person asked for with `/skill` in this message. */
77
+ RequestedSkillIDs: string[];
78
+ /** Whether Plan Mode is on for the conversation. */
79
+ PlanMode: boolean;
80
+ }
81
+ /** What an {@link AgentTurnHandler} reports back to the chat area. */
82
+ export interface AgentTurnResult {
83
+ /** False when the turn failed. The chat area shows {@link ErrorMessage} and writes nothing. */
84
+ Success: boolean;
85
+ /** Why the turn failed, shown to the person. */
86
+ ErrorMessage?: string;
87
+ /**
88
+ * The rows the host wrote for the turn, oldest first: the agent's reply and any status rows.
89
+ * The chat area loads and shows them. A row still `In-Progress` is followed like any other
90
+ * in-progress reply.
91
+ */
92
+ ReplyDetailIds?: string[];
93
+ /** The agent run, when the host has one. Carried on `AfterAgentTurn`. */
94
+ AgentRunId?: string;
95
+ /** The agent's result, when the host has one. `AfterAgentTurn` fires only when it's present. */
96
+ Result?: ExecuteAgentResult;
97
+ }
98
+ /**
99
+ * Runs an agent turn on the host's server instead of MJ's own path. The chat area calls it once
100
+ * per turn, after `BeforeAgentTurn` and before any reply row exists, and shows the rows it reports.
101
+ */
102
+ export type AgentTurnHandler = (request: AgentTurnRequest) => Promise<AgentTurnResult>;
103
+ //# sourceMappingURL=agent-turn.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"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AM,GAAG,IAAI,CAAC;IACrC,iEAAiE;IACjE,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,oDAAoD;IACpD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,sEAAsE;AACtE,MAAM,WAAW,eAAe;IAC5B,+FAA+F;IAC/F,OAAO,EAAE,OAAO,CAAC;IACjB,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gGAAgG;IAChG,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @fileoverview The host-facing contract for an agent turn in `mj-conversation-chat-area`.
3
+ *
4
+ * An agent turn is what may follow a person's saved message. The chat area picks one agent by a
5
+ * fixed order of routes, announces the turn with `BeforeAgentTurn` (which a host can cancel or
6
+ * redirect), and then runs it: on MJ's own path, or on the host's server through an
7
+ * {@link AgentTurnHandler}. These types are what a host reads and writes along the way.
8
+ *
9
+ * @module @memberjunction/ng-conversations
10
+ */
11
+ export {};
12
+ //# sourceMappingURL=agent-turn.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-turn.model.js","sourceRoot":"","sources":["../../../src/lib/models/agent-turn.model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG","sourcesContent":["/**\n * @fileoverview The host-facing contract for an agent turn in `mj-conversation-chat-area`.\n *\n * An agent turn is what may follow a person's saved message. The chat area picks one agent by a\n * fixed order of routes, announces the turn with `BeforeAgentTurn` (which a host can cancel or\n * redirect), and then runs it: on MJ's own path, or on the host's server through an\n * {@link AgentTurnHandler}. These types are what a host reads and writes along the way.\n *\n * @module @memberjunction/ng-conversations\n */\n\nimport type { ExecuteAgentResult } from '@memberjunction/ai-core-plus';\n\n/**\n * When a message starts an agent turn.\n *\n * - `Always` (the default): every message does, as it always has.\n * - `MentionOnly`: only a message that tags an agent does. Any other message is posted with no\n * turn at all: no reply row, no placeholder and no turn events.\n */\nexport type AgentReplyMode = 'Always' | 'MentionOnly';\n\n/**\n * How the turn's agent was chosen. MJ tries the routes in this order and takes the first that\n * applies; under `MentionOnly`, only `Mention` applies.\n *\n * - `Mention`: the message tags the agent.\n * - `Continuity`: the last agent that answered in the conversation, other than the\n * conversation manager.\n * - `ConversationDefault`: the agent pinned on the conversation (`Conversation.DefaultAgentID`).\n * - `HostDefault`: the host's `DefaultAgentId` input.\n * - `ConversationManager`: MJ's conversation manager agent (Sage unless configured otherwise),\n * which may delegate to another agent.\n * - `Redirect`: a `BeforeAgentTurn` listener sent the turn to a different agent.\n */\nexport type AgentTurnRoute =\n | 'Mention'\n | 'Continuity'\n | 'ConversationDefault'\n | 'HostDefault'\n | 'ConversationManager'\n | 'Redirect';\n\n/** The agent a turn resolved to, and the route that chose it. */\nexport interface AgentTurnTarget {\n /** The agent that takes the turn. */\n AgentId: string;\n /** How the agent was chosen. */\n Route: AgentTurnRoute;\n}\n\n/** What `BeforeAgentTurn` tells its listeners about the turn it announces. */\nexport interface AgentTurnInfo extends AgentTurnTarget {\n /** The agent's name, when MJ knows it. */\n AgentName: string | null;\n /** The person's saved message that the turn answers. */\n UserMessageId: string | null;\n}\n\n/**\n * Everything the chat area knows about a turn it hands to an {@link AgentTurnHandler}.\n * No reply row exists yet when the handler is called.\n */\nexport interface AgentTurnRequest {\n /** The conversation the message was posted in. */\n ConversationId: string;\n /** The person's saved message (`MJ: Conversation Details`, Role `User`). */\n UserMessageId: string;\n /** The message text, with mentions in their stored JSON form. */\n MessageText: string;\n /** The agent the turn resolved to, after any redirect. */\n AgentId: string;\n /** The agent's name, when MJ knows it. */\n AgentName: string | null;\n /** How the agent was chosen. */\n Route: AgentTurnRoute;\n /** The chat area's `ApplicationId` input. */\n ApplicationId: string | null;\n /** The chat area's `AppContext` input. */\n AppContext: Record<string, unknown> | null;\n /** The chat area's `AgentHistoryFrom` input: the first moment of the conversation the turn may read. */\n AgentHistoryFrom: Date | null;\n /**\n * The agent configuration preset (`MJ: AI Agent Configurations.ID`) the person chose: the one\n * on the mention for a `Mention` turn, otherwise the header mode picker's selection.\n */\n ConfigurationPresetId: string | null;\n /** Skills the person asked for with `/skill` in this message. */\n RequestedSkillIDs: string[];\n /** Whether Plan Mode is on for the conversation. */\n PlanMode: boolean;\n}\n\n/** What an {@link AgentTurnHandler} reports back to the chat area. */\nexport interface AgentTurnResult {\n /** False when the turn failed. The chat area shows {@link ErrorMessage} and writes nothing. */\n Success: boolean;\n /** Why the turn failed, shown to the person. */\n ErrorMessage?: string;\n /**\n * The rows the host wrote for the turn, oldest first: the agent's reply and any status rows.\n * The chat area loads and shows them. A row still `In-Progress` is followed like any other\n * in-progress reply.\n */\n ReplyDetailIds?: string[];\n /** The agent run, when the host has one. Carried on `AfterAgentTurn`. */\n AgentRunId?: string;\n /** The agent's result, when the host has one. `AfterAgentTurn` fires only when it's present. */\n Result?: ExecuteAgentResult;\n}\n\n/**\n * Runs an agent turn on the host's server instead of MJ's own path. The chat area calls it once\n * per turn, after `BeforeAgentTurn` and before any reply row exists, and shows the rows it reports.\n */\nexport type AgentTurnHandler = (request: AgentTurnRequest) => Promise<AgentTurnResult>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"collection-view.model.js","sourceRoot":"","sources":["../../../src/lib/models/collection-view.model.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * View modes for collections display\n */\nexport type CollectionViewMode = 'grid' | 'list';\n\n/**\n * Sort options for collections view\n */\nexport type CollectionSortBy = 'name' | 'date' | 'type';\nexport type CollectionSortOrder = 'asc' | 'desc';\n\n/**\n * Unified item type for displaying both collections and artifacts together\n */\nexport interface CollectionViewItem {\n type: 'folder' | 'artifact';\n id: string;\n name: string;\n description?: string;\n icon: string;\n selected?: boolean; // For multi-select\n\n // Folder-specific\n itemCount?: number;\n owner?: string;\n isShared?: boolean;\n\n // Artifact-specific\n versionNumber?: number;\n artifactType?: string;\n lastModified?: Date;\n\n // Original entities for actions\n collection?: any;\n artifact?: any;\n version?: any;\n}\n"]}
1
+ {"version":3,"file":"collection-view.model.js","sourceRoot":"","sources":["../../../src/lib/models/collection-view.model.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * View modes for collections display\n */\nexport type CollectionViewMode = 'grid' | 'list';\n\n/**\n * Sort options for collections view\n */\nexport type CollectionSortBy = 'name' | 'date' | 'type';\nexport type CollectionSortOrder = 'asc' | 'desc';\n\n/**\n * Unified item type for displaying both collections and artifacts together\n */\nexport interface CollectionViewItem {\n type: 'folder' | 'artifact'; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n id: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n name: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n description?: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n icon: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n selected?: boolean; // For multi-select — case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n\n // Folder-specific\n itemCount?: number; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n owner?: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n isShared?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n\n // Artifact-specific\n versionNumber?: number; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n artifactType?: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n lastModified?: Date; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n\n // Original entities for actions\n collection?: any; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n artifact?: any; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n version?: any; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n}\n"]}
@@ -78,6 +78,14 @@ export type ArtifactSortBy = 'name' | 'date' | 'type' | 'modified';
78
78
  * Grouping options for conversations
79
79
  */
80
80
  export type ConversationGroupBy = 'project' | 'date' | 'none';
81
+ /**
82
+ * Field the conversation list is sorted on.
83
+ */
84
+ export type ConversationSortBy = 'date' | 'name';
85
+ /**
86
+ * Direction of the conversation list sort.
87
+ */
88
+ export type ConversationSortDirection = 'asc' | 'desc';
81
89
  /**
82
90
  * Type of entity being mentioned
83
91
  */
@@ -1 +1 @@
1
- {"version":3,"file":"conversation-state.model.d.ts","sourceRoot":"","sources":["../../../src/lib/models/conversation-state.model.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,0BAA0B,EAC3B,MAAM,8BAA8B,CAAC;AAEtC;;;GAGG;AACH,MAAM,WAAW,gCAAgC;IAC/C,sEAAsE;IACtE,QAAQ,CAAC,EAAE,0BAA0B,CAAC;IACtC,kEAAkE;IAClE,QAAQ,CAAC,EAAE;QACT,0BAA0B;QAC1B,QAAQ,EAAE,gBAAgB,CAAC;QAC3B,2CAA2C;QAC3C,OAAO,EAAE,uBAAuB,CAAC;KAClC,CAAC;C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ACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,WAAW,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,YAAY,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7B,YAAY,EAAE,OAAO,EAAE,CAAC;IACxB,cAAc,EAAE,OAAO,EAAE,CAAC;IAC1B,aAAa,EAAE,OAAO,EAAE,CAAC;CAC1B"}
1
+ {"version":3,"file":"conversation-state.model.d.ts","sourceRoot":"","sources":["../../../src/lib/models/conversation-state.model.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,0BAA0B,EAC3B,MAAM,8BAA8B,CAAC;AAEtC;;;GAGG;AACH,MAAM,WAAW,gCAAgC;IAC/C,sEAAsE;IACtE,QAAQ,CAAC,EAAE,0BAA0B,CAAC;IACtC,kEAAkE;IAClE,QAAQ,CAAC,EAAE;QACT,0BAA0B;QAC1B,QAAQ,EAAE,gBAAgB,CAAC;QAC3B,2CAA2C;QAC3C,OAAO,EAAE,uBAAuB,CAAC;KAClC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,0BAA0B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mBAAmB,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,KAAK,GAAG,MAAM,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,WAAW,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,YAAY,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7B,YAAY,EAAE,OAAO,EAAE,CAAC;IACxB,cAAc,EAAE,OAAO,EAAE,CAAC;IAC1B,aAAa,EAAE,OAAO,EAAE,CAAC;CAC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"conversation-state.model.js","sourceRoot":"","sources":["../../../src/lib/models/conversation-state.model.ts"],"names":[],"mappings":"","sourcesContent":["import {\n MJArtifactEntity,\n MJArtifactVersionEntity\n} from '@memberjunction/core-entities';\n\nimport {\n MJAIAgentRunEntityExtended\n} from \"@memberjunction/ai-core-plus\";\n\n/**\n * Peripheral data loaded for a conversation detail message\n * Contains related entities like agent runs and artifacts\n */\nexport interface ConversationDetailPeripheralData {\n /** Agent run information if this message was generated by an agent */\n agentRun?: MJAIAgentRunEntityExtended;\n /** Artifact information if this message has an output artifact */\n artifact?: {\n /** The artifact entity */\n artifact: MJArtifactEntity;\n /** The specific version of the artifact */\n version: MJArtifactVersionEntity;\n };\n}\n\n/**\n * Type-safe maps for peripheral data indexed by ConversationDetailID\n */\nexport interface PeripheralDataMaps {\n /** Map of ConversationDetailID -> AIAgentRun */\n agentRunsByDetailId: Map<string, MJAIAgentRunEntityExtended>;\n /** Map of ConversationDetailID -> {artifact, version} */\n artifactsByDetailId: Map<string, {\n artifact: MJArtifactEntity;\n version: MJArtifactVersionEntity;\n }>;\n}\n\n/**\n * Represents an active agent process\n */\nexport interface AgentProcess {\n id: string;\n agentId: string;\n agentName: string;\n agentColor: string;\n status: 'pending' | 'in_progress' | 'complete' | 'failed';\n message: string;\n progress?: number;\n startedAt: Date;\n}\n\n/**\n * Options for filtering tasks\n */\nexport interface TaskFilters {\n status?: string[];\n projectId?: string;\n assignedToUserId?: string;\n assignedToAgentId?: string;\n environmentId?: string;\n}\n\n/**\n * Options for creating public links\n */\nexport interface PublicLinkOptions {\n password?: string;\n expiresAt?: Date;\n maxViews?: number;\n}\n\n/**\n * Tab types for the main navigation\n */\nexport type NavigationTab = 'conversations' | 'collections' | 'tasks';\n\n/**\n * Layout modes for the workspace\n */\nexport type WorkspaceLayout = 'full' | 'compact' | 'embedded';\n\n/**\n * View modes for collections\n */\nexport type CollectionViewMode = 'grid' | 'list';\n\n/**\n * Sort options for artifacts\n */\nexport type ArtifactSortBy = 'name' | 'date' | 'type' | 'modified';\n\n/**\n * Grouping options for conversations\n */\nexport type ConversationGroupBy = 'project' | 'date' | 'none';\n\n/**\n * Type of entity being mentioned\n */\nexport type MentionType = 'agent' | 'user' | 'entity' | 'query' | 'skill';\n\n/**\n * Represents a mention in a message (@Agent, @User, #Entity, or /Skill)\n */\nexport interface Mention {\n type: MentionType;\n id: string;\n name: string;\n configurationId?: string; // Optional AI configuration preset ID for agents\n}\n\n/**\n * Result of parsing mentions from a message.\n * Structurally mirrors `MentionParseResult` from `@memberjunction/conversations-runtime`\n * (deliberate duplicate — cross-package re-exports are prohibited). Keep in sync.\n */\nexport interface MentionParseResult {\n mentions: Mention[];\n agentMention: Mention | null; // Single agent mention (first one found)\n userMentions: Mention[]; // All user mentions\n entityMentions: Mention[]; // All entity mentions (#Entity)\n skillMentions: Mention[]; // All skill mentions (/Skill)\n}"]}
1
+ {"version":3,"file":"conversation-state.model.js","sourceRoot":"","sources":["../../../src/lib/models/conversation-state.model.ts"],"names":[],"mappings":"","sourcesContent":["import {\n MJArtifactEntity,\n MJArtifactVersionEntity\n} from '@memberjunction/core-entities';\n\nimport {\n MJAIAgentRunEntityExtended\n} from \"@memberjunction/ai-core-plus\";\n\n/**\n * Peripheral data loaded for a conversation detail message\n * Contains related entities like agent runs and artifacts\n */\nexport interface ConversationDetailPeripheralData {\n /** Agent run information if this message was generated by an agent */\n agentRun?: MJAIAgentRunEntityExtended;\n /** Artifact information if this message has an output artifact */\n artifact?: {\n /** The artifact entity */\n artifact: MJArtifactEntity;\n /** The specific version of the artifact */\n version: MJArtifactVersionEntity;\n };\n}\n\n/**\n * Type-safe maps for peripheral data indexed by ConversationDetailID\n */\nexport interface PeripheralDataMaps {\n /** Map of ConversationDetailID -> AIAgentRun */\n agentRunsByDetailId: Map<string, MJAIAgentRunEntityExtended>;\n /** Map of ConversationDetailID -> {artifact, version} */\n artifactsByDetailId: Map<string, {\n artifact: MJArtifactEntity;\n version: MJArtifactVersionEntity;\n }>;\n}\n\n/**\n * Represents an active agent process\n */\nexport interface AgentProcess {\n id: string;\n agentId: string;\n agentName: string;\n agentColor: string;\n status: 'pending' | 'in_progress' | 'complete' | 'failed';\n message: string;\n progress?: number;\n startedAt: Date;\n}\n\n/**\n * Options for filtering tasks\n */\nexport interface TaskFilters {\n status?: string[];\n projectId?: string;\n assignedToUserId?: string;\n assignedToAgentId?: string;\n environmentId?: string;\n}\n\n/**\n * Options for creating public links\n */\nexport interface PublicLinkOptions {\n password?: string;\n expiresAt?: Date;\n maxViews?: number;\n}\n\n/**\n * Tab types for the main navigation\n */\nexport type NavigationTab = 'conversations' | 'collections' | 'tasks';\n\n/**\n * Layout modes for the workspace\n */\nexport type WorkspaceLayout = 'full' | 'compact' | 'embedded';\n\n/**\n * View modes for collections\n */\nexport type CollectionViewMode = 'grid' | 'list';\n\n/**\n * Sort options for artifacts\n */\nexport type ArtifactSortBy = 'name' | 'date' | 'type' | 'modified';\n\n/**\n * Grouping options for conversations\n */\nexport type ConversationGroupBy = 'project' | 'date' | 'none';\n\n/**\n * Field the conversation list is sorted on.\n */\nexport type ConversationSortBy = 'date' | 'name';\n\n/**\n * Direction of the conversation list sort.\n */\nexport type ConversationSortDirection = 'asc' | 'desc';\n\n/**\n * Type of entity being mentioned\n */\nexport type MentionType = 'agent' | 'user' | 'entity' | 'query' | 'skill';\n\n/**\n * Represents a mention in a message (@Agent, @User, #Entity, or /Skill)\n */\nexport interface Mention {\n type: MentionType;\n id: string;\n name: string;\n configurationId?: string; // Optional AI configuration preset ID for agents\n}\n\n/**\n * Result of parsing mentions from a message.\n * Structurally mirrors `MentionParseResult` from `@memberjunction/conversations-runtime`\n * (deliberate duplicate — cross-package re-exports are prohibited). Keep in sync.\n */\nexport interface MentionParseResult {\n mentions: Mention[];\n agentMention: Mention | null; // Single agent mention (first one found)\n userMentions: Mention[]; // All user mentions\n entityMentions: Mention[]; // All entity mentions (#Entity)\n skillMentions: Mention[]; // All skill mentions (/Skill)\n}"]}
@@ -22,18 +22,42 @@ export declare class LazyArtifactInfo {
22
22
  * default, named explicitly rather than reached for via `new Metadata()`.
23
23
  */
24
24
  private provider?;
25
- readonly conversationDetailId: string;
26
- readonly direction: string;
27
- readonly artifactVersionId: string;
28
- readonly versionNumber: number;
29
- readonly versionName: string | null;
30
- readonly versionDescription: string | null;
31
- readonly versionCreatedAt: Date;
32
- readonly artifactId: string;
33
- readonly artifactName: string;
34
- readonly artifactType: string;
35
- readonly artifactDescription: string;
36
- readonly visibility: string;
25
+ readonly ConversationDetailId: string;
26
+ /** @deprecated Use {@link ConversationDetailId}. */
27
+ get conversationDetailId(): string;
28
+ readonly Direction: string;
29
+ /** @deprecated Use {@link Direction}. */
30
+ get direction(): string;
31
+ readonly ArtifactVersionId: string;
32
+ /** @deprecated Use {@link ArtifactVersionId}. */
33
+ get artifactVersionId(): string;
34
+ readonly VersionNumber: number;
35
+ /** @deprecated Use {@link VersionNumber}. */
36
+ get versionNumber(): number;
37
+ readonly VersionName: string | null;
38
+ /** @deprecated Use {@link VersionName}. */
39
+ get versionName(): string | null;
40
+ readonly VersionDescription: string | null;
41
+ /** @deprecated Use {@link VersionDescription}. */
42
+ get versionDescription(): string | null;
43
+ readonly VersionCreatedAt: Date;
44
+ /** @deprecated Use {@link VersionCreatedAt}. */
45
+ get versionCreatedAt(): Date;
46
+ readonly ArtifactId: string;
47
+ /** @deprecated Use {@link ArtifactId}. */
48
+ get artifactId(): string;
49
+ readonly ArtifactName: string;
50
+ /** @deprecated Use {@link ArtifactName}. */
51
+ get artifactName(): string;
52
+ readonly ArtifactType: string;
53
+ /** @deprecated Use {@link ArtifactType}. */
54
+ get artifactType(): string;
55
+ readonly ArtifactDescription: string;
56
+ /** @deprecated Use {@link ArtifactDescription}. */
57
+ get artifactDescription(): string;
58
+ readonly Visibility: string;
59
+ /** @deprecated Use {@link Visibility}. */
60
+ get visibility(): string;
37
61
  private _fallbackArtifact;
38
62
  private _fallbackVersion;
39
63
  private _fallbackLoadPromise;
@@ -48,20 +72,28 @@ export declare class LazyArtifactInfo {
48
72
  * Gets the full Artifact entity.
49
73
  * Checks ArtifactMetadataEngine first (always fresh), falls back to direct load.
50
74
  */
75
+ GetArtifact(): Promise<MJArtifactEntity>;
76
+ /** @deprecated Use {@link GetArtifact}. */
51
77
  getArtifact(): Promise<MJArtifactEntity>;
52
78
  /**
53
79
  * Gets the full ArtifactVersion entity including Content field.
54
80
  * Checks ArtifactMetadataEngine first (always fresh), falls back to direct load.
55
81
  */
82
+ GetVersion(): Promise<MJArtifactVersionEntity>;
83
+ /** @deprecated Use {@link GetVersion}. */
56
84
  getVersion(): Promise<MJArtifactVersionEntity>;
57
85
  /**
58
86
  * Checks if the artifact entities can be accessed without triggering a load.
59
87
  * True if the engine has them or fallbacks are populated.
60
88
  */
89
+ get IsLoaded(): boolean;
90
+ /** @deprecated Use {@link IsLoaded}. */
61
91
  get isLoaded(): boolean;
62
92
  /**
63
93
  * Checks if a fallback load is currently in progress.
64
94
  */
95
+ get IsLoading(): boolean;
96
+ /** @deprecated Use {@link IsLoading}. */
65
97
  get isLoading(): boolean;
66
98
  /**
67
99
  * Loads the artifact directly from the database as a fallback.