@memberjunction/ng-conversations 6.2.0-edge.0 → 6.2.0-edge.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -2
- package/dist/lib/components/active-tasks/active-tasks-panel.component.d.ts +19 -3
- package/dist/lib/components/active-tasks/active-tasks-panel.component.d.ts.map +1 -1
- package/dist/lib/components/active-tasks/active-tasks-panel.component.js +39 -7
- package/dist/lib/components/active-tasks/active-tasks-panel.component.js.map +1 -1
- package/dist/lib/components/agent/active-agent-indicator.component.d.ts +74 -6
- package/dist/lib/components/agent/active-agent-indicator.component.d.ts.map +1 -1
- package/dist/lib/components/agent/active-agent-indicator.component.js +111 -21
- package/dist/lib/components/agent/active-agent-indicator.component.js.map +1 -1
- package/dist/lib/components/agent/agent-process-panel.component.d.ts +31 -5
- package/dist/lib/components/agent/agent-process-panel.component.d.ts.map +1 -1
- package/dist/lib/components/agent/agent-process-panel.component.js +71 -15
- package/dist/lib/components/agent/agent-process-panel.component.js.map +1 -1
- package/dist/lib/components/artifact/artifact-share-modal.component.d.ts +65 -9
- package/dist/lib/components/artifact/artifact-share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/artifact/artifact-share-modal.component.js +169 -57
- package/dist/lib/components/artifact/artifact-share-modal.component.js.map +1 -1
- package/dist/lib/components/attachment/image-viewer.component.d.ts +77 -11
- package/dist/lib/components/attachment/image-viewer.component.d.ts.map +1 -1
- package/dist/lib/components/attachment/image-viewer.component.js +181 -47
- package/dist/lib/components/attachment/image-viewer.component.js.map +1 -1
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.d.ts +129 -19
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.js +350 -116
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.js.map +1 -1
- package/dist/lib/components/collection/artifact-create-modal.component.d.ts +60 -8
- package/dist/lib/components/collection/artifact-create-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/artifact-create-modal.component.js +130 -46
- package/dist/lib/components/collection/artifact-create-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-artifact-card.component.d.ts +63 -3
- package/dist/lib/components/collection/collection-artifact-card.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-artifact-card.component.js +113 -19
- package/dist/lib/components/collection/collection-artifact-card.component.js.map +1 -1
- package/dist/lib/components/collection/collection-form-modal.component.d.ts +54 -8
- package/dist/lib/components/collection/collection-form-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-form-modal.component.js +130 -46
- package/dist/lib/components/collection/collection-form-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-share-modal.component.d.ts +70 -10
- package/dist/lib/components/collection/collection-share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-share-modal.component.js +175 -53
- package/dist/lib/components/collection/collection-share-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.d.ts +89 -9
- package/dist/lib/components/collection/collection-tree.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.js +220 -70
- package/dist/lib/components/collection/collection-tree.component.js.map +1 -1
- package/dist/lib/components/collection/collection-view.component.d.ts +89 -11
- package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-view.component.js +154 -40
- package/dist/lib/components/collection/collection-view.component.js.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.d.ts +390 -38
- package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.js +951 -367
- package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
- package/dist/lib/components/composer/ai-composer.component.d.ts +213 -18
- package/dist/lib/components/composer/ai-composer.component.d.ts.map +1 -1
- package/dist/lib/components/composer/ai-composer.component.js +388 -44
- package/dist/lib/components/composer/ai-composer.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts +12 -1
- package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-agent-picker.component.js +26 -4
- package/dist/lib/components/conversation/conversation-agent-picker.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +1191 -124
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +2816 -785
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-empty-state.component.d.ts +139 -19
- package/dist/lib/components/conversation/conversation-empty-state.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-empty-state.component.js +296 -59
- package/dist/lib/components/conversation/conversation-empty-state.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts +579 -78
- package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.js +2322 -823
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
- package/dist/lib/components/conversation/pinned-messages-panel.component.d.ts +42 -4
- package/dist/lib/components/conversation/pinned-messages-panel.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/pinned-messages-panel.component.js +93 -21
- package/dist/lib/components/conversation/pinned-messages-panel.component.js.map +1 -1
- package/dist/lib/components/dialogs/input-dialog.component.d.ts +57 -11
- package/dist/lib/components/dialogs/input-dialog.component.d.ts.map +1 -1
- package/dist/lib/components/dialogs/input-dialog.component.js +128 -16
- package/dist/lib/components/dialogs/input-dialog.component.js.map +1 -1
- package/dist/lib/components/dialogs/rating-dialog.component.d.ts +68 -10
- package/dist/lib/components/dialogs/rating-dialog.component.d.ts.map +1 -1
- package/dist/lib/components/dialogs/rating-dialog.component.js +151 -27
- package/dist/lib/components/dialogs/rating-dialog.component.js.map +1 -1
- package/dist/lib/components/export/export-modal.component.d.ts +84 -10
- package/dist/lib/components/export/export-modal.component.d.ts.map +1 -1
- package/dist/lib/components/export/export-modal.component.js +173 -49
- package/dist/lib/components/export/export-modal.component.js.map +1 -1
- package/dist/lib/components/global-tasks/global-tasks-panel.component.d.ts +29 -3
- package/dist/lib/components/global-tasks/global-tasks-panel.component.d.ts.map +1 -1
- package/dist/lib/components/global-tasks/global-tasks-panel.component.js +58 -12
- package/dist/lib/components/global-tasks/global-tasks-panel.component.js.map +1 -1
- package/dist/lib/components/library/library-full-view.component.d.ts +57 -8
- package/dist/lib/components/library/library-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/library/library-full-view.component.js +119 -35
- package/dist/lib/components/library/library-full-view.component.js.map +1 -1
- package/dist/lib/components/members/members-modal.component.d.ts +76 -10
- package/dist/lib/components/members/members-modal.component.d.ts.map +1 -1
- package/dist/lib/components/members/members-modal.component.js +164 -50
- package/dist/lib/components/members/members-modal.component.js.map +1 -1
- package/dist/lib/components/message/actionable-commands.component.d.ts +49 -5
- package/dist/lib/components/message/actionable-commands.component.d.ts.map +1 -1
- package/dist/lib/components/message/actionable-commands.component.js +140 -26
- package/dist/lib/components/message/actionable-commands.component.js.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.d.ts +46 -10
- package/dist/lib/components/message/conversation-message-rating.component.d.ts.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.js +120 -36
- package/dist/lib/components/message/conversation-message-rating.component.js.map +1 -1
- package/dist/lib/components/message/message-input.component.d.ts +613 -74
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +1390 -422
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +490 -29
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +1088 -244
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +297 -29
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +598 -123
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/navigation/conversation-navigation.component.d.ts +64 -5
- package/dist/lib/components/navigation/conversation-navigation.component.d.ts.map +1 -1
- package/dist/lib/components/navigation/conversation-navigation.component.js +101 -11
- package/dist/lib/components/navigation/conversation-navigation.component.js.map +1 -1
- package/dist/lib/components/notification/activity-indicator.component.d.ts +6 -2
- package/dist/lib/components/notification/activity-indicator.component.d.ts.map +1 -1
- package/dist/lib/components/notification/activity-indicator.component.js +13 -3
- package/dist/lib/components/notification/activity-indicator.component.js.map +1 -1
- package/dist/lib/components/notification/notification-badge.component.d.ts +15 -3
- package/dist/lib/components/notification/notification-badge.component.d.ts.map +1 -1
- package/dist/lib/components/notification/notification-badge.component.js +36 -8
- package/dist/lib/components/notification/notification-badge.component.js.map +1 -1
- package/dist/lib/components/overlay/chat-overlay.component.d.ts +1 -1
- package/dist/lib/components/overlay/chat-overlay.component.js +4 -4
- package/dist/lib/components/overlay/chat-overlay.component.js.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.d.ts +93 -11
- package/dist/lib/components/project/project-form-modal.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.js +348 -87
- package/dist/lib/components/project/project-form-modal.component.js.map +1 -1
- package/dist/lib/components/project/project-selector.component.d.ts +78 -8
- package/dist/lib/components/project/project-selector.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-selector.component.js +177 -46
- package/dist/lib/components/project/project-selector.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-activity-rail.component.d.ts +1 -1
- package/dist/lib/components/realtime/realtime-activity-rail.component.js +2 -2
- package/dist/lib/components/realtime/realtime-activity-rail.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-delegation-card.component.d.ts +1 -1
- package/dist/lib/components/realtime/realtime-delegation-card.component.js +2 -2
- package/dist/lib/components/realtime/realtime-delegation-card.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +2 -2
- package/dist/lib/components/realtime/realtime-session-overlay.component.js +18 -18
- package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-timeline-card.component.d.ts +47 -23
- package/dist/lib/components/realtime/realtime-session-timeline-card.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-timeline-card.component.js +136 -92
- package/dist/lib/components/realtime/realtime-session-timeline-card.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.component.d.ts +2 -2
- package/dist/lib/components/realtime/realtime-surface-tabs.component.js +4 -4
- package/dist/lib/components/realtime/realtime-surface-tabs.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.model.js +3 -3
- package/dist/lib/components/realtime/realtime-surface-tabs.model.js.map +1 -1
- package/dist/lib/components/realtime/realtime-ui-config.d.ts +13 -11
- package/dist/lib/components/realtime/realtime-ui-config.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-ui-config.js +29 -25
- package/dist/lib/components/realtime/realtime-ui-config.js.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts +3 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js +6 -2
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js.map +1 -1
- package/dist/lib/components/search/search-panel.component.d.ts +133 -22
- package/dist/lib/components/search/search-panel.component.d.ts.map +1 -1
- package/dist/lib/components/search/search-panel.component.js +312 -83
- package/dist/lib/components/search/search-panel.component.js.map +1 -1
- package/dist/lib/components/share/share-modal.component.d.ts +69 -9
- package/dist/lib/components/share/share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/share/share-modal.component.js +139 -31
- package/dist/lib/components/share/share-modal.component.js.map +1 -1
- package/dist/lib/components/shared/user-picker.component.d.ts +48 -8
- package/dist/lib/components/shared/user-picker.component.d.ts.map +1 -1
- package/dist/lib/components/shared/user-picker.component.js +110 -30
- package/dist/lib/components/shared/user-picker.component.js.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts +114 -11
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.js +199 -21
- package/dist/lib/components/sidebar/conversation-sidebar.component.js.map +1 -1
- package/dist/lib/components/sidebar/routines-section.component.d.ts +20 -1
- package/dist/lib/components/sidebar/routines-section.component.d.ts.map +1 -1
- package/dist/lib/components/sidebar/routines-section.component.js +25 -5
- package/dist/lib/components/sidebar/routines-section.component.js.map +1 -1
- package/dist/lib/components/slots/slot-interfaces.d.ts +19 -0
- package/dist/lib/components/slots/slot-interfaces.d.ts.map +1 -1
- package/dist/lib/components/slots/slot-interfaces.js.map +1 -1
- package/dist/lib/components/task/tasks-full-view.component.d.ts +95 -13
- package/dist/lib/components/task/tasks-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/task/tasks-full-view.component.js +223 -75
- package/dist/lib/components/task/tasks-full-view.component.js.map +1 -1
- package/dist/lib/components/tasks/task-widget.component.d.ts +46 -6
- package/dist/lib/components/tasks/task-widget.component.d.ts.map +1 -1
- package/dist/lib/components/tasks/task-widget.component.js +100 -16
- package/dist/lib/components/tasks/task-widget.component.js.map +1 -1
- package/dist/lib/components/tasks/tasks-dropdown.component.d.ts +64 -7
- package/dist/lib/components/tasks/tasks-dropdown.component.d.ts.map +1 -1
- package/dist/lib/components/tasks/tasks-dropdown.component.js +127 -27
- package/dist/lib/components/tasks/tasks-dropdown.component.js.map +1 -1
- package/dist/lib/components/thread/thread-panel.component.d.ts +66 -8
- package/dist/lib/components/thread/thread-panel.component.d.ts.map +1 -1
- package/dist/lib/components/thread/thread-panel.component.js +146 -36
- package/dist/lib/components/thread/thread-panel.component.js.map +1 -1
- package/dist/lib/components/toast/toast.component.d.ts +11 -1
- package/dist/lib/components/toast/toast.component.d.ts.map +1 -1
- package/dist/lib/components/toast/toast.component.js +25 -5
- package/dist/lib/components/toast/toast.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts +385 -42
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +891 -292
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts +8 -0
- package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts.map +1 -1
- package/dist/lib/composer-plugins/base-conversation-mention.provider.js +8 -1
- package/dist/lib/composer-plugins/base-conversation-mention.provider.js.map +1 -1
- package/dist/lib/directives/chat-slot.directive.d.ts +5 -1
- package/dist/lib/directives/chat-slot.directive.d.ts.map +1 -1
- package/dist/lib/directives/chat-slot.directive.js.map +1 -1
- package/dist/lib/directives/search-shortcut.directive.d.ts +9 -1
- package/dist/lib/directives/search-shortcut.directive.d.ts.map +1 -1
- package/dist/lib/directives/search-shortcut.directive.js +14 -4
- package/dist/lib/directives/search-shortcut.directive.js.map +1 -1
- package/dist/lib/events/chat-events.d.ts +34 -7
- package/dist/lib/events/chat-events.d.ts.map +1 -1
- package/dist/lib/events/chat-events.js +37 -7
- package/dist/lib/events/chat-events.js.map +1 -1
- package/dist/lib/models/agent-turn.model.d.ts +113 -0
- package/dist/lib/models/agent-turn.model.d.ts.map +1 -0
- package/dist/lib/models/agent-turn.model.js +12 -0
- package/dist/lib/models/agent-turn.model.js.map +1 -0
- package/dist/lib/models/collection-view.model.js.map +1 -1
- package/dist/lib/models/conversation-state.model.d.ts +8 -0
- package/dist/lib/models/conversation-state.model.d.ts.map +1 -1
- package/dist/lib/models/conversation-state.model.js.map +1 -1
- package/dist/lib/models/lazy-artifact-info.d.ts +44 -12
- package/dist/lib/models/lazy-artifact-info.d.ts.map +1 -1
- package/dist/lib/models/lazy-artifact-info.js +98 -34
- package/dist/lib/models/lazy-artifact-info.js.map +1 -1
- package/dist/lib/services/active-tasks.service.d.ts +30 -4
- package/dist/lib/services/active-tasks.service.d.ts.map +1 -1
- package/dist/lib/services/active-tasks.service.js +71 -19
- package/dist/lib/services/active-tasks.service.js.map +1 -1
- package/dist/lib/services/agent-state.service.d.ts +17 -1
- package/dist/lib/services/agent-state.service.d.ts.map +1 -1
- package/dist/lib/services/agent-state.service.js +48 -16
- package/dist/lib/services/agent-state.service.js.map +1 -1
- package/dist/lib/services/artifact-permission.service.d.ts +39 -0
- package/dist/lib/services/artifact-permission.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-permission.service.js +152 -17
- package/dist/lib/services/artifact-permission.service.js.map +1 -1
- package/dist/lib/services/artifact-state.service.d.ts +58 -5
- package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-state.service.js +135 -35
- package/dist/lib/services/artifact-state.service.js.map +1 -1
- package/dist/lib/services/collection-permission.service.d.ts +28 -0
- package/dist/lib/services/collection-permission.service.d.ts.map +1 -1
- package/dist/lib/services/collection-permission.service.js +88 -32
- package/dist/lib/services/collection-permission.service.js.map +1 -1
- package/dist/lib/services/collection-state.service.d.ts +11 -1
- package/dist/lib/services/collection-state.service.d.ts.map +1 -1
- package/dist/lib/services/collection-state.service.js +25 -5
- package/dist/lib/services/collection-state.service.js.map +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts +47 -4
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +85 -20
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/conversation-attachment.service.d.ts +17 -0
- package/dist/lib/services/conversation-attachment.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-attachment.service.js +38 -10
- package/dist/lib/services/conversation-attachment.service.js.map +1 -1
- package/dist/lib/services/conversation-liveness-dom.service.d.ts +42 -0
- package/dist/lib/services/conversation-liveness-dom.service.d.ts.map +1 -0
- package/dist/lib/services/conversation-liveness-dom.service.js +74 -0
- package/dist/lib/services/conversation-liveness-dom.service.js.map +1 -0
- package/dist/lib/services/conversation-streaming.service.d.ts +22 -0
- package/dist/lib/services/conversation-streaming.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-streaming.service.js +50 -10
- package/dist/lib/services/conversation-streaming.service.js.map +1 -1
- package/dist/lib/services/data-cache.service.d.ts +31 -0
- package/dist/lib/services/data-cache.service.d.ts.map +1 -1
- package/dist/lib/services/data-cache.service.js +71 -15
- package/dist/lib/services/data-cache.service.js.map +1 -1
- package/dist/lib/services/dialog.service.d.ts +13 -0
- package/dist/lib/services/dialog.service.d.ts.map +1 -1
- package/dist/lib/services/dialog.service.js +25 -5
- package/dist/lib/services/dialog.service.js.map +1 -1
- package/dist/lib/services/export.service.d.ts +2 -0
- package/dist/lib/services/export.service.d.ts.map +1 -1
- package/dist/lib/services/export.service.js +5 -1
- package/dist/lib/services/export.service.js.map +1 -1
- package/dist/lib/services/mention-parser.service.d.ts +10 -0
- package/dist/lib/services/mention-parser.service.d.ts.map +1 -1
- package/dist/lib/services/mention-parser.service.js +25 -5
- package/dist/lib/services/mention-parser.service.js.map +1 -1
- package/dist/lib/services/notification.service.d.ts +54 -6
- package/dist/lib/services/notification.service.d.ts.map +1 -1
- package/dist/lib/services/notification.service.js +123 -27
- package/dist/lib/services/notification.service.js.map +1 -1
- package/dist/lib/services/realtime-audio-recorder.d.ts +4 -4
- package/dist/lib/services/realtime-audio-recorder.js +12 -12
- package/dist/lib/services/realtime-audio-recorder.js.map +1 -1
- package/dist/lib/services/realtime-pcm-wav.d.ts +4 -0
- package/dist/lib/services/realtime-pcm-wav.d.ts.map +1 -1
- package/dist/lib/services/realtime-pcm-wav.js +10 -2
- package/dist/lib/services/realtime-pcm-wav.js.map +1 -1
- package/dist/lib/services/search.service.d.ts +42 -9
- package/dist/lib/services/search.service.d.ts.map +1 -1
- package/dist/lib/services/search.service.js +103 -23
- package/dist/lib/services/search.service.js.map +1 -1
- package/dist/lib/services/toast.service.d.ts +19 -1
- package/dist/lib/services/toast.service.d.ts.map +1 -1
- package/dist/lib/services/toast.service.js +45 -9
- package/dist/lib/services/toast.service.js.map +1 -1
- package/dist/lib/services/ui-command-handler.service.d.ts +56 -5
- package/dist/lib/services/ui-command-handler.service.d.ts.map +1 -1
- package/dist/lib/services/ui-command-handler.service.js +113 -16
- package/dist/lib/services/ui-command-handler.service.js.map +1 -1
- package/dist/lib/utils/agent-artifact-summary.d.ts +2 -2
- package/dist/lib/utils/agent-artifact-summary.js +3 -3
- package/dist/lib/utils/agent-artifact-summary.js.map +1 -1
- package/dist/lib/utils/agent-turn-routing.d.ts +70 -0
- package/dist/lib/utils/agent-turn-routing.d.ts.map +1 -0
- package/dist/lib/utils/agent-turn-routing.js +84 -0
- package/dist/lib/utils/agent-turn-routing.js.map +1 -0
- package/dist/lib/utils/artifact-panel-action.d.ts +15 -4
- package/dist/lib/utils/artifact-panel-action.d.ts.map +1 -1
- package/dist/lib/utils/artifact-panel-action.js +10 -2
- package/dist/lib/utils/artifact-panel-action.js.map +1 -1
- package/dist/lib/utils/decision-routing.d.ts +68 -0
- package/dist/lib/utils/decision-routing.d.ts.map +1 -0
- package/dist/lib/utils/decision-routing.js +101 -0
- package/dist/lib/utils/decision-routing.js.map +1 -0
- package/dist/lib/utils/distinct-artifacts.d.ts +2 -0
- package/dist/lib/utils/distinct-artifacts.d.ts.map +1 -1
- package/dist/lib/utils/distinct-artifacts.js +5 -1
- package/dist/lib/utils/distinct-artifacts.js.map +1 -1
- package/dist/lib/utils/plan-mode-preference.d.ts +2 -2
- package/dist/lib/utils/plan-mode-preference.js +6 -6
- package/dist/lib/utils/plan-mode-preference.js.map +1 -1
- package/dist/public-api.d.ts +5 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +8 -0
- package/dist/public-api.js.map +1 -1
- 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
|
|
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;;
|
|
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;
|
|
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
|
-
|
|
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.
|
|
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, {
|
|
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;
|
|
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
|
|
31
|
-
*
|
|
32
|
-
*
|
|
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
|
-
|
|
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
|
|
42
|
-
*
|
|
43
|
-
*
|
|
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;
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AE,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
|
|
33
|
-
*
|
|
34
|
-
*
|
|
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
|
-
|
|
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
|
|
49
|
-
*
|
|
50
|
-
*
|
|
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,wBAAwB;IAE9C;IACA;IACA;IAHpB,YACoB,cAAsB,EACtB,WAAmB,EACnB,gBAA+B,IAAI;QAEnD,KAAK,EAAE,CAAC;QAJQ,mBAA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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,CAAC;IACrD,CAAC;CACJ;AAED;;;;GAIG;AACH,MAAM,OAAO,uBAAuB;IAEZ;IACA;IACA;IAHpB,YACoB,cAAsB,EACtB,UAAk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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,113 @@
|
|
|
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
|
+
* - `DecisionRouted`: another agent in the conversation, which a confident routing decision chose
|
|
28
|
+
* in continuity's place. Only with the chat's `EnableDecisionRouting` on.
|
|
29
|
+
* - `ConversationDefault`: the agent pinned on the conversation (`Conversation.DefaultAgentID`).
|
|
30
|
+
* - `HostDefault`: the host's `DefaultAgentId` input.
|
|
31
|
+
* - `ConversationManager`: MJ's conversation manager agent (Sage unless configured otherwise),
|
|
32
|
+
* which may delegate to another agent.
|
|
33
|
+
* - `Redirect`: a `BeforeAgentTurn` listener sent the turn to a different agent.
|
|
34
|
+
*/
|
|
35
|
+
export type AgentTurnRoute = 'Mention' | 'Continuity' | 'DecisionRouted' | 'ConversationDefault' | 'HostDefault' | 'ConversationManager' | 'Redirect';
|
|
36
|
+
/** The agent a turn resolved to, and the route that chose it. */
|
|
37
|
+
export interface AgentTurnTarget {
|
|
38
|
+
/** The agent that takes the turn. */
|
|
39
|
+
AgentId: string;
|
|
40
|
+
/** How the agent was chosen. */
|
|
41
|
+
Route: AgentTurnRoute;
|
|
42
|
+
}
|
|
43
|
+
/** What `BeforeAgentTurn` tells its listeners about the turn it announces. */
|
|
44
|
+
export interface AgentTurnInfo extends AgentTurnTarget {
|
|
45
|
+
/** The agent's name, when MJ knows it. */
|
|
46
|
+
AgentName: string | null;
|
|
47
|
+
/** The person's saved message that the turn answers. */
|
|
48
|
+
UserMessageId: string | null;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Everything the chat area knows about a turn it hands to an {@link AgentTurnHandler}.
|
|
52
|
+
* No reply row exists yet when the handler is called.
|
|
53
|
+
*/
|
|
54
|
+
export interface AgentTurnRequest {
|
|
55
|
+
/** The conversation the message was posted in. */
|
|
56
|
+
ConversationId: string;
|
|
57
|
+
/** The person's saved message (`MJ: Conversation Details`, Role `User`). */
|
|
58
|
+
UserMessageId: string;
|
|
59
|
+
/** The message text, with mentions in their stored JSON form. */
|
|
60
|
+
MessageText: string;
|
|
61
|
+
/** The agent the turn resolved to, after any redirect. */
|
|
62
|
+
AgentId: string;
|
|
63
|
+
/** The agent's name, when MJ knows it. */
|
|
64
|
+
AgentName: string | null;
|
|
65
|
+
/** How the agent was chosen. */
|
|
66
|
+
Route: AgentTurnRoute;
|
|
67
|
+
/** The chat area's `ApplicationId` input. */
|
|
68
|
+
ApplicationId: string | null;
|
|
69
|
+
/** The chat area's `AppContext` input. */
|
|
70
|
+
AppContext: Record<string, unknown> | null;
|
|
71
|
+
/** The chat area's `AgentHistoryFrom` input: the first moment of the conversation the turn may read. */
|
|
72
|
+
AgentHistoryFrom: Date | null;
|
|
73
|
+
/**
|
|
74
|
+
* The agent configuration preset (`MJ: AI Agent Configurations.ID`) the person chose: the one
|
|
75
|
+
* on the mention for a `Mention` turn, otherwise the header mode picker's selection.
|
|
76
|
+
*/
|
|
77
|
+
ConfigurationPresetId: string | null;
|
|
78
|
+
/** Skills the person asked for with `/skill` in this message. */
|
|
79
|
+
RequestedSkillIDs: string[];
|
|
80
|
+
/** Whether Plan Mode is on for the conversation. */
|
|
81
|
+
PlanMode: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* The artifact version (`MJ: Artifact Versions.ID`) the message modifies, when the chat's
|
|
84
|
+
* routing decision (`EnableDecisionRouting`) confidently named one this agent produced. MJ's
|
|
85
|
+
* own path continues from that version instead of the agent's latest output. Null otherwise.
|
|
86
|
+
*/
|
|
87
|
+
TargetArtifactVersionId: string | null;
|
|
88
|
+
}
|
|
89
|
+
/** What an {@link AgentTurnHandler} reports back to the chat area. */
|
|
90
|
+
export interface AgentTurnResult {
|
|
91
|
+
/** False when the turn failed. The chat area shows {@link ErrorMessage} and writes nothing. */
|
|
92
|
+
Success: boolean;
|
|
93
|
+
/** Why the turn failed, shown to the person. */
|
|
94
|
+
ErrorMessage?: string;
|
|
95
|
+
/**
|
|
96
|
+
* The rows the host wrote for the turn, oldest first: the agent's reply and any status rows.
|
|
97
|
+
* The chat area loads and shows them. A row still `In-Progress` is followed like any other
|
|
98
|
+
* in-progress reply. The host reports that row's live status through `AgentRunStatusPublisher`
|
|
99
|
+
* (`@memberjunction/server`) on the caller's session: significant-step progress, streamed text,
|
|
100
|
+
* the partial result, and the completion. The completion's `conversationDetailId` is the reply row.
|
|
101
|
+
*/
|
|
102
|
+
ReplyDetailIds?: string[];
|
|
103
|
+
/** The agent run, when the host has one. Carried on `AfterAgentTurn`. */
|
|
104
|
+
AgentRunId?: string;
|
|
105
|
+
/** The agent's result, when the host has one. `AfterAgentTurn` fires only when it's present. */
|
|
106
|
+
Result?: ExecuteAgentResult;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Runs an agent turn on the host's server instead of MJ's own path. The chat area calls it once
|
|
110
|
+
* per turn, after `BeforeAgentTurn` and before any reply row exists, and shows the rows it reports.
|
|
111
|
+
*/
|
|
112
|
+
export type AgentTurnHandler = (request: AgentTurnRequest) => Promise<AgentTurnResult>;
|
|
113
|
+
//# sourceMappingURL=agent-turn.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-turn.model.d.ts","sourceRoot":"","sources":["../../../src/lib/models/agent-turn.model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,K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ACpD,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C;AAED,sEAAsE;AACtE,MAAM,WAAW,eAAe;IAC5B,+FAA+F;IAC/F,OAAO,EAAE,OAAO,CAAC;IACjB,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;OAMG;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 * - `DecisionRouted`: another agent in the conversation, which a confident routing decision chose\n * in continuity's place. Only with the chat's `EnableDecisionRouting` on.\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 | 'DecisionRouted'\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 * The artifact version (`MJ: Artifact Versions.ID`) the message modifies, when the chat's\n * routing decision (`EnableDecisionRouting`) confidently named one this agent produced. MJ's\n * own path continues from that version instead of the agent's latest output. Null otherwise.\n */\n TargetArtifactVersionId: string | null;\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. The host reports that row's live status through `AgentRunStatusPublisher`\n * (`@memberjunction/server`) on the caller's session: significant-step progress, streamed text,\n * the partial result, and the completion. The completion's `conversationDetailId` is the reply row.\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'
|
|
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":[],"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WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG,aAAa,GAAG,OAAO,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjD;;GAEG;AACH,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,E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,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG,aAAa,GAAG,OAAO,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjD;;GAEG;AACH,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,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}"]}
|