@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
@@ -1 +1 @@
1
- {"version":3,"file":"toast.service.js","sourceRoot":"","sources":["../../../src/lib/services/toast.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAc,MAAM,MAAM,CAAC;;AAenD,MAAM,OAAO,YAAY;IACf,aAAa,GAAG,IAAI,eAAe,CAAU,EAAE,CAAC,CAAC;IAClD,OAAO,GAAwB,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC;IAEhE,SAAS,GAAG,CAAC,CAAC;IAEtB;;OAEG;IACI,IAAI,CAAC,OAAe,EAAE,OAAkB,MAAM,EAAE,WAAmB,IAAI;QAC5E,MAAM,KAAK,GAAU;YACnB,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,GAAG,EAAE,EAAE;YAC7C,OAAO;YACP,IAAI;YACJ,QAAQ;YACR,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;SACtB,CAAC;QAEF,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;QAC/C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,GAAG,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;QAEnD,8BAA8B;QAC9B,IAAI,QAAQ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iFAEP,YAAY;cAHxB,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\nexport type ToastType = 'success' | 'error' | 'warning' | 'info';\n\nexport interface Toast {\n id: string;\n message: string;\n type: ToastType;\n duration: number;\n timestamp: number;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ToastService {\n private toastsSubject = new BehaviorSubject<Toast[]>([]);\n public toasts$: Observable<Toast[]> = this.toastsSubject.asObservable();\n\n private idCounter = 0;\n\n /**\n * Show a toast notification\n */\n public show(message: string, type: ToastType = 'info', duration: number = 3000): string {\n const toast: Toast = {\n id: `toast-${++this.idCounter}-${Date.now()}`,\n message,\n type,\n duration,\n timestamp: Date.now()\n };\n\n const currentToasts = this.toastsSubject.value;\n this.toastsSubject.next([...currentToasts, toast]);\n\n // Auto-dismiss after duration\n if (duration > 0) {\n setTimeout(() => {\n this.dismiss(toast.id);\n }, duration);\n }\n\n return toast.id;\n }\n\n /**\n * Show a success toast\n */\n public success(message: string, duration: number = 3000): string {\n return this.show(message, 'success', duration);\n }\n\n /**\n * Show an error toast\n */\n public error(message: string, duration: number = 5000): string {\n return this.show(message, 'error', duration);\n }\n\n /**\n * Show a warning toast\n */\n public warning(message: string, duration: number = 4000): string {\n return this.show(message, 'warning', duration);\n }\n\n /**\n * Show an info toast\n */\n public info(message: string, duration: number = 3000): string {\n return this.show(message, 'info', duration);\n }\n\n /**\n * Dismiss a specific toast by ID\n */\n public dismiss(id: string): void {\n const currentToasts = this.toastsSubject.value;\n const filteredToasts = currentToasts.filter(t => t.id !== id);\n this.toastsSubject.next(filteredToasts);\n }\n\n /**\n * Clear all toasts\n */\n public clear(): void {\n this.toastsSubject.next([]);\n }\n}\n"]}
1
+ {"version":3,"file":"toast.service.js","sourceRoot":"","sources":["../../../src/lib/services/toast.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAA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,KAAK,CAAC;QAC/C,MAAM,cAAc,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QAC9D,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC1C,CAAC;IAED,uCAAuC;IAChC,OAAO,CAAC,EAAU;QACvB,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC;IAED;;OAEG;IACI,KAAK;QACV,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;IAED,qCAAqC;IAC9B,KAAK;QACV,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;sGArHU,YAAY;gEAAZ,YAAY,WAAZ,YAAY,mBAFX,MAAM;;iFAEP,YAAY;cAHxB,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\nexport type ToastType = 'success' | 'error' | 'warning' | 'info';\n\nexport interface Toast {\n id: string;\n message: string;\n type: ToastType;\n duration: number;\n timestamp: number;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ToastService {\n private toastsSubject = new BehaviorSubject<Toast[]>([]);\n public Toasts$: Observable<Toast[]> = this.toastsSubject.asObservable();\n\n /** @deprecated Use {@link Toasts$}. */\n public get toasts$(): Observable<Toast[]> {\n return this.Toasts$;\n }\n /** @deprecated Use {@link Toasts$}. */\n public set toasts$(value: Observable<Toast[]>) {\n this.Toasts$ = value;\n }\n\n private idCounter = 0;\n\n /**\n * Show a toast notification\n */\n public Show(message: string, type: ToastType = 'info', duration: number = 3000): string {\n const toast: Toast = {\n id: `toast-${++this.idCounter}-${Date.now()}`,\n message,\n type,\n duration,\n timestamp: Date.now()\n };\n\n const currentToasts = this.toastsSubject.value;\n this.toastsSubject.next([...currentToasts, toast]);\n\n // Auto-dismiss after duration\n if (duration > 0) {\n setTimeout(() => {\n this.Dismiss(toast.id);\n }, duration);\n }\n\n return toast.id;\n }\n\n /** @deprecated Use {@link Show}. */\n public show(message: string, type: ToastType = 'info', duration: number = 3000): string {\n return this.Show(message, type, duration);\n }\n\n /**\n * Show a success toast\n */\n public Success(message: string, duration: number = 3000): string {\n return this.Show(message, 'success', duration);\n }\n\n /** @deprecated Use {@link Success}. */\n public success(message: string, duration: number = 3000): string {\n return this.Success(message, duration);\n }\n\n /**\n * Show an error toast\n */\n public Error(message: string, duration: number = 5000): string {\n return this.Show(message, 'error', duration);\n }\n\n /** @deprecated Use {@link Error}. */\n public error(message: string, duration: number = 5000): string {\n return this.Error(message, duration);\n }\n\n /**\n * Show a warning toast\n */\n public Warning(message: string, duration: number = 4000): string {\n return this.Show(message, 'warning', duration);\n }\n\n /** @deprecated Use {@link Warning}. */\n public warning(message: string, duration: number = 4000): string {\n return this.Warning(message, duration);\n }\n\n /**\n * Show an info toast\n */\n public Info(message: string, duration: number = 3000): string {\n return this.Show(message, 'info', duration);\n }\n\n /** @deprecated Use {@link Info}. */\n public info(message: string, duration: number = 3000): string {\n return this.Info(message, duration);\n }\n\n /**\n * Dismiss a specific toast by ID\n */\n public Dismiss(id: string): void {\n const currentToasts = this.toastsSubject.value;\n const filteredToasts = currentToasts.filter(t => t.id !== id);\n this.toastsSubject.next(filteredToasts);\n }\n\n /** @deprecated Use {@link Dismiss}. */\n public dismiss(id: string): void {\n return this.Dismiss(id);\n }\n\n /**\n * Clear all toasts\n */\n public Clear(): void {\n this.toastsSubject.next([]);\n }\n\n /** @deprecated Use {@link Clear}. */\n public clear(): void {\n return this.Clear();\n }\n}\n"]}
@@ -19,17 +19,27 @@ export declare class UICommandHandlerService {
19
19
  * Event emitted when an actionable command requires host-app handling.
20
20
  * Currently only open:resource commands are emitted — open:url is handled directly.
21
21
  */
22
- actionableCommandRequested: EventEmitter<ActionableCommandRequest>;
22
+ ActionableCommandRequested: EventEmitter<ActionableCommandRequest>;
23
+ /** @deprecated Use {@link ActionableCommandRequested}. */
24
+ get actionableCommandRequested(): EventEmitter<ActionableCommandRequest>;
25
+ /** @deprecated Use {@link ActionableCommandRequested}. */
26
+ set actionableCommandRequested(value: EventEmitter<ActionableCommandRequest>);
23
27
  /**
24
28
  * Event emitted when an automatic command should be executed
25
29
  * Host application should subscribe to this and handle the command appropriately
26
30
  */
27
- automaticCommandRequested: EventEmitter<AutomaticCommand>;
31
+ AutomaticCommandRequested: EventEmitter<AutomaticCommand>;
32
+ /** @deprecated Use {@link AutomaticCommandRequested}. */
33
+ get automaticCommandRequested(): EventEmitter<AutomaticCommand>;
34
+ /** @deprecated Use {@link AutomaticCommandRequested}. */
35
+ set automaticCommandRequested(value: EventEmitter<AutomaticCommand>);
28
36
  constructor(dataCacheService: DataCacheService);
29
37
  /**
30
38
  * Execute an actionable command (triggered by user clicking a button).
31
39
  * Generic commands like open:url are handled directly; others are emitted to the host.
32
40
  */
41
+ ExecuteActionableCommand(command: ActionableCommand, origin?: Omit<ActionableCommandRequest, 'command'>): Promise<void>;
42
+ /** @deprecated Use {@link ExecuteActionableCommand}. */
33
43
  executeActionableCommand(command: ActionableCommand, origin?: Omit<ActionableCommandRequest, 'command'>): Promise<void>;
34
44
  /**
35
45
  * Handle open:url commands directly by opening the URL in a browser tab.
@@ -45,10 +55,14 @@ export declare class UICommandHandlerService {
45
55
  * Execute an automatic command (runs immediately without user interaction)
46
56
  * Special handling: refresh:data commands execute locally, others emit to host
47
57
  */
58
+ ExecuteAutomaticCommand(command: AutomaticCommand): Promise<void>;
59
+ /** @deprecated Use {@link ExecuteAutomaticCommand}. */
48
60
  executeAutomaticCommand(command: AutomaticCommand): Promise<void>;
49
61
  /**
50
62
  * Execute all automatic commands from an agent result
51
63
  */
64
+ ExecuteAutomaticCommands(commands: AutomaticCommand[]): Promise<void>;
65
+ /** @deprecated Use {@link ExecuteAutomaticCommands}. */
52
66
  executeAutomaticCommands(commands: AutomaticCommand[]): Promise<void>;
53
67
  /**
54
68
  * Handle refreshing data (entity data or caches)
@@ -1 +1 @@
1
- {"version":3,"file":"ui-command-handler.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/ui-command-handler.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAsC,MAAM,8BAA8B,CAAC;AACvH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;;AAExD,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAED;;;;;GAKG;AACH,qBAGa,uBAAuB;IAchC,OAAO,CAAC,gBAAgB;IAb1B;;;OAGG;IACI,0BAA0B,yCAAgD;IAEjF;;;OAGG;IACI,yBAAyB,iCAAwC;gBAG9D,gBAAgB,EAAE,gBAAgB;IAG5C;;;OAGG;IACU,wBAAwB,CAAC,OAAO,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,wBAAwB,EAAE,SAAS,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAcpI;;;OAGG;IACH,OAAO,CAAC,aAAa;IAYrB;;;OAGG;IACH,OAAO,CAAC,WAAW;IAgBnB;;;OAGG;IACU,uBAAuB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAa9E;;OAEG;IACU,wBAAwB,CAAC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAclF;;;OAGG;YACW,iBAAiB;yCA7GpB,uBAAuB;6CAAvB,uBAAuB;CA8HnC"}
1
+ {"version":3,"file":"ui-command-handler.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/ui-command-handler.service.ts"],"names":[],"m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BAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9E;;OAEG;IACU,wBAAwB,CAAC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAclF,wDAAwD;IAC3C,wBAAwB,CAAC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlF;;;OAGG;YACW,iBAAiB;yCA9IpB,uBAAuB;6CAAvB,uBAAuB;CA+JnC"}
@@ -13,12 +13,28 @@ export class UICommandHandlerService {
13
13
  * Event emitted when an actionable command requires host-app handling.
14
14
  * Currently only open:resource commands are emitted — open:url is handled directly.
15
15
  */
16
- actionableCommandRequested = new EventEmitter();
16
+ ActionableCommandRequested = new EventEmitter();
17
+ /** @deprecated Use {@link ActionableCommandRequested}. */
18
+ get actionableCommandRequested() {
19
+ return this.ActionableCommandRequested;
20
+ }
21
+ /** @deprecated Use {@link ActionableCommandRequested}. */
22
+ set actionableCommandRequested(value) {
23
+ this.ActionableCommandRequested = value;
24
+ }
17
25
  /**
18
26
  * Event emitted when an automatic command should be executed
19
27
  * Host application should subscribe to this and handle the command appropriately
20
28
  */
21
- automaticCommandRequested = new EventEmitter();
29
+ AutomaticCommandRequested = new EventEmitter();
30
+ /** @deprecated Use {@link AutomaticCommandRequested}. */
31
+ get automaticCommandRequested() {
32
+ return this.AutomaticCommandRequested;
33
+ }
34
+ /** @deprecated Use {@link AutomaticCommandRequested}. */
35
+ set automaticCommandRequested(value) {
36
+ this.AutomaticCommandRequested = value;
37
+ }
22
38
  constructor(dataCacheService) {
23
39
  this.dataCacheService = dataCacheService;
24
40
  }
@@ -26,20 +42,24 @@ export class UICommandHandlerService {
26
42
  * Execute an actionable command (triggered by user clicking a button).
27
43
  * Generic commands like open:url are handled directly; others are emitted to the host.
28
44
  */
29
- async executeActionableCommand(command, origin) {
45
+ async ExecuteActionableCommand(command, origin) {
30
46
  if (command.type === 'open:url') {
31
47
  this.handleOpenUrl(command);
32
48
  }
33
49
  else {
34
50
  // open:resource requires app-specific navigation — emit for host to handle
35
51
  console.log('📤 Emitting actionable command for host app:', command);
36
- this.actionableCommandRequested.emit({
52
+ this.ActionableCommandRequested.emit({
37
53
  command,
38
54
  conversationId: origin?.conversationId ?? null,
39
55
  conversationDetailId: origin?.conversationDetailId ?? null
40
56
  });
41
57
  }
42
58
  }
59
+ /** @deprecated Use {@link ExecuteActionableCommand}. */
60
+ async executeActionableCommand(command, origin) {
61
+ return this.ExecuteActionableCommand(command, origin);
62
+ }
43
63
  /**
44
64
  * Handle open:url commands directly by opening the URL in a browser tab.
45
65
  * Data URIs are converted to Blob URLs because Chrome blocks window.open with data: URIs.
@@ -76,7 +96,7 @@ export class UICommandHandlerService {
76
96
  * Execute an automatic command (runs immediately without user interaction)
77
97
  * Special handling: refresh:data commands execute locally, others emit to host
78
98
  */
79
- async executeAutomaticCommand(command) {
99
+ async ExecuteAutomaticCommand(command) {
80
100
  console.log('Executing automatic command:', command);
81
101
  if (command.type === 'refresh:data') {
82
102
  // Handle data refresh locally as it's a generic operation
@@ -85,25 +105,33 @@ export class UICommandHandlerService {
85
105
  else {
86
106
  // Emit other automatic commands (like notifications) for host to handle
87
107
  console.log('📤 Emitting automatic command for host app:', command);
88
- this.automaticCommandRequested.emit(command);
108
+ this.AutomaticCommandRequested.emit(command);
89
109
  }
90
110
  }
111
+ /** @deprecated Use {@link ExecuteAutomaticCommand}. */
112
+ async executeAutomaticCommand(command) {
113
+ return this.ExecuteAutomaticCommand(command);
114
+ }
91
115
  /**
92
116
  * Execute all automatic commands from an agent result
93
117
  */
94
- async executeAutomaticCommands(commands) {
118
+ async ExecuteAutomaticCommands(commands) {
95
119
  if (!commands || commands.length === 0) {
96
120
  return;
97
121
  }
98
122
  for (const command of commands) {
99
123
  try {
100
- await this.executeAutomaticCommand(command);
124
+ await this.ExecuteAutomaticCommand(command);
101
125
  }
102
126
  catch (error) {
103
127
  console.error('Error executing automatic command:', command, error);
104
128
  }
105
129
  }
106
130
  }
131
+ /** @deprecated Use {@link ExecuteAutomaticCommands}. */
132
+ async executeAutomaticCommands(commands) {
133
+ return this.ExecuteAutomaticCommands(commands);
134
+ }
107
135
  /**
108
136
  * Handle refreshing data (entity data or caches)
109
137
  * This is handled locally as it's a generic operation that doesn't require host app knowledge
@@ -1 +1 @@
1
- {"version":3,"file":"ui-command-handler.service.js","sourceRoot":"","sources":["../../../src/lib/services/ui-command-handler.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;;;AAUzD;;;;;GAKG;AAIH,MAAM,OAAO,uBAAuB;IAcxB;IAbV;;;OAGG;IACI,0BAA0B,GAAG,IAAI,YAAY,EAA4B,CAAC;IAEjF;;;OAGG;IACI,yBAAyB,GAAG,IAAI,YAAY,EAAoB,CAAC;IAExE,YACU,gBAAkC;QAAlC,qBAAgB,GAAhB,gBAAgB,CAAkB;IACzC,CAAC;IAEJ;;;OAGG;IACI,KAAK,CAAC,wBAAwB,CAAC,OAA0B,EAAE,MAAkD;QAClH,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YAChC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,2EAA2E;YAC3E,OAAO,CAAC,GAAG,CAAC,8CAA8C,EAAE,OAAO,CAAC,CAAC;YACrE,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC;gBACnC,OAAO;gBACP,cAAc,EAAE,MAAM,EAAE,cAAc,IAAI,IAAI;gBAC9C,oBAAoB,EAAE,MAAM,EAAE,oBAAoB,IAAI,IAAI;aAC3D,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED;;;OAGG;IACK,aAAa,CAAC,OAAuB;QAC3C,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;QACxB,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,KAAK,KAAK,CAAC;QAExC,IAAI,GAAG,CAA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AAC,wBAAwB,EAAE,WAAW,CAAC,CAAC;QACrD,CAAC;aAAM,IAAI,KAAK,KAAK,OAAO,IAAI,SAAS,EAAE,CAAC;YAC1C,2BAA2B;YAC3B,MAAM,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;YACpD,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;QAC7C,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,OAAO,CAAC,CAAC;QACpE,CAAC;IACH,CAAC;iHA7HU,uBAAuB;gEAAvB,uBAAuB,WAAvB,uBAAuB,mBAFtB,MAAM;;iFAEP,uBAAuB;cAHnC,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable, EventEmitter } from '@angular/core';\nimport { ActionableCommand, AutomaticCommand, RefreshDataCommand, OpenURLCommand } from '@memberjunction/ai-core-plus';\nimport { DataCacheService } from './data-cache.service';\n\nexport interface ActionableCommandRequest {\n command: ActionableCommand;\n conversationId?: string | null;\n conversationDetailId?: string | null;\n}\n\n/**\n * Service for handling UI commands from agents.\n *\n * Generic commands (open:url) are handled directly by this service.\n * App-specific commands (open:resource) are emitted for the host application to handle.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class UICommandHandlerService {\n /**\n * Event emitted when an actionable command requires host-app handling.\n * Currently only open:resource commands are emitted — open:url is handled directly.\n */\n public actionableCommandRequested = new EventEmitter<ActionableCommandRequest>();\n\n /**\n * Event emitted when an automatic command should be executed\n * Host application should subscribe to this and handle the command appropriately\n */\n public automaticCommandRequested = new EventEmitter<AutomaticCommand>();\n\n constructor(\n private dataCacheService: DataCacheService\n ) {}\n\n /**\n * Execute an actionable command (triggered by user clicking a button).\n * Generic commands like open:url are handled directly; others are emitted to the host.\n */\n public async executeActionableCommand(command: ActionableCommand, origin?: Omit<ActionableCommandRequest, 'command'>): Promise<void> {\n if (command.type === 'open:url') {\n this.handleOpenUrl(command);\n } else {\n // open:resource requires app-specific navigation — emit for host to handle\n console.log('📤 Emitting actionable command for host app:', command);\n this.actionableCommandRequested.emit({\n command,\n conversationId: origin?.conversationId ?? null,\n conversationDetailId: origin?.conversationDetailId ?? null\n });\n }\n }\n\n /**\n * Handle open:url commands directly by opening the URL in a browser tab.\n * Data URIs are converted to Blob URLs because Chrome blocks window.open with data: URIs.\n */\n private handleOpenUrl(command: OpenURLCommand): void {\n const url = command.url;\n const newTab = command.newTab !== false;\n\n if (url.startsWith('data:')) {\n this.openDataUri(url);\n } else {\n const target = newTab ? '_blank' : '_self';\n window.open(url, target, target === '_blank' ? 'noopener,noreferrer' : undefined);\n }\n }\n\n /**\n * Open a data URI by converting it to a Blob URL.\n * Chrome blocks window.open('data:...') for security, so we create a Blob URL instead.\n */\n private openDataUri(dataUri: string): void {\n const [header, base64Data] = dataUri.split(',');\n const mimeMatch = header.match(/data:([^;]+)/);\n const mimeType = mimeMatch ? mimeMatch[1] : 'application/octet-stream';\n\n const byteString = atob(base64Data);\n const byteArray = new Uint8Array(byteString.length);\n for (let i = 0; i < byteString.length; i++) {\n byteArray[i] = byteString.charCodeAt(i);\n }\n\n const blob = new Blob([byteArray], { type: mimeType });\n const blobUrl = URL.createObjectURL(blob);\n window.open(blobUrl, '_blank');\n }\n\n /**\n * Execute an automatic command (runs immediately without user interaction)\n * Special handling: refresh:data commands execute locally, others emit to host\n */\n public async executeAutomaticCommand(command: AutomaticCommand): Promise<void> {\n console.log('Executing automatic command:', command);\n\n if (command.type === 'refresh:data') {\n // Handle data refresh locally as it's a generic operation\n await this.handleRefreshData(command);\n } else {\n // Emit other automatic commands (like notifications) for host to handle\n console.log('📤 Emitting automatic command for host app:', command);\n this.automaticCommandRequested.emit(command);\n }\n }\n\n /**\n * Execute all automatic commands from an agent result\n */\n public async executeAutomaticCommands(commands: AutomaticCommand[]): Promise<void> {\n if (!commands || commands.length === 0) {\n return;\n }\n\n for (const command of commands) {\n try {\n await this.executeAutomaticCommand(command);\n } catch (error) {\n console.error('Error executing automatic command:', command, error);\n }\n }\n }\n\n /**\n * Handle refreshing data (entity data or caches)\n * This is handled locally as it's a generic operation that doesn't require host app knowledge\n */\n private async handleRefreshData(command: RefreshDataCommand): Promise<void> {\n const { scope, entityNames, cacheName } = command;\n\n if (scope === 'entity' && entityNames && entityNames.length > 0) {\n // Refresh specific entity data\n for (const entityName of entityNames) {\n await this.dataCacheService.refreshEntity(entityName);\n }\n console.log('Refreshed entity data:', entityNames);\n } else if (scope === 'cache' && cacheName) {\n // Refresh a specific cache\n await this.dataCacheService.refreshCache(cacheName);\n console.log('Refreshed cache:', cacheName);\n } else {\n console.warn('Invalid refresh:data command parameters:', command);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"ui-command-handler.service.js","sourceRoot":"","sources":["../../../src/lib/services/ui-command-handler.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;;;AAUzD;;;;;GAKG;AAIH,MAAM,OAAO,uBAAuB;IAgCxB;IA/BV;;;OAGG;IACI,0BAA0B,GAAG,IAAI,YAAY,EAA4B,CAAC;IAEjF,0DAA0D;IAC1D,IAAW,0BAA0B;QACnC,OAAO,IAAI,CAAC,0BAA0B,CAAC;IACzC,CAAC;IACD,0DAA0D;IAC1D,IAAW,0BAA0B,CAAC,KAAK;QACzC,IAAI,CAAC,0BAA0B,GAAG,KAAK,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACI,yBAAyB,GAAG,IAAI,YAAY,EAAoB,CAAC;IAExE,yDAAyD;IACzD,IAAW,yBAAyB;QAClC,OAAO,IAAI,CAAC,yBAAyB,CAAC;IACxC,CAAC;IACD,yDAAyD;IACzD,IAAW,yBAAyB,CAAC,KAAK;QACxC,IAAI,CAAC,yBAAyB,GAAG,KAAK,CAAC;IACzC,CAAC;IAED,YACU,gBAAkC;QAAlC,qBAAgB,GAAhB,gBAAgB,CAAkB;IACzC,CAAC;IA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O,CAAC,GAAG,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;QAC7C,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,OAAO,CAAC,CAAC;QACpE,CAAC;IACH,CAAC;iHA9JU,uBAAuB;gEAAvB,uBAAuB,WAAvB,uBAAuB,mBAFtB,MAAM;;iFAEP,uBAAuB;cAHnC,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable, EventEmitter } from '@angular/core';\nimport { ActionableCommand, AutomaticCommand, RefreshDataCommand, OpenURLCommand } from '@memberjunction/ai-core-plus';\nimport { DataCacheService } from './data-cache.service';\n\nexport interface ActionableCommandRequest {\n command: ActionableCommand;\n conversationId?: string | null;\n conversationDetailId?: string | null;\n}\n\n/**\n * Service for handling UI commands from agents.\n *\n * Generic commands (open:url) are handled directly by this service.\n * App-specific commands (open:resource) are emitted for the host application to handle.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class UICommandHandlerService {\n /**\n * Event emitted when an actionable command requires host-app handling.\n * Currently only open:resource commands are emitted — open:url is handled directly.\n */\n public ActionableCommandRequested = new EventEmitter<ActionableCommandRequest>();\n\n /** @deprecated Use {@link ActionableCommandRequested}. */\n public get actionableCommandRequested() {\n return this.ActionableCommandRequested;\n }\n /** @deprecated Use {@link ActionableCommandRequested}. */\n public set actionableCommandRequested(value) {\n this.ActionableCommandRequested = value;\n }\n\n /**\n * Event emitted when an automatic command should be executed\n * Host application should subscribe to this and handle the command appropriately\n */\n public AutomaticCommandRequested = new EventEmitter<AutomaticCommand>();\n\n /** @deprecated Use {@link AutomaticCommandRequested}. */\n public get automaticCommandRequested() {\n return this.AutomaticCommandRequested;\n }\n /** @deprecated Use {@link AutomaticCommandRequested}. */\n public set automaticCommandRequested(value) {\n this.AutomaticCommandRequested = value;\n }\n\n constructor(\n private dataCacheService: DataCacheService\n ) {}\n\n /**\n * Execute an actionable command (triggered by user clicking a button).\n * Generic commands like open:url are handled directly; others are emitted to the host.\n */\n public async ExecuteActionableCommand(command: ActionableCommand, origin?: Omit<ActionableCommandRequest, 'command'>): Promise<void> {\n if (command.type === 'open:url') {\n this.handleOpenUrl(command);\n } else {\n // open:resource requires app-specific navigation — emit for host to handle\n console.log('📤 Emitting actionable command for host app:', command);\n this.ActionableCommandRequested.emit({\n command,\n conversationId: origin?.conversationId ?? null,\n conversationDetailId: origin?.conversationDetailId ?? null\n });\n }\n }\n\n /** @deprecated Use {@link ExecuteActionableCommand}. */\n public async executeActionableCommand(command: ActionableCommand, origin?: Omit<ActionableCommandRequest, 'command'>): Promise<void> {\n return this.ExecuteActionableCommand(command, origin);\n }\n\n /**\n * Handle open:url commands directly by opening the URL in a browser tab.\n * Data URIs are converted to Blob URLs because Chrome blocks window.open with data: URIs.\n */\n private handleOpenUrl(command: OpenURLCommand): void {\n const url = command.url;\n const newTab = command.newTab !== false;\n\n if (url.startsWith('data:')) {\n this.openDataUri(url);\n } else {\n const target = newTab ? '_blank' : '_self';\n window.open(url, target, target === '_blank' ? 'noopener,noreferrer' : undefined);\n }\n }\n\n /**\n * Open a data URI by converting it to a Blob URL.\n * Chrome blocks window.open('data:...') for security, so we create a Blob URL instead.\n */\n private openDataUri(dataUri: string): void {\n const [header, base64Data] = dataUri.split(',');\n const mimeMatch = header.match(/data:([^;]+)/);\n const mimeType = mimeMatch ? mimeMatch[1] : 'application/octet-stream';\n\n const byteString = atob(base64Data);\n const byteArray = new Uint8Array(byteString.length);\n for (let i = 0; i < byteString.length; i++) {\n byteArray[i] = byteString.charCodeAt(i);\n }\n\n const blob = new Blob([byteArray], { type: mimeType });\n const blobUrl = URL.createObjectURL(blob);\n window.open(blobUrl, '_blank');\n }\n\n /**\n * Execute an automatic command (runs immediately without user interaction)\n * Special handling: refresh:data commands execute locally, others emit to host\n */\n public async ExecuteAutomaticCommand(command: AutomaticCommand): Promise<void> {\n console.log('Executing automatic command:', command);\n\n if (command.type === 'refresh:data') {\n // Handle data refresh locally as it's a generic operation\n await this.handleRefreshData(command);\n } else {\n // Emit other automatic commands (like notifications) for host to handle\n console.log('📤 Emitting automatic command for host app:', command);\n this.AutomaticCommandRequested.emit(command);\n }\n }\n\n /** @deprecated Use {@link ExecuteAutomaticCommand}. */\n public async executeAutomaticCommand(command: AutomaticCommand): Promise<void> {\n return this.ExecuteAutomaticCommand(command);\n }\n\n /**\n * Execute all automatic commands from an agent result\n */\n public async ExecuteAutomaticCommands(commands: AutomaticCommand[]): Promise<void> {\n if (!commands || commands.length === 0) {\n return;\n }\n\n for (const command of commands) {\n try {\n await this.ExecuteAutomaticCommand(command);\n } catch (error) {\n console.error('Error executing automatic command:', command, error);\n }\n }\n }\n\n /** @deprecated Use {@link ExecuteAutomaticCommands}. */\n public async executeAutomaticCommands(commands: AutomaticCommand[]): Promise<void> {\n return this.ExecuteAutomaticCommands(commands);\n }\n\n /**\n * Handle refreshing data (entity data or caches)\n * This is handled locally as it's a generic operation that doesn't require host app knowledge\n */\n private async handleRefreshData(command: RefreshDataCommand): Promise<void> {\n const { scope, entityNames, cacheName } = command;\n\n if (scope === 'entity' && entityNames && entityNames.length > 0) {\n // Refresh specific entity data\n for (const entityName of entityNames) {\n await this.dataCacheService.refreshEntity(entityName);\n }\n console.log('Refreshed entity data:', entityNames);\n } else if (scope === 'cache' && cacheName) {\n // Refresh a specific cache\n await this.dataCacheService.refreshCache(cacheName);\n console.log('Refreshed cache:', cacheName);\n } else {\n console.warn('Invalid refresh:data command parameters:', command);\n }\n }\n}\n"]}
@@ -30,9 +30,9 @@ export interface AgentArtifactRow {
30
30
  export interface AgentArtifactSummary {
31
31
  artifactId: string;
32
32
  artifactName: string;
33
- artifactType: string;
33
+ ArtifactType: string;
34
34
  /** Newest first, so `versions[0]` is the latest. */
35
- versions: Array<{
35
+ Versions: Array<{
36
36
  versionId: string;
37
37
  versionNumber: number;
38
38
  versionName: string | null;
@@ -33,12 +33,12 @@ export function GroupVersionsByArtifact(versions, artifactsById) {
33
33
  summary = {
34
34
  artifactId: version.ArtifactID,
35
35
  artifactName: artifact.Name,
36
- artifactType: artifact.Type,
37
- versions: []
36
+ ArtifactType: artifact.Type,
37
+ Versions: []
38
38
  };
39
39
  byArtifact.set(version.ArtifactID, summary);
40
40
  }
41
- summary.versions.push({
41
+ summary.Versions.push({
42
42
  versionId: version.ID,
43
43
  versionNumber: version.VersionNumber,
44
44
  versionName: version.Name
@@ -1 +1 @@
1
- {"version":3,"file":"agent-artifact-summary.js","sourceRoot":"","sources":["../../../src/lib/utils/agent-artifact-summary.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAiCH;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,uBAAuB,CACnC,QAA4C,EAC5C,aAAoD;IAEpD,MAAM,UAAU,GAAG,IAAI,GAAG,EAAgC,CAAC;IAE3D,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC7B,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACvD,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,6EAA6E;YAC7E,8EAA8E;YAC9E,wEAAwE;YACxE,SAAS;QACb,CAAC;QACD,IAAI,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACjD,IAAI,CAAC,OAAO,EAAE,CAAC;YACX,OAAO,GAAG;gBACN,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,YAAY,EAAE,QAAQ,CAAC,IAAI;gBAC3B,YAAY,EAAE,QAAQ,CAAC,IAAI;gBAC3B,QAAQ,EAAE,EAAE;aACf,CAAC;YACF,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;YAClB,SAAS,EAAE,OAAO,CAAC,EAAE;YACrB,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,WAAW,EAAE,OAAO,CAAC,IAAI;SAC5B,CAAC,CAAC;IACP,CAAC;IACD,OAAO,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;AACpC,CAAC","sourcesContent":["/**\n * Grouping for the \"Prior Artifacts Created by This Agent\" block fed to the Check Sage Intent\n * prompt.\n *\n * PURE (no Angular, no entities, no provider) so the ordering contract below is unit-testable\n * without the service's DI — same reason `conversation-detail-window.ts` and `date-jump.ts`\n * live out here rather than on their consumers.\n */\n\n/** The version fields the grouping needs. Structural, so the RunView row type satisfies it. */\nexport interface AgentArtifactVersionRow {\n ID: string;\n ArtifactID: string;\n VersionNumber: number;\n Name: string | null;\n}\n\n/** The artifact fields the prompt prints. */\nexport interface AgentArtifactRow {\n ID: string;\n Name: string;\n Type: string;\n}\n\n/**\n * One artifact an agent produced in this conversation, with its versions newest-first.\n *\n * Deliberately narrower than the array-scan shape it replaces, which also carried `runId`,\n * `artifactDescription`, `versionDescription` and `createdAt` — none of which the intent\n * prompt ever read. Dropping them is what lets the caller resolve this without joining back\n * to agent runs, turning a four-table reconstruction into two reads.\n */\nexport interface AgentArtifactSummary {\n artifactId: string;\n artifactName: string;\n artifactType: string;\n /** Newest first, so `versions[0]` is the latest. */\n versions: Array<{ versionId: string; versionNumber: number; versionName: string | null }>;\n}\n\n/**\n * Folds versions into per-artifact summaries.\n *\n * NO SORT, and that is deliberate rather than an omission. The caller reads versions\n * `__mj_CreatedAt DESC`, so inserting in arrival order leaves each artifact's versions\n * newest-first AND leaves the Map ordered by whichever artifact was touched most recently —\n * which is exactly what the explicit sort in the array-scan version used to compute. The\n * assumption is load-bearing and invisible, so it is pinned by tests.\n *\n * @param versions - Artifact versions, newest first\n * @param artifactsById - The artifact rows behind those versions\n */\nexport function GroupVersionsByArtifact(\n versions: readonly AgentArtifactVersionRow[],\n artifactsById: ReadonlyMap<string, AgentArtifactRow>\n): AgentArtifactSummary[] {\n const byArtifact = new Map<string, AgentArtifactSummary>();\n\n for (const version of versions) {\n const artifact = artifactsById.get(version.ArtifactID);\n if (!artifact) {\n // Mirrors the stored query's INNER JOIN semantics. A version can outlive the\n // artifact row the caller can read; emitting a summary with an undefined name\n // would put the string \"undefined\" straight into the classifier prompt.\n continue;\n }\n let summary = byArtifact.get(version.ArtifactID);\n if (!summary) {\n summary = {\n artifactId: version.ArtifactID,\n artifactName: artifact.Name,\n artifactType: artifact.Type,\n versions: []\n };\n byArtifact.set(version.ArtifactID, summary);\n }\n summary.versions.push({\n versionId: version.ID,\n versionNumber: version.VersionNumber,\n versionName: version.Name\n });\n }\n return [...byArtifact.values()];\n}\n"]}
1
+ {"version":3,"file":"agent-artifact-summary.js","sourceRoot":"","sources":["../../../src/lib/utils/agent-artifact-summary.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAiCH;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,uBAAuB,CACnC,QAA4C,EAC5C,aAAoD;IAEpD,MAAM,UAAU,GAAG,IAAI,GAAG,EAAgC,CAAC;IAE3D,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC7B,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACvD,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,6EAA6E;YAC7E,8EAA8E;YAC9E,wEAAwE;YACxE,SAAS;QACb,CAAC;QACD,IAAI,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACjD,IAAI,CAAC,OAAO,EAAE,CAAC;YACX,OAAO,GAAG;gBACN,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,YAAY,EAAE,QAAQ,CAAC,IAAI;gBAC3B,YAAY,EAAE,QAAQ,CAAC,IAAI;gBAC3B,QAAQ,EAAE,EAAE;aACf,CAAC;YACF,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;YAClB,SAAS,EAAE,OAAO,CAAC,EAAE;YACrB,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,WAAW,EAAE,OAAO,CAAC,IAAI;SAC5B,CAAC,CAAC;IACP,CAAC;IACD,OAAO,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;AACpC,CAAC","sourcesContent":["/**\n * Grouping for the \"Prior Artifacts Created by This Agent\" block fed to the Check Sage Intent\n * prompt.\n *\n * PURE (no Angular, no entities, no provider) so the ordering contract below is unit-testable\n * without the service's DI — same reason `conversation-detail-window.ts` and `date-jump.ts`\n * live out here rather than on their consumers.\n */\n\n/** The version fields the grouping needs. Structural, so the RunView row type satisfies it. */\nexport interface AgentArtifactVersionRow {\n ID: string;\n ArtifactID: string;\n VersionNumber: number;\n Name: string | null;\n}\n\n/** The artifact fields the prompt prints. */\nexport interface AgentArtifactRow {\n ID: string;\n Name: string;\n Type: string;\n}\n\n/**\n * One artifact an agent produced in this conversation, with its versions newest-first.\n *\n * Deliberately narrower than the array-scan shape it replaces, which also carried `runId`,\n * `artifactDescription`, `versionDescription` and `createdAt` — none of which the intent\n * prompt ever read. Dropping them is what lets the caller resolve this without joining back\n * to agent runs, turning a four-table reconstruction into two reads.\n */\nexport interface AgentArtifactSummary {\n artifactId: string; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n artifactName: string; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n ArtifactType: string;\n /** Newest first, so `versions[0]` is the latest. */\n Versions: Array<{ versionId: string; versionNumber: number; versionName: string | null }>;\n}\n\n/**\n * Folds versions into per-artifact summaries.\n *\n * NO SORT, and that is deliberate rather than an omission. The caller reads versions\n * `__mj_CreatedAt DESC`, so inserting in arrival order leaves each artifact's versions\n * newest-first AND leaves the Map ordered by whichever artifact was touched most recently —\n * which is exactly what the explicit sort in the array-scan version used to compute. The\n * assumption is load-bearing and invisible, so it is pinned by tests.\n *\n * @param versions - Artifact versions, newest first\n * @param artifactsById - The artifact rows behind those versions\n */\nexport function GroupVersionsByArtifact(\n versions: readonly AgentArtifactVersionRow[],\n artifactsById: ReadonlyMap<string, AgentArtifactRow>\n): AgentArtifactSummary[] {\n const byArtifact = new Map<string, AgentArtifactSummary>();\n\n for (const version of versions) {\n const artifact = artifactsById.get(version.ArtifactID);\n if (!artifact) {\n // Mirrors the stored query's INNER JOIN semantics. A version can outlive the\n // artifact row the caller can read; emitting a summary with an undefined name\n // would put the string \"undefined\" straight into the classifier prompt.\n continue;\n }\n let summary = byArtifact.get(version.ArtifactID);\n if (!summary) {\n summary = {\n artifactId: version.ArtifactID,\n artifactName: artifact.Name,\n ArtifactType: artifact.Type,\n Versions: []\n };\n byArtifact.set(version.ArtifactID, summary);\n }\n summary.Versions.push({\n versionId: version.ID,\n versionNumber: version.VersionNumber,\n versionName: version.Name\n });\n }\n return [...byArtifact.values()];\n}\n"]}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * @fileoverview Pure routing rules for an agent turn: which agent answers a message, and whether
3
+ * any does. Kept free of Angular and of I/O so the whole matrix (reply mode × mention × allowed
4
+ * list × route) is testable directly; `MessageInputComponent` supplies the candidates.
5
+ *
6
+ * @module @memberjunction/ng-conversations
7
+ */
8
+ import type { AgentReplyMode, AgentTurnTarget } from '../models/agent-turn.model';
9
+ /** The agent each route would use for one message, before the host's rules are applied. */
10
+ export interface AgentTurnCandidates {
11
+ /** Agents the message tags, in the order they appear. */
12
+ MentionedAgentIds: readonly string[];
13
+ /** The last agent that answered in the conversation, other than the conversation manager. */
14
+ ContinuityAgentId: string | null;
15
+ /** The agent pinned on the conversation. */
16
+ ConversationDefaultAgentId: string | null;
17
+ /** The host's `DefaultAgentId` input. */
18
+ HostDefaultAgentId: string | null;
19
+ /** MJ's conversation manager agent. */
20
+ ConversationManagerAgentId: string | null;
21
+ }
22
+ /** The host's rules for the chat. */
23
+ export interface AgentTurnRules {
24
+ /** When a message starts a turn. */
25
+ ReplyMode: AgentReplyMode;
26
+ /** The agents that may answer. Null allows every agent. */
27
+ AllowedAgentIDs: readonly string[] | null;
28
+ }
29
+ /**
30
+ * True when the agent may take a turn. A null or undefined list allows every agent; an empty
31
+ * list allows none.
32
+ */
33
+ export declare function IsAgentAllowed(agentId: string | null | undefined, allowedAgentIDs: readonly string[] | null | undefined): boolean;
34
+ /**
35
+ * Picks the agent and route for one message, or null when no turn starts.
36
+ *
37
+ * The order is MJ's: the first tagged agent the host allows, then (under `Always` only) the last
38
+ * agent that answered, the conversation's pinned agent, the host's default agent, and the
39
+ * conversation manager. A candidate the host doesn't allow is skipped.
40
+ *
41
+ * A continuity or default candidate that `isKnownAgent` doesn't recognise falls back to the
42
+ * conversation manager, as MJ always has, rather than to the next route. A tagged agent is taken
43
+ * as tagged.
44
+ *
45
+ * @param candidates The agent each route would use.
46
+ * @param rules The host's reply mode and allowed list.
47
+ * @param isKnownAgent True when the agent exists in the client's agent catalog.
48
+ */
49
+ export declare function ResolveAgentTurn(candidates: AgentTurnCandidates, rules: AgentTurnRules, isKnownAgent: (agentId: string) => boolean): AgentTurnTarget | null;
50
+ /** A task-graph step that runs an agent, as the conversation manager emits it. */
51
+ interface AgentTaskStep {
52
+ kind: string;
53
+ configuration?: {
54
+ agentName?: string;
55
+ } | object;
56
+ }
57
+ /**
58
+ * The agent names in a task graph that the host doesn't allow. The conversation manager can
59
+ * answer with a multi-step workflow instead of a single delegation; each `Agent` step names the
60
+ * agent that runs it, so the allowed list has to hold there too.
61
+ *
62
+ * @param steps The graph's tasks.
63
+ * @param allowedAgentIDs The host's allowed list. Null allows every agent.
64
+ * @param resolveAgentId Maps an agent name to its ID, or null when no such agent exists.
65
+ * @returns The disallowed names, each once, in the order they appear. Empty when all are allowed.
66
+ */
67
+ export declare function FindDisallowedTaskGraphAgents(steps: ReadonlyArray<AgentTaskStep>, allowedAgentIDs: readonly string[] | null, resolveAgentId: (agentName: string) => string | null): string[];
68
+ export {};
69
+ //# sourceMappingURL=agent-turn-routing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-turn-routing.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/agent-turn-routing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAkB,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElG,2FAA2F;AAC3F,MAAM,WAAW,mBAAmB;IAChC,yDAAyD;IACzD,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,6FAA6F;IAC7F,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,4CAA4C;IAC5C,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,yCAAyC;IACzC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,uCAAuC;IACvC,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7C;AAED,qCAAqC;AACrC,MAAM,WAAW,cAAc;IAC3B,oCAAoC;IACpC,SAAS,EAAE,cAAc,CAAC;IAC1B,2DAA2D;IAC3D,eAAe,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;CAC7C;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC1B,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAClC,eAAe,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,GACtD,OAAO,CAQT;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC5B,UAAU,EAAE,mBAAmB,EAC/B,KAAK,EAAE,cAAc,EACrB,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,GAC3C,eAAe,GAAG,IAAI,CAsBxB;AAUD,kFAAkF;AAClF,UAAU,aAAa;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC;CACnD;AAED;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CACzC,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC,EACnC,eAAe,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,EACzC,cAAc,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GACrD,MAAM,EAAE,CAYV"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * @fileoverview Pure routing rules for an agent turn: which agent answers a message, and whether
3
+ * any does. Kept free of Angular and of I/O so the whole matrix (reply mode × mention × allowed
4
+ * list × route) is testable directly; `MessageInputComponent` supplies the candidates.
5
+ *
6
+ * @module @memberjunction/ng-conversations
7
+ */
8
+ import { UUIDsEqual } from '@memberjunction/global';
9
+ /**
10
+ * True when the agent may take a turn. A null or undefined list allows every agent; an empty
11
+ * list allows none.
12
+ */
13
+ export function IsAgentAllowed(agentId, allowedAgentIDs) {
14
+ if (!agentId) {
15
+ return false;
16
+ }
17
+ if (allowedAgentIDs == null) {
18
+ return true;
19
+ }
20
+ return allowedAgentIDs.some(id => UUIDsEqual(id, agentId));
21
+ }
22
+ /**
23
+ * Picks the agent and route for one message, or null when no turn starts.
24
+ *
25
+ * The order is MJ's: the first tagged agent the host allows, then (under `Always` only) the last
26
+ * agent that answered, the conversation's pinned agent, the host's default agent, and the
27
+ * conversation manager. A candidate the host doesn't allow is skipped.
28
+ *
29
+ * A continuity or default candidate that `isKnownAgent` doesn't recognise falls back to the
30
+ * conversation manager, as MJ always has, rather than to the next route. A tagged agent is taken
31
+ * as tagged.
32
+ *
33
+ * @param candidates The agent each route would use.
34
+ * @param rules The host's reply mode and allowed list.
35
+ * @param isKnownAgent True when the agent exists in the client's agent catalog.
36
+ */
37
+ export function ResolveAgentTurn(candidates, rules, isKnownAgent) {
38
+ const mentioned = candidates.MentionedAgentIds.find(id => IsAgentAllowed(id, rules.AllowedAgentIDs));
39
+ if (mentioned) {
40
+ return { AgentId: mentioned, Route: 'Mention' };
41
+ }
42
+ if (rules.ReplyMode === 'MentionOnly') {
43
+ return null;
44
+ }
45
+ const implicitRoutes = [
46
+ ['Continuity', candidates.ContinuityAgentId],
47
+ ['ConversationDefault', candidates.ConversationDefaultAgentId],
48
+ ['HostDefault', candidates.HostDefaultAgentId],
49
+ ];
50
+ for (const [route, agentId] of implicitRoutes) {
51
+ if (agentId && IsAgentAllowed(agentId, rules.AllowedAgentIDs)) {
52
+ return isKnownAgent(agentId)
53
+ ? { AgentId: agentId, Route: route }
54
+ : conversationManagerTarget(candidates, rules);
55
+ }
56
+ }
57
+ return conversationManagerTarget(candidates, rules);
58
+ }
59
+ /** The conversation manager's turn, when there is one and the host allows it. */
60
+ function conversationManagerTarget(candidates, rules) {
61
+ const agentId = candidates.ConversationManagerAgentId;
62
+ return agentId && IsAgentAllowed(agentId, rules.AllowedAgentIDs)
63
+ ? { AgentId: agentId, Route: 'ConversationManager' }
64
+ : null;
65
+ }
66
+ /**
67
+ * The agent names in a task graph that the host doesn't allow. The conversation manager can
68
+ * answer with a multi-step workflow instead of a single delegation; each `Agent` step names the
69
+ * agent that runs it, so the allowed list has to hold there too.
70
+ *
71
+ * @param steps The graph's tasks.
72
+ * @param allowedAgentIDs The host's allowed list. Null allows every agent.
73
+ * @param resolveAgentId Maps an agent name to its ID, or null when no such agent exists.
74
+ * @returns The disallowed names, each once, in the order they appear. Empty when all are allowed.
75
+ */
76
+ export function FindDisallowedTaskGraphAgents(steps, allowedAgentIDs, resolveAgentId) {
77
+ if (allowedAgentIDs == null) {
78
+ return [];
79
+ }
80
+ const disallowed = [];
81
+ for (const step of steps) {
82
+ const agentName = step.kind === 'Agent' ? agentNameOf(step.configuration) : null;
83
+ if (agentName && !IsAgentAllowed(resolveAgentId(agentName), allowedAgentIDs) && !disallowed.includes(agentName)) {
84
+ disallowed.push(agentName);
85
+ }
86
+ }
87
+ return disallowed;
88
+ }
89
+ /** The `agentName` of an Agent step's configuration, when it has one. */
90
+ function agentNameOf(configuration) {
91
+ if (configuration && 'agentName' in configuration && typeof configuration.agentName === 'string') {
92
+ return configuration.agentName;
93
+ }
94
+ return null;
95
+ }
96
+ //# sourceMappingURL=agent-turn-routing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-turn-routing.js","sourceRoot":"","sources":["../../../src/lib/utils/agent-turn-routing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAyBpD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC1B,OAAkC,EAClC,eAAqD;IAErD,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,IAAI,eAAe,IAAI,IAAI,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,OAAO,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,gBAAgB,CAC5B,UAA+B,EAC/B,KAAqB,EACrB,YAA0C;IAE1C,MAAM,SAAS,GAAG,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;IACrG,IAAI,SAAS,EAAE,CAAC;QACZ,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IACpD,CAAC;IACD,IAAI,KAAK,CAAC,SAAS,KAAK,aAAa,EAAE,CAAC;QACpC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,cAAc,GAAmD;QACnE,CAAC,YAAY,EAAE,UAAU,CAAC,iBAAiB,CAAC;QAC5C,CAAC,qBAAqB,EAAE,UAAU,CAAC,0BAA0B,CAAC;QAC9D,CA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,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YAC9G,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC/B,CAAC;IACL,CAAC;IACD,OAAO,UAAU,CAAC;AACtB,CAAC;AAED,yEAAyE;AACzE,SAAS,WAAW,CAAC,aAA6C;IAC9D,IAAI,aAAa,IAAI,WAAW,IAAI,aAAa,IAAI,OAAO,aAAa,CAAC,SAAS,KAAK,QAAQ,EAAE,CAAC;QAC/F,OAAO,aAAa,CAAC,SAAS,CAAC;IACnC,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC","sourcesContent":["/**\n * @fileoverview Pure routing rules for an agent turn: which agent answers a message, and whether\n * any does. Kept free of Angular and of I/O so the whole matrix (reply mode × mention × allowed\n * list × route) is testable directly; `MessageInputComponent` supplies the candidates.\n *\n * @module @memberjunction/ng-conversations\n */\n\nimport { UUIDsEqual } from '@memberjunction/global';\nimport type { AgentReplyMode, AgentTurnRoute, AgentTurnTarget } from '../models/agent-turn.model';\n\n/** The agent each route would use for one message, before the host's rules are applied. */\nexport interface AgentTurnCandidates {\n /** Agents the message tags, in the order they appear. */\n MentionedAgentIds: readonly string[];\n /** The last agent that answered in the conversation, other than the conversation manager. */\n ContinuityAgentId: string | null;\n /** The agent pinned on the conversation. */\n ConversationDefaultAgentId: string | null;\n /** The host's `DefaultAgentId` input. */\n HostDefaultAgentId: string | null;\n /** MJ's conversation manager agent. */\n ConversationManagerAgentId: string | null;\n}\n\n/** The host's rules for the chat. */\nexport interface AgentTurnRules {\n /** When a message starts a turn. */\n ReplyMode: AgentReplyMode;\n /** The agents that may answer. Null allows every agent. */\n AllowedAgentIDs: readonly string[] | null;\n}\n\n/**\n * True when the agent may take a turn. A null or undefined list allows every agent; an empty\n * list allows none.\n */\nexport function IsAgentAllowed(\n agentId: string | null | undefined,\n allowedAgentIDs: readonly string[] | null | undefined\n): boolean {\n if (!agentId) {\n return false;\n }\n if (allowedAgentIDs == null) {\n return true;\n }\n return allowedAgentIDs.some(id => UUIDsEqual(id, agentId));\n}\n\n/**\n * Picks the agent and route for one message, or null when no turn starts.\n *\n * The order is MJ's: the first tagged agent the host allows, then (under `Always` only) the last\n * agent that answered, the conversation's pinned agent, the host's default agent, and the\n * conversation manager. A candidate the host doesn't allow is skipped.\n *\n * A continuity or default candidate that `isKnownAgent` doesn't recognise falls back to the\n * conversation manager, as MJ always has, rather than to the next route. A tagged agent is taken\n * as tagged.\n *\n * @param candidates The agent each route would use.\n * @param rules The host's reply mode and allowed list.\n * @param isKnownAgent True when the agent exists in the client's agent catalog.\n */\nexport function ResolveAgentTurn(\n candidates: AgentTurnCandidates,\n rules: AgentTurnRules,\n isKnownAgent: (agentId: string) => boolean\n): AgentTurnTarget | null {\n const mentioned = candidates.MentionedAgentIds.find(id => IsAgentAllowed(id, rules.AllowedAgentIDs));\n if (mentioned) {\n return { AgentId: mentioned, Route: 'Mention' };\n }\n if (rules.ReplyMode === 'MentionOnly') {\n return null;\n }\n\n const implicitRoutes: ReadonlyArray<[AgentTurnRoute, string | null]> = [\n ['Continuity', candidates.ContinuityAgentId],\n ['ConversationDefault', candidates.ConversationDefaultAgentId],\n ['HostDefault', candidates.HostDefaultAgentId],\n ];\n for (const [route, agentId] of implicitRoutes) {\n if (agentId && IsAgentAllowed(agentId, rules.AllowedAgentIDs)) {\n return isKnownAgent(agentId)\n ? { AgentId: agentId, Route: route }\n : conversationManagerTarget(candidates, rules);\n }\n }\n return conversationManagerTarget(candidates, rules);\n}\n\n/** The conversation manager's turn, when there is one and the host allows it. */\nfunction conversationManagerTarget(candidates: AgentTurnCandidates, rules: AgentTurnRules): AgentTurnTarget | null {\n const agentId = candidates.ConversationManagerAgentId;\n return agentId && IsAgentAllowed(agentId, rules.AllowedAgentIDs)\n ? { AgentId: agentId, Route: 'ConversationManager' }\n : null;\n}\n\n/** A task-graph step that runs an agent, as the conversation manager emits it. */\ninterface AgentTaskStep {\n kind: string;\n configuration?: { agentName?: string } | object;\n}\n\n/**\n * The agent names in a task graph that the host doesn't allow. The conversation manager can\n * answer with a multi-step workflow instead of a single delegation; each `Agent` step names the\n * agent that runs it, so the allowed list has to hold there too.\n *\n * @param steps The graph's tasks.\n * @param allowedAgentIDs The host's allowed list. Null allows every agent.\n * @param resolveAgentId Maps an agent name to its ID, or null when no such agent exists.\n * @returns The disallowed names, each once, in the order they appear. Empty when all are allowed.\n */\nexport function FindDisallowedTaskGraphAgents(\n steps: ReadonlyArray<AgentTaskStep>,\n allowedAgentIDs: readonly string[] | null,\n resolveAgentId: (agentName: string) => string | null\n): string[] {\n if (allowedAgentIDs == null) {\n return [];\n }\n const disallowed: string[] = [];\n for (const step of steps) {\n const agentName = step.kind === 'Agent' ? agentNameOf(step.configuration) : null;\n if (agentName && !IsAgentAllowed(resolveAgentId(agentName), allowedAgentIDs) && !disallowed.includes(agentName)) {\n disallowed.push(agentName);\n }\n }\n return disallowed;\n}\n\n/** The `agentName` of an Agent step's configuration, when it has one. */\nfunction agentNameOf(configuration: AgentTaskStep['configuration']): string | null {\n if (configuration && 'agentName' in configuration && typeof configuration.agentName === 'string') {\n return configuration.agentName;\n }\n return null;\n}\n"]}
@@ -15,15 +15,15 @@ export interface ArtifactVersionRef {
15
15
  */
16
16
  export interface ArtifactPanelBaseline {
17
17
  /** artifactId → highest version, from {@link snapshotArtifactVersions}. */
18
- versions: Map<string, number>;
18
+ Versions: Map<string, number>;
19
19
  /** The conversation on screen when the snapshot was taken. */
20
20
  conversationId: string | null;
21
21
  /** The conversation whose artifacts the map was actually holding, or null if none had loaded. */
22
- mapConversationId: string | null;
22
+ MapConversationId: string | null;
23
23
  /** Paging-merge counter at snapshot time. */
24
- mapGeneration: number;
24
+ MapGeneration: number;
25
25
  /** User-selection counter at snapshot time. */
26
- selectionEpoch: number;
26
+ SelectionEpoch: number;
27
27
  }
28
28
  export type ArtifactPanelAction = {
29
29
  kind: 'none';
@@ -42,6 +42,8 @@ export type ArtifactPanelAction = {
42
42
  * Keys are NORMALIZED UUIDs, so lookups are case-insensitive by construction (SQL Server returns
43
43
  * upper case, PostgreSQL lower) at O(1) rather than by scanning every key for a `UUIDsEqual` hit.
44
44
  */
45
+ export declare function SnapshotArtifactVersions(refs: Iterable<ArtifactVersionRef>): Map<string, number>;
46
+ /** @deprecated Use {@link SnapshotArtifactVersions}. */
45
47
  export declare function snapshotArtifactVersions(refs: Iterable<ArtifactVersionRef>): Map<string, number>;
46
48
  /**
47
49
  * Decide what the artifact panel should do after an agent run, from a before/after diff of
@@ -78,6 +80,15 @@ export declare function snapshotArtifactVersions(refs: Iterable<ArtifactVersionR
78
80
  * @param input.userChangedSelection - Defaults to false. True when the user picked or closed an
79
81
  * artifact while the turn was in flight; the panel is then left where they put it.
80
82
  */
83
+ export declare function DecideArtifactPanelAction(input: {
84
+ panelOpen: boolean;
85
+ selectedArtifactId: string | null;
86
+ before: Map<string, number>;
87
+ after: ArtifactVersionRef[];
88
+ baselineComparable?: boolean;
89
+ userChangedSelection?: boolean;
90
+ }): ArtifactPanelAction;
91
+ /** @deprecated Use {@link DecideArtifactPanelAction}. */
81
92
  export declare function decideArtifactPanelAction(input: {
82
93
  panelOpen: boolean;
83
94
  selectedArtifactId: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"artifact-panel-action.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/artifact-panel-action.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CAChC;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,2EAA2E;IAC3E,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,8DAA8D;IAC9D,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,iGAAiG;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BAAgB,yBAAyB,CAAC,KAAK,EAAE;IAC/C,SAAS,EAAE,OAAO,CAAC;IACnB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,GAAG,mBAAmB,CAEtB"}
@@ -5,7 +5,7 @@ import { NormalizeUUID, UUIDsEqual } from '@memberjunction/global';
5
5
  * Keys are NORMALIZED UUIDs, so lookups are case-insensitive by construction (SQL Server returns
6
6
  * upper case, PostgreSQL lower) at O(1) rather than by scanning every key for a `UUIDsEqual` hit.
7
7
  */
8
- export function snapshotArtifactVersions(refs) {
8
+ export function SnapshotArtifactVersions(refs) {
9
9
  const latest = new Map();
10
10
  for (const ref of refs) {
11
11
  const key = NormalizeUUID(ref.artifactId);
@@ -13,6 +13,10 @@ export function snapshotArtifactVersions(refs) {
13
13
  }
14
14
  return latest;
15
15
  }
16
+ /** @deprecated Use {@link SnapshotArtifactVersions}. */
17
+ export function snapshotArtifactVersions(refs) {
18
+ return SnapshotArtifactVersions(refs);
19
+ }
16
20
  /** Same reduction as {@link snapshotArtifactVersions}, keeping the timestamp for ordering. */
17
21
  function latestByArtifact(refs) {
18
22
  const latest = new Map();
@@ -74,7 +78,7 @@ function bestCandidate(entries) {
74
78
  * @param input.userChangedSelection - Defaults to false. True when the user picked or closed an
75
79
  * artifact while the turn was in flight; the panel is then left where they put it.
76
80
  */
77
- export function decideArtifactPanelAction(input) {
81
+ export function DecideArtifactPanelAction(input) {
78
82
  const after = latestByArtifact(input.after);
79
83
  const entries = [...after.entries()];
80
84
  const baselineComparable = input.baselineComparable !== false;
@@ -119,4 +123,8 @@ export function decideArtifactPanelAction(input) {
119
123
  const latest = bestCandidate(bumped);
120
124
  return { kind: 'open', artifactId: latest.artifactId, versionNumber: latest.versionNumber };
121
125
  }
126
+ /** @deprecated Use {@link DecideArtifactPanelAction}. */
127
+ export function decideArtifactPanelAction(input) {
128
+ return DecideArtifactPanelAction(input);
129
+ }
122
130
  //# sourceMappingURL=artifact-panel-action.js.map