@memberjunction/ng-conversations 6.2.0-edge.5 → 6.2.0-edge.7
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/dist/lib/components/attachment/image-viewer.component.d.ts +3 -1
- package/dist/lib/components/attachment/image-viewer.component.d.ts.map +1 -1
- package/dist/lib/components/attachment/image-viewer.component.js +5 -1
- package/dist/lib/components/attachment/image-viewer.component.js.map +1 -1
- package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-view.component.js +1 -0
- package/dist/lib/components/collection/collection-view.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +188 -9
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +1333 -464
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-mode-picker.component.js +2 -2
- package/dist/lib/components/conversation/conversation-mode-picker.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-remote-browser-controller.d.ts +109 -0
- package/dist/lib/components/conversation/conversation-remote-browser-controller.d.ts.map +1 -0
- package/dist/lib/components/conversation/conversation-remote-browser-controller.js +298 -0
- package/dist/lib/components/conversation/conversation-remote-browser-controller.js.map +1 -0
- package/dist/lib/components/message/agent-handoff-card.component.d.ts +102 -0
- package/dist/lib/components/message/agent-handoff-card.component.d.ts.map +1 -0
- package/dist/lib/components/message/agent-handoff-card.component.js +439 -0
- package/dist/lib/components/message/agent-handoff-card.component.js.map +1 -0
- package/dist/lib/components/message/message-input.component.d.ts +126 -59
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +559 -554
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +34 -2
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +678 -520
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +13 -1
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +92 -39
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/overlay/chat-overlay.component.d.ts +19 -0
- package/dist/lib/components/overlay/chat-overlay.component.d.ts.map +1 -1
- package/dist/lib/components/overlay/chat-overlay.component.js +125 -13
- package/dist/lib/components/overlay/chat-overlay.component.js.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.js +2 -2
- package/dist/lib/components/project/project-form-modal.component.js.map +1 -1
- package/dist/lib/components/realtime/interactive-component/run-view-component-artifact-source.js +1 -1
- package/dist/lib/components/realtime/interactive-component/run-view-component-artifact-source.js.map +1 -1
- package/dist/lib/components/realtime/media/media-channel-state.d.ts +5 -0
- package/dist/lib/components/realtime/media/media-channel-state.d.ts.map +1 -1
- package/dist/lib/components/realtime/media/media-channel-state.js +27 -1
- package/dist/lib/components/realtime/media/media-channel-state.js.map +1 -1
- package/dist/lib/components/realtime/media/media-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/media/media-channel.js +7 -2
- package/dist/lib/components/realtime/media/media-channel.js.map +1 -1
- package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts +19 -2
- package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/media/realtime-media-surface.component.js +59 -10
- package/dist/lib/components/realtime/media/realtime-media-surface.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-banner.component.d.ts +22 -6
- package/dist/lib/components/realtime/realtime-agent-banner.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-banner.component.js +160 -98
- package/dist/lib/components/realtime/realtime-agent-banner.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-call-failure-notice.d.ts +13 -0
- package/dist/lib/components/realtime/realtime-call-failure-notice.d.ts.map +1 -0
- package/dist/lib/components/realtime/realtime-call-failure-notice.js +21 -0
- package/dist/lib/components/realtime/realtime-call-failure-notice.js.map +1 -0
- package/dist/lib/components/realtime/realtime-composer.component.d.ts +26 -3
- package/dist/lib/components/realtime/realtime-composer.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-composer.component.js +226 -120
- package/dist/lib/components/realtime/realtime-composer.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +73 -16
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.js +219 -108
- package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-ui-config.d.ts +9 -12
- package/dist/lib/components/realtime/realtime-ui-config.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-ui-config.js +38 -18
- package/dist/lib/components/realtime/realtime-ui-config.js.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js +34 -5
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-tools.d.ts +8 -2
- package/dist/lib/components/realtime/remote-browser/remote-browser-tools.d.ts.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-tools.js +51 -10
- package/dist/lib/components/realtime/remote-browser/remote-browser-tools.js.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel-config.d.ts +46 -0
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel-config.d.ts.map +1 -0
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel-config.js +64 -0
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel-config.js.map +1 -0
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts +131 -9
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js +347 -38
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js.map +1 -1
- package/dist/lib/conversations.module.d.ts +2 -1
- package/dist/lib/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.js +9 -4
- package/dist/lib/conversations.module.js.map +1 -1
- package/dist/lib/events/chat-events.d.ts +5 -4
- package/dist/lib/events/chat-events.d.ts.map +1 -1
- package/dist/lib/events/chat-events.js +2 -2
- package/dist/lib/events/chat-events.js.map +1 -1
- package/dist/lib/models/agent-turn.model.d.ts +11 -7
- package/dist/lib/models/agent-turn.model.d.ts.map +1 -1
- package/dist/lib/models/agent-turn.model.js.map +1 -1
- package/dist/lib/services/active-tasks.service.d.ts +5 -0
- package/dist/lib/services/active-tasks.service.d.ts.map +1 -1
- package/dist/lib/services/active-tasks.service.js +16 -0
- package/dist/lib/services/active-tasks.service.js.map +1 -1
- package/dist/lib/services/agent-state.service.d.ts.map +1 -1
- package/dist/lib/services/agent-state.service.js +7 -1
- package/dist/lib/services/agent-state.service.js.map +1 -1
- package/dist/lib/services/artifact-permission.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-permission.service.js +2 -0
- package/dist/lib/services/artifact-permission.service.js.map +1 -1
- package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-state.service.js +1 -0
- package/dist/lib/services/artifact-state.service.js.map +1 -1
- package/dist/lib/services/collection-permission.service.d.ts.map +1 -1
- package/dist/lib/services/collection-permission.service.js +1 -0
- package/dist/lib/services/collection-permission.service.js.map +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts +38 -16
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +57 -71
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/conversation-detail-window.store.d.ts +5 -0
- package/dist/lib/services/conversation-detail-window.store.d.ts.map +1 -1
- package/dist/lib/services/conversation-detail-window.store.js +52 -5
- package/dist/lib/services/conversation-detail-window.store.js.map +1 -1
- package/dist/lib/services/realtime-session-review.service.d.ts +2 -1
- package/dist/lib/services/realtime-session-review.service.d.ts.map +1 -1
- package/dist/lib/services/realtime-session-review.service.js.map +1 -1
- package/dist/lib/services/realtime-session.service.d.ts.map +1 -1
- package/dist/lib/services/realtime-session.service.js +2 -1
- package/dist/lib/services/realtime-session.service.js.map +1 -1
- package/dist/lib/services/search.service.d.ts.map +1 -1
- package/dist/lib/services/search.service.js +1 -0
- package/dist/lib/services/search.service.js.map +1 -1
- package/dist/lib/utils/agent-failure-display.d.ts +14 -0
- package/dist/lib/utils/agent-failure-display.d.ts.map +1 -0
- package/dist/lib/utils/agent-failure-display.js +26 -0
- package/dist/lib/utils/agent-failure-display.js.map +1 -0
- package/dist/lib/utils/agent-handoff-map.d.ts +52 -0
- package/dist/lib/utils/agent-handoff-map.d.ts.map +1 -0
- package/dist/lib/utils/agent-handoff-map.js +270 -0
- package/dist/lib/utils/agent-handoff-map.js.map +1 -0
- package/dist/lib/utils/agent-turn-routing.d.ts +62 -7
- package/dist/lib/utils/agent-turn-routing.d.ts.map +1 -1
- package/dist/lib/utils/agent-turn-routing.js +147 -6
- package/dist/lib/utils/agent-turn-routing.js.map +1 -1
- package/dist/lib/utils/decision-routing.d.ts +17 -9
- package/dist/lib/utils/decision-routing.d.ts.map +1 -1
- package/dist/lib/utils/decision-routing.js +23 -14
- package/dist/lib/utils/decision-routing.js.map +1 -1
- package/dist/lib/utils/message-list-order.d.ts +13 -0
- package/dist/lib/utils/message-list-order.d.ts.map +1 -0
- package/dist/lib/utils/message-list-order.js +31 -0
- package/dist/lib/utils/message-list-order.js.map +1 -0
- package/dist/lib/utils/pin-state.d.ts +11 -0
- package/dist/lib/utils/pin-state.d.ts.map +1 -0
- package/dist/lib/utils/pin-state.js +9 -0
- package/dist/lib/utils/pin-state.js.map +1 -0
- package/dist/lib/utils/thread-replies.d.ts +34 -0
- package/dist/lib/utils/thread-replies.d.ts.map +1 -0
- package/dist/lib/utils/thread-replies.js +49 -0
- package/dist/lib/utils/thread-replies.js.map +1 -0
- package/dist/public-api.d.ts +6 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +6 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +36 -36
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"whiteboard-channel.js","sourceRoot":"","sources":["../../../../../src/lib/components/realtime/whiteboard/whiteboard-channel.ts"],"names":[],"mappings":";;;;;;AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,iCAAiC,EAAkC,MAAM,8BAA8B,CAAC;AAEjH,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAA4B,MAAM,kCAAkC,CAAC;AAC7H,OAAO,EACL,wBAAwB,EAAE,wBAAwB,EAAE,+BAA+B,EAAE,2BAA2B,EAChH,sBAAsB,EAAE,eAAe,EACxC,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;GAQG;AACH,SAAS,aAAa,CAAC,MAAc;IACnC,IAAI,CAAC;QACH,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC3C,OAAO,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAK,MAAgC,CAAC,OAAO,KAAK,IAAI,CAAC;IAC7G,CAAC;IAAC,MAAM,CAAC;QACP,yFAAyF;QACzF,qFAAqF;QACrF,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,GAAW,EAAE,KAAK,GAAG,IAAI,EAAE,MAAM,GAAG,GAAG;IACpF,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE,CAAC;QACpE,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,IAAI,OAAO,CAAgB,CAAC,OAAO,EAAE,EAAE;QAC5C,IAAI,GAA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AE,CAAC;QACtB,IAAI,CAAC,yBAAyB,EAAE,CAAC;QACjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF,CAAA;AA7VY,yBAAyB;IADrC,aAAa,CAAC,yBAAyB,EAAE,2BAA2B,CAAC;GACzD,yBAAyB,CA6VrC;;AAED;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B;IAC3C,uEAAuE;AACzE,CAAC;AAED,wDAAwD;AACxD,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,GAAW,EAAE,KAAK,GAAG,IAAI,EAAE,MAAM,GAAG,GAAG;IACpF,OAAO,wBAAwB,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC","sourcesContent":["import type { Type } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { RegisterClass } from '@memberjunction/global';\nimport { RealtimeToolDefinition } from '@memberjunction/ai';\nimport { REALTIME_CHANNEL_CONTRACT_VERSION, type RealtimeChannelDescriptor } from '@memberjunction/ai-core-plus';\nimport { ChannelInboundVideoBridge, IChannelFrameProvider, type MediaPlacement } from '@memberjunction/ai-realtime-client';\nimport { BaseRealtimeChannelClient, BuildToolBackedVerbs, ChannelOnboardingDetails } from '@memberjunction/realtime-runtime';\nimport {\n ApplyWhiteboardAgentTool, BuildWhiteboardExportSvg, RealtimeWhiteboardHostComponent, WHITEBOARD_TOOL_DEFINITIONS,\n WHITEBOARD_TOOL_PREFIX, WhiteboardState, WhiteboardWidgetInteractionEvent, WhiteboardWidgetSubmitEvent\n} from '@memberjunction/ng-whiteboard';\n\n/**\n * Whether a whiteboard tool result reports success.\n *\n * `ApplyWhiteboardAgentTool` returns a JSON `WhiteboardToolResult` string — `{ success: true, … }`\n * or `{ success: false, error }` — for every tool and every failure path. Anything that does not\n * parse as an object with `success === true` is treated as NOT a successful mutation, which is the\n * safe direction: the cost of missing a confirmation frame is one stale picture until the next\n * change, while the cost of a false one is telling the model an edit landed when it did not.\n */\nfunction toolSucceeded(result: string): boolean {\n try {\n const parsed: unknown = JSON.parse(result);\n return parsed !== null && typeof parsed === 'object' && (parsed as { success?: unknown }).success === true;\n } catch {\n // A non-JSON result cannot be confirmed as a mutation — the host returned something this\n // channel does not understand, so it does not get a \"your change is on screen\" note.\n return false;\n }\n}\n\n/**\n * Asynchronously rasterizes an SVG string to a JPEG base64 string (without the `data:image/jpeg;base64,` prefix)\n * using an offscreen canvas. Returns null in non-DOM environments or when rendering fails.\n */\nexport async function RasterizeSvgToJpegBase64(svg: string, width = 1280, height = 720): Promise<string | null> {\n if (typeof document === 'undefined' || typeof Image === 'undefined') {\n return null;\n }\n return new Promise<string | null>((resolve) => {\n let url: string | null = null;\n let timer: ReturnType<typeof setTimeout> | null = null;\n\n const cleanup = () => {\n if (timer != null) {\n clearTimeout(timer);\n timer = null;\n }\n if (url) {\n URL.revokeObjectURL(url);\n url = null;\n }\n };\n\n try {\n const img = new Image();\n const svgBlob = new Blob([svg], { type: 'image/svg+xml;charset=utf-8' });\n url = URL.createObjectURL(svgBlob);\n\n // Capped wait: resolve null and revoke URL if the Image never fires onload or onerror (item 61)\n timer = setTimeout(() => {\n console.error('[RealtimeWhiteboardChannel] SVG rasterization timed out after 5000ms');\n cleanup();\n resolve(null);\n }, 5000);\n\n img.onload = () => {\n try {\n const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n cleanup();\n resolve(null);\n return;\n }\n ctx.fillStyle = '#ffffff';\n ctx.fillRect(0, 0, width, height);\n ctx.drawImage(img, 0, 0, width, height);\n cleanup();\n const dataUrl = canvas.toDataURL('image/jpeg', 0.85);\n const comma = dataUrl.indexOf(',');\n resolve(comma >= 0 ? dataUrl.slice(comma + 1) : dataUrl);\n } catch (err) {\n console.error('[RealtimeWhiteboardChannel] Failed to rasterize SVG canvas to JPEG:', err);\n cleanup();\n resolve(null);\n }\n };\n img.onerror = (err) => {\n console.error('[RealtimeWhiteboardChannel] Failed to load SVG image for rasterization:', err);\n cleanup();\n resolve(null);\n };\n img.src = url;\n } catch (err) {\n console.error('[RealtimeWhiteboardChannel] Failed to initialize SVG rasterization:', err);\n cleanup();\n resolve(null);\n }\n });\n}\n\n/**\n * Per-widget throttle window for AMBIENT interaction context notes: at most one note per\n * widget per this many ms — within the window the LATEST summary wins (chatty widgets\n * collapse to one trailing-edge note instead of flooding the model's context).\n */\nexport const WHITEBOARD_INTERACTION_NOTE_THROTTLE_MS = 4000;\n\n/** Per-widget ambient-note throttle bookkeeping. */\ninterface InteractionThrottleEntry {\n /** When this widget's last ambient note was sent (epoch ms). */\n LastSentAt: number;\n /** Trailing-edge timer for a deferred note, or null when the window is idle. */\n Timer: ReturnType<typeof setTimeout> | null;\n /** The latest event received within the open window (sent when the timer fires). */\n Pending: WhiteboardWidgetInteractionEvent | null;\n}\n\n/**\n * The LIVE WHITEBOARD as a pluggable interactive channel — the canonical\n * {@link BaseRealtimeChannelClient} implementation, resolved from the `MJ: AI Agent\n * Channels` registry row whose `ClientPluginClass` is `'RealtimeWhiteboardChannel'`.\n *\n * One instance per session (created via ClassFactory at session start). It owns the\n * board's {@link WhiteboardState} engine and contributes the channel's full contract:\n *\n * - **Action**: the `Whiteboard_*` client-executed tool set\n * ({@link WHITEBOARD_TOOL_DEFINITIONS}); {@link ApplyAgentTool} prefers the BOUND host\n * component (board mutation + violet pop-in / toast / presence-cursor garnish) and\n * falls back to the pure {@link ApplyWhiteboardAgentTool} engine call when no surface\n * is bound (e.g. the board has not been shown yet) — the channel keeps working, just\n * without the garnish.\n * - **Perception**: {@link BindSurface} subscribes the host's coalesced (750 ms)\n * `SceneDelta` stream and pipes each delta into the live model's context as a\n * `[whiteboard]` background note; the agent-undo toast click flows the same way.\n * - **Surface**: {@link RealtimeWhiteboardHostComponent}, created on the overlay's stage; the\n * host's \"Move to stage\" button rides `Context.SetFocusMode`, and the board hears where the\n * overlay placed it ({@link OnSurfacePlacementChange}) so the button offers the way back.\n * - **State of record**: every board mutation (user edits AND agent tool calls) requests\n * a save of {@link WhiteboardState.ToJSON} under channel name `'Whiteboard'` — the\n * host debounces and flushes at teardown.\n *\n * A PRIOR session's persisted board is restored through {@link RestoreState} (invoked by\n * the session host after Initialize, before any surface binding): the saved JSON is\n * rehydrated IN PLACE into the same {@link WhiteboardState} instance, so the save\n * subscription and any later surface binding keep pointing at one engine. Malformed or\n * incompatible payloads are tolerated — the board simply starts fresh.\n */\n@RegisterClass(BaseRealtimeChannelClient, 'RealtimeWhiteboardChannel')\nexport class RealtimeWhiteboardChannel extends BaseRealtimeChannelClient<RealtimeWhiteboardHostComponent> implements IChannelFrameProvider {\n /** The board's state of record — created fresh with the plugin (one per session). */\n public readonly State = new WhiteboardState();\n\n /** The live bound surface, when the channel tab's pane is instantiated. */\n private host: RealtimeWhiteboardHostComponent | null = null;\n /** Output subscriptions on the bound surface (SceneDelta / AgentUndo / FocusModeChange). */\n private surfaceSubs: Subscription[] = [];\n /** Board-mutation subscription driving the debounced state-of-record save. */\n private stateChangedSub: Subscription | null = null;\n /** Per-widget ambient-interaction note throttles (ItemID → window state). */\n private interactionThrottles = new Map<string, InteractionThrottleEntry>();\n public get ChannelName(): string {\n return 'Whiteboard';\n }\n\n /**\n * Produces the latest visual scene as a base64-encoded frame for the video bridge.\n * Renders the whiteboard SVG into an offscreen canvas and returns base64 JPEG.\n */\n public async GetLatestFrame(): Promise<string | null> {\n if (!this.State) {\n return null;\n }\n try {\n const svg = BuildWhiteboardExportSvg(this.State);\n return await RasterizeSvgToJpegBase64(svg);\n } catch (err) {\n console.error('[RealtimeWhiteboardChannel] Failed to export whiteboard frame:', err);\n return null;\n }\n }\n\n /**\n * The shared frame bridge, which now lives on the base channel (`VisualVideoBridge`). This accessor\n * keeps the board's long-standing `videoBridge` handle — tests and tooling reach the bridge by that\n * name — pointing at the one the pump actually writes to.\n */\n private get videoBridge(): ChannelInboundVideoBridge | null {\n return this.VisualVideoBridge;\n }\n private set videoBridge(bridge: ChannelInboundVideoBridge | null) {\n this.VisualVideoBridge = bridge;\n }\n\n // The change-driven frame pump (leading edge, trailing settle, dedupe, negotiated cadence, one\n // confirmation frame after an agent edit) used to live here. It is now the base channel's\n // `EnableVisualPerception` pump, enabled from OnInitialize — this channel only says WHEN its picture\n // changed. The behavior is unchanged, including (deliberately) the shared bridge's fixed-rate poller:\n // see `StartBridgePoller` in OnInitialize.\n\n public get ToolNamePrefix(): string {\n return WHITEBOARD_TOOL_PREFIX;\n }\n\n public get TabTitle(): string {\n return 'Whiteboard';\n }\n\n public get TabIcon(): string {\n return 'fa-solid fa-chalkboard';\n }\n\n /** The board can be shared on its own: the call's Share menu offers it under \"This panel\" while it is on screen. */\n public override get SurfaceShareable(): boolean {\n return true;\n }\n\n public GetToolDefinitions(): RealtimeToolDefinition[] {\n return WHITEBOARD_TOOL_DEFINITIONS;\n }\n\n public override GetSurfaceComponent(): Type<RealtimeWhiteboardHostComponent> {\n return RealtimeWhiteboardHostComponent;\n }\n\n /** First-run intro shown the first time the user opens the Whiteboard tab (once per user). */\n public override GetOnboardingDetails(): ChannelOnboardingDetails {\n return {\n Heading: 'Whiteboard',\n Description:\n 'A shared canvas the agent can sketch, write and annotate on live during the call — ' +\n 'whatever it draws appears here instantly, and anything you add is something it can see too.',\n Tips: [\n 'Watch the board fill in as you talk — the agent updates it in real time.',\n 'Add your own notes or shapes; the agent perceives your edits and can build on them.',\n 'Use Focus to give the board the whole screen, and save it to artifacts to keep it.'\n ],\n IconClass: 'fa-solid fa-chalkboard'\n };\n }\n\n /**\n * The board's self-description: what it holds, every `Whiteboard_*` tool as a verb (so a tool a\n * subclass adds shows up here too), and that the model can SEE it (frames), not just read its state.\n */\n public override GetDescriptor(): RealtimeChannelDescriptor {\n return {\n Key: this.ChannelName,\n Version: REALTIME_CHANNEL_CONTRACT_VERSION,\n DisplayName: this.TabTitle,\n OwningPackage: '@memberjunction/ng-conversations',\n Instructions:\n 'A shared canvas you and the user can both draw, write and annotate on live. Whatever you add ' +\n 'appears instantly, and you perceive what the user adds. Use it to sketch, diagram and explain ' +\n 'visually; do not narrate minor edits.',\n Nouns: [\n {\n Name: 'pages',\n Description: 'The board\\'s pages, in order; each holds the items (notes, shapes, connectors, text, widgets) drawn on it.',\n Schema: { type: 'array', items: { type: 'object' } }\n }\n ],\n Verbs: BuildToolBackedVerbs(this.GetToolDefinitions(), this.ToolNamePrefix),\n Events: [\n { Name: 'state_changed', Description: 'The board changed (by you or the user).' },\n { Name: 'frame_pushed', Description: 'A picture of the board was sent to you.' }\n ],\n DisplayPolicy: 'open-on-start',\n DefaultAvailability: 'all-sessions',\n MaxExposure: 'pixels'\n };\n }\n\n /**\n * Persist the board (host-debounced) on EVERY board mutation — user edits AND agent tools — and drive\n * the visual pump. The board feeds the model its own perception (coalesced scene deltas from the\n * bound surface), so state changes are recorded for events and frame tagging only (`Perceive: false`):\n * the structured note would duplicate the deltas.\n */\n protected override OnInitialize(): void {\n this.stateChangedSub?.unsubscribe();\n this.EnableVisualPerception(this, {\n ConfirmationNote:\n '[whiteboard] visual confirmation of your action (background — do NOT narrate or announce your own change; continue naturally)',\n // Preserves what the board always did: it started the bridge's fixed-rate poller despite being\n // designed heartbeat-free. Flagged for the reviewer; remove to make the board purely change-driven.\n StartBridgePoller: true\n });\n this.stateChangedSub = this.State.Changed$.subscribe((change) => {\n this.Context?.RequestSave(this.State.ToJSON());\n this.RecordChange({ Author: change.Author, Perceive: false });\n // Only user edits (and scene replacements like undo) drive the settle-debounce pipeline.\n // Agent edits are confirmed with a single frame in ApplyAgentTool.\n if (change.Author === 'user' || change.Op === 'replace') {\n void this.NotifyVisualChange();\n }\n });\n }\n\n /**\n * Wires the dynamically-created board host: inputs (shared state engine + agent name)\n * are set BEFORE the component's first change detection, and the perception/garnish\n * outputs are subscribed back into the host context — the overlay never sees any of it.\n */\n public BindSurface(instance: RealtimeWhiteboardHostComponent): void {\n this.EnsureVideoBridge();\n this.releaseSurface();\n this.host = instance;\n instance.State = this.State;\n instance.AgentName = this.Context?.AgentName ?? 'Agent';\n this.surfaceSubs.push(\n // The board's coalesced scene delta — the perception feed the agent \"sees\".\n instance.SceneDelta.subscribe((deltaJson: string) => {\n // Background PERCEPTION, not conversation: the model sees every user edit without\n // being told, but must not narrate minor changes — only react when something is\n // significant (or when asked). The etiquette rides in the note itself so any\n // realtime model gets it regardless of system-prompt sync state.\n this.Context?.SendContextNote(\n '[whiteboard] board update (background context — do NOT comment on minor edits; ' +\n 'only mention it if the change is significant to the discussion): ' + deltaJson);\n }),\n // The user clicked Undo on the agent-action toast (the undo already applied locally).\n instance.AgentUndo.subscribe(() => {\n this.Context?.SendContextNote('[whiteboard] user undid your last change');\n }),\n // A sandboxed HTML widget submitted user input (MJWhiteboard.submit) — already\n // validated, size-capped and not canceled (the host's cancelable WidgetSubmitting\n // event ran first). Surface it to the agent so it can react to quiz answers /\n // micro-form input it asked for.\n instance.WidgetSubmitted.subscribe((submit: WhiteboardWidgetSubmitEvent) => {\n // Durable awareness first (the note persists in the model's context)…\n this.Context?.SendContextNote(\n `[whiteboard] the user submitted input in widget \"${submit.Title || submit.ItemID}\": ${submit.DataJson}`);\n // …then make the model REACT — a submission is explicit user input the user is\n // waiting on; without this trigger, SendContextNote alone produces dead silence\n // (\"I clicked Submit and nothing happened\").\n this.Context?.RequestSpokenResponse?.(\n `The user just submitted input in the whiteboard widget \"${submit.Title || submit.ItemID}\": ${submit.DataJson}. ` +\n `React to it now in your own voice — acknowledge their choice and continue naturally.`);\n }),\n // AMBIENT widget telemetry (the injected recorder, NOT widget-authored script):\n // clicks / changes / typing summarized by the board. Pure background perception —\n // throttled per widget so chatty widgets don't flood the model's context, and framed\n // with do-not-respond etiquette (explicit MJWhiteboard.submit input arrives above).\n instance.WidgetInteraction.subscribe((interaction: WhiteboardWidgetInteractionEvent) => {\n this.onWidgetInteraction(interaction);\n }),\n // The board's Focus toggle — ask the shell to collapse/restore the main call column.\n instance.FocusModeChange.subscribe((focused: boolean) => {\n this.Context?.SetFocusMode(focused);\n }),\n // \"Save to artifacts\": snapshot the board as a first-class versioned artifact.\n instance.SaveToArtifactsRequested.subscribe(() => {\n void this.saveBoardAsArtifact();\n })\n );\n }\n\n public override UnbindSurface(): void {\n this.releaseSurface();\n }\n\n /**\n * Routes one ambient widget-interaction batch to the agent as a throttled background\n * context note: outside an open window the note goes out immediately and opens a\n * {@link WHITEBOARD_INTERACTION_NOTE_THROTTLE_MS} window; within the window the LATEST\n * event is stashed and a trailing-edge timer sends it when the window closes (one note\n * per widget per window, latest summary wins).\n */\n private onWidgetInteraction(interaction: WhiteboardWidgetInteractionEvent): void {\n const now = Date.now();\n const entry = this.interactionThrottles.get(interaction.ItemID);\n if (!entry || (entry.Timer === null && now - entry.LastSentAt >= WHITEBOARD_INTERACTION_NOTE_THROTTLE_MS)) {\n this.sendInteractionNote(interaction);\n this.interactionThrottles.set(interaction.ItemID, { LastSentAt: now, Timer: null, Pending: null });\n return;\n }\n entry.Pending = interaction; // latest wins within the window\n if (entry.Timer === null) {\n const wait = Math.max(0, entry.LastSentAt + WHITEBOARD_INTERACTION_NOTE_THROTTLE_MS - now);\n entry.Timer = setTimeout(() => {\n entry.Timer = null;\n const pending = entry.Pending;\n entry.Pending = null;\n if (pending) {\n entry.LastSentAt = Date.now();\n this.sendInteractionNote(pending);\n }\n }, wait);\n }\n }\n\n /** The ambient-note framing: background etiquette rides in the note itself (like scene deltas). */\n private sendInteractionNote(interaction: WhiteboardWidgetInteractionEvent): void {\n this.Context?.SendContextNote(\n `[whiteboard] ambient activity in widget \"${interaction.Title || interaction.ItemID}\" ` +\n '(background — do NOT respond unless it is significant or you are asked; ' +\n `explicit submissions arrive separately): ${interaction.Summary}`);\n }\n\n /** Cancels all pending ambient-note timers and resets the per-widget throttle windows. */\n private clearInteractionThrottles(): void {\n for (const entry of this.interactionThrottles.values()) {\n if (entry.Timer !== null) {\n clearTimeout(entry.Timer);\n }\n }\n this.interactionThrottles.clear();\n }\n\n /**\n * Persists the current board as a `MJ: Artifacts` snapshot via the host context\n * (best-effort; the host logs failures). On success the agent is told via a context\n * note so it can reference the saved artifact naturally.\n */\n private async saveBoardAsArtifact(): Promise<void> {\n const ctx = this.Context;\n if (!ctx) {\n return;\n }\n const now = new Date();\n const name = `Whiteboard — ${now.toLocaleDateString()} ${now.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}`;\n const artifactId = await ctx.SaveAsArtifact(name, this.State.ToJSON());\n if (artifactId) {\n ctx.SendContextNote(`[whiteboard] the user saved the current board as the artifact \"${name}\"`);\n }\n }\n\n /**\n * Executes one `Whiteboard_*` tool call LOCALLY. Prefers the live bound host (board\n * mutation + UI garnish); falls back to the pure engine function when no surface is\n * bound so the channel keeps working before the board is first shown.\n */\n public ApplyAgentTool(toolName: string, argsJson: string): string {\n let result: string;\n if (this.host) {\n result = this.host.ApplyAgentTool(toolName, argsJson);\n } else {\n result = ApplyWhiteboardAgentTool(this.State, toolName, argsJson);\n }\n // A SUCCESSFUL agent tool triggers exactly ONE immediate visual confirmation frame and a note\n // telling the model not to narrate its own change. A FAILED one must trigger neither: every\n // failure path returns `{ success: false, error }` (bad JSON args, unknown tool, per-tool\n // validation), and confirming it would tell the model its edit landed AND instruct it to stay\n // quiet about it — so the failure would vanish from the user's view while the model carried on.\n // It would also push a frame identical to the last one, since a failed tool changes nothing.\n if (toolSucceeded(result)) {\n void this.ConfirmVisualChange();\n }\n return result;\n }\n\n /** The board's serialized state of record (persisted under {@link ChannelName}). */\n public override SerializeState(): string | null {\n return this.State.ToJSON();\n }\n\n /**\n * Rehydrates a prior session's saved board into THIS session's state engine (in place —\n * the {@link State} instance and its subscriptions are preserved). Returns `true` on\n * success; malformed / incompatible JSON returns `false` and the board stays fresh\n * (never throws — {@link WhiteboardState.LoadFromJSON} is tolerant by contract).\n */\n public override RestoreState(stateJson: string): boolean {\n return this.State.LoadFromJSON(stateJson);\n }\n\n /** Keeps the board's \"Move to stage\" / \"Back to tab\" button true to where the host placed it. */\n public override OnSurfacePlacementChange(placement: MediaPlacement): void {\n this.host?.SetOnStage(placement === 'stage');\n }\n\n /**\n * Exit focus mode THROUGH the bound host (its own Focus button state stays in sync; it\n * re-emits `FocusModeChange(false)` → `Context.SetFocusMode(false)`). When no surface is\n * bound the overlay's defensive flag clear covers it.\n */\n public override RequestFocusExit(): void {\n if (this.host?.FocusMode) {\n this.host.ToggleFocus();\n }\n }\n\n public override Dispose(): void {\n this.stateChangedSub?.unsubscribe();\n this.stateChangedSub = null;\n super.Dispose(); // releases the surface binding, the visual pump + bridge, and the context\n }\n\n /** Unsubscribes surface outputs, cancels pending ambient notes and drops the host reference. */\n private releaseSurface(): void {\n for (const sub of this.surfaceSubs) {\n sub.unsubscribe();\n }\n this.surfaceSubs = [];\n this.clearInteractionThrottles();\n this.host = null;\n }\n}\n\n/**\n * Tree-shaking prevention: the whiteboard channel is resolved dynamically through the\n * ClassFactory (by the registry row's `ClientPluginClass` key), so this static call is\n * what keeps its `@RegisterClass` side effect from being eliminated by the bundler.\n * Called by `RealtimeSessionService` alongside the realtime-client driver Load calls.\n */\nexport function LoadRealtimeWhiteboardChannel(): void {\n // intentional no-op — the import side effect performs the registration\n}\n\n/** @deprecated Use {@link RasterizeSvgToJpegBase64}. */\nexport async function rasterizeSvgToJpegBase64(svg: string, width = 1280, height = 720): Promise<string | null> {\n return RasterizeSvgToJpegBase64(svg, width, height);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"whiteboard-channel.js","sourceRoot":"","sources":["../../../../../src/lib/components/realtime/whiteboard/whiteboard-channel.ts"],"names":[],"mappings":";;;;;;AAGA,OAAO,EAAE,eAAe,EAAE,iCAAiC,EAAkC,MAAM,8BAA8B,CAAC;AAElI,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAA4B,MAAM,kCAAkC,CAAC;AAC7H,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EACL,wBAAwB,EAAE,wBAAwB,EAAE,6BAA6B,EAAE,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A6B;IAC3C,uEAAuE;AACzE,CAAC;AAED,wDAAwD;AACxD,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,GAAW,EAAE,KAAK,GAAG,IAAI,EAAE,MAAM,GAAG,GAAG;IACpF,OAAO,wBAAwB,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC","sourcesContent":["import type { Type } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { RealtimeToolDefinition, type JSONObject } from '@memberjunction/ai';\nimport { CompareExposure, REALTIME_CHANNEL_CONTRACT_VERSION, type RealtimeChannelDescriptor } from '@memberjunction/ai-core-plus';\nimport { ChannelInboundVideoBridge, IChannelFrameProvider, type MediaPlacement } from '@memberjunction/ai-realtime-client';\nimport { BaseRealtimeChannelClient, BuildToolBackedVerbs, ChannelOnboardingDetails } from '@memberjunction/realtime-runtime';\nimport { IsPlainObject, RegisterClass } from '@memberjunction/global';\nimport {\n ApplyWhiteboardAgentTool, BuildWhiteboardExportSvg, IsWhiteboardWidgetToolAllowed, IsWhiteboardWidgetToolName,\n MinWhiteboardWidgetAccess, RealtimeWhiteboardHostComponent, WHITEBOARD_TOOL_DEFINITIONS, WHITEBOARD_TOOL_NAMES,\n WHITEBOARD_TOOL_PREFIX, WHITEBOARD_WIDGET_TOOL_NAMES, WhiteboardAuthor, WhiteboardState, WhiteboardToolResult,\n SameWhiteboardWidgetActions, WhiteboardWidgetAccess, WhiteboardWidgetActionInfo, WhiteboardWidgetActionsChangedEventArgs,\n WhiteboardWidgetInteractionEvent,\n WhiteboardWidgetSubmitEvent, WhiteboardWidgetToolName\n} from '@memberjunction/ng-whiteboard';\nimport { DEFAULT_WHITEBOARD_CHANNEL_CONFIG, ParseWhiteboardChannelConfig, type WhiteboardChannelConfig } from './whiteboard-channel-config';\n\n/**\n * Whether a whiteboard tool result reports success.\n *\n * `ApplyWhiteboardAgentTool` returns a JSON `WhiteboardToolResult` string — `{ success: true, … }`\n * or `{ success: false, error }` — for every tool and every failure path. Anything that does not\n * parse as an object with `success === true` is treated as NOT a successful mutation, which is the\n * safe direction: the cost of missing a confirmation frame is one stale picture until the next\n * change, while the cost of a false one is telling the model an edit landed when it did not.\n */\nfunction toolSucceeded(result: string): boolean {\n try {\n const parsed: unknown = JSON.parse(result);\n return parsed !== null && typeof parsed === 'object' && (parsed as { success?: unknown }).success === true;\n } catch {\n // A non-JSON result cannot be confirmed as a mutation — the host returned something this\n // channel does not understand, so it does not get a \"your change is on screen\" note.\n return false;\n }\n}\n\n/**\n * Asynchronously rasterizes an SVG string to a JPEG base64 string (without the `data:image/jpeg;base64,` prefix)\n * using an offscreen canvas. Returns null in non-DOM environments or when rendering fails.\n */\nexport async function RasterizeSvgToJpegBase64(svg: string, width = 1280, height = 720): Promise<string | null> {\n if (typeof document === 'undefined' || typeof Image === 'undefined') {\n return null;\n }\n return new Promise<string | null>((resolve) => {\n let url: string | null = null;\n let timer: ReturnType<typeof setTimeout> | null = null;\n\n const cleanup = () => {\n if (timer != null) {\n clearTimeout(timer);\n timer = null;\n }\n if (url) {\n URL.revokeObjectURL(url);\n url = null;\n }\n };\n\n try {\n const img = new Image();\n const svgBlob = new Blob([svg], { type: 'image/svg+xml;charset=utf-8' });\n url = URL.createObjectURL(svgBlob);\n\n // Capped wait: resolve null and revoke URL if the Image never fires onload or onerror (item 61)\n timer = setTimeout(() => {\n console.error('[RealtimeWhiteboardChannel] SVG rasterization timed out after 5000ms');\n cleanup();\n resolve(null);\n }, 5000);\n\n img.onload = () => {\n try {\n const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n cleanup();\n resolve(null);\n return;\n }\n ctx.fillStyle = '#ffffff';\n ctx.fillRect(0, 0, width, height);\n ctx.drawImage(img, 0, 0, width, height);\n cleanup();\n const dataUrl = canvas.toDataURL('image/jpeg', 0.85);\n const comma = dataUrl.indexOf(',');\n resolve(comma >= 0 ? dataUrl.slice(comma + 1) : dataUrl);\n } catch (err) {\n console.error('[RealtimeWhiteboardChannel] Failed to rasterize SVG canvas to JPEG:', err);\n cleanup();\n resolve(null);\n }\n };\n img.onerror = (err) => {\n console.error('[RealtimeWhiteboardChannel] Failed to load SVG image for rasterization:', err);\n cleanup();\n resolve(null);\n };\n img.src = url;\n } catch (err) {\n console.error('[RealtimeWhiteboardChannel] Failed to initialize SVG rasterization:', err);\n cleanup();\n resolve(null);\n }\n });\n}\n\n/**\n * Per-widget throttle window for AMBIENT interaction context notes: at most one note per\n * widget per this many ms — within the window the LATEST summary wins (chatty widgets\n * collapse to one trailing-edge note instead of flooding the model's context).\n */\nexport const WHITEBOARD_INTERACTION_NOTE_THROTTLE_MS = 4000;\n\n/** Every widget tool's result carries the widget's contents (outline, state), so it requires `'state'` exposure. */\nconst WIDGET_TOOLS_RETURN_STATE: Readonly<Record<string, 'state'>> = Object.fromEntries(\n WHITEBOARD_WIDGET_TOOL_NAMES.map(name => [name, 'state' as const]));\n\n/**\n * Per-widget throttle window for \"widget offers actions\" perception notes (same leading +\n * trailing, latest-wins shape as the ambient interaction notes).\n */\nexport const WHITEBOARD_ACTIONS_NOTE_THROTTLE_MS = 4000;\n\n/**\n * Minimum spacing (ms) between the save requests a widget-state change triggers. The\n * session runtime debounces saves 3 s and RE-ARMS on every request, so a chatty widget\n * requesting on every keystroke would never save until teardown; spacing requests further\n * apart than the debounce guarantees each one lands.\n */\nexport const WHITEBOARD_WIDGET_STATE_SAVE_THROTTLE_MS = 5000;\n\n/** The JSON key the widget states ride under, beside the board's own fields, in the session save payload. */\nexport const WHITEBOARD_WIDGET_STATES_SAVE_KEY = 'widgetStates';\n\n/**\n * One widget command as {@link RealtimeWhiteboardChannel.OnBeforeWidgetCommand} sees it,\n * before it reaches the board.\n */\nexport interface WhiteboardChannelWidgetCommand {\n /** Which widget tool the agent called. */\n ToolName: WhiteboardWidgetToolName;\n /** The target widget's item ID, when the arguments name one. */\n ItemID: string | null;\n /** The parsed tool arguments, or null when they were not a JSON object (the board then answers `invalid_args`). */\n Args: Readonly<JSONObject> | null;\n /** The raw tool arguments as the model sent them. */\n ArgsJson: string;\n /** The effective widget access this call was checked against. */\n Access: WhiteboardWidgetAccess;\n}\n\n/** A widget-tool failure code (the `errorCode` of a {@link WhiteboardToolResult}). */\ntype WidgetToolErrorCode = NonNullable<WhiteboardToolResult['errorCode']>;\n\n/** A JSON tool result for a widget command the channel refused before it reached the board. */\nfunction widgetToolFailure(errorCode: WidgetToolErrorCode, error: string): string {\n const result: WhiteboardToolResult = { success: false, error, errorCode };\n return JSON.stringify(result);\n}\n\n/** Parses tool arguments into a JSON object, or null when they are not one. */\nfunction parseToolArgs(argsJson: string): JSONObject | null {\n try {\n const parsed: unknown = JSON.parse(argsJson);\n // JSON.parse output is JSON by construction, so narrowing a plain object to JSONObject is not a type lie.\n return IsPlainObject(parsed) ? (parsed as JSONObject) : null;\n } catch {\n return null;\n }\n}\n\n/** Whether a widget event came from the agent's own operate command (absent Author = the user). */\nfunction isAgentAuthored(event: { ItemID: string; Author?: WhiteboardAuthor }): boolean {\n return event.Author === 'agent';\n}\n\n/** Reads the `widgetStates` sibling key of a saved payload; anything malformed reads as none. */\nfunction readSavedWidgetStates(stateJson: string): Record<string, string> {\n const saved = parseToolArgs(stateJson);\n const raw = saved ? saved[WHITEBOARD_WIDGET_STATES_SAVE_KEY] : undefined;\n const out: Record<string, string> = {};\n if (IsPlainObject(raw)) {\n for (const [id, value] of Object.entries(raw as JSONObject)) {\n if (typeof value === 'string') {\n out[id] = value;\n }\n }\n }\n return out;\n}\n\n/** Per-key throttle bookkeeping. */\ninterface NoteThrottleEntry<T> {\n /** When this key's last note was sent (epoch ms). */\n LastSentAt: number;\n /** Trailing-edge timer for a deferred note, or null when the window is idle. */\n Timer: ReturnType<typeof setTimeout> | null;\n /** The latest value received within the open window (sent when the timer fires). */\n Pending: T | null;\n}\n\n/**\n * Per-key leading + trailing throttle for background notes: outside an open window a value\n * is sent immediately and opens a window; within the window the LATEST value is stashed and\n * a trailing-edge timer sends it when the window closes (one note per key per window).\n */\nclass KeyedNoteThrottle<T> {\n private entries = new Map<string, NoteThrottleEntry<T>>();\n\n constructor(private readonly windowMs: number, private readonly send: (value: T) => void) {}\n\n /** Offers one value for `key`; it is sent now or at the end of the key's open window. */\n public Push(key: string, value: T): void {\n const now = Date.now();\n const entry = this.entries.get(key);\n if (!entry || (entry.Timer === null && now - entry.LastSentAt >= this.windowMs)) {\n this.send(value);\n this.entries.set(key, { LastSentAt: now, Timer: null, Pending: null });\n return;\n }\n entry.Pending = value; // latest wins within the window\n if (entry.Timer === null) {\n const wait = Math.max(0, entry.LastSentAt + this.windowMs - now);\n entry.Timer = setTimeout(() => this.flush(entry), wait);\n }\n }\n\n /** Cancels every pending trailing note and resets all windows. */\n public Clear(): void {\n for (const entry of this.entries.values()) {\n if (entry.Timer !== null) {\n clearTimeout(entry.Timer);\n }\n }\n this.entries.clear();\n }\n\n private flush(entry: NoteThrottleEntry<T>): void {\n entry.Timer = null;\n const pending = entry.Pending;\n entry.Pending = null;\n if (pending !== null) {\n entry.LastSentAt = Date.now();\n this.send(pending);\n }\n }\n}\n\n/**\n * The LIVE WHITEBOARD as a pluggable interactive channel — the canonical\n * {@link BaseRealtimeChannelClient} implementation, resolved from the `MJ: AI Agent\n * Channels` registry row whose `ClientPluginClass` is `'RealtimeWhiteboardChannel'`.\n *\n * One instance per session (created via ClassFactory at session start). It owns the\n * board's {@link WhiteboardState} engine and contributes the channel's full contract:\n *\n * - **Action**: the `Whiteboard_*` client-executed tool set\n * ({@link WHITEBOARD_TOOL_DEFINITIONS}); {@link ApplyAgentTool} prefers the BOUND host\n * component (board mutation + violet pop-in / toast / presence-cursor garnish) and\n * falls back to the pure {@link ApplyWhiteboardAgentTool} engine call when no surface\n * is bound (e.g. the board has not been shown yet) — the channel keeps working, just\n * without the garnish.\n * - **Perception**: {@link BindSurface} subscribes the host's coalesced (750 ms)\n * `SceneDelta` stream and pipes each delta into the live model's context as a\n * `[whiteboard]` background note; the agent-undo toast click flows the same way.\n * - **Surface**: {@link RealtimeWhiteboardHostComponent}, created on the overlay's stage; the\n * host's \"Move to stage\" button rides `Context.SetFocusMode`, and the board hears where the\n * overlay placed it ({@link OnSurfacePlacementChange}) so the button offers the way back.\n * - **State of record**: every board mutation (user edits AND agent tool calls) requests\n * a save of {@link WhiteboardState.ToJSON} under channel name `'Whiteboard'` — the\n * host debounces and flushes at teardown.\n *\n * A PRIOR session's persisted board is restored through {@link RestoreState} (invoked by\n * the session host after Initialize, before any surface binding): the saved JSON is\n * rehydrated IN PLACE into the same {@link WhiteboardState} instance, so the save\n * subscription and any later surface binding keep pointing at one engine. Malformed or\n * incompatible payloads are tolerated — the board simply starts fresh.\n */\n@RegisterClass(BaseRealtimeChannelClient, 'RealtimeWhiteboardChannel')\nexport class RealtimeWhiteboardChannel extends BaseRealtimeChannelClient<RealtimeWhiteboardHostComponent> implements IChannelFrameProvider {\n /** The board's state of record — created fresh with the plugin (one per session). */\n public readonly State = new WhiteboardState();\n\n /** The live bound surface, when the channel tab's pane is instantiated. */\n private host: RealtimeWhiteboardHostComponent | null = null;\n /** Output subscriptions on the bound surface (SceneDelta / AgentUndo / FocusModeChange). */\n private surfaceSubs: Subscription[] = [];\n /** Board-mutation subscription driving the debounced state-of-record save. */\n private stateChangedSub: Subscription | null = null;\n /** Per-widget ambient-interaction note throttles (ItemID → window state). */\n private interactionThrottles = new KeyedNoteThrottle<WhiteboardWidgetInteractionEvent>(\n WHITEBOARD_INTERACTION_NOTE_THROTTLE_MS, (interaction) => this.sendInteractionNote(interaction));\n /** Per-widget \"offers actions\" note throttles (ItemID → window state). */\n private actionsNoteThrottles = new KeyedNoteThrottle<WhiteboardWidgetActionsChangedEventArgs>(\n WHITEBOARD_ACTIONS_NOTE_THROTTLE_MS, (actions) => this.sendActionsNote(actions));\n /** Per-widget action list of the last \"offers actions\" note SENT (ItemID → actions), for dedupe. */\n private lastActionsNoted = new Map<string, WhiteboardWidgetActionInfo[]>();\n /** The parsed `ChannelConfig` (defaults until {@link OnInitialize}). */\n private config: WhiteboardChannelConfig = { ...DEFAULT_WHITEBOARD_CHANNEL_CONFIG };\n /** Widget-state subscription driving the throttled save. */\n private widgetStateSub: Subscription | null = null;\n /** Trailing timer of the widget-state save throttle, or null when idle. */\n private widgetStateSaveTimer: ReturnType<typeof setTimeout> | null = null;\n /** When the widget-state path last requested a save (epoch ms). */\n private lastWidgetStateSaveAt = Number.NEGATIVE_INFINITY;\n /** True while {@link RestoreState} runs: saves are held so none carries a half-restored board. */\n private restoring = false;\n public get ChannelName(): string {\n return 'Whiteboard';\n }\n\n /**\n * Produces the latest visual scene as a base64-encoded frame for the video bridge.\n * Renders the whiteboard SVG into an offscreen canvas and returns base64 JPEG.\n */\n public async GetLatestFrame(): Promise<string | null> {\n if (!this.State) {\n return null;\n }\n try {\n const svg = BuildWhiteboardExportSvg(this.State);\n return await RasterizeSvgToJpegBase64(svg);\n } catch (err) {\n console.error('[RealtimeWhiteboardChannel] Failed to export whiteboard frame:', err);\n return null;\n }\n }\n\n /**\n * The shared frame bridge, which now lives on the base channel (`VisualVideoBridge`). This accessor\n * keeps the board's long-standing `videoBridge` handle — tests and tooling reach the bridge by that\n * name — pointing at the one the pump actually writes to.\n */\n private get videoBridge(): ChannelInboundVideoBridge | null {\n return this.VisualVideoBridge;\n }\n private set videoBridge(bridge: ChannelInboundVideoBridge | null) {\n this.VisualVideoBridge = bridge;\n }\n\n // The change-driven frame pump (leading edge, trailing settle, dedupe, negotiated cadence, one\n // confirmation frame after an agent edit) used to live here. It is now the base channel's\n // `EnableVisualPerception` pump, enabled from OnInitialize — this channel only says WHEN its picture\n // changed. The behavior is unchanged, including (deliberately) the shared bridge's fixed-rate poller:\n // see `StartBridgePoller` in OnInitialize.\n\n public get ToolNamePrefix(): string {\n return WHITEBOARD_TOOL_PREFIX;\n }\n\n public get TabTitle(): string {\n return 'Whiteboard';\n }\n\n public get TabIcon(): string {\n return 'fa-solid fa-chalkboard';\n }\n\n /** The board can be shared on its own: the call's Share menu offers it under \"This panel\" while it is on screen. */\n public override get SurfaceShareable(): boolean {\n return true;\n }\n\n /**\n * The board's tools. The widget tools are declared only as far as {@link MaxWidgetAccess}\n * allows (`'inspect-only'` declares Inspect only, `'off'` none). Read before the channel is\n * initialized, so it depends on the class alone, never on the session's config.\n */\n public GetToolDefinitions(): RealtimeToolDefinition[] {\n const max = this.MaxWidgetAccess;\n if (max === 'full') {\n return WHITEBOARD_TOOL_DEFINITIONS;\n }\n return WHITEBOARD_TOOL_DEFINITIONS.filter(tool => !IsWhiteboardWidgetToolName(tool.Name) || IsWhiteboardWidgetToolAllowed(max, tool.Name));\n }\n\n // ────────────────────────────────────────────── widget access policy (extension points)\n\n /**\n * The most widget access this channel class ever offers — which widget tools it DECLARES to the\n * model (tools are collected before the channel is initialized, so this cannot depend on the\n * session). Default `'full'`. A host app lowers it by subclassing the channel and registering the\n * subclass under `'RealtimeWhiteboardChannel'` (or via `HostChannels[].Create`).\n */\n protected get MaxWidgetAccess(): WhiteboardWidgetAccess {\n return 'full';\n }\n\n /**\n * The widget access in force for ONE call, evaluated per call (so it may change mid-session,\n * e.g. `'off'` while an assessment is open). Default: the lower of {@link MaxWidgetAccess} and\n * the session's `widgetAccess` config. A call it does not allow returns `access_denied`.\n */\n protected ResolveWidgetAccess(): WhiteboardWidgetAccess {\n return MinWhiteboardWidgetAccess(this.MaxWidgetAccess, this.config.WidgetAccess);\n }\n\n /**\n * Last-moment veto of one widget command that access already allows: return the refusal text the\n * model should see (the call returns `vetoed` with it) or `null` to let it through. Default allows all.\n */\n protected OnBeforeWidgetCommand(_command: WhiteboardChannelWidgetCommand): string | null {\n return null;\n }\n\n /** Whether widget runtime state rides in this session's saves (config `persistWidgetState`). */\n public get PersistWidgetState(): boolean {\n return this.config.PersistWidgetState;\n }\n\n public override GetSurfaceComponent(): Type<RealtimeWhiteboardHostComponent> {\n return RealtimeWhiteboardHostComponent;\n }\n\n /** First-run intro shown the first time the user opens the Whiteboard tab (once per user). */\n public override GetOnboardingDetails(): ChannelOnboardingDetails {\n return {\n Heading: 'Whiteboard',\n Description:\n 'A shared canvas the agent can sketch, write and annotate on live during the call — ' +\n 'whatever it draws appears here instantly, and anything you add is something it can see too.',\n Tips: [\n 'Watch the board fill in as you talk — the agent updates it in real time.',\n 'Add your own notes or shapes; the agent perceives your edits and can build on them.',\n 'Use Focus to give the board the whole screen, and save it to artifacts to keep it.'\n ],\n IconClass: 'fa-solid fa-chalkboard'\n };\n }\n\n /**\n * The board's self-description: what it holds, every `Whiteboard_*` tool as a verb (so a tool a\n * subclass adds shows up here too), and that the model can SEE it (frames), not just read its state.\n */\n public override GetDescriptor(): RealtimeChannelDescriptor {\n return {\n Key: this.ChannelName,\n Version: REALTIME_CHANNEL_CONTRACT_VERSION,\n DisplayName: this.TabTitle,\n OwningPackage: '@memberjunction/ng-conversations',\n Instructions:\n 'A shared canvas you and the user can both draw, write and annotate on live. Whatever you add ' +\n 'appears instantly, and you perceive what the user adds. Use it to sketch, diagram and explain ' +\n 'visually; do not narrate minor edits.',\n Nouns: [\n {\n Name: 'pages',\n Description: 'The board\\'s pages, in order; each holds the items (notes, shapes, connectors, text, widgets) drawn on it.',\n Schema: { type: 'array', items: { type: 'object' } }\n }\n ],\n // Each widget tool returns the widget's contents, so the runtime refuses it below 'state' exposure.\n Verbs: BuildToolBackedVerbs(this.GetToolDefinitions(), this.ToolNamePrefix, 'agent', WIDGET_TOOLS_RETURN_STATE),\n Events: [\n { Name: 'state_changed', Description: 'The board changed (by you or the user).' },\n { Name: 'frame_pushed', Description: 'A picture of the board was sent to you.' }\n ],\n DisplayPolicy: 'open-on-start',\n DefaultAvailability: 'all-sessions',\n MaxExposure: 'pixels'\n };\n }\n\n /**\n * Persist the board (host-debounced) on EVERY board mutation — user edits AND agent tools — and drive\n * the visual pump. The board feeds the model its own perception (coalesced scene deltas from the\n * bound surface), so state changes are recorded for events and frame tagging only (`Perceive: false`):\n * the structured note would duplicate the deltas.\n */\n protected override OnInitialize(): void {\n this.applyChannelConfig();\n this.stateChangedSub?.unsubscribe();\n this.EnableVisualPerception(this, {\n ConfirmationNote:\n '[whiteboard] visual confirmation of your action (background — do NOT narrate or announce your own change; continue naturally)',\n // Preserves what the board always did: it started the bridge's fixed-rate poller despite being\n // designed heartbeat-free. Flagged for the reviewer; remove to make the board purely change-driven.\n StartBridgePoller: true\n });\n this.stateChangedSub = this.State.Changed$.subscribe((change) => {\n if (!this.restoring) {\n this.Context?.RequestSave(this.BuildSavePayload());\n }\n this.RecordChange({ Author: change.Author, Perceive: false });\n // Only user edits (and scene replacements like undo) drive the settle-debounce pipeline.\n // Agent edits are confirmed with a single frame in ApplyAgentTool.\n if (change.Author === 'user' || change.Op === 'replace') {\n void this.NotifyVisualChange();\n }\n });\n // Widget state is runtime data (no Changed$): save it on its own, throttled cadence.\n this.widgetStateSub?.unsubscribe();\n this.widgetStateSub = this.State.WidgetStateChanged$.subscribe(() => this.scheduleWidgetStateSave());\n }\n\n /** Parses `ChannelConfig`; an invalid member falls back to its default with a console warning. */\n private applyChannelConfig(): void {\n const parsed = ParseWhiteboardChannelConfig(this.Context?.ChannelConfig);\n this.config = parsed.Config;\n for (const problem of parsed.Problems) {\n console.warn(`[RealtimeWhiteboardChannel] channel config: ${problem}`);\n }\n }\n\n /**\n * Tells the model, once the session is live, which widget tools this session's access leaves\n * unavailable (notes sent before the session is live are dropped, so not from OnInitialize).\n */\n public override OnSessionStarted(): void {\n super.OnSessionStarted();\n const limit = this.describeWidgetAccessLimit(this.ResolveWidgetAccess());\n if (limit) {\n this.Context?.SendContextNote(`[whiteboard] ${limit}`);\n }\n }\n\n /** One sentence naming the widget tools `access` leaves unavailable, or null at full access. */\n private describeWidgetAccessLimit(access: WhiteboardWidgetAccess): string | null {\n if (access === 'full') {\n return null;\n }\n const unavailable = WHITEBOARD_WIDGET_TOOL_NAMES.filter(name => !IsWhiteboardWidgetToolAllowed(access, name));\n const reason = access === 'off'\n ? 'widget tools are turned off for this session'\n : `widgets are inspect-only for this session — read them with ${WHITEBOARD_TOOL_NAMES.InspectWidget}, but do not try to change them`;\n return `${unavailable.join(', ')} ${unavailable.length === 1 ? 'is' : 'are'} unavailable: ${reason}.`;\n }\n\n /**\n * The session save payload: the board's own JSON plus, when `persistWidgetState` is on and any\n * widget holds state, a sibling `widgetStates` key. Old readers ignore the unknown key; LiveKit\n * sync and Save-to-artifact keep plain {@link WhiteboardState.ToJSON}.\n */\n protected BuildSavePayload(): string {\n const boardJson = this.State.ToJSON();\n if (!this.config.PersistWidgetState) {\n return boardJson;\n }\n const widgetStates = this.State.WidgetStatesToJSON();\n if (Object.keys(widgetStates).length === 0) {\n return boardJson;\n }\n const payload = parseToolArgs(boardJson) ?? {};\n payload[WHITEBOARD_WIDGET_STATES_SAVE_KEY] = widgetStates;\n return JSON.stringify(payload);\n }\n\n /**\n * Requests a save for a widget-state change at most once per\n * {@link WHITEBOARD_WIDGET_STATE_SAVE_THROTTLE_MS} (leading edge, then one trailing request with\n * the latest state). Nothing is requested when `persistWidgetState` is off.\n */\n private scheduleWidgetStateSave(): void {\n if (this.restoring || !this.config.PersistWidgetState || this.widgetStateSaveTimer !== null) {\n return;\n }\n const wait = this.lastWidgetStateSaveAt + WHITEBOARD_WIDGET_STATE_SAVE_THROTTLE_MS - Date.now();\n if (wait <= 0) {\n this.requestWidgetStateSave();\n return;\n }\n this.widgetStateSaveTimer = setTimeout(() => {\n this.widgetStateSaveTimer = null;\n this.requestWidgetStateSave();\n }, wait);\n }\n\n private requestWidgetStateSave(): void {\n this.lastWidgetStateSaveAt = Date.now();\n this.Context?.RequestSave(this.BuildSavePayload());\n }\n\n /**\n * Wires the dynamically-created board host: inputs (shared state engine + agent name)\n * are set BEFORE the component's first change detection, and the perception/garnish\n * outputs are subscribed back into the host context — the overlay never sees any of it.\n */\n public BindSurface(instance: RealtimeWhiteboardHostComponent): void {\n this.EnsureVideoBridge();\n this.releaseSurface();\n this.host = instance;\n instance.State = this.State;\n instance.AgentName = this.Context?.AgentName ?? 'Agent';\n instance.AgentWidgetAccess = this.ResolveWidgetAccess();\n this.surfaceSubs.push(\n // The board's coalesced scene delta — the perception feed the agent \"sees\".\n instance.SceneDelta.subscribe((deltaJson: string) => {\n // Background PERCEPTION, not conversation: the model sees every user edit without\n // being told, but must not narrate minor changes — only react when something is\n // significant (or when asked). The etiquette rides in the note itself so any\n // realtime model gets it regardless of system-prompt sync state.\n this.Context?.SendContextNote(\n '[whiteboard] board update (background context — do NOT comment on minor edits; ' +\n 'only mention it if the change is significant to the discussion): ' + deltaJson);\n }),\n // The user clicked Undo on the agent-action toast (the undo already applied locally).\n instance.AgentUndo.subscribe(() => {\n this.Context?.SendContextNote('[whiteboard] user undid your last change');\n }),\n // A sandboxed HTML widget submitted user input (MJWhiteboard.submit) — already\n // validated, size-capped and not canceled (the host's cancelable WidgetSubmitting\n // event ran first). Surface it to the agent so it can react to quiz answers /\n // micro-form input it asked for.\n instance.WidgetSubmitted.subscribe((submit: WhiteboardWidgetSubmitEvent) => {\n // The agent's own operate command submitted it: the tool result already carries\n // `submitted`, so no note and no spoken reaction (it would answer itself).\n if (isAgentAuthored(submit)) {\n return;\n }\n // Durable awareness first (the note persists in the model's context)…\n this.Context?.SendContextNote(\n `[whiteboard] the user submitted input in widget \"${submit.Title || submit.ItemID}\": ${submit.DataJson}`);\n // …then make the model REACT — a submission is explicit user input the user is\n // waiting on; without this trigger, SendContextNote alone produces dead silence\n // (\"I clicked Submit and nothing happened\").\n this.Context?.RequestSpokenResponse?.(\n `The user just submitted input in the whiteboard widget \"${submit.Title || submit.ItemID}\": ${submit.DataJson}. ` +\n `React to it now in your own voice — acknowledge their choice and continue naturally.`);\n }),\n // AMBIENT widget telemetry (the injected recorder, NOT widget-authored script):\n // clicks / changes / typing summarized by the board. Pure background perception —\n // throttled per widget so chatty widgets don't flood the model's context, and framed\n // with do-not-respond etiquette (explicit MJWhiteboard.submit input arrives above).\n instance.WidgetInteraction.subscribe((interaction: WhiteboardWidgetInteractionEvent) => {\n this.onWidgetInteraction(interaction);\n }),\n // A widget registered or changed its named actions — a throttled perception note.\n instance.WidgetActionsChanged.subscribe((actions: WhiteboardWidgetActionsChangedEventArgs) => {\n this.actionsNoteThrottles.Push(actions.ItemID, actions);\n }),\n // The board's Focus toggle — ask the shell to collapse/restore the main call column.\n instance.FocusModeChange.subscribe((focused: boolean) => {\n this.Context?.SetFocusMode(focused);\n }),\n // \"Save to artifacts\": snapshot the board as a first-class versioned artifact.\n instance.SaveToArtifactsRequested.subscribe(() => {\n void this.saveBoardAsArtifact();\n })\n );\n }\n\n public override UnbindSurface(): void {\n this.releaseSurface();\n }\n\n /**\n * Routes one ambient widget-interaction batch to the agent as a throttled background\n * context note: outside an open window the note goes out immediately and opens a\n * {@link WHITEBOARD_INTERACTION_NOTE_THROTTLE_MS} window; within the window the LATEST\n * event is stashed and a trailing-edge timer sends it when the window closes (one note\n * per widget per window, latest summary wins). The agent's own interactions (its operate\n * steps) are not echoed back to it.\n */\n private onWidgetInteraction(interaction: WhiteboardWidgetInteractionEvent): void {\n if (isAgentAuthored(interaction)) {\n return;\n }\n this.interactionThrottles.Push(interaction.ItemID, interaction);\n }\n\n /** The ambient-note framing: background etiquette rides in the note itself (like scene deltas). */\n private sendInteractionNote(interaction: WhiteboardWidgetInteractionEvent): void {\n this.Context?.SendContextNote(\n `[whiteboard] ambient activity in widget \"${interaction.Title || interaction.ItemID}\" ` +\n '(background — do NOT respond unless it is significant or you are asked; ' +\n `explicit submissions arrive separately): ${interaction.Summary}`);\n }\n\n /**\n * \"[whiteboard] widget … offers actions: …\" — sent only when the channel's exposure lets the\n * model see board contents (`'state'` or above) and this session may call widget actions,\n * and only when the list (names + descriptions) differs from the last note sent for that\n * widget: a remount, a `hello` answer or the agent's own inspect re-reports the same list.\n */\n private sendActionsNote(event: WhiteboardWidgetActionsChangedEventArgs): void {\n if (event.Actions.length === 0 || CompareExposure(this.Exposure, 'state') < 0) {\n return;\n }\n if (!IsWhiteboardWidgetToolAllowed(this.ResolveWidgetAccess(), WHITEBOARD_TOOL_NAMES.CallWidget)) {\n return;\n }\n const lastSent = this.lastActionsNoted.get(event.ItemID);\n if (lastSent && SameWhiteboardWidgetActions(lastSent, event.Actions)) {\n return;\n }\n this.lastActionsNoted.set(event.ItemID, event.Actions.map(action => ({ ...action })));\n const names = event.Actions.map(action => action.Name).join(', ');\n this.Context?.SendContextNote(`[whiteboard] widget \"${event.Title || event.ItemID}\" (${event.ItemID}) offers actions: ${names}`);\n }\n\n /** Cancels all pending ambient / actions note timers and resets the per-widget throttle windows. */\n private clearInteractionThrottles(): void {\n this.interactionThrottles.Clear();\n this.actionsNoteThrottles.Clear();\n }\n\n /**\n * Persists the current board as a `MJ: Artifacts` snapshot via the host context\n * (best-effort; the host logs failures). On success the agent is told via a context\n * note so it can reference the saved artifact naturally.\n */\n private async saveBoardAsArtifact(): Promise<void> {\n const ctx = this.Context;\n if (!ctx) {\n return;\n }\n const now = new Date();\n const name = `Whiteboard — ${now.toLocaleDateString()} ${now.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}`;\n const artifactId = await ctx.SaveAsArtifact(name, this.State.ToJSON());\n if (artifactId) {\n ctx.SendContextNote(`[whiteboard] the user saved the current board as the artifact \"${name}\"`);\n }\n }\n\n /**\n * Executes one `Whiteboard_*` tool call LOCALLY. Board tools prefer the live bound host\n * (board mutation + UI garnish) and fall back to the pure engine function when no surface\n * is bound, so the channel keeps working before the board is first shown. Widget tools\n * (inspect / operate / call) need the live board and resolve asynchronously; see\n * {@link applyWidgetTool}.\n *\n * Return contract: **board tools return a plain `string` synchronously** (bound or not);\n * **the three widget tools** ({@link IsWhiteboardWidgetToolName}) **return a\n * `Promise<string>`** (policy refusals may also come back as a plain string). The declared\n * type is therefore `string | Promise<string>`. An override that post-processes results\n * should route `IsWhiteboardWidgetToolName(toolName)` calls straight to `super` and, for the\n * rest, narrow the board result with `typeof result === 'string'`.\n */\n public ApplyAgentTool(toolName: string, argsJson: string): string | Promise<string> {\n if (IsWhiteboardWidgetToolName(toolName)) {\n return this.applyWidgetTool(toolName, argsJson);\n }\n let result: string;\n if (this.host) {\n result = this.host.ApplyAgentTool(toolName, argsJson);\n } else {\n result = ApplyWhiteboardAgentTool(this.State, toolName, argsJson);\n }\n // A SUCCESSFUL agent tool triggers exactly ONE immediate visual confirmation frame and a note\n // telling the model not to narrate its own change. A FAILED one must trigger neither: every\n // failure path returns `{ success: false, error }` (bad JSON args, unknown tool, per-tool\n // validation), and confirming it would tell the model its edit landed AND instruct it to stay\n // quiet about it — so the failure would vanish from the user's view while the model carried on.\n // It would also push a frame identical to the last one, since a failed tool changes nothing.\n if (toolSucceeded(result)) {\n void this.ConfirmVisualChange();\n }\n return result;\n }\n\n /**\n * One widget command: access policy (`access_denied`, with the reason), then the\n * {@link OnBeforeWidgetCommand} veto (`vetoed`), then the live board (`surface_unavailable`\n * when none is bound). No confirmation frame: a widget's picture is a placeholder in frames.\n */\n private applyWidgetTool(toolName: WhiteboardWidgetToolName, argsJson: string): string | Promise<string> {\n const access = this.ResolveWidgetAccess();\n if (!IsWhiteboardWidgetToolAllowed(access, toolName)) {\n return widgetToolFailure('access_denied', this.describeWidgetAccessLimit(access) ?? `${toolName} is not available.`);\n }\n const args = parseToolArgs(argsJson);\n const itemId = args && typeof args['itemId'] === 'string' ? args['itemId'] : null;\n const refusal = this.OnBeforeWidgetCommand({ ToolName: toolName, ItemID: itemId, Args: args, ArgsJson: argsJson, Access: access });\n if (refusal !== null) {\n return widgetToolFailure('vetoed', refusal);\n }\n const host = this.host;\n if (!host) {\n return widgetToolFailure('surface_unavailable',\n 'The whiteboard isn\\'t open, so its widgets can\\'t be reached; ask the user to open the Whiteboard panel, then try again.');\n }\n host.AgentWidgetAccess = access; // per-call policy may have changed since BindSurface\n return host.ApplyAgentToolAsync(toolName, argsJson).catch((error: Error) =>\n widgetToolFailure('surface_unavailable', `The whiteboard could not run ${toolName}: ${error?.message ?? String(error)}`));\n }\n\n /**\n * The board's serialized state of record — the board JSON only. It also backs the channel's\n * `GetState()` snapshot, so widget states (learner answers) stay out of it; they ride only in\n * the session save payload ({@link BuildSavePayload}).\n */\n public override SerializeState(): string | null {\n return this.State.ToJSON();\n }\n\n /**\n * Rehydrates a prior session's saved board into THIS session's state engine (in place —\n * the {@link State} instance and its subscriptions are preserved). Returns `true` on\n * success; malformed / incompatible JSON returns `false` and the board stays fresh\n * (never throws — {@link WhiteboardState.LoadFromJSON} is tolerant by contract).\n *\n * Saves: none are requested while the board and its widget states are being loaded (so no\n * save can pair the restored board with stale in-memory widget states); after a successful\n * restore, exactly one save is requested carrying both. A failed restore requests nothing.\n */\n public override RestoreState(stateJson: string): boolean {\n // A trailing widget-state save armed before the restore would fire after it as a second save.\n if (this.widgetStateSaveTimer !== null) {\n clearTimeout(this.widgetStateSaveTimer);\n this.widgetStateSaveTimer = null;\n }\n this.restoring = true;\n try {\n if (!this.State.LoadFromJSON(stateJson)) {\n return false;\n }\n // A legacy payload (no `widgetStates` key) simply restores no widget state. With\n // `persistWidgetState` off nothing is restored either: state lives in memory only.\n this.State.LoadWidgetStates(this.config.PersistWidgetState ? readSavedWidgetStates(stateJson) : {});\n }\n finally {\n this.restoring = false;\n }\n this.Context?.RequestSave(this.BuildSavePayload());\n return true;\n }\n\n /** Keeps the board's \"Move to stage\" / \"Back to tab\" button true to where the host placed it. */\n public override OnSurfacePlacementChange(placement: MediaPlacement): void {\n this.host?.SetOnStage(placement === 'stage');\n }\n\n /**\n * Exit focus mode THROUGH the bound host (its own Focus button state stays in sync; it\n * re-emits `FocusModeChange(false)` → `Context.SetFocusMode(false)`). When no surface is\n * bound the overlay's defensive flag clear covers it.\n */\n public override RequestFocusExit(): void {\n if (this.host?.FocusMode) {\n this.host.ToggleFocus();\n }\n }\n\n public override Dispose(): void {\n this.stateChangedSub?.unsubscribe();\n this.stateChangedSub = null;\n this.widgetStateSub?.unsubscribe();\n this.widgetStateSub = null;\n if (this.widgetStateSaveTimer !== null) {\n // Best effort: hand the latest widget state over before the context is released.\n clearTimeout(this.widgetStateSaveTimer);\n this.widgetStateSaveTimer = null;\n this.requestWidgetStateSave();\n }\n super.Dispose(); // releases the surface binding, the visual pump + bridge, and the context\n }\n\n /** Unsubscribes surface outputs, cancels pending ambient notes and drops the host reference. */\n private releaseSurface(): void {\n for (const sub of this.surfaceSubs) {\n sub.unsubscribe();\n }\n this.surfaceSubs = [];\n this.clearInteractionThrottles();\n this.host = null;\n }\n}\n\n/**\n * Tree-shaking prevention: the whiteboard channel is resolved dynamically through the\n * ClassFactory (by the registry row's `ClientPluginClass` key), so this static call is\n * what keeps its `@RegisterClass` side effect from being eliminated by the bundler.\n * Called by `RealtimeSessionService` alongside the realtime-client driver Load calls.\n */\nexport function LoadRealtimeWhiteboardChannel(): void {\n // intentional no-op — the import side effect performs the registration\n}\n\n/** @deprecated Use {@link RasterizeSvgToJpegBase64}. */\nexport async function rasterizeSvgToJpegBase64(svg: string, width = 1280, height = 720): Promise<string | null> {\n return RasterizeSvgToJpegBase64(svg, width, height);\n}\n"]}
|
|
@@ -78,9 +78,10 @@ import * as i76 from "./components/realtime/remote-browser/remote-browser-surfac
|
|
|
78
78
|
import * as i77 from "./components/realtime/media/realtime-media-surface.component";
|
|
79
79
|
import * as i78 from "./components/realtime/interactive-component/realtime-interactive-component-surface.component";
|
|
80
80
|
import * as i79 from "./components/realtime/evidence-playback/realtime-evidence-playback.component";
|
|
81
|
+
import * as i80 from "./components/message/agent-handoff-card.component";
|
|
81
82
|
export declare class ConversationsModule {
|
|
82
83
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConversationsModule, never>;
|
|
83
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ConversationsModule, [typeof i1.MessageItemComponent, typeof i2.MessageListComponent, typeof i3.MessageInputComponent, typeof i4.AiComposerComponent, typeof i5.ActionableCommandsComponent, typeof i6.WorkflowPlanCardComponent, typeof i7.ConversationMessageRatingComponent, typeof i8.ConversationWorkspaceComponent, typeof i9.ConversationNavigationComponent, typeof i10.ConversationSidebarComponent, typeof i11.RoutinesSectionComponent, typeof i12.ConversationListComponent, typeof i13.ConversationChatAreaComponent, typeof i14.ConversationEmptyStateComponent, typeof i15.ConversationAgentPickerComponent, typeof i16.ConversationModePickerComponent, typeof i17.CollectionTreeComponent, typeof i18.CollectionViewComponent, typeof i19.CollectionArtifactCardComponent, typeof i20.LibraryFullViewComponent, typeof i21.CollectionFormModalComponent, typeof i22.ArtifactCreateModalComponent, typeof i23.CollectionsFullViewComponent, typeof i24.ProjectSelectorComponent, typeof i25.ProjectFormModalComponent, typeof i26.TasksDropdownComponent, typeof i27.TaskWidgetComponent, typeof i28.AgentProcessPanelComponent, typeof i29.ActiveAgentIndicatorComponent, typeof i30.ActiveTasksPanelComponent, typeof i31.ShareModalComponent, typeof i32.MembersModalComponent, typeof i33.ExportModalComponent, typeof i34.SearchPanelComponent, typeof i35.NotificationBadgeComponent, typeof i36.ActivityIndicatorComponent, typeof i37.ToastComponent, typeof i38.InputDialogComponent, typeof i39.RatingDialogComponent, typeof i40.GlobalTasksPanelComponent, typeof i41.ImageViewerComponent, typeof i42.PinnedMessagesPanelComponent, typeof i43.ForksPopoverComponent, typeof i44.ChatAgentsOverlayComponent, typeof i45.SearchShortcutDirective], [typeof i46.CommonModule, typeof i47.FormsModule, typeof i48.TaskGraphEditorModule, typeof i47.ReactiveFormsModule, typeof i49.OverlayModule, typeof i50.MJButtonDirective, typeof i50.MJClickableDirective, typeof i50.MJDatepickerComponent, typeof i50.MJDialogComponent, typeof i50.MJDialogActionsComponent, typeof i50.MJEmptyStateComponent, typeof i50.MJAlertComponent, typeof i50.MJAccordionModule, typeof i50.MJFilterChipComponent, typeof i51.ContainerDirectivesModule, typeof i52.CodeEditorModule, typeof i53.ArtifactsModule, typeof i54.TestingModule, typeof i55.SharedGenericModule, typeof i56.UserRoutinesModule, typeof i57.ComposerModule, typeof i58.MarkdownModule, typeof i59.DynamicFormsModule, typeof i60.ResourcePermissionsModule, typeof i61.TasksFullViewComponent, typeof i62.CollectionShareModalComponent, typeof i63.UserPickerComponent, typeof i64.ArtifactCollectionPickerModalComponent, typeof i65.ArtifactShareModalComponent, typeof i66.ChatSlotDirective, typeof i67.MJChatEmptyStateDefaultComponent, typeof i68.MJChatAgentPresenceDefaultComponent, typeof i69.MJChatHeaderDefaultComponent, typeof i70.MJChatMessageExtraDefaultComponent, typeof i71.MJChatDemonstrationSurfaceDefaultComponent, typeof i72.MJChatMessageBubbleDefaultComponent, typeof i73.RealtimeAgentPickerComponent, typeof i74.RealtimeSessionOverlayComponent, typeof i75.RealtimeWhiteboardHostComponent, typeof i76.RemoteBrowserSurfaceComponent, typeof i77.RealtimeMediaSurfaceComponent, typeof i78.RealtimeInteractiveComponentSurfaceComponent, typeof i79.RealtimeEvidencePlaybackComponent], [typeof i1.MessageItemComponent, typeof i2.MessageListComponent, typeof i3.MessageInputComponent, typeof i4.AiComposerComponent, typeof i5.ActionableCommandsComponent, typeof i6.WorkflowPlanCardComponent, typeof i7.ConversationMessageRatingComponent, typeof i8.ConversationWorkspaceComponent, typeof i9.ConversationNavigationComponent, typeof i10.ConversationSidebarComponent, typeof i11.RoutinesSectionComponent, typeof i12.ConversationListComponent, typeof i13.ConversationChatAreaComponent, typeof i14.ConversationEmptyStateComponent, typeof i15.ConversationAgentPickerComponent, typeof i16.ConversationModePickerComponent, typeof i17.CollectionTreeComponent, typeof i18.CollectionViewComponent, typeof i19.CollectionArtifactCardComponent, typeof i20.LibraryFullViewComponent, typeof i21.CollectionFormModalComponent, typeof i22.ArtifactCreateModalComponent, typeof i23.CollectionsFullViewComponent, typeof i24.ProjectSelectorComponent, typeof i25.ProjectFormModalComponent, typeof i26.TasksDropdownComponent, typeof i27.TaskWidgetComponent, typeof i28.AgentProcessPanelComponent, typeof i29.ActiveAgentIndicatorComponent, typeof i30.ActiveTasksPanelComponent, typeof i31.ShareModalComponent, typeof i32.MembersModalComponent, typeof i33.ExportModalComponent, typeof i34.SearchPanelComponent, typeof i35.NotificationBadgeComponent, typeof i36.ActivityIndicatorComponent, typeof i37.ToastComponent, typeof i38.InputDialogComponent, typeof i39.RatingDialogComponent, typeof i40.GlobalTasksPanelComponent, typeof i41.ImageViewerComponent, typeof i42.PinnedMessagesPanelComponent, typeof i43.ForksPopoverComponent, typeof i44.ChatAgentsOverlayComponent, typeof i45.SearchShortcutDirective, typeof i57.ComposerModule, typeof i61.TasksFullViewComponent, typeof i66.ChatSlotDirective, typeof i67.MJChatEmptyStateDefaultComponent, typeof i68.MJChatAgentPresenceDefaultComponent, typeof i69.MJChatHeaderDefaultComponent, typeof i70.MJChatMessageExtraDefaultComponent, typeof i71.MJChatDemonstrationSurfaceDefaultComponent, typeof i72.MJChatMessageBubbleDefaultComponent, typeof i73.RealtimeAgentPickerComponent, typeof i74.RealtimeSessionOverlayComponent, typeof i75.RealtimeWhiteboardHostComponent, typeof i76.RemoteBrowserSurfaceComponent, typeof i77.RealtimeMediaSurfaceComponent, typeof i79.RealtimeEvidencePlaybackComponent]>;
|
|
84
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ConversationsModule, [typeof i1.MessageItemComponent, typeof i2.MessageListComponent, typeof i3.MessageInputComponent, typeof i4.AiComposerComponent, typeof i5.ActionableCommandsComponent, typeof i6.WorkflowPlanCardComponent, typeof i7.ConversationMessageRatingComponent, typeof i8.ConversationWorkspaceComponent, typeof i9.ConversationNavigationComponent, typeof i10.ConversationSidebarComponent, typeof i11.RoutinesSectionComponent, typeof i12.ConversationListComponent, typeof i13.ConversationChatAreaComponent, typeof i14.ConversationEmptyStateComponent, typeof i15.ConversationAgentPickerComponent, typeof i16.ConversationModePickerComponent, typeof i17.CollectionTreeComponent, typeof i18.CollectionViewComponent, typeof i19.CollectionArtifactCardComponent, typeof i20.LibraryFullViewComponent, typeof i21.CollectionFormModalComponent, typeof i22.ArtifactCreateModalComponent, typeof i23.CollectionsFullViewComponent, typeof i24.ProjectSelectorComponent, typeof i25.ProjectFormModalComponent, typeof i26.TasksDropdownComponent, typeof i27.TaskWidgetComponent, typeof i28.AgentProcessPanelComponent, typeof i29.ActiveAgentIndicatorComponent, typeof i30.ActiveTasksPanelComponent, typeof i31.ShareModalComponent, typeof i32.MembersModalComponent, typeof i33.ExportModalComponent, typeof i34.SearchPanelComponent, typeof i35.NotificationBadgeComponent, typeof i36.ActivityIndicatorComponent, typeof i37.ToastComponent, typeof i38.InputDialogComponent, typeof i39.RatingDialogComponent, typeof i40.GlobalTasksPanelComponent, typeof i41.ImageViewerComponent, typeof i42.PinnedMessagesPanelComponent, typeof i43.ForksPopoverComponent, typeof i44.ChatAgentsOverlayComponent, typeof i45.SearchShortcutDirective], [typeof i46.CommonModule, typeof i47.FormsModule, typeof i48.TaskGraphEditorModule, typeof i47.ReactiveFormsModule, typeof i49.OverlayModule, typeof i50.MJButtonDirective, typeof i50.MJClickableDirective, typeof i50.MJDatepickerComponent, typeof i50.MJDialogComponent, typeof i50.MJDialogActionsComponent, typeof i50.MJEmptyStateComponent, typeof i50.MJAlertComponent, typeof i50.MJAccordionModule, typeof i50.MJFilterChipComponent, typeof i51.ContainerDirectivesModule, typeof i52.CodeEditorModule, typeof i53.ArtifactsModule, typeof i54.TestingModule, typeof i55.SharedGenericModule, typeof i56.UserRoutinesModule, typeof i57.ComposerModule, typeof i58.MarkdownModule, typeof i59.DynamicFormsModule, typeof i60.ResourcePermissionsModule, typeof i61.TasksFullViewComponent, typeof i62.CollectionShareModalComponent, typeof i63.UserPickerComponent, typeof i64.ArtifactCollectionPickerModalComponent, typeof i65.ArtifactShareModalComponent, typeof i66.ChatSlotDirective, typeof i67.MJChatEmptyStateDefaultComponent, typeof i68.MJChatAgentPresenceDefaultComponent, typeof i69.MJChatHeaderDefaultComponent, typeof i70.MJChatMessageExtraDefaultComponent, typeof i71.MJChatDemonstrationSurfaceDefaultComponent, typeof i72.MJChatMessageBubbleDefaultComponent, typeof i73.RealtimeAgentPickerComponent, typeof i74.RealtimeSessionOverlayComponent, typeof i75.RealtimeWhiteboardHostComponent, typeof i76.RemoteBrowserSurfaceComponent, typeof i77.RealtimeMediaSurfaceComponent, typeof i78.RealtimeInteractiveComponentSurfaceComponent, typeof i79.RealtimeEvidencePlaybackComponent, typeof i80.AgentHandoffCardComponent], [typeof i1.MessageItemComponent, typeof i2.MessageListComponent, typeof i3.MessageInputComponent, typeof i4.AiComposerComponent, typeof i5.ActionableCommandsComponent, typeof i6.WorkflowPlanCardComponent, typeof i7.ConversationMessageRatingComponent, typeof i8.ConversationWorkspaceComponent, typeof i9.ConversationNavigationComponent, typeof i10.ConversationSidebarComponent, typeof i11.RoutinesSectionComponent, typeof i12.ConversationListComponent, typeof i13.ConversationChatAreaComponent, typeof i14.ConversationEmptyStateComponent, typeof i15.ConversationAgentPickerComponent, typeof i16.ConversationModePickerComponent, typeof i17.CollectionTreeComponent, typeof i18.CollectionViewComponent, typeof i19.CollectionArtifactCardComponent, typeof i20.LibraryFullViewComponent, typeof i21.CollectionFormModalComponent, typeof i22.ArtifactCreateModalComponent, typeof i23.CollectionsFullViewComponent, typeof i24.ProjectSelectorComponent, typeof i25.ProjectFormModalComponent, typeof i26.TasksDropdownComponent, typeof i27.TaskWidgetComponent, typeof i28.AgentProcessPanelComponent, typeof i29.ActiveAgentIndicatorComponent, typeof i30.ActiveTasksPanelComponent, typeof i31.ShareModalComponent, typeof i32.MembersModalComponent, typeof i33.ExportModalComponent, typeof i34.SearchPanelComponent, typeof i35.NotificationBadgeComponent, typeof i36.ActivityIndicatorComponent, typeof i37.ToastComponent, typeof i38.InputDialogComponent, typeof i39.RatingDialogComponent, typeof i40.GlobalTasksPanelComponent, typeof i41.ImageViewerComponent, typeof i42.PinnedMessagesPanelComponent, typeof i43.ForksPopoverComponent, typeof i44.ChatAgentsOverlayComponent, typeof i45.SearchShortcutDirective, typeof i57.ComposerModule, typeof i61.TasksFullViewComponent, typeof i66.ChatSlotDirective, typeof i67.MJChatEmptyStateDefaultComponent, typeof i68.MJChatAgentPresenceDefaultComponent, typeof i69.MJChatHeaderDefaultComponent, typeof i70.MJChatMessageExtraDefaultComponent, typeof i71.MJChatDemonstrationSurfaceDefaultComponent, typeof i72.MJChatMessageBubbleDefaultComponent, typeof i73.RealtimeAgentPickerComponent, typeof i74.RealtimeSessionOverlayComponent, typeof i75.RealtimeWhiteboardHostComponent, typeof i76.RemoteBrowserSurfaceComponent, typeof i77.RealtimeMediaSurfaceComponent, typeof i79.RealtimeEvidencePlaybackComponent, typeof i80.AgentHandoffCardComponent]>;
|
|
84
85
|
static ɵinj: i0.ɵɵInjectorDeclaration<ConversationsModule>;
|
|
85
86
|
}
|
|
86
87
|
//# sourceMappingURL=conversations.module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.module.d.ts","sourceRoot":"","sources":["../../src/lib/conversations.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conversations.module.d.ts","sourceRoot":"","sources":["../../src/lib/conversations.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2LA,qBAgFa,mBAAmB;yCAAnB,mBAAmB;0CAAnB,mBAAmB;0CAAnB,mBAAmB;CAAG"}
|
|
@@ -22,6 +22,7 @@ import { AiComposerComponent } from './components/composer/ai-composer.component
|
|
|
22
22
|
import { LoadComposerPlugins } from './composer-plugins/load-composer-plugins';
|
|
23
23
|
// Components
|
|
24
24
|
import { MessageItemComponent } from './components/message/message-item.component';
|
|
25
|
+
import { AgentHandoffCardComponent } from './components/message/agent-handoff-card.component';
|
|
25
26
|
import { MessageListComponent } from './components/message/message-list.component';
|
|
26
27
|
import { MessageInputComponent } from './components/message/message-input.component';
|
|
27
28
|
import { DynamicFormsModule } from '@memberjunction/ng-forms';
|
|
@@ -275,7 +276,8 @@ export class ConversationsModule {
|
|
|
275
276
|
RemoteBrowserSurfaceComponent,
|
|
276
277
|
RealtimeMediaSurfaceComponent,
|
|
277
278
|
RealtimeInteractiveComponentSurfaceComponent,
|
|
278
|
-
RealtimeEvidencePlaybackComponent
|
|
279
|
+
RealtimeEvidencePlaybackComponent,
|
|
280
|
+
AgentHandoffCardComponent
|
|
279
281
|
],
|
|
280
282
|
exports: [
|
|
281
283
|
...COMPONENTS,
|
|
@@ -299,7 +301,8 @@ export class ConversationsModule {
|
|
|
299
301
|
RealtimeWhiteboardHostComponent,
|
|
300
302
|
RemoteBrowserSurfaceComponent,
|
|
301
303
|
RealtimeMediaSurfaceComponent,
|
|
302
|
-
RealtimeEvidencePlaybackComponent
|
|
304
|
+
RealtimeEvidencePlaybackComponent,
|
|
305
|
+
AgentHandoffCardComponent
|
|
303
306
|
]
|
|
304
307
|
}]
|
|
305
308
|
}], null, null); })();
|
|
@@ -392,7 +395,8 @@ export class ConversationsModule {
|
|
|
392
395
|
RemoteBrowserSurfaceComponent,
|
|
393
396
|
RealtimeMediaSurfaceComponent,
|
|
394
397
|
RealtimeInteractiveComponentSurfaceComponent,
|
|
395
|
-
RealtimeEvidencePlaybackComponent
|
|
398
|
+
RealtimeEvidencePlaybackComponent,
|
|
399
|
+
AgentHandoffCardComponent], exports: [MessageItemComponent,
|
|
396
400
|
MessageListComponent,
|
|
397
401
|
MessageInputComponent,
|
|
398
402
|
AiComposerComponent,
|
|
@@ -456,5 +460,6 @@ export class ConversationsModule {
|
|
|
456
460
|
RealtimeWhiteboardHostComponent,
|
|
457
461
|
RemoteBrowserSurfaceComponent,
|
|
458
462
|
RealtimeMediaSurfaceComponent,
|
|
459
|
-
RealtimeEvidencePlaybackComponent
|
|
463
|
+
RealtimeEvidencePlaybackComponent,
|
|
464
|
+
AgentHandoffCardComponent] }); })();
|
|
460
465
|
//# sourceMappingURL=conversations.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.module.js","sourceRoot":"","sources":["../../src/lib/conversations.module.ts"],"names":[],"mappings":"AAAA,OA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,4BAA4B;QAC5B,4BAA4B;QAC5B,4BAA4B;QAC5B,wBAAwB;QACxB,yBAAyB;QACzB,0DAA0D;QAC1D,sBAAsB;QACtB,mBAAmB;QACnB,0BAA0B;QAC1B,6BAA6B;QAC7B,yBAAyB;QACzB,mBAAmB;QACnB,qBAAqB;QACrB,oBAAoB;QACpB,oBAAoB;QACpB,0BAA0B;QAC1B,0BAA0B;QAC1B,cAAc;QACd,oBAAoB;QACpB,qBAAqB;QACrB,yBAAyB;QACzB,oBAAoB;QACpB,4BAA4B;QAC5B,qBAAqB;QACrB,0BAA0B,EA0DxB,uBAAuB;QACvB,uFAAuF;QACvF,kEAAkE;QAClE,cAAc;QACd,wBAAwB;QACxB,sBAAsB;QACtB,mCAAmC;QACnC,iBAAiB;QACjB,gCAAgC;QAChC,mCAAmC;QACnC,4BAA4B;QAC5B,kCAAkC;QAClC,0CAA0C;QAC1C,mCAAmC;QACnC,8BAA8B;QAC9B,4BAA4B;QAC5B,+BAA+B;QAC/B,+BAA+B;QAC/B,6BAA6B;QAC7B,6BAA6B;QAC7B,iCAAiC","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { OverlayModule } from '@angular/cdk/overlay';\n\n// MJ UI Components\nimport { MJButtonDirective, MJClickableDirective, MJDatepickerComponent, MJDialogComponent, MJDialogActionsComponent, MJEmptyStateComponent, MJAlertComponent, MJAccordionModule, MJFilterChipComponent } from '@memberjunction/ng-ui-components';\n\n// MemberJunction modules\nimport { ContainerDirectivesModule } from '@memberjunction/ng-container-directives';\nimport { CodeEditorModule } from '@memberjunction/ng-code-editor';\nimport { ArtifactsModule } from '@memberjunction/ng-artifacts';\nimport { TestingModule } from '@memberjunction/ng-testing';\nimport { SharedGenericModule } from '@memberjunction/ng-shared-generic';\nimport { UserRoutinesModule } from '@memberjunction/ng-user-routines';\n\n// Markdown module\nimport { MarkdownModule } from '@memberjunction/ng-markdown';\n\n// Resource permissions (generic share dialog)\nimport { ResourcePermissionsModule } from '@memberjunction/ng-resource-permissions';\n\n// Composer (mention editor + dropdown + message input box) — extracted to @memberjunction/ng-composer\nimport { ComposerModule } from '@memberjunction/ng-composer';\n\n// AI-aware composer wrapper (agent/record/skill trigger plugins built in)\nimport { AiComposerComponent } from './components/composer/ai-composer.component';\nimport { LoadComposerPlugins } from './composer-plugins/load-composer-plugins';\n\n// Components\nimport { MessageItemComponent } from './components/message/message-item.component';\nimport { MessageListComponent } from './components/message/message-list.component';\nimport { MessageInputComponent } from './components/message/message-input.component';\nimport { DynamicFormsModule } from '@memberjunction/ng-forms';\nimport { ActionableCommandsComponent } from './components/message/actionable-commands.component';\nimport { WorkflowPlanCardComponent } from './components/message/workflow-plan-card.component';\nimport { TaskGraphEditorModule } from '@memberjunction/ng-task-graph-editor';\nimport { ConversationMessageRatingComponent } from './components/message/conversation-message-rating.component';\nimport { ConversationWorkspaceComponent } from './components/workspace/conversation-workspace.component';\nimport { ConversationNavigationComponent } from './components/navigation/conversation-navigation.component';\nimport { ConversationSidebarComponent } from './components/sidebar/conversation-sidebar.component';\nimport { RoutinesSectionComponent } from './components/sidebar/routines-section.component';\nimport { ConversationListComponent } from './components/conversation/conversation-list.component';\nimport { ConversationChatAreaComponent } from './components/conversation/conversation-chat-area.component';\nimport { ConversationEmptyStateComponent } from './components/conversation/conversation-empty-state.component';\nimport { ConversationAgentPickerComponent } from './components/conversation/conversation-agent-picker.component';\nimport { ConversationModePickerComponent } from './components/conversation/conversation-mode-picker.component';\nimport { CollectionTreeComponent } from './components/collection/collection-tree.component';\nimport { CollectionViewComponent } from './components/collection/collection-view.component';\nimport { CollectionArtifactCardComponent } from './components/collection/collection-artifact-card.component';\nimport { LibraryFullViewComponent } from './components/library/library-full-view.component';\nimport { CollectionFormModalComponent } from './components/collection/collection-form-modal.component';\nimport { ArtifactCreateModalComponent } from './components/collection/artifact-create-modal.component';\nimport { CollectionsFullViewComponent } from './components/collection/collections-full-view.component';\nimport { ProjectSelectorComponent } from './components/project/project-selector.component';\nimport { ProjectFormModalComponent } from './components/project/project-form-modal.component';\nimport { TasksFullViewComponent } from './components/task/tasks-full-view.component';\nimport { TasksDropdownComponent } from './components/tasks/tasks-dropdown.component';\nimport { TaskWidgetComponent } from './components/tasks/task-widget.component';\nimport { AgentProcessPanelComponent } from './components/agent/agent-process-panel.component';\nimport { ActiveAgentIndicatorComponent } from './components/agent/active-agent-indicator.component';\nimport { ActiveTasksPanelComponent } from './components/active-tasks/active-tasks-panel.component';\nimport { ShareModalComponent } from './components/share/share-modal.component';\nimport { MembersModalComponent } from './components/members/members-modal.component';\nimport { ExportModalComponent } from './components/export/export-modal.component';\nimport { SearchPanelComponent } from './components/search/search-panel.component';\nimport { NotificationBadgeComponent } from './components/notification/notification-badge.component';\nimport { ActivityIndicatorComponent } from './components/notification/activity-indicator.component';\nimport { ToastComponent } from './components/toast/toast.component';\nimport { InputDialogComponent } from './components/dialogs/input-dialog.component';\nimport { RatingDialogComponent } from './components/dialogs/rating-dialog.component';\nimport { CollectionShareModalComponent } from './components/collection/collection-share-modal.component';\nimport { UserPickerComponent } from './components/shared/user-picker.component';\nimport { ArtifactCollectionPickerModalComponent } from './components/collection/artifact-collection-picker-modal.component';\nimport { ArtifactShareModalComponent } from './components/artifact/artifact-share-modal.component';\nimport { GlobalTasksPanelComponent } from './components/global-tasks/global-tasks-panel.component';\nimport { ImageViewerComponent } from './components/attachment/image-viewer.component';\nimport { PinnedMessagesPanelComponent } from './components/conversation/pinned-messages-panel.component';\nimport { ForksPopoverComponent } from './components/conversation/forks-popover.component';\nimport { ChatAgentsOverlayComponent } from './components/overlay/chat-overlay.component';\nimport { RealtimeAgentPickerComponent } from './components/realtime/realtime-agent-picker.component';\nimport { RealtimeSessionOverlayComponent } from './components/realtime/realtime-session-overlay.component';\nimport { RealtimeWhiteboardHostComponent } from '@memberjunction/ng-whiteboard';\nimport { LoadRealtimeWhiteboardChannel } from './components/realtime/whiteboard/whiteboard-channel';\nimport { LoadWhiteboardArtifactViewer } from './components/realtime/whiteboard/whiteboard-artifact-viewer.component';\nimport { LoadRealtimeRemoteBrowserChannel } from './components/realtime/remote-browser/remote-browser-channel';\nimport { RemoteBrowserSurfaceComponent } from './components/realtime/remote-browser/remote-browser-surface.component';\nimport { LoadRealtimeMediaChannel } from './components/realtime/media/media-channel';\nimport { LoadClientContextChannel } from './components/realtime/channels/client-context-channel';\nimport { LoadIdentityVerificationChannel } from './components/realtime/identity-verification/identity-verification-channel';\nimport { LoadRealtimeCaptureChannels } from './components/realtime/capture/realtime-capture-channel';\nimport { LoadRealtimeAvatarChannel } from './components/realtime/avatar/realtime-avatar-channel';\nimport { RealtimeMediaSurfaceComponent } from './components/realtime/media/realtime-media-surface.component';\nimport { LoadRealtimeInteractiveComponentChannel } from './components/realtime/interactive-component/interactive-component-channel';\nimport { RealtimeInteractiveComponentSurfaceComponent } from './components/realtime/interactive-component/realtime-interactive-component-surface.component';\nimport { RealtimeEvidencePlaybackComponent } from './components/realtime/evidence-playback/realtime-evidence-playback.component';\n\n// Directives\nimport { SearchShortcutDirective } from './directives/search-shortcut.directive';\n\n// PR 2c — Widget extension surface (standalone)\nimport { ChatSlotDirective } from './directives/chat-slot.directive';\nimport { MJChatEmptyStateDefaultComponent } from './components/slots/mj-chat-empty-state-default.component';\nimport { MJChatAgentPresenceDefaultComponent } from './components/slots/mj-chat-agent-presence-default.component';\nimport { MJChatHeaderDefaultComponent } from './components/slots/mj-chat-header-default.component';\nimport { MJChatMessageExtraDefaultComponent } from './components/slots/mj-chat-message-extra-default.component';\nimport { MJChatDemonstrationSurfaceDefaultComponent } from './components/slots/mj-chat-demonstration-surface-default.component';\nimport { MJChatMessageBubbleDefaultComponent } from './components/slots/mj-chat-message-bubble-default.component';\n\n// Tree-shaking prevention for interactive-channel CLIENT PLUGINS: they are resolved\n// dynamically through the MJ ClassFactory (keyed by the `MJ: AI Agent Channels` registry's\n// ClientPluginClass), so these static calls are what keep their @RegisterClass side effects\n// from being eliminated by the bundler. They live here (not in RealtimeSessionService) because\n// channel plugins carry Angular surface components — the service stays component-free.\nLoadRealtimeWhiteboardChannel();\n// Remote Browser channel plugin — same registry-driven resolution (ClientPluginClass\n// 'RealtimeRemoteBrowserChannel'); the static call defeats tree-shaking of its @RegisterClass.\nLoadRealtimeRemoteBrowserChannel();\n// Media channel plugin — same registry-driven resolution (ClientPluginClass\n// 'RealtimeMediaChannel'); the static call defeats tree-shaking of its @RegisterClass.\nLoadRealtimeMediaChannel();\n// Interactive Component channel plugin — ClientPluginClass 'RealtimeInteractiveComponentChannel'.\nLoadRealtimeInteractiveComponentChannel();\nLoadClientContextChannel();\nLoadIdentityVerificationChannel();\n// The Camera and Screen Share channel plugins (ClientPluginClass 'RealtimeCameraChannel' / 'RealtimeScreenShareChannel').\nLoadRealtimeCaptureChannels();\n// The Avatar channel plugin (ClientPluginClass 'RealtimeAvatarChannel'): the agent's video.\nLoadRealtimeAvatarChannel();\n// Whiteboard ARTIFACT VIEWER plugin — resolved by the artifact plugin host via the\n// ClassFactory (keyed by the artifact type's DriverClass), same tree-shaking concern.\nLoadWhiteboardArtifactViewer();\n// Composer trigger-provider PLUGINS ('@' agent mentions, '#' record mentions, '/' skill\n// commands) — resolved via ClassFactory discovery by any mj-mention-editor without an\n// explicit provider list; the static call defeats tree-shaking of their @RegisterClass.\nLoadComposerPlugins();\n\n// Export all components (excluding standalone components)\nconst COMPONENTS = [\n MessageItemComponent,\n MessageListComponent,\n MessageInputComponent,\n AiComposerComponent,\n ActionableCommandsComponent,\n WorkflowPlanCardComponent,\n ConversationMessageRatingComponent,\n ConversationWorkspaceComponent,\n ConversationNavigationComponent,\n ConversationSidebarComponent,\n RoutinesSectionComponent,\n ConversationListComponent,\n ConversationChatAreaComponent,\n ConversationEmptyStateComponent,\n ConversationAgentPickerComponent,\n ConversationModePickerComponent,\n CollectionTreeComponent,\n CollectionViewComponent,\n CollectionArtifactCardComponent,\n LibraryFullViewComponent,\n CollectionFormModalComponent,\n ArtifactCreateModalComponent,\n CollectionsFullViewComponent,\n ProjectSelectorComponent,\n ProjectFormModalComponent,\n // TasksFullViewComponent - now standalone, imported below\n TasksDropdownComponent,\n TaskWidgetComponent,\n AgentProcessPanelComponent,\n ActiveAgentIndicatorComponent,\n ActiveTasksPanelComponent,\n ShareModalComponent,\n MembersModalComponent,\n ExportModalComponent,\n SearchPanelComponent,\n NotificationBadgeComponent,\n ActivityIndicatorComponent,\n ToastComponent,\n InputDialogComponent,\n RatingDialogComponent,\n GlobalTasksPanelComponent,\n ImageViewerComponent,\n PinnedMessagesPanelComponent,\n ForksPopoverComponent,\n ChatAgentsOverlayComponent\n];\n\n@NgModule({\n declarations: [\n ...COMPONENTS,\n SearchShortcutDirective\n ],\n imports: [\n CommonModule,\n FormsModule,\n TaskGraphEditorModule,\n ReactiveFormsModule,\n OverlayModule,\n MJButtonDirective,\n MJClickableDirective,\n MJDatepickerComponent,\n MJDialogComponent,\n MJDialogActionsComponent,\n MJEmptyStateComponent,\n MJAlertComponent,\n MJAccordionModule,\n MJFilterChipComponent,\n ContainerDirectivesModule,\n CodeEditorModule,\n ArtifactsModule,\n TestingModule,\n SharedGenericModule,\n UserRoutinesModule,\n ComposerModule,\n MarkdownModule,\n DynamicFormsModule,\n ResourcePermissionsModule,\n // Standalone components\n TasksFullViewComponent,\n CollectionShareModalComponent,\n UserPickerComponent,\n ArtifactCollectionPickerModalComponent,\n ArtifactShareModalComponent,\n // PR 2c — Widget extension surface (standalone)\n ChatSlotDirective,\n MJChatEmptyStateDefaultComponent,\n MJChatAgentPresenceDefaultComponent,\n MJChatHeaderDefaultComponent,\n MJChatMessageExtraDefaultComponent,\n MJChatDemonstrationSurfaceDefaultComponent,\n MJChatMessageBubbleDefaultComponent,\n // Realtime / voice (PR #2787)\n RealtimeAgentPickerComponent,\n RealtimeSessionOverlayComponent,\n RealtimeWhiteboardHostComponent,\n RemoteBrowserSurfaceComponent,\n RealtimeMediaSurfaceComponent,\n RealtimeInteractiveComponentSurfaceComponent,\n RealtimeEvidencePlaybackComponent\n ],\n exports: [\n ...COMPONENTS,\n SearchShortcutDirective,\n // Composer components (mj-mention-editor / mj-mention-dropdown / mj-message-input-box)\n // remain available to consumers of this module's template surface\n ComposerModule,\n // Standalone components\n TasksFullViewComponent,\n // PR 2c — Widget extension surface\n ChatSlotDirective,\n MJChatEmptyStateDefaultComponent,\n MJChatAgentPresenceDefaultComponent,\n MJChatHeaderDefaultComponent,\n MJChatMessageExtraDefaultComponent,\n MJChatDemonstrationSurfaceDefaultComponent,\n MJChatMessageBubbleDefaultComponent,\n // Realtime / voice (PR #2787)\n RealtimeAgentPickerComponent,\n RealtimeSessionOverlayComponent,\n RealtimeWhiteboardHostComponent,\n RemoteBrowserSurfaceComponent,\n RealtimeMediaSurfaceComponent,\n RealtimeEvidencePlaybackComponent\n ]\n})\nexport class ConversationsModule {}"]}
|
|
1
|
+
{"version":3,"file":"conversations.module.js","sourceRoot":"","sources":["../../src/lib/conversations.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,mBAAmB;AACnB,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAElP,yBAAyB;AACzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,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ACjB,gCAAgC;QAChC,mCAAmC;QACnC,4BAA4B;QAC5B,kCAAkC;QAClC,0CAA0C;QAC1C,mCAAmC;QACnC,8BAA8B;QAC9B,4BAA4B;QAC5B,+BAA+B;QAC/B,+BAA+B;QAC/B,6BAA6B;QAC7B,6BAA6B;QAC7B,iCAAiC;QACjC,yBAAyB","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { OverlayModule } from '@angular/cdk/overlay';\n\n// MJ UI Components\nimport { MJButtonDirective, MJClickableDirective, MJDatepickerComponent, MJDialogComponent, MJDialogActionsComponent, MJEmptyStateComponent, MJAlertComponent, MJAccordionModule, MJFilterChipComponent } from '@memberjunction/ng-ui-components';\n\n// MemberJunction modules\nimport { ContainerDirectivesModule } from '@memberjunction/ng-container-directives';\nimport { CodeEditorModule } from '@memberjunction/ng-code-editor';\nimport { ArtifactsModule } from '@memberjunction/ng-artifacts';\nimport { TestingModule } from '@memberjunction/ng-testing';\nimport { SharedGenericModule } from '@memberjunction/ng-shared-generic';\nimport { UserRoutinesModule } from '@memberjunction/ng-user-routines';\n\n// Markdown module\nimport { MarkdownModule } from '@memberjunction/ng-markdown';\n\n// Resource permissions (generic share dialog)\nimport { ResourcePermissionsModule } from '@memberjunction/ng-resource-permissions';\n\n// Composer (mention editor + dropdown + message input box) — extracted to @memberjunction/ng-composer\nimport { ComposerModule } from '@memberjunction/ng-composer';\n\n// AI-aware composer wrapper (agent/record/skill trigger plugins built in)\nimport { AiComposerComponent } from './components/composer/ai-composer.component';\nimport { LoadComposerPlugins } from './composer-plugins/load-composer-plugins';\n\n// Components\nimport { MessageItemComponent } from './components/message/message-item.component';\nimport { AgentHandoffCardComponent } from './components/message/agent-handoff-card.component';\nimport { MessageListComponent } from './components/message/message-list.component';\nimport { MessageInputComponent } from './components/message/message-input.component';\nimport { DynamicFormsModule } from '@memberjunction/ng-forms';\nimport { ActionableCommandsComponent } from './components/message/actionable-commands.component';\nimport { WorkflowPlanCardComponent } from './components/message/workflow-plan-card.component';\nimport { TaskGraphEditorModule } from '@memberjunction/ng-task-graph-editor';\nimport { ConversationMessageRatingComponent } from './components/message/conversation-message-rating.component';\nimport { ConversationWorkspaceComponent } from './components/workspace/conversation-workspace.component';\nimport { ConversationNavigationComponent } from './components/navigation/conversation-navigation.component';\nimport { ConversationSidebarComponent } from './components/sidebar/conversation-sidebar.component';\nimport { RoutinesSectionComponent } from './components/sidebar/routines-section.component';\nimport { ConversationListComponent } from './components/conversation/conversation-list.component';\nimport { ConversationChatAreaComponent } from './components/conversation/conversation-chat-area.component';\nimport { ConversationEmptyStateComponent } from './components/conversation/conversation-empty-state.component';\nimport { ConversationAgentPickerComponent } from './components/conversation/conversation-agent-picker.component';\nimport { ConversationModePickerComponent } from './components/conversation/conversation-mode-picker.component';\nimport { CollectionTreeComponent } from './components/collection/collection-tree.component';\nimport { CollectionViewComponent } from './components/collection/collection-view.component';\nimport { CollectionArtifactCardComponent } from './components/collection/collection-artifact-card.component';\nimport { LibraryFullViewComponent } from './components/library/library-full-view.component';\nimport { CollectionFormModalComponent } from './components/collection/collection-form-modal.component';\nimport { ArtifactCreateModalComponent } from './components/collection/artifact-create-modal.component';\nimport { CollectionsFullViewComponent } from './components/collection/collections-full-view.component';\nimport { ProjectSelectorComponent } from './components/project/project-selector.component';\nimport { ProjectFormModalComponent } from './components/project/project-form-modal.component';\nimport { TasksFullViewComponent } from './components/task/tasks-full-view.component';\nimport { TasksDropdownComponent } from './components/tasks/tasks-dropdown.component';\nimport { TaskWidgetComponent } from './components/tasks/task-widget.component';\nimport { AgentProcessPanelComponent } from './components/agent/agent-process-panel.component';\nimport { ActiveAgentIndicatorComponent } from './components/agent/active-agent-indicator.component';\nimport { ActiveTasksPanelComponent } from './components/active-tasks/active-tasks-panel.component';\nimport { ShareModalComponent } from './components/share/share-modal.component';\nimport { MembersModalComponent } from './components/members/members-modal.component';\nimport { ExportModalComponent } from './components/export/export-modal.component';\nimport { SearchPanelComponent } from './components/search/search-panel.component';\nimport { NotificationBadgeComponent } from './components/notification/notification-badge.component';\nimport { ActivityIndicatorComponent } from './components/notification/activity-indicator.component';\nimport { ToastComponent } from './components/toast/toast.component';\nimport { InputDialogComponent } from './components/dialogs/input-dialog.component';\nimport { RatingDialogComponent } from './components/dialogs/rating-dialog.component';\nimport { CollectionShareModalComponent } from './components/collection/collection-share-modal.component';\nimport { UserPickerComponent } from './components/shared/user-picker.component';\nimport { ArtifactCollectionPickerModalComponent } from './components/collection/artifact-collection-picker-modal.component';\nimport { ArtifactShareModalComponent } from './components/artifact/artifact-share-modal.component';\nimport { GlobalTasksPanelComponent } from './components/global-tasks/global-tasks-panel.component';\nimport { ImageViewerComponent } from './components/attachment/image-viewer.component';\nimport { PinnedMessagesPanelComponent } from './components/conversation/pinned-messages-panel.component';\nimport { ForksPopoverComponent } from './components/conversation/forks-popover.component';\nimport { ChatAgentsOverlayComponent } from './components/overlay/chat-overlay.component';\nimport { RealtimeAgentPickerComponent } from './components/realtime/realtime-agent-picker.component';\nimport { RealtimeSessionOverlayComponent } from './components/realtime/realtime-session-overlay.component';\nimport { RealtimeWhiteboardHostComponent } from '@memberjunction/ng-whiteboard';\nimport { LoadRealtimeWhiteboardChannel } from './components/realtime/whiteboard/whiteboard-channel';\nimport { LoadWhiteboardArtifactViewer } from './components/realtime/whiteboard/whiteboard-artifact-viewer.component';\nimport { LoadRealtimeRemoteBrowserChannel } from './components/realtime/remote-browser/remote-browser-channel';\nimport { RemoteBrowserSurfaceComponent } from './components/realtime/remote-browser/remote-browser-surface.component';\nimport { LoadRealtimeMediaChannel } from './components/realtime/media/media-channel';\nimport { LoadClientContextChannel } from './components/realtime/channels/client-context-channel';\nimport { LoadIdentityVerificationChannel } from './components/realtime/identity-verification/identity-verification-channel';\nimport { LoadRealtimeCaptureChannels } from './components/realtime/capture/realtime-capture-channel';\nimport { LoadRealtimeAvatarChannel } from './components/realtime/avatar/realtime-avatar-channel';\nimport { RealtimeMediaSurfaceComponent } from './components/realtime/media/realtime-media-surface.component';\nimport { LoadRealtimeInteractiveComponentChannel } from './components/realtime/interactive-component/interactive-component-channel';\nimport { RealtimeInteractiveComponentSurfaceComponent } from './components/realtime/interactive-component/realtime-interactive-component-surface.component';\nimport { RealtimeEvidencePlaybackComponent } from './components/realtime/evidence-playback/realtime-evidence-playback.component';\n\n// Directives\nimport { SearchShortcutDirective } from './directives/search-shortcut.directive';\n\n// PR 2c — Widget extension surface (standalone)\nimport { ChatSlotDirective } from './directives/chat-slot.directive';\nimport { MJChatEmptyStateDefaultComponent } from './components/slots/mj-chat-empty-state-default.component';\nimport { MJChatAgentPresenceDefaultComponent } from './components/slots/mj-chat-agent-presence-default.component';\nimport { MJChatHeaderDefaultComponent } from './components/slots/mj-chat-header-default.component';\nimport { MJChatMessageExtraDefaultComponent } from './components/slots/mj-chat-message-extra-default.component';\nimport { MJChatDemonstrationSurfaceDefaultComponent } from './components/slots/mj-chat-demonstration-surface-default.component';\nimport { MJChatMessageBubbleDefaultComponent } from './components/slots/mj-chat-message-bubble-default.component';\n\n// Tree-shaking prevention for interactive-channel CLIENT PLUGINS: they are resolved\n// dynamically through the MJ ClassFactory (keyed by the `MJ: AI Agent Channels` registry's\n// ClientPluginClass), so these static calls are what keep their @RegisterClass side effects\n// from being eliminated by the bundler. They live here (not in RealtimeSessionService) because\n// channel plugins carry Angular surface components — the service stays component-free.\nLoadRealtimeWhiteboardChannel();\n// Remote Browser channel plugin — same registry-driven resolution (ClientPluginClass\n// 'RealtimeRemoteBrowserChannel'); the static call defeats tree-shaking of its @RegisterClass.\nLoadRealtimeRemoteBrowserChannel();\n// Media channel plugin — same registry-driven resolution (ClientPluginClass\n// 'RealtimeMediaChannel'); the static call defeats tree-shaking of its @RegisterClass.\nLoadRealtimeMediaChannel();\n// Interactive Component channel plugin — ClientPluginClass 'RealtimeInteractiveComponentChannel'.\nLoadRealtimeInteractiveComponentChannel();\nLoadClientContextChannel();\nLoadIdentityVerificationChannel();\n// The Camera and Screen Share channel plugins (ClientPluginClass 'RealtimeCameraChannel' / 'RealtimeScreenShareChannel').\nLoadRealtimeCaptureChannels();\n// The Avatar channel plugin (ClientPluginClass 'RealtimeAvatarChannel'): the agent's video.\nLoadRealtimeAvatarChannel();\n// Whiteboard ARTIFACT VIEWER plugin — resolved by the artifact plugin host via the\n// ClassFactory (keyed by the artifact type's DriverClass), same tree-shaking concern.\nLoadWhiteboardArtifactViewer();\n// Composer trigger-provider PLUGINS ('@' agent mentions, '#' record mentions, '/' skill\n// commands) — resolved via ClassFactory discovery by any mj-mention-editor without an\n// explicit provider list; the static call defeats tree-shaking of their @RegisterClass.\nLoadComposerPlugins();\n\n// Export all components (excluding standalone components)\nconst COMPONENTS = [\n MessageItemComponent,\n MessageListComponent,\n MessageInputComponent,\n AiComposerComponent,\n ActionableCommandsComponent,\n WorkflowPlanCardComponent,\n ConversationMessageRatingComponent,\n ConversationWorkspaceComponent,\n ConversationNavigationComponent,\n ConversationSidebarComponent,\n RoutinesSectionComponent,\n ConversationListComponent,\n ConversationChatAreaComponent,\n ConversationEmptyStateComponent,\n ConversationAgentPickerComponent,\n ConversationModePickerComponent,\n CollectionTreeComponent,\n CollectionViewComponent,\n CollectionArtifactCardComponent,\n LibraryFullViewComponent,\n CollectionFormModalComponent,\n ArtifactCreateModalComponent,\n CollectionsFullViewComponent,\n ProjectSelectorComponent,\n ProjectFormModalComponent,\n // TasksFullViewComponent - now standalone, imported below\n TasksDropdownComponent,\n TaskWidgetComponent,\n AgentProcessPanelComponent,\n ActiveAgentIndicatorComponent,\n ActiveTasksPanelComponent,\n ShareModalComponent,\n MembersModalComponent,\n ExportModalComponent,\n SearchPanelComponent,\n NotificationBadgeComponent,\n ActivityIndicatorComponent,\n ToastComponent,\n InputDialogComponent,\n RatingDialogComponent,\n GlobalTasksPanelComponent,\n ImageViewerComponent,\n PinnedMessagesPanelComponent,\n ForksPopoverComponent,\n ChatAgentsOverlayComponent\n];\n\n@NgModule({\n declarations: [\n ...COMPONENTS,\n SearchShortcutDirective\n ],\n imports: [\n CommonModule,\n FormsModule,\n TaskGraphEditorModule,\n ReactiveFormsModule,\n OverlayModule,\n MJButtonDirective,\n MJClickableDirective,\n MJDatepickerComponent,\n MJDialogComponent,\n MJDialogActionsComponent,\n MJEmptyStateComponent,\n MJAlertComponent,\n MJAccordionModule,\n MJFilterChipComponent,\n ContainerDirectivesModule,\n CodeEditorModule,\n ArtifactsModule,\n TestingModule,\n SharedGenericModule,\n UserRoutinesModule,\n ComposerModule,\n MarkdownModule,\n DynamicFormsModule,\n ResourcePermissionsModule,\n // Standalone components\n TasksFullViewComponent,\n CollectionShareModalComponent,\n UserPickerComponent,\n ArtifactCollectionPickerModalComponent,\n ArtifactShareModalComponent,\n // PR 2c — Widget extension surface (standalone)\n ChatSlotDirective,\n MJChatEmptyStateDefaultComponent,\n MJChatAgentPresenceDefaultComponent,\n MJChatHeaderDefaultComponent,\n MJChatMessageExtraDefaultComponent,\n MJChatDemonstrationSurfaceDefaultComponent,\n MJChatMessageBubbleDefaultComponent,\n // Realtime / voice (PR #2787)\n RealtimeAgentPickerComponent,\n RealtimeSessionOverlayComponent,\n RealtimeWhiteboardHostComponent,\n RemoteBrowserSurfaceComponent,\n RealtimeMediaSurfaceComponent,\n RealtimeInteractiveComponentSurfaceComponent,\n RealtimeEvidencePlaybackComponent,\n AgentHandoffCardComponent\n ],\n exports: [\n ...COMPONENTS,\n SearchShortcutDirective,\n // Composer components (mj-mention-editor / mj-mention-dropdown / mj-message-input-box)\n // remain available to consumers of this module's template surface\n ComposerModule,\n // Standalone components\n TasksFullViewComponent,\n // PR 2c — Widget extension surface\n ChatSlotDirective,\n MJChatEmptyStateDefaultComponent,\n MJChatAgentPresenceDefaultComponent,\n MJChatHeaderDefaultComponent,\n MJChatMessageExtraDefaultComponent,\n MJChatDemonstrationSurfaceDefaultComponent,\n MJChatMessageBubbleDefaultComponent,\n // Realtime / voice (PR #2787)\n RealtimeAgentPickerComponent,\n RealtimeSessionOverlayComponent,\n RealtimeWhiteboardHostComponent,\n RemoteBrowserSurfaceComponent,\n RealtimeMediaSurfaceComponent,\n RealtimeEvidencePlaybackComponent,\n AgentHandoffCardComponent\n ]\n})\nexport class ConversationsModule {}"]}
|
|
@@ -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 { SessionEndReason } from '@memberjunction/conversations-runtime';
|
|
20
21
|
import type { AgentTurnInfo, AgentTurnRoute } from '../models/agent-turn.model';
|
|
21
22
|
/**
|
|
22
23
|
* Base class for cancelable chat events. Listeners flip `Cancel = true` to
|
|
@@ -178,12 +179,12 @@ export declare class SessionChannelStateChangedEventArgs {
|
|
|
178
179
|
constructor(SessionId: string, ChannelKind: string, State: 'open' | 'closed');
|
|
179
180
|
}
|
|
180
181
|
/**
|
|
181
|
-
* Informational. A session ended client-side.
|
|
182
|
-
* `
|
|
182
|
+
* Informational. A session ended client-side. `Reason` is the runtime's
|
|
183
|
+
* `SessionEndReason` — see {@link SessionStartedEventArgs} module comment.
|
|
183
184
|
*/
|
|
184
185
|
export declare class SessionEndedEventArgs {
|
|
185
186
|
readonly SessionId: string;
|
|
186
|
-
readonly Reason:
|
|
187
|
-
constructor(SessionId: string, Reason:
|
|
187
|
+
readonly Reason: SessionEndReason;
|
|
188
|
+
constructor(SessionId: string, Reason: SessionEndReason);
|
|
188
189
|
}
|
|
189
190
|
//# sourceMappingURL=chat-events.d.ts.map
|
|
@@ -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;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,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,EAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,OAAO,EAAE,OAAO;CAEvC;AAaD;;;;;GAKG;AACH,qBAAa,uBAAuB;aAEZ,SAAS,EAAE,MAAM;aACjB,YAAY,EAAE,SAAS,MAAM,EAAE;gBAD/B,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,SAAS,MAAM,EAAE;CAEtD;AAED;;;GAGG;AACH,qBAAa,mCAAmC;aAExB,SAAS,EAAE,MAAM;aACjB,WAAW,EAAE,MAAM;aACnB,KAAK,EAAE,MAAM,GAAG,QAAQ;gBAFxB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,GAAG,QAAQ;CAE/C;AAED;;;GAGG;AACH,qBAAa,qBAAqB;aAEV,SAAS,EAAE,MAAM;aACjB,MAAM,EAAE,gBAAgB;gBADxB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,gBAAgB;CAE/C"}
|
|
@@ -241,8 +241,8 @@ export class SessionChannelStateChangedEventArgs {
|
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
/**
|
|
244
|
-
* Informational. A session ended client-side.
|
|
245
|
-
* `
|
|
244
|
+
* Informational. A session ended client-side. `Reason` is the runtime's
|
|
245
|
+
* `SessionEndReason` — see {@link SessionStartedEventArgs} module comment.
|
|
246
246
|
*/
|
|
247
247
|
export class SessionEndedEventArgs {
|
|
248
248
|
SessionId;
|
|
@@ -1 +1 @@
|
|
|
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,S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AAM,OAAO,uBAAuB;IAEZ;IACA;IAFpB,YACoB,SAAiB,EACjB,YAA+B;QAD/B,cAAS,GAAT,SAAS,CAAQ;QACjB,iBAAY,GAAZ,YAAY,CAAmB;IAChD,CAAC;CACP;AAED;;;GAGG;AACH,MAAM,OAAO,mCAAmC;IAExB;IACA;IACA;IAHpB,YACoB,SAAiB,EACjB,WAAmB,EACnB,KAAwB;QAFxB,cAAS,GAAT,SAAS,CAAQ;QACjB,gBAAW,GAAX,WAAW,CAAQ;QACnB,UAAK,GAAL,KAAK,CAAmB;IACzC,CAAC;CACP;AAED;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IAEV;IACA;IAFpB,YACoB,SAAiB,EACjB,MAAwC;QADxC,cAAS,GAAT,SAAS,CAAQ;QACjB,WAAM,GAAN,MAAM,CAAkC;IACzD,CAAC;CACP","sourcesContent":["/**\n * @fileoverview Before/After cancelable event argument classes for the\n * conversations widget.\n *\n * Follows MJ's established Before/After cancelable event pattern (see\n * `packages/Angular/Generic/trees/src/lib/events/tree-events.ts` and\n * `packages/Angular/Generic/base-forms/src/lib/types/form-events.ts`).\n *\n * **Contract:** Action events come as `Before*` / `After*` pairs. The\n * `Before*` event carries an args object extending {@link CancellableChatEventArgs}\n * with a `Cancel: boolean` property the listener can flip. The component\n * checks `if (event.Cancel) return;` before proceeding and emits the\n * corresponding `After*` only on the non-canceled path. Informational\n * events (progress, shown-notifications, session lifecycle) stay as single\n * emitters without a Before-pair.\n *\n * @module @memberjunction/ng-conversations\n */\n\nimport type { ExecuteAgentResult } from '@memberjunction/ai-core-plus';\nimport type { AgentTurnInfo, AgentTurnRoute } from '../models/agent-turn.model';\n\n/**\n * Base class for cancelable chat events. Listeners flip `Cancel = true` to\n * halt the default behavior; the matching `After*` event will NOT fire.\n * The optional `CancelReason` is a free-form string for telemetry / debug.\n */\nexport class CancellableChatEventArgs {\n public Cancel: boolean = false;\n public CancelReason?: string;\n}\n\n// ────────────────────────────────────────────────────────────────────\n// Agent-turn lifecycle\n// ────────────────────────────────────────────────────────────────────\n\n/**\n * Fired once per agent turn, BEFORE any reply row exists: the person's message is saved and the\n * chat area has picked the agent that will answer it, on whichever route chose it (a tagged\n * agent, the last agent that answered, a pinned or host default agent, or the conversation\n * manager). A message that starts no turn (see `AgentReplyMode`) fires nothing.\n *\n * A listener can:\n * - cancel the turn (`Cancel = true`). Nothing more is written: no placeholder, no reply row,\n * and `AfterAgentTurn` does not fire. `CancelReason` is logged, not shown.\n * - send the turn to a different agent by setting {@link RedirectAgentId}. The agent must be\n * one the chat allows (`AllowedAgentIDs`); otherwise the turn is refused with a notice.\n *\n * Listeners run synchronously: the chat area reads `Cancel` and `RedirectAgentId` as soon as\n * `emit()` returns.\n *\n * Earlier releases fired this event only on the conversation-manager route, after that route's\n * placeholder row was saved, so a cancel left the row behind marked \"Turn canceled\".\n */\nexport class BeforeAgentTurnEventArgs extends CancellableChatEventArgs {\n /** The agent the turn resolved to. Null only when the args were built without turn details. */\n public readonly AgentId: string | null;\n /** The agent's name, when known. */\n public readonly AgentName: string | null;\n /** How the agent was chosen. */\n public readonly Route: AgentTurnRoute | null;\n /** The person's saved message the turn answers. */\n public readonly UserMessageId: string | null;\n /**\n * Set to send the turn to a different agent instead. Null (the default) keeps\n * {@link AgentId}. The turn then runs with `Route` `'Redirect'`.\n */\n public RedirectAgentId: string | null = null;\n\n constructor(\n public readonly ConversationId: string,\n public readonly MessageText: string,\n public readonly ApplicationId: string | null = null,\n turn: AgentTurnInfo | null = null\n ) {\n super();\n this.AgentId = turn?.AgentId ?? null;\n this.AgentName = turn?.AgentName ?? null;\n this.Route = turn?.Route ?? null;\n this.UserMessageId = turn?.UserMessageId ?? null;\n }\n}\n\n/**\n * Fired AFTER a successful agent turn, on every route. Carries the agent run id and the\n * underlying `ExecuteAgentResult`. NOT fired when the corresponding `BeforeAgentTurnEventArgs`\n * was canceled, when the turn failed, or when a host `AgentTurnHandler` reported no `Result`.\n */\nexport class AfterAgentTurnEventArgs {\n constructor(\n public readonly ConversationId: string,\n public readonly AgentRunId: string,\n public readonly Result: ExecuteAgentResult\n ) {}\n}\n\n// ────────────────────────────────────────────────────────────────────\n// Tool invocations\n// ────────────────────────────────────────────────────────────────────\n\n/**\n * Fired BEFORE the agent invokes a registered client tool. Listeners can veto\n * the dispatch by setting `event.Cancel = true` — `AgentClientSession`\n * short-circuits, the tool handler does NOT run, `afterToolInvoked` does NOT\n * fire, and the server receives a failure response carrying the optional\n * `CancelReason`.\n *\n * @example Confirm before a destructive tool runs\n * ```typescript\n * onBeforeToolInvoked(event: BeforeToolInvokedEventArgs) {\n * if (event.ToolName === 'deleteRecord') {\n * if (!confirm('Agent wants to delete a record. Allow?')) {\n * event.Cancel = true;\n * event.CancelReason = 'User declined deletion';\n * }\n * }\n * }\n * ```\n */\nexport class BeforeToolInvokedEventArgs extends CancellableChatEventArgs {\n constructor(\n public readonly ToolName: string,\n public readonly Args: unknown\n ) {\n super();\n }\n}\n\n/**\n * Fired AFTER a tool invocation completes. Carries the tool name, the\n * arguments it was called with, and the result it produced. NOT fired when\n * the corresponding `BeforeToolInvokedEventArgs` was canceled — the contract\n * is enforced in `AgentClientSession.handleToolRequest`.\n */\nexport class AfterToolInvokedEventArgs {\n constructor(\n public readonly ToolName: string,\n public readonly Args: unknown,\n public readonly Result: unknown\n ) {}\n}\n\n// ────────────────────────────────────────────────────────────────────\n// Response forms\n// ────────────────────────────────────────────────────────────────────\n\n/**\n * Fired BEFORE a response form's submitted values are sent back to the\n * agent. Listeners can cancel (e.g., a validation pass that blocks\n * submission until certain fields are populated).\n */\nexport class BeforeResponseFormSubmittedEventArgs extends CancellableChatEventArgs {\n constructor(\n public readonly FormId: string,\n public readonly Values: Record<string, unknown>\n ) {\n super();\n }\n}\n\n/**\n * Fired AFTER a response form's submitted values have been sent. NOT fired\n * when the corresponding `BeforeResponseFormSubmittedEventArgs` was\n * canceled.\n */\nexport class AfterResponseFormSubmittedEventArgs {\n constructor(\n public readonly FormId: string,\n public readonly Values: Record<string, unknown>\n ) {}\n}\n\n// ────────────────────────────────────────────────────────────────────\n// Stopping an in-progress agent run\n// ────────────────────────────────────────────────────────────────────\n\n/**\n * Fired BEFORE an in-progress agent run is stopped, when the person clicks Stop on the reply\n * the run is writing. Listeners can cancel (`Cancel = true`): nothing is written, the control\n * stays available, and `AfterStopClicked` does not fire. `AgentRunId` is null when the run\n * row has not been seen by the chat yet (the first moment after the reply placeholder appears);\n * the stop is then resolved by the reply's detail id.\n *\n * Listeners run synchronously: the message item reads `Cancel` as soon as `emit()` returns.\n */\nexport class BeforeStopClickedEventArgs extends CancellableChatEventArgs {\n constructor(\n public readonly ConversationDetailId: string,\n public readonly AgentRunId: string | null\n ) {\n super();\n }\n}\n\n/**\n * Fired AFTER a stop was attempted. `Stopped` is whether the run's row was marked Cancelled;\n * false means the run had already finished or the write was refused. NOT fired when the\n * corresponding `BeforeStopClickedEventArgs` was canceled.\n */\nexport class AfterStopClickedEventArgs {\n constructor(\n public readonly ConversationDetailId: string,\n public readonly AgentRunId: string | null,\n public readonly Stopped: boolean\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;AAMH;;;;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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AACH,MAAM,OAAO,0BAA2B,SAAQ,wBAAwB;IAEhD;IACA;IAFpB,YACoB,oBAA4B,EAC5B,UAAyB;QAEzC,KAAK,EAAE,CAAC;QAHQ,yBAAoB,GAApB,oBAAoB,CAAQ;QAC5B,eAAU,GAAV,UAAU,CAAe;IAG7C,CAAC;CACJ;AAED;;;;GAIG;AACH,MAAM,OAAO,yBAAyB;IAEd;IACA;IACA;IAHpB,YACoB,oBAA4B,EAC5B,UAAyB,EACzB,OAAgB;QAFhB,yBAAoB,GAApB,oBAAoB,CAAQ;QAC5B,eAAU,GAAV,UAAU,CAAe;QACzB,YAAO,GAAP,OAAO,CAAS;IACjC,CAAC;CACP;AAED,uEAAuE;AACvE,qDAAqD;AACrD,uEAAuE;AACvE,EAAE;AACF,+DAA+D;AAC/D,6EAA6E;AAC7E,+EAA+E;AAC/E,+EAA+E;AAC/E,wEAAwE;AACxE,8DAA8D;AAE9D;;;;;GAKG;AACH,MAAM,OAAO,uBAAuB;IAEZ;IACA;IAFpB,YACoB,SAAiB,EACjB,YAA+B;QAD/B,cAAS,GAAT,SAAS,CAAQ;QACjB,iBAAY,GAAZ,YAAY,CAAmB;IAChD,CAAC;CACP;AAED;;;GAGG;AACH,MAAM,OAAO,mCAAmC;IAExB;IACA;IACA;IAHpB,YACoB,SAAiB,EACjB,WAAmB,EACnB,KAAwB;QAFxB,cAAS,GAAT,SAAS,CAAQ;QACjB,gBAAW,GAAX,WAAW,CAAQ;QACnB,UAAK,GAAL,KAAK,CAAmB;IACzC,CAAC;CACP;AAED;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IAEV;IACA;IAFpB,YACoB,SAAiB,EACjB,MAAwB;QADxB,cAAS,GAAT,SAAS,CAAQ;QACjB,WAAM,GAAN,MAAM,CAAkB;IACzC,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 { SessionEndReason } from '@memberjunction/conversations-runtime';\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// Stopping an in-progress agent run\n// ────────────────────────────────────────────────────────────────────\n\n/**\n * Fired BEFORE an in-progress agent run is stopped, when the person clicks Stop on the reply\n * the run is writing. Listeners can cancel (`Cancel = true`): nothing is written, the control\n * stays available, and `AfterStopClicked` does not fire. `AgentRunId` is null when the run\n * row has not been seen by the chat yet (the first moment after the reply placeholder appears);\n * the stop is then resolved by the reply's detail id.\n *\n * Listeners run synchronously: the message item reads `Cancel` as soon as `emit()` returns.\n */\nexport class BeforeStopClickedEventArgs extends CancellableChatEventArgs {\n constructor(\n public readonly ConversationDetailId: string,\n public readonly AgentRunId: string | null\n ) {\n super();\n }\n}\n\n/**\n * Fired AFTER a stop was attempted. `Stopped` is whether the run's row was marked Cancelled;\n * false means the run had already finished or the write was refused. NOT fired when the\n * corresponding `BeforeStopClickedEventArgs` was canceled.\n */\nexport class AfterStopClickedEventArgs {\n constructor(\n public readonly ConversationDetailId: string,\n public readonly AgentRunId: string | null,\n public readonly Stopped: boolean\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. `Reason` is the runtime's\n * `SessionEndReason` — see {@link SessionStartedEventArgs} module comment.\n */\nexport class SessionEndedEventArgs {\n constructor(\n public readonly SessionId: string,\n public readonly Reason: SessionEndReason\n ) {}\n}\n"]}
|