@memberjunction/ng-conversations 5.43.0 → 5.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (351) hide show
  1. package/dist/lib/components/active-tasks/active-tasks-panel.component.d.ts +0 -1
  2. package/dist/lib/components/active-tasks/active-tasks-panel.component.d.ts.map +1 -1
  3. package/dist/lib/components/active-tasks/active-tasks-panel.component.js +56 -52
  4. package/dist/lib/components/active-tasks/active-tasks-panel.component.js.map +1 -1
  5. package/dist/lib/components/artifact/artifact-share-modal.component.js +37 -41
  6. package/dist/lib/components/artifact/artifact-share-modal.component.js.map +1 -1
  7. package/dist/lib/components/collection/collection-form-modal.component.d.ts.map +1 -1
  8. package/dist/lib/components/collection/collection-form-modal.component.js +10 -14
  9. package/dist/lib/components/collection/collection-form-modal.component.js.map +1 -1
  10. package/dist/lib/components/collection/collection-share-modal.component.js +41 -45
  11. package/dist/lib/components/collection/collection-share-modal.component.js.map +1 -1
  12. package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
  13. package/dist/lib/components/collection/collection-view.component.js +22 -36
  14. package/dist/lib/components/collection/collection-view.component.js.map +1 -1
  15. package/dist/lib/components/collection/collections-full-view.component.d.ts +4 -0
  16. package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
  17. package/dist/lib/components/collection/collections-full-view.component.js +134 -166
  18. package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
  19. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +73 -8
  20. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
  21. package/dist/lib/components/conversation/conversation-chat-area.component.js +487 -123
  22. package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
  23. package/dist/lib/components/conversation/pinned-messages-panel.component.js +6 -9
  24. package/dist/lib/components/conversation/pinned-messages-panel.component.js.map +1 -1
  25. package/dist/lib/components/library/library-full-view.component.d.ts.map +1 -1
  26. package/dist/lib/components/library/library-full-view.component.js +20 -24
  27. package/dist/lib/components/library/library-full-view.component.js.map +1 -1
  28. package/dist/lib/components/members/members-modal.component.d.ts.map +1 -1
  29. package/dist/lib/components/members/members-modal.component.js +10 -11
  30. package/dist/lib/components/members/members-modal.component.js.map +1 -1
  31. package/dist/lib/components/mention/mention-dropdown.component.js +49 -28
  32. package/dist/lib/components/mention/mention-dropdown.component.js.map +1 -1
  33. package/dist/lib/components/mention/mention-editor.component.d.ts.map +1 -1
  34. package/dist/lib/components/mention/mention-editor.component.js +24 -10
  35. package/dist/lib/components/mention/mention-editor.component.js.map +1 -1
  36. package/dist/lib/components/message/message-input-box.component.d.ts +11 -16
  37. package/dist/lib/components/message/message-input-box.component.d.ts.map +1 -1
  38. package/dist/lib/components/message/message-input-box.component.js +52 -46
  39. package/dist/lib/components/message/message-input-box.component.js.map +1 -1
  40. package/dist/lib/components/message/message-input.component.d.ts +83 -18
  41. package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
  42. package/dist/lib/components/message/message-input.component.js +238 -151
  43. package/dist/lib/components/message/message-input.component.js.map +1 -1
  44. package/dist/lib/components/message/message-item.component.d.ts +10 -1
  45. package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
  46. package/dist/lib/components/message/message-item.component.js +67 -15
  47. package/dist/lib/components/message/message-item.component.js.map +1 -1
  48. package/dist/lib/components/message/message-list.component.js +6 -9
  49. package/dist/lib/components/message/message-list.component.js.map +1 -1
  50. package/dist/lib/components/overlay/chat-overlay.component.d.ts +3 -0
  51. package/dist/lib/components/overlay/chat-overlay.component.d.ts.map +1 -1
  52. package/dist/lib/components/overlay/chat-overlay.component.js +9 -4
  53. package/dist/lib/components/overlay/chat-overlay.component.js.map +1 -1
  54. package/dist/lib/components/realtime/channels/base-realtime-channel-client.d.ts +45 -0
  55. package/dist/lib/components/realtime/channels/base-realtime-channel-client.d.ts.map +1 -1
  56. package/dist/lib/components/realtime/channels/base-realtime-channel-client.js +10 -0
  57. package/dist/lib/components/realtime/channels/base-realtime-channel-client.js.map +1 -1
  58. package/dist/lib/components/realtime/channels/client-context-channel.d.ts +46 -0
  59. package/dist/lib/components/realtime/channels/client-context-channel.d.ts.map +1 -0
  60. package/dist/lib/components/realtime/channels/client-context-channel.js +174 -0
  61. package/dist/lib/components/realtime/channels/client-context-channel.js.map +1 -0
  62. package/dist/lib/components/realtime/evidence-playback/realtime-evidence-playback.component.d.ts +123 -0
  63. package/dist/lib/components/realtime/evidence-playback/realtime-evidence-playback.component.d.ts.map +1 -0
  64. package/dist/lib/components/realtime/evidence-playback/realtime-evidence-playback.component.js +397 -0
  65. package/dist/lib/components/realtime/evidence-playback/realtime-evidence-playback.component.js.map +1 -0
  66. package/dist/lib/components/realtime/media/media-channel-state.d.ts +103 -0
  67. package/dist/lib/components/realtime/media/media-channel-state.d.ts.map +1 -0
  68. package/dist/lib/components/realtime/media/media-channel-state.js +143 -0
  69. package/dist/lib/components/realtime/media/media-channel-state.js.map +1 -0
  70. package/dist/lib/components/realtime/media/media-channel-tools.d.ts +24 -0
  71. package/dist/lib/components/realtime/media/media-channel-tools.d.ts.map +1 -0
  72. package/dist/lib/components/realtime/media/media-channel-tools.js +107 -0
  73. package/dist/lib/components/realtime/media/media-channel-tools.js.map +1 -0
  74. package/dist/lib/components/realtime/media/media-channel.d.ts +89 -0
  75. package/dist/lib/components/realtime/media/media-channel.d.ts.map +1 -0
  76. package/dist/lib/components/realtime/media/media-channel.js +253 -0
  77. package/dist/lib/components/realtime/media/media-channel.js.map +1 -0
  78. package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts +141 -0
  79. package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts.map +1 -0
  80. package/dist/lib/components/realtime/media/realtime-media-surface.component.js +574 -0
  81. package/dist/lib/components/realtime/media/realtime-media-surface.component.js.map +1 -0
  82. package/dist/lib/components/realtime/realtime-activity-rail.component.d.ts +59 -14
  83. package/dist/lib/components/realtime/realtime-activity-rail.component.d.ts.map +1 -1
  84. package/dist/lib/components/realtime/realtime-activity-rail.component.js +277 -74
  85. package/dist/lib/components/realtime/realtime-activity-rail.component.js.map +1 -1
  86. package/dist/lib/components/realtime/realtime-agent-banner.component.d.ts +28 -27
  87. package/dist/lib/components/realtime/realtime-agent-banner.component.d.ts.map +1 -1
  88. package/dist/lib/components/realtime/realtime-agent-banner.component.js +144 -143
  89. package/dist/lib/components/realtime/realtime-agent-banner.component.js.map +1 -1
  90. package/dist/lib/components/realtime/realtime-agent-picker.component.d.ts +12 -0
  91. package/dist/lib/components/realtime/realtime-agent-picker.component.d.ts.map +1 -1
  92. package/dist/lib/components/realtime/realtime-agent-picker.component.js +105 -43
  93. package/dist/lib/components/realtime/realtime-agent-picker.component.js.map +1 -1
  94. package/dist/lib/components/realtime/realtime-audio-visuals.d.ts +2 -2
  95. package/dist/lib/components/realtime/realtime-audio-visuals.d.ts.map +1 -1
  96. package/dist/lib/components/realtime/realtime-audio-visuals.js.map +1 -1
  97. package/dist/lib/components/realtime/realtime-composer.component.d.ts +41 -7
  98. package/dist/lib/components/realtime/realtime-composer.component.d.ts.map +1 -1
  99. package/dist/lib/components/realtime/realtime-composer.component.js +216 -102
  100. package/dist/lib/components/realtime/realtime-composer.component.js.map +1 -1
  101. package/dist/lib/components/realtime/realtime-delegation-card.component.d.ts +0 -2
  102. package/dist/lib/components/realtime/realtime-delegation-card.component.d.ts.map +1 -1
  103. package/dist/lib/components/realtime/realtime-delegation-card.component.js +67 -71
  104. package/dist/lib/components/realtime/realtime-delegation-card.component.js.map +1 -1
  105. package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +364 -44
  106. package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts.map +1 -1
  107. package/dist/lib/components/realtime/realtime-session-overlay.component.js +839 -153
  108. package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
  109. package/dist/lib/components/realtime/realtime-session-state.d.ts +5 -5
  110. package/dist/lib/components/realtime/realtime-session-state.d.ts.map +1 -1
  111. package/dist/lib/components/realtime/realtime-session-state.js.map +1 -1
  112. package/dist/lib/components/realtime/realtime-surface-tab-style.d.ts +70 -0
  113. package/dist/lib/components/realtime/realtime-surface-tab-style.d.ts.map +1 -0
  114. package/dist/lib/components/realtime/realtime-surface-tab-style.js +115 -0
  115. package/dist/lib/components/realtime/realtime-surface-tab-style.js.map +1 -0
  116. package/dist/lib/components/realtime/realtime-surface-tabs.component.d.ts +55 -57
  117. package/dist/lib/components/realtime/realtime-surface-tabs.component.d.ts.map +1 -1
  118. package/dist/lib/components/realtime/realtime-surface-tabs.component.js +165 -143
  119. package/dist/lib/components/realtime/realtime-surface-tabs.component.js.map +1 -1
  120. package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts +80 -71
  121. package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts.map +1 -1
  122. package/dist/lib/components/realtime/realtime-surface-tabs.model.js +83 -113
  123. package/dist/lib/components/realtime/realtime-surface-tabs.model.js.map +1 -1
  124. package/dist/lib/components/realtime/realtime-ui-config.d.ts +270 -0
  125. package/dist/lib/components/realtime/realtime-ui-config.d.ts.map +1 -0
  126. package/dist/lib/components/realtime/realtime-ui-config.js +212 -0
  127. package/dist/lib/components/realtime/realtime-ui-config.js.map +1 -0
  128. package/dist/lib/components/search/search-panel.component.d.ts +2 -0
  129. package/dist/lib/components/search/search-panel.component.d.ts.map +1 -1
  130. package/dist/lib/components/search/search-panel.component.js +92 -101
  131. package/dist/lib/components/search/search-panel.component.js.map +1 -1
  132. package/dist/lib/components/share/share-modal.component.d.ts.map +1 -1
  133. package/dist/lib/components/share/share-modal.component.js +10 -11
  134. package/dist/lib/components/share/share-modal.component.js.map +1 -1
  135. package/dist/lib/components/shared/user-picker.component.d.ts.map +1 -1
  136. package/dist/lib/components/shared/user-picker.component.js +12 -15
  137. package/dist/lib/components/shared/user-picker.component.js.map +1 -1
  138. package/dist/lib/components/workspace/conversation-workspace.component.d.ts +5 -0
  139. package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
  140. package/dist/lib/components/workspace/conversation-workspace.component.js +18 -7
  141. package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
  142. package/dist/lib/conversations.module.d.ts +29 -26
  143. package/dist/lib/conversations.module.d.ts.map +1 -1
  144. package/dist/lib/conversations.module.js +37 -6
  145. package/dist/lib/conversations.module.js.map +1 -1
  146. package/dist/lib/models/conversation-state.model.d.ts +6 -3
  147. package/dist/lib/models/conversation-state.model.d.ts.map +1 -1
  148. package/dist/lib/models/conversation-state.model.js.map +1 -1
  149. package/dist/lib/services/conversation-agent.service.d.ts +2 -2
  150. package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
  151. package/dist/lib/services/conversation-agent.service.js +6 -2
  152. package/dist/lib/services/conversation-agent.service.js.map +1 -1
  153. package/dist/lib/services/mention-autocomplete.service.d.ts +17 -1
  154. package/dist/lib/services/mention-autocomplete.service.d.ts.map +1 -1
  155. package/dist/lib/services/mention-autocomplete.service.js +58 -2
  156. package/dist/lib/services/mention-autocomplete.service.js.map +1 -1
  157. package/dist/lib/services/realtime-audio-recorder.d.ts +143 -0
  158. package/dist/lib/services/realtime-audio-recorder.d.ts.map +1 -0
  159. package/dist/lib/services/realtime-audio-recorder.js +379 -0
  160. package/dist/lib/services/realtime-audio-recorder.js.map +1 -0
  161. package/dist/lib/services/realtime-pcm-wav.d.ts +75 -0
  162. package/dist/lib/services/realtime-pcm-wav.d.ts.map +1 -0
  163. package/dist/lib/services/realtime-pcm-wav.js +205 -0
  164. package/dist/lib/services/realtime-pcm-wav.js.map +1 -0
  165. package/dist/lib/services/realtime-session-review.service.d.ts +28 -1
  166. package/dist/lib/services/realtime-session-review.service.d.ts.map +1 -1
  167. package/dist/lib/services/realtime-session-review.service.js +12 -3
  168. package/dist/lib/services/realtime-session-review.service.js.map +1 -1
  169. package/dist/lib/services/realtime-session.service.d.ts +210 -20
  170. package/dist/lib/services/realtime-session.service.d.ts.map +1 -1
  171. package/dist/lib/services/realtime-session.service.js +452 -21
  172. package/dist/lib/services/realtime-session.service.js.map +1 -1
  173. package/dist/lib/services/realtime-sessions-adapter.js +1 -1
  174. package/dist/lib/services/realtime-sessions-adapter.js.map +1 -1
  175. package/dist/lib/services/ui-command-handler.service.d.ts +7 -2
  176. package/dist/lib/services/ui-command-handler.service.d.ts.map +1 -1
  177. package/dist/lib/services/ui-command-handler.service.js +6 -2
  178. package/dist/lib/services/ui-command-handler.service.js.map +1 -1
  179. package/dist/lib/utils/plan-mode-preference.d.ts +62 -0
  180. package/dist/lib/utils/plan-mode-preference.d.ts.map +1 -0
  181. package/dist/lib/utils/plan-mode-preference.js +130 -0
  182. package/dist/lib/utils/plan-mode-preference.js.map +1 -0
  183. package/dist/public-api.d.ts +6 -0
  184. package/dist/public-api.d.ts.map +1 -1
  185. package/dist/public-api.js +8 -0
  186. package/dist/public-api.js.map +1 -1
  187. package/package.json +28 -26
  188. package/dist/__tests__/attachment-badge.test.d.ts +0 -2
  189. package/dist/__tests__/attachment-badge.test.d.ts.map +0 -1
  190. package/dist/__tests__/attachment-badge.test.js +0 -66
  191. package/dist/__tests__/attachment-badge.test.js.map +0 -1
  192. package/dist/__tests__/channel-optional-surface.test.d.ts +0 -2
  193. package/dist/__tests__/channel-optional-surface.test.d.ts.map +0 -1
  194. package/dist/__tests__/channel-optional-surface.test.js +0 -53
  195. package/dist/__tests__/channel-optional-surface.test.js.map +0 -1
  196. package/dist/__tests__/chat-events.test.d.ts +0 -14
  197. package/dist/__tests__/chat-events.test.d.ts.map +0 -1
  198. package/dist/__tests__/chat-events.test.js +0 -109
  199. package/dist/__tests__/chat-events.test.js.map +0 -1
  200. package/dist/__tests__/collections-full-view.test.d.ts +0 -2
  201. package/dist/__tests__/collections-full-view.test.d.ts.map +0 -1
  202. package/dist/__tests__/collections-full-view.test.js +0 -225
  203. package/dist/__tests__/collections-full-view.test.js.map +0 -1
  204. package/dist/__tests__/conversation-cache.test.d.ts +0 -2
  205. package/dist/__tests__/conversation-cache.test.d.ts.map +0 -1
  206. package/dist/__tests__/conversation-cache.test.js +0 -233
  207. package/dist/__tests__/conversation-cache.test.js.map +0 -1
  208. package/dist/__tests__/conversation-naming.test.d.ts +0 -2
  209. package/dist/__tests__/conversation-naming.test.d.ts.map +0 -1
  210. package/dist/__tests__/conversation-naming.test.js +0 -110
  211. package/dist/__tests__/conversation-naming.test.js.map +0 -1
  212. package/dist/__tests__/delegation-result-parser.test.d.ts +0 -2
  213. package/dist/__tests__/delegation-result-parser.test.d.ts.map +0 -1
  214. package/dist/__tests__/delegation-result-parser.test.js +0 -107
  215. package/dist/__tests__/delegation-result-parser.test.js.map +0 -1
  216. package/dist/__tests__/distinct-artifacts.test.d.ts +0 -2
  217. package/dist/__tests__/distinct-artifacts.test.d.ts.map +0 -1
  218. package/dist/__tests__/distinct-artifacts.test.js +0 -56
  219. package/dist/__tests__/distinct-artifacts.test.js.map +0 -1
  220. package/dist/__tests__/event-wiring.test.d.ts +0 -15
  221. package/dist/__tests__/event-wiring.test.d.ts.map +0 -1
  222. package/dist/__tests__/event-wiring.test.js +0 -100
  223. package/dist/__tests__/event-wiring.test.js.map +0 -1
  224. package/dist/__tests__/index.test.d.ts +0 -2
  225. package/dist/__tests__/index.test.d.ts.map +0 -1
  226. package/dist/__tests__/index.test.js +0 -7
  227. package/dist/__tests__/index.test.js.map +0 -1
  228. package/dist/__tests__/narration-template.test.d.ts +0 -2
  229. package/dist/__tests__/narration-template.test.d.ts.map +0 -1
  230. package/dist/__tests__/narration-template.test.js +0 -76
  231. package/dist/__tests__/narration-template.test.js.map +0 -1
  232. package/dist/__tests__/notification-model.test.d.ts +0 -2
  233. package/dist/__tests__/notification-model.test.d.ts.map +0 -1
  234. package/dist/__tests__/notification-model.test.js +0 -68
  235. package/dist/__tests__/notification-model.test.js.map +0 -1
  236. package/dist/__tests__/realtime-agent-picker-models.test.d.ts +0 -2
  237. package/dist/__tests__/realtime-agent-picker-models.test.d.ts.map +0 -1
  238. package/dist/__tests__/realtime-agent-picker-models.test.js +0 -49
  239. package/dist/__tests__/realtime-agent-picker-models.test.js.map +0 -1
  240. package/dist/__tests__/realtime-audio-visuals.test.d.ts +0 -2
  241. package/dist/__tests__/realtime-audio-visuals.test.d.ts.map +0 -1
  242. package/dist/__tests__/realtime-audio-visuals.test.js +0 -123
  243. package/dist/__tests__/realtime-audio-visuals.test.js.map +0 -1
  244. package/dist/__tests__/realtime-delegation-card-cancel.test.d.ts +0 -2
  245. package/dist/__tests__/realtime-delegation-card-cancel.test.d.ts.map +0 -1
  246. package/dist/__tests__/realtime-delegation-card-cancel.test.js +0 -48
  247. package/dist/__tests__/realtime-delegation-card-cancel.test.js.map +0 -1
  248. package/dist/__tests__/realtime-disclosure.test.d.ts +0 -2
  249. package/dist/__tests__/realtime-disclosure.test.d.ts.map +0 -1
  250. package/dist/__tests__/realtime-disclosure.test.js +0 -164
  251. package/dist/__tests__/realtime-disclosure.test.js.map +0 -1
  252. package/dist/__tests__/realtime-pairing.test.d.ts +0 -2
  253. package/dist/__tests__/realtime-pairing.test.d.ts.map +0 -1
  254. package/dist/__tests__/realtime-pairing.test.js +0 -207
  255. package/dist/__tests__/realtime-pairing.test.js.map +0 -1
  256. package/dist/__tests__/realtime-review-lifecycle.test.d.ts +0 -2
  257. package/dist/__tests__/realtime-review-lifecycle.test.d.ts.map +0 -1
  258. package/dist/__tests__/realtime-review-lifecycle.test.js +0 -154
  259. package/dist/__tests__/realtime-review-lifecycle.test.js.map +0 -1
  260. package/dist/__tests__/realtime-session-cancel-usage.test.d.ts +0 -2
  261. package/dist/__tests__/realtime-session-cancel-usage.test.d.ts.map +0 -1
  262. package/dist/__tests__/realtime-session-cancel-usage.test.js +0 -230
  263. package/dist/__tests__/realtime-session-cancel-usage.test.js.map +0 -1
  264. package/dist/__tests__/realtime-session-channels.test.d.ts +0 -2
  265. package/dist/__tests__/realtime-session-channels.test.d.ts.map +0 -1
  266. package/dist/__tests__/realtime-session-channels.test.js +0 -252
  267. package/dist/__tests__/realtime-session-channels.test.js.map +0 -1
  268. package/dist/__tests__/realtime-session-client-tools.test.d.ts +0 -2
  269. package/dist/__tests__/realtime-session-client-tools.test.d.ts.map +0 -1
  270. package/dist/__tests__/realtime-session-client-tools.test.js +0 -103
  271. package/dist/__tests__/realtime-session-client-tools.test.js.map +0 -1
  272. package/dist/__tests__/realtime-session-minimized.test.d.ts +0 -2
  273. package/dist/__tests__/realtime-session-minimized.test.d.ts.map +0 -1
  274. package/dist/__tests__/realtime-session-minimized.test.js +0 -32
  275. package/dist/__tests__/realtime-session-minimized.test.js.map +0 -1
  276. package/dist/__tests__/realtime-session-mint.test.d.ts +0 -2
  277. package/dist/__tests__/realtime-session-mint.test.d.ts.map +0 -1
  278. package/dist/__tests__/realtime-session-mint.test.js +0 -69
  279. package/dist/__tests__/realtime-session-mint.test.js.map +0 -1
  280. package/dist/__tests__/realtime-session-policy.test.d.ts +0 -2
  281. package/dist/__tests__/realtime-session-policy.test.d.ts.map +0 -1
  282. package/dist/__tests__/realtime-session-policy.test.js +0 -303
  283. package/dist/__tests__/realtime-session-policy.test.js.map +0 -1
  284. package/dist/__tests__/realtime-session-review.service.test.d.ts +0 -2
  285. package/dist/__tests__/realtime-session-review.service.test.d.ts.map +0 -1
  286. package/dist/__tests__/realtime-session-review.service.test.js +0 -743
  287. package/dist/__tests__/realtime-session-review.service.test.js.map +0 -1
  288. package/dist/__tests__/realtime-session-state.test.d.ts +0 -2
  289. package/dist/__tests__/realtime-session-state.test.d.ts.map +0 -1
  290. package/dist/__tests__/realtime-session-state.test.js +0 -83
  291. package/dist/__tests__/realtime-session-state.test.js.map +0 -1
  292. package/dist/__tests__/realtime-session-timeline-card.test.d.ts +0 -2
  293. package/dist/__tests__/realtime-session-timeline-card.test.d.ts.map +0 -1
  294. package/dist/__tests__/realtime-session-timeline-card.test.js +0 -106
  295. package/dist/__tests__/realtime-session-timeline-card.test.js.map +0 -1
  296. package/dist/__tests__/realtime-session-timeline.test.d.ts +0 -2
  297. package/dist/__tests__/realtime-session-timeline.test.d.ts.map +0 -1
  298. package/dist/__tests__/realtime-session-timeline.test.js +0 -142
  299. package/dist/__tests__/realtime-session-timeline.test.js.map +0 -1
  300. package/dist/__tests__/realtime-sessions-adapter.test.d.ts +0 -19
  301. package/dist/__tests__/realtime-sessions-adapter.test.d.ts.map +0 -1
  302. package/dist/__tests__/realtime-sessions-adapter.test.js +0 -188
  303. package/dist/__tests__/realtime-sessions-adapter.test.js.map +0 -1
  304. package/dist/__tests__/realtime-surface-panel-prefs.test.d.ts +0 -2
  305. package/dist/__tests__/realtime-surface-panel-prefs.test.d.ts.map +0 -1
  306. package/dist/__tests__/realtime-surface-panel-prefs.test.js +0 -100
  307. package/dist/__tests__/realtime-surface-panel-prefs.test.js.map +0 -1
  308. package/dist/__tests__/realtime-surface-tabs-model.test.d.ts +0 -2
  309. package/dist/__tests__/realtime-surface-tabs-model.test.d.ts.map +0 -1
  310. package/dist/__tests__/realtime-surface-tabs-model.test.js +0 -193
  311. package/dist/__tests__/realtime-surface-tabs-model.test.js.map +0 -1
  312. package/dist/__tests__/remote-browser-audio-player.test.d.ts +0 -2
  313. package/dist/__tests__/remote-browser-audio-player.test.d.ts.map +0 -1
  314. package/dist/__tests__/remote-browser-audio-player.test.js +0 -137
  315. package/dist/__tests__/remote-browser-audio-player.test.js.map +0 -1
  316. package/dist/__tests__/remote-browser-channel.test.d.ts +0 -2
  317. package/dist/__tests__/remote-browser-channel.test.d.ts.map +0 -1
  318. package/dist/__tests__/remote-browser-channel.test.js +0 -585
  319. package/dist/__tests__/remote-browser-channel.test.js.map +0 -1
  320. package/dist/__tests__/search-service.test.d.ts +0 -2
  321. package/dist/__tests__/search-service.test.d.ts.map +0 -1
  322. package/dist/__tests__/search-service.test.js +0 -114
  323. package/dist/__tests__/search-service.test.js.map +0 -1
  324. package/dist/__tests__/slot-defaults.test.d.ts +0 -24
  325. package/dist/__tests__/slot-defaults.test.d.ts.map +0 -1
  326. package/dist/__tests__/slot-defaults.test.js +0 -63
  327. package/dist/__tests__/slot-defaults.test.js.map +0 -1
  328. package/dist/__tests__/toast-service.test.d.ts +0 -2
  329. package/dist/__tests__/toast-service.test.d.ts.map +0 -1
  330. package/dist/__tests__/toast-service.test.js +0 -143
  331. package/dist/__tests__/toast-service.test.js.map +0 -1
  332. package/dist/__tests__/user-authorization.test.d.ts +0 -2
  333. package/dist/__tests__/user-authorization.test.d.ts.map +0 -1
  334. package/dist/__tests__/user-authorization.test.js +0 -97
  335. package/dist/__tests__/user-authorization.test.js.map +0 -1
  336. package/dist/__tests__/voice-session-narration.test.d.ts +0 -2
  337. package/dist/__tests__/voice-session-narration.test.d.ts.map +0 -1
  338. package/dist/__tests__/voice-session-narration.test.js +0 -609
  339. package/dist/__tests__/voice-session-narration.test.js.map +0 -1
  340. package/dist/__tests__/whiteboard-artifact-viewer.test.d.ts +0 -2
  341. package/dist/__tests__/whiteboard-artifact-viewer.test.d.ts.map +0 -1
  342. package/dist/__tests__/whiteboard-artifact-viewer.test.js +0 -101
  343. package/dist/__tests__/whiteboard-artifact-viewer.test.js.map +0 -1
  344. package/dist/__tests__/whiteboard-channel.test.d.ts +0 -2
  345. package/dist/__tests__/whiteboard-channel.test.d.ts.map +0 -1
  346. package/dist/__tests__/whiteboard-channel.test.js +0 -260
  347. package/dist/__tests__/whiteboard-channel.test.js.map +0 -1
  348. package/dist/__tests__/whiteboard-restore-state.test.d.ts +0 -2
  349. package/dist/__tests__/whiteboard-restore-state.test.d.ts.map +0 -1
  350. package/dist/__tests__/whiteboard-restore-state.test.js +0 -108
  351. package/dist/__tests__/whiteboard-restore-state.test.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"realtime-session-overlay.component.js","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-session-overlay.component.ts","../../../../src/lib/components/realtime/realtime-session-overlay.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAA4B,iBAAiB,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AC7B,yBAAyB;oBACzB,4BAA4B;oBAC5B,gCAAgC;iBACjC;;kBAaA,KAAK;;kBAGL,KAAK;;kBAUL,KAAK;;kBAGL,KAAK;;kBAQL,KAAK;;kBAiBL,MAAM;;kBAQN,MAAM;;kBAMN,MAAM;;kBAGN,MAAM;;kBAkGN,SAAS;mBAAC,4BAA4B;;kBA6BtC,SAAS;mBAAC,yBAAyB;;kBAYnC,SAAS;mBAAC,gBAAgB;;kBA0d1B,YAAY;mBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC;;kFAxqBjC,+BAA+B","sourcesContent":["import { Component, ElementRef, EventEmitter, HostListener, Input, Output, OnDestroy, AfterViewInit, ChangeDetectorRef, NgZone, TemplateRef, ViewChild, inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Subscription } from 'rxjs';\nimport { UserInfo } from '@memberjunction/core';\nimport { UserInfoEngine } from '@memberjunction/core-entities';\nimport { SharedGenericModule } from '@memberjunction/ng-shared-generic';\nimport { VoiceConnectionState, RealtimeSessionService } from '../../services/realtime-session.service';\nimport { ParsedDelegationArtifact } from '../../services/delegation-result-parser';\nimport { BuildReviewThreadItems, RealtimeSessionReview } from '../../services/realtime-session-review.service';\nimport { RealtimeSessionState } from './realtime-session-state';\nimport { RealtimeAgentBannerComponent } from './realtime-agent-banner.component';\nimport { RealtimeSessionThreadComponent } from './realtime-session-thread.component';\nimport { RealtimeChannelStripComponent } from './realtime-channel-strip.component';\nimport { RealtimeComposerComponent } from './realtime-composer.component';\nimport { RealtimeSurfaceTabsComponent } from './realtime-surface-tabs.component';\nimport {\n ClampSurfacePanelWidth, DefaultSurfacePanelWidth, IsSurfacePanelDrag, ParseSurfacePanelPref,\n SerializeSurfacePanelPref, SurfacePanelDragWidth,\n SURFACE_PANEL_COLLAPSED_WIDTH, SURFACE_PANEL_DEFAULT_WIDTH, SURFACE_PANEL_PREF_KEY\n} from './realtime-surface-panel-prefs';\nimport { RealtimeDisclosureModel, RealtimeUxDensity, SerializeUxMilestones, REALTIME_UX_PREF_KEY } from './realtime-disclosure';\nimport { RealtimeAudioVisualFrame, RealtimeAudioVisualSmoother, RealtimeVoiceDirection } from './realtime-audio-visuals';\nimport { RealtimeChannelTabRegistration, ShouldRemoveReviewWhiteboardTab } from './realtime-surface-tabs.model';\nimport { BaseRealtimeChannelClient } from './channels/base-realtime-channel-client';\nimport { RealtimeWhiteboardBoardComponent, WhiteboardState } from '@memberjunction/ng-whiteboard';\n\n/**\n * A request to open an entity record, emitted by the call overlay's gear-gated developer\n * links (\"Open run\" / \"Open session\"). The Generic host (chat area) converts it onto its\n * existing `openEntityRecord` output chain — the package never navigates itself (no Router).\n */\nexport interface RealtimeNavigateRequest {\n /** Entity to open (e.g. `MJ: AI Agent Runs`, `MJ: AI Agent Sessions`). */\n EntityName: string;\n /** ID of the record to open. */\n RecordID: string;\n}\n\n/**\n * A request to RESUME a reviewed session as a NEW live call, emitted by review mode's\n * \"Start live session\" button. The host (chat area) clears its review state and starts a\n * voice session through the same path the composer's mic uses, passing\n * {@link LastSessionId} so the server chains the new session to the reviewed one\n * (restoring saved channel states such as the whiteboard via `PriorChannelStatesJson`).\n */\nexport interface RealtimeStartLiveRequest {\n /** Agent the resumed session should front (review Config `targetAgentID`, else the session's `AgentID`). */\n TargetAgentId: string;\n /** Conversation the reviewed session was bound to, when any. */\n ConversationId: string | null;\n /** The reviewed session's id — chained as the new session's `lastSessionId`. */\n LastSessionId: string;\n}\n\n/**\n * The \"call mode\" overlay for a live real-time voice session. Hosted by the\n * conversation chat area (`<mj-conversation-chat-area>`) behind `Active$`, it fills the\n * conversation panel IN PLACE (`position:absolute; inset:0` over the panel — not a\n * fixed app-wide dialog), replacing the conversation view including the composer.\n *\n * Two-column layout:\n * - MAIN column — {@link RealtimeAgentBannerComponent} (the unified APP-BAR: identity +\n * turn-state + the disclosure-gated action cluster), the unified\n * {@link RealtimeSessionThreadComponent} (or the level-0 pure-audio hero), the channel\n * strip, and {@link RealtimeComposerComponent} (the bottom dock: phone-call strip ⇄\n * fused minis+composer).\n * - RIGHT PANEL — {@link RealtimeSurfaceTabsComponent}: the TABBED surface panel.\n * Tab 1 \"Activity\" hosts the session activity rail; one tab opens per ARTIFACT a\n * delegated run produces (auto-focused + flashed on arrival, viewed read-only via the\n * standard artifact viewer); ONE TAB PER INTERACTIVE CHANNEL the session resolved from\n * the `MJ: AI Agent Channels` registry. Collapsible to a slim strip at the panel level.\n *\n * INTERACTIVE CHANNELS ARE PLUGINS — this shell is channel-agnostic. It subscribes\n * {@link RealtimeSessionService.ActiveChannels$} and registers one surface tab per\n * {@link BaseRealtimeChannelClient} (key/title/icon from the plugin); the tab pane creates\n * the plugin's surface component dynamically and the PLUGIN wires its own inputs/outputs.\n * The only channel-generic affordance the shell owns is the FOCUS layout: any channel may\n * request it (via its context's `SetFocusMode` → {@link RealtimeSessionService.ChannelFocus$}),\n * which collapses the main call column (`.board-focus`) and shows the floating call pill.\n *\n * Owns the shared {@link RealtimeSessionState} — the SINGLE merge of the service's\n * caption/delegation/narration streams — and passes it to both thread and rail via\n * inputs, so neither duplicates subscription logic.\n *\n * DEVELOPER MODE: the controls row's gear toggles {@link DevMode} (per-session, off by\n * default, never persisted), revealing \"Open run\" links on delegation cards / rail items\n * and an \"Open session\" link in the banner. Clicking one emits {@link NavigateRequest}\n * and MINIMIZES the call (via {@link RealtimeSessionService.SetMinimized}) — the session\n * stays live while the host navigates to the record.\n *\n * SESSION REVIEW MODE: when the host supplies {@link ReviewData} (a loaded\n * `RealtimeSessionReview`) and NO live session is active, the overlay renders what went\n * down in that PAST session instead of a live call: the banner shows a \"Session review\"\n * badge + lifecycle range + close-reason chip; the SAME thread/rail components render the\n * historical caption turns and delegated-run cards (via\n * {@link RealtimeSessionState.LoadHistoricalItems}); a read-only Whiteboard tab is\n * registered ONLY when the session saved a parseable Whiteboard channel state. Everything\n * live is DEAD in review — no mic, no captions stream, no composer, no channel strip; the\n * controls collapse to a single \"Start live session\" button ({@link StartLiveRequested},\n * which resumes by chaining `lastSessionId`) and a Close button ({@link ReviewClosed}).\n */\n@Component({\n standalone: true,\n selector: 'mj-realtime-session-overlay',\n imports: [\n CommonModule,\n SharedGenericModule,\n RealtimeAgentBannerComponent,\n RealtimeSessionThreadComponent,\n RealtimeChannelStripComponent,\n RealtimeComposerComponent,\n RealtimeSurfaceTabsComponent,\n RealtimeWhiteboardBoardComponent\n ],\n templateUrl: './realtime-session-overlay.component.html',\n styleUrl: './realtime-session-overlay.component.css'\n})\nexport class RealtimeSessionOverlayComponent implements AfterViewInit, OnDestroy {\n private _agentName = 'Sage';\n\n /**\n * True while the call is MINIMIZED: the overlay hides itself (CSS, not destruction) so\n * the host can show its floating \"on call\" pill WITHOUT losing this shell's merged\n * session state (delegation cards ride non-replaying streams) or view state (dev mode,\n * expanded chips, scroll position). The host binds this from `Minimized$`.\n */\n @Input() Hidden = false;\n\n /** Display name of the agent the voice session fronts (e.g. \"Sage\"). */\n @Input()\n set AgentName(value: string) {\n this._agentName = value || 'Sage';\n this.State.AgentName = this._agentName;\n }\n get AgentName(): string {\n return this._agentName;\n }\n\n /** The signed-in user, threaded to the surface panel's artifact viewer. */\n @Input() CurrentUser: UserInfo | null = null;\n\n /** The active environment id, threaded to the surface panel's artifact viewer. */\n @Input() EnvironmentID = '';\n\n /**\n * SESSION REVIEW data: when set (and no live session is active) the overlay renders\n * the reviewed past session instead of a live call. Setting it populates the shared\n * {@link State} with the historical thread and prepares the read-only whiteboard tab;\n * clearing it returns the state to its live-merge baseline.\n */\n @Input()\n set ReviewData(value: RealtimeSessionReview | null) {\n if (value === this._reviewData) {\n return;\n }\n this._reviewData = value;\n if (value && !this.voice.IsActive) {\n this.enterReview(value);\n } else if (!value) {\n this.exitReview();\n }\n }\n get ReviewData(): RealtimeSessionReview | null {\n return this._reviewData;\n }\n\n /** Emitted after the call ends so the host can react (visibility is driven by Active$). */\n @Output() Ended = new EventEmitter<void>();\n\n /**\n * Emitted when a gear-gated developer link asks to open an entity record. The host is\n * expected to bubble this through its standard record-open path (the chat area re-emits\n * it on `openEntityRecord`, which Explorer routes via `NavigationService`). The overlay\n * minimizes itself first so the live call survives the navigation.\n */\n @Output() NavigateRequest = new EventEmitter<RealtimeNavigateRequest>();\n\n /**\n * Review mode's \"Start live session\": the host clears its review state and resumes the\n * reviewed session as a new live call (chaining `LastSessionId` to restore channel states).\n */\n @Output() StartLiveRequested = new EventEmitter<RealtimeStartLiveRequest>();\n\n /** Review mode's Close: the host clears its review state, returning to the conversation. */\n @Output() ReviewClosed = new EventEmitter<void>();\n\n private voice = inject(RealtimeSessionService);\n private cdr = inject(ChangeDetectorRef);\n\n private _reviewData: RealtimeSessionReview | null = null;\n\n /**\n * Set by {@link OnStartLive} just before emitting {@link StartLiveRequested}, so the\n * ReviewData→null transition that follows is recognized as a REVIEW→LIVE CONTINUATION\n * (keep the historical thread + append the \"Resumed live session\" divider) rather than\n * a plain review close (clear everything).\n */\n private pendingLiveContinuation = false;\n\n /** The reviewed chain's history artifacts, registered as unfocused surface tabs. */\n private reviewArtifacts: ParsedDelegationArtifact[] = [];\n\n /**\n * True while the surface panel carries the REVIEW-registered (template-based, read-only)\n * Whiteboard tab. Drives the review→live continuation edge: when the resumed live\n * session's channel set resolves WITHOUT a Whiteboard channel, the stale review tab is\n * removed (see {@link cleanupStaleReviewBoardTab}); when it resolves WITH one, the live\n * plugin re-registers the same key and the tab upgrades in place.\n */\n private reviewWhiteboardTabRegistered = false;\n\n /** True while the overlay renders a PAST session (review data set, no live call). */\n public get IsReviewing(): boolean {\n return this._reviewData !== null && !this.voice.IsActive;\n }\n\n /**\n * The reviewed session's rehydrated whiteboard, when it saved a parseable Whiteboard\n * channel state — rendered read-only by the review whiteboard tab. Null = no tab.\n */\n public ReviewWhiteboard: WhiteboardState | null = null;\n\n /** Shared session state — single source for the thread AND the activity rail. */\n public readonly State = new RealtimeSessionState();\n\n /**\n * PROGRESSIVE DISCLOSURE: the levels/milestones model behind the pure-audio-first UX\n * (see {@link RealtimeDisclosureModel}). Loaded from UserInfoEngine at construction;\n * content events ({@link onSessionStateChanged}, {@link onChannelActivity}) raise the\n * volatile session level; milestones ratchet + persist when the call ends. REVIEW mode\n * bypasses disclosure entirely — a past session always renders the full console.\n */\n public readonly Disclosure = new RealtimeDisclosureModel();\n\n /**\n * The strip's Details peek: shows the surface panel ON DEMAND while it isn't earned yet\n * (disclosure level < 2) — Activity and channel surfaces exist before their content\n * does. Cleared automatically once content earns the panel for real.\n */\n public DetailsPeek = false;\n\n /**\n * Whether the typed-input dock is open — a TWO-WAY user door (the strip's Type\n * control / the T hotkey open it; the dock's hide control closes it), volatile and\n * reset per session. Typing never becomes permanent chrome.\n */\n public ComposerOpen = false;\n\n /** Live turn-state from the session service — drives the banner + connecting screen. */\n public readonly ConnectionState$ = this.voice.ConnectionState$;\n\n /** Server-reported realtime model name for the active session — shown subtly in the banner. */\n public readonly ModelName$ = this.voice.ModelName$;\n\n /**\n * Whether the conversation renders as TEXT (the thread) or stays voice-first (the\n * orb hero). A PERSISTED per-user preference (`mj.realtimeVoice.captions.v1`) —\n * default OFF: voice-first, the orb owns the screen until the user opts into text.\n */\n public ShowCaptions = false;\n\n /** UserInfoEngine key for the persisted captions (text-vs-orb) preference. */\n private static readonly CaptionsPrefKey = 'mj.realtimeVoice.captions.v1';\n\n /**\n * Whether developer affordances (open-record links) are revealed. Per-session view\n * state on this shell — off by default, reset with the overlay, never persisted.\n */\n public DevMode = false;\n\n /** ID of the live server-side agent session record, for the banner's dev link. */\n public get SessionID(): string | null {\n return this.voice.CurrentAgentSessionId;\n }\n\n /**\n * The tabbed surface panel (right panel) — channel registrations are forwarded to it.\n * A SETTER because the panel is disclosure-gated (`@if`): it can be created LATE (the\n * first delegation / channel activity reveals it mid-call), at which point any queued\n * channel registrations and a pending auto-reveal must flush to the fresh instance.\n */\n private surfaceTabs?: RealtimeSurfaceTabsComponent;\n @ViewChild(RealtimeSurfaceTabsComponent)\n private set surfaceTabsRef(ref: RealtimeSurfaceTabsComponent | undefined) {\n this.surfaceTabs = ref;\n if (ref) {\n // A (re)created panel starts with a FRESH tab model: artifact tabs self-recover\n // (the panel re-scans the session state) but CHANNEL tabs only registered when\n // ActiveChannels$ emitted at session start — re-register the live set here so\n // hiding the panel (pure-audio return, Details off) never loses the Whiteboard.\n this.registerChannelTabs([...this.voice.ActiveChannels]);\n this.flushPendingChannelTabs();\n const reveal = this.pendingRevealKey;\n this.pendingRevealKey = null;\n // Deferred: focus/expand feed the parent's width bindings (wide tier) — never\n // mutate those inside the change-detection pass that created the panel.\n setTimeout(() => {\n if (reveal) {\n // The agent's first channel activity caused this creation — land ON the board.\n ref.RevealChannel(reveal);\n } else {\n // Default for a fresh panel (live AND review): the marquee surface — channels\n // lead the strip — NOT the Activity rail; agent-run plumbing is opt-in only.\n // (Review channel tabs register a beat later and take focus themselves.)\n ref.FocusFirstTab();\n }\n });\n }\n }\n\n /** The bottom dock — the T-to-type hotkey focuses its input. */\n @ViewChild(RealtimeComposerComponent) private composer?: RealtimeComposerComponent;\n\n /** Channel keys already auto-revealed this session (first activity only). */\n private revealedChannelKeys = new Set<string>();\n\n /** Auto-reveal that arrived before the (disclosure-gated) panel rendered. */\n private pendingRevealKey: string | null = null;\n\n /** Previous Active$ value — edges drive disclosure session begin/ratchet. */\n private prevActive = false;\n\n /** Template hosting the read-only review whiteboard (root-level, so always resolvable). */\n @ViewChild('reviewBoardTpl') private reviewBoardTpl?: TemplateRef<unknown>;\n\n /** Channel registrations received before the surface panel rendered (flushed in ngAfterViewInit). */\n private pendingChannelTabs: RealtimeChannelTabRegistration[] = [];\n\n /** True once the view (and the review-board template ref) exists. */\n private viewReady = false;\n\n // ── Channel FOCUS layout (channel-generic — any plugin may request it) ─────\n\n /**\n * True while a channel surface is in FOCUS mode: the main call column collapses\n * (`.board-focus` on the overlay) and a compact floating call pill (orb + state +\n * mute / show-thread / end) rides over the surface.\n */\n public ChannelFocusMode = false;\n\n /** Mic-muted state reflected on the focus pill's mute button. */\n public FocusPillMuted = false;\n\n /** The channel currently holding the focus layout (the pill's exit routes back to it). */\n private focusChannel: BaseRealtimeChannelClient | null = null;\n\n private subs: Subscription[] = [];\n\n constructor() {\n this.loadPanelWidthPref();\n this.loadDisclosurePref();\n this.loadCaptionsPref();\n this.State.Attach(this.voice);\n this.subs.push(\n // Re-render on merged-state changes; content arrival raises the disclosure level.\n this.State.Changed$.subscribe(() => this.onSessionStateChanged()),\n this.Disclosure.Changed$.subscribe(() => this.cdr.markForCheck()),\n // One surface tab per registry-resolved channel plugin (replays the current set).\n this.voice.ActiveChannels$.subscribe(channels => this.registerChannelTabs(channels)),\n // Any channel may request the focus layout through its host context.\n this.voice.ChannelFocus$.subscribe(event => this.onChannelFocus(event.Channel, event.Focused)),\n // The agent ACTED on a channel — auto-reveal its surface tab on first activity.\n this.voice.ChannelActivity$.subscribe(plugin => this.onChannelActivity(plugin)),\n // Live/idle flips: reset/ratchet disclosure + re-evaluate the review-vs-live branch.\n this.voice.Active$.subscribe(active => this.onActiveChanged(active))\n );\n }\n\n ngAfterViewInit(): void {\n this.viewReady = true;\n this.flushPendingChannelTabs();\n this.registerReviewBoardTab();\n this.registerReviewArtifactTabs();\n }\n\n // ── Surface-panel sizing (flex layout + pointer-drag handle; width persisted per-user) ──\n //\n // The panel width is a PLAIN FIELD rendered via [style.width.px] — there is no split\n // library with its own internal size state to fight. The resize handle uses the same\n // mechanics as ui-components' slide-panel (`MjSlidePanelComponent`): mousedown →\n // document mousemove/mouseup registered OUTSIDE Angular, live clamp while dragging,\n // adopt + persist on release. A bare CLICK cannot move the panel by construction\n // (width follows the pointer delta) and the click-vs-drag guard keeps it from being\n // adopted or persisted.\n\n /** Whether the surface panel is collapsed to its slim strip (reported by the panel). */\n public PanelCollapsed = false;\n /** Wide tier active (a content tab is focused) — drives the DEFAULT width only. */\n public PanelWide = false;\n /** The user's explicit dragged width (persisted); null = follow the default tiers. */\n private userPanelWidth: number | null = null;\n /** Current expanded panel width in px (rendered as the panel's inline width). */\n public PanelWidthPx = SURFACE_PANEL_DEFAULT_WIDTH;\n /** True while the resize handle is mid-drag (brand-tints the handle). */\n public IsPanelResizing = false;\n private panelResizeStartX = 0;\n private panelResizeStartWidth = 0;\n private boundPanelResizeMove = this.onPanelResizeMove.bind(this);\n private boundPanelResizeEnd = this.onPanelResizeEnd.bind(this);\n private hostRef = inject(ElementRef);\n private ngZone = inject(NgZone);\n\n /** The panel's rendered width: slim strip when collapsed, otherwise the current width. */\n public get PanelAreaSize(): number {\n return this.PanelCollapsed ? SURFACE_PANEL_COLLAPSED_WIDTH : this.PanelWidthPx;\n }\n\n /** Resizing is meaningless while collapsed or when the surface fills (focus mode). */\n public get PanelResizeDisabled(): boolean {\n return this.PanelCollapsed || this.ChannelFocusMode;\n }\n\n public OnPanelCollapsedChange(collapsed: boolean): void {\n this.PanelCollapsed = collapsed;\n this.cdr.markForCheck();\n }\n\n /** Wide-tier flips only move the DEFAULT width — an explicit user width always wins. */\n public OnPanelWideChanged(wide: boolean): void {\n this.PanelWide = wide;\n if (this.userPanelWidth === null) {\n this.PanelWidthPx = DefaultSurfacePanelWidth(wide, this.hostWidth());\n }\n this.cdr.markForCheck();\n }\n\n /** Mousedown on the resize handle: capture the start state and track the pointer document-wide. */\n public OnPanelResizeStart(event: MouseEvent): void {\n if (this.PanelResizeDisabled) {\n return;\n }\n event.preventDefault();\n this.IsPanelResizing = true;\n this.panelResizeStartX = event.clientX;\n this.panelResizeStartWidth = this.PanelWidthPx;\n document.body.style.cursor = 'col-resize';\n document.body.style.userSelect = 'none';\n this.ngZone.runOutsideAngular(() => {\n document.addEventListener('mousemove', this.boundPanelResizeMove);\n document.addEventListener('mouseup', this.boundPanelResizeEnd);\n });\n this.cdr.markForCheck();\n }\n\n /** Live drag: panel width follows the pointer delta, clamped to [min, 70% of the overlay]. */\n private onPanelResizeMove(event: MouseEvent): void {\n if (!this.IsPanelResizing) {\n return;\n }\n this.PanelWidthPx = SurfacePanelDragWidth(\n this.panelResizeStartWidth, this.panelResizeStartX, event.clientX, this.hostWidth()\n );\n this.ngZone.run(() => this.cdr.markForCheck());\n }\n\n /**\n * Release: a genuine DRAG adopts the width as the user's explicit preference and\n * persists it (debounced); a bare CLICK (movement under the tolerance) restores the\n * start width and persists nothing — the handle never snaps on a click.\n */\n private onPanelResizeEnd(event: MouseEvent): void {\n if (!this.IsPanelResizing) {\n return;\n }\n this.teardownPanelResize();\n if (IsSurfacePanelDrag(this.panelResizeStartX, event.clientX)) {\n this.userPanelWidth = this.PanelWidthPx;\n this.persistPanelWidth(this.PanelWidthPx);\n } else {\n this.PanelWidthPx = this.panelResizeStartWidth;\n }\n this.ngZone.run(() => {\n this.IsPanelResizing = false;\n this.cdr.markForCheck();\n });\n }\n\n /** Double-click the handle: back to the default tier width; persist the reset. */\n public OnPanelResizeReset(): void {\n this.userPanelWidth = null;\n this.PanelWidthPx = DefaultSurfacePanelWidth(this.PanelWide, this.hostWidth());\n this.persistPanelWidth(null);\n this.cdr.markForCheck();\n }\n\n /** Removes the document-wide drag listeners and restores the body cursor/selection. */\n private teardownPanelResize(): void {\n document.removeEventListener('mousemove', this.boundPanelResizeMove);\n document.removeEventListener('mouseup', this.boundPanelResizeEnd);\n document.body.style.cursor = '';\n document.body.style.userSelect = '';\n }\n\n /**\n * The overlay's measurable width for clamping. The component host is\n * `display: contents` (zero rect) — measure the rendered `.call-overlay` div instead.\n */\n private hostWidth(): number {\n const host = this.hostRef.nativeElement as HTMLElement;\n const el = (host.firstElementChild as HTMLElement | null) ?? host;\n return el.getBoundingClientRect ? el.getBoundingClientRect().width : 0;\n }\n\n /** Reads the persisted width once per overlay instance (no-op when the engine isn't configured). */\n private loadPanelWidthPref(): void {\n try {\n const pref = ParseSurfacePanelPref(UserInfoEngine.Instance.GetSetting(SURFACE_PANEL_PREF_KEY));\n if (pref) {\n this.userPanelWidth = pref.Width;\n // hostWidth() is 0 before first layout — the clamp then enforces only the\n // minimum, and the 70% cap re-applies on the next real drag.\n this.PanelWidthPx = ClampSurfacePanelWidth(pref.Width, this.hostWidth());\n this.cdr.markForCheck();\n }\n } catch {\n // UserInfoEngine not configured (plain-node tests / early bootstrap) — default tiers apply.\n }\n }\n\n /** Persists the width preference server-side (debounced); reset serializes {\"width\":null}. */\n private persistPanelWidth(width: number | null): void {\n try {\n UserInfoEngine.Instance.SetSettingDebounced(SURFACE_PANEL_PREF_KEY, SerializeSurfacePanelPref(width));\n } catch {\n // engine unavailable — width still applies for this session\n }\n }\n\n // ── Progressive disclosure (the console that grows with you) ────────────────\n\n /**\n * True while the PURE-AUDIO hero (the orb) owns the main column. The captions\n * preference IS the text-vs-orb switch: captions off (the voice-first default) shows\n * the breathing orb at ANY disclosure level; captions on shows the thread. Review\n * always shows the thread.\n */\n public get ShowHero(): boolean {\n return !this.IsReviewing && !this.ShowCaptions;\n }\n\n /**\n * Whether the surface-panel area renders. The tabs have their OWN control (the\n * Details toggle, plus the board auto-reveal and artifact-view requests) — they are\n * deliberately DECOUPLED from typing/disclosure levels: revealing the composer must\n * never surprise the user with the whole tab panel.\n */\n public get ShowPanelArea(): boolean {\n return this.IsReviewing || this.DetailsPeek;\n }\n\n /** The Details (tabs) toggle is always offered while live — it's the panel's one door. */\n public get ShowDetailsControl(): boolean {\n return !this.IsReviewing;\n }\n\n /** Reads the persisted disclosure milestones (tolerant; defaults to day one). */\n private loadDisclosurePref(): void {\n try {\n this.Disclosure.Load(UserInfoEngine.Instance.GetSetting(REALTIME_UX_PREF_KEY));\n } catch {\n // UserInfoEngine not configured (plain-node tests / early bootstrap) — day-one defaults.\n this.Disclosure.Load(null);\n }\n }\n\n /** Reads the persisted text-vs-orb preference (tolerant; default = voice-first OFF). */\n private loadCaptionsPref(): void {\n try {\n this.ShowCaptions = UserInfoEngine.Instance.GetSetting(RealtimeSessionOverlayComponent.CaptionsPrefKey) === 'true';\n } catch {\n // UserInfoEngine not configured — voice-first default applies.\n }\n }\n\n /** Persists the text-vs-orb preference (debounced, best-effort). */\n private persistCaptionsPref(): void {\n try {\n UserInfoEngine.Instance.SetSettingDebounced(RealtimeSessionOverlayComponent.CaptionsPrefKey, String(this.ShowCaptions));\n } catch {\n // engine unavailable — the preference still applies for this session\n }\n }\n\n /** Persists the disclosure milestones server-side (debounced, best-effort). */\n private persistDisclosure(serialized: string): void {\n try {\n UserInfoEngine.Instance.SetSettingDebounced(REALTIME_UX_PREF_KEY, serialized);\n } catch {\n // engine unavailable — the ratchet still applies for this browser session\n }\n }\n\n /**\n * Merged-state change: re-render only. DELIBERATELY no disclosure raise — per product\n * direction, content never flips the console open: a running delegation is narrated\n * aloud, a finished artifact lands as a GLOWING (unfocused) tab, and the ONLY thing\n * that auto-reveals is a channel's first agent activity (the whiteboard demands eyes).\n * A pure-audio user stays in pure audio until THEY ask for more.\n */\n private onSessionStateChanged(): void {\n this.cdr.markForCheck();\n }\n\n /**\n * The agent ACTED on a channel (a tool call routed to its local executor — e.g. the\n * first whiteboard write). THE ONE AUTO-REVEAL: the surface panel opens (as a peek —\n * the left column stays exactly as it was, pure audio included) with the channel's tab\n * focused and flashed, exactly once per channel — so the user discovers the board the\n * moment it comes alive. Disclosure levels are NOT raised: no text, no composer, no\n * extra chrome — just the board.\n */\n private onChannelActivity(plugin: BaseRealtimeChannelClient): void {\n if (this.IsReviewing || this.revealedChannelKeys.has(plugin.ChannelName)) {\n return;\n }\n this.revealedChannelKeys.add(plugin.ChannelName);\n this.DetailsPeek = true; // the panel shows via the same on-demand mechanism Details uses\n if (this.surfaceTabs) {\n // Stream handler (a tool call), not a change-detection pass — reveal synchronously\n // so the board is the visible tab the instant the agent's first stroke lands.\n this.surfaceTabs.RevealChannel(plugin.ChannelName);\n } else {\n // Panel not rendered yet (the peek just created it) — reveal once it exists.\n this.pendingRevealKey = plugin.ChannelName;\n }\n this.cdr.markForCheck();\n }\n\n /** Active$ edges: session start resets the volatile level; session end ratchets + persists. */\n private onActiveChanged(active: boolean): void {\n if (active && !this.prevActive) {\n this.Disclosure.BeginSession();\n this.DetailsPeek = false;\n this.ComposerOpen = false; // typing is opt-in per session (voice-first)\n this.revealedChannelKeys.clear();\n this.pendingRevealKey = null;\n this.startAudioVisualLoop();\n } else if (!active && this.prevActive) {\n this.persistDisclosure(this.Disclosure.RatchetOnSessionEnd());\n this.stopAudioVisualLoop();\n }\n this.prevActive = active;\n this.cdr.markForCheck();\n }\n\n // ── Audio-reactive visuals (the orb that vibrates like a speaker cone) ──────\n //\n // A requestAnimationFrame loop OUTSIDE Angular samples the client's audio meters\n // (RealtimeSessionService.GetAudioActivity → driver AnalyserNodes), runs the frame through\n // the smoothing state machine, and writes CSS custom properties + data attributes\n // straight onto the rendered overlay element — zero change detection per frame. CSS\n // gates on [data-audio-live]: with real metering the orb/EQ follow the waveform; when\n // the driver attached no meters the attribute stays 'false' and the turn-state-driven\n // keyframe animations keep working unchanged.\n\n /** Per-frame smoothing state (attack/decay envelopes + direction hysteresis). */\n private readonly audioSmoother = new RealtimeAudioVisualSmoother();\n private audioRafHandle: number | null = null;\n /** Last attribute values written (attributes are only touched on change). */\n private lastAudioLive: boolean | null = null;\n private lastVoiceDirection: RealtimeVoiceDirection | null = null;\n\n /** Starts the sampling loop (idempotent). Runs outside Angular — no CD per frame. */\n private startAudioVisualLoop(): void {\n if (this.audioRafHandle !== null || typeof requestAnimationFrame !== 'function') {\n return;\n }\n this.audioSmoother.Reset();\n this.ngZone.runOutsideAngular(() => {\n const tick = (): void => {\n this.audioRafHandle = requestAnimationFrame(tick);\n if (this.Hidden) {\n return; // minimized — skip the work, keep the loop armed\n }\n const frame = this.audioSmoother.Next(this.voice.GetAudioActivity(), performance.now());\n this.applyAudioVisualFrame(frame);\n };\n this.audioRafHandle = requestAnimationFrame(tick);\n });\n }\n\n /** Stops the loop and returns the overlay to turn-state-driven animation. */\n private stopAudioVisualLoop(): void {\n if (this.audioRafHandle !== null) {\n cancelAnimationFrame(this.audioRafHandle);\n this.audioRafHandle = null;\n }\n this.audioSmoother.Reset();\n this.lastAudioLive = null;\n this.lastVoiceDirection = null;\n this.overlayElement()?.setAttribute('data-audio-live', 'false');\n }\n\n /** The rendered `.call-overlay` element (the :host is display:contents). */\n private overlayElement(): HTMLElement | null {\n const host = this.hostRef.nativeElement as HTMLElement;\n return (host.firstElementChild as HTMLElement | null) ?? null;\n }\n\n /** Writes one smoothed frame as CSS vars/attributes (attributes only on change). */\n private applyAudioVisualFrame(frame: RealtimeAudioVisualFrame | null): void {\n const el = this.overlayElement();\n if (!el) {\n return;\n }\n const live = frame !== null;\n if (live !== this.lastAudioLive) {\n this.lastAudioLive = live;\n el.setAttribute('data-audio-live', String(live));\n }\n if (!frame) {\n return;\n }\n el.style.setProperty('--voice-out', frame.OutputLevel.toFixed(3));\n el.style.setProperty('--voice-in', frame.InputLevel.toFixed(3));\n for (let i = 0; i < frame.Bins.length; i++) {\n el.style.setProperty(`--eq-${i + 1}`, frame.Bins[i].toFixed(3));\n }\n if (frame.Direction !== this.lastVoiceDirection) {\n this.lastVoiceDirection = frame.Direction;\n el.setAttribute('data-voice-dir', frame.Direction);\n }\n }\n\n /** The strip's Details control: peek at (or hide) the surface panel on demand. */\n public OnDetailsToggled(): void {\n this.DetailsPeek = !this.DetailsPeek;\n if (this.DetailsPeek) {\n // Land on the marquee surface (channels lead the strip; Activity is pinned last).\n setTimeout(() => this.surfaceTabs?.FocusFirstTab());\n }\n this.cdr.markForCheck();\n }\n\n /** The gear popover picked an interface density — apply + persist immediately. */\n public OnDensityChanged(density: RealtimeUxDensity): void {\n this.Disclosure.SetDensity(density);\n this.persistDisclosure(SerializeUxMilestones(this.Disclosure.Milestones));\n }\n\n /** The hero's \"Show the conversation\" affordance — turns the text preference on. */\n public OnTextReveal(): void {\n this.OnCaptionsToggled(true);\n }\n\n /**\n * The app-bar's \"Pure audio\": returns to the orb-only surface AND makes it stick —\n * it sets the persisted interface density to `simple` (the same setting the gear\n * writes), so a refresh / next call still opens pure audio. In-session reveals\n * (\"Show the conversation\", T-to-type, Details) remain available and stay ephemeral;\n * the gear's density control switches back to Standard/Pro/Auto whenever wanted.\n */\n public OnPureAudio(): void {\n this.Disclosure.SetDensity('simple');\n this.persistDisclosure(SerializeUxMilestones(this.Disclosure.Milestones));\n this.DetailsPeek = false;\n this.cdr.markForCheck();\n }\n\n /** App-bar Minimize: hide the call view (CSS) — the call stays fully live. */\n public OnMinimize(): void {\n this.voice.SetMinimized(true);\n }\n\n /** App-bar / strip End: tear the session down, then notify the host. */\n public async OnEndCall(): Promise<void> {\n await this.voice.EndVoiceSession();\n this.Ended.emit();\n }\n\n /** Maps the realtime state onto the hero orb's `data-state` (active turn-states only). */\n public HeroOrbState(state: VoiceConnectionState): 'speaking' | 'listening' | 'thinking' {\n switch (state) {\n case 'speaking': return 'speaking';\n case 'thinking': return 'thinking';\n default: return 'listening';\n }\n }\n\n /** Short first-person status line for the pure-audio hero. */\n public HeroStateLabel(state: VoiceConnectionState): string {\n switch (state) {\n case 'speaking': return `${this.AgentName} is speaking…`;\n case 'thinking': return `${this.AgentName} is working…`;\n case 'listening': return 'Listening';\n case 'connecting': return 'Connecting…';\n case 'error': return 'Connection error';\n default: return 'On call';\n }\n }\n\n /**\n * T-TO-TYPE: pressing T during a live call reveals the composer (raising disclosure to\n * the engaged level when needed) and focuses its input — typing always exists, it just\n * whispers until used. Ignored while review/minimized, with modifiers, or when an\n * editable element already has focus.\n */\n @HostListener('document:keydown', ['$event'])\n public OnDocumentKeydown(event: KeyboardEvent): void {\n if (this.Hidden || this.IsReviewing || !this.voice.IsActive) {\n return;\n }\n if ((event.key !== 't' && event.key !== 'T') || event.metaKey || event.ctrlKey || event.altKey) {\n return;\n }\n if (this.isEditableTarget(event.target) || this.isKeyboardCapturingSurfaceFocused()) {\n return;\n }\n event.preventDefault();\n this.OnComposerOpenChanged(true);\n // The dock may have just been created — focus after this CD pass.\n setTimeout(() => this.composer?.FocusInput());\n }\n\n /**\n * True when the event target is a native text-editing element (an input, textarea, or contentEditable),\n * where a bare letter should type — not trigger the T-to-type shortcut.\n *\n * @param eventTarget The keydown event's target.\n * @returns Whether the target is an editable element.\n */\n private isEditableTarget(eventTarget: EventTarget | null): boolean {\n const target = eventTarget as HTMLElement | null;\n return !!target && (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable);\n }\n\n /**\n * True when a surface that opts into capturing keyboard input currently holds focus — notably the Remote\n * Browser live canvas, which marks itself with `data-mj-capture-keys` while the user is driving it. When it\n * has focus, the overlay's global shortcuts (T-to-type) must stand down so the user's keystrokes land in the\n * remote browser, not the local composer. Decoupled by an attribute contract so the overlay needs no direct\n * reference to the surface component.\n *\n * @returns Whether a keyboard-capturing surface is focused.\n */\n private isKeyboardCapturingSurfaceFocused(): boolean {\n const active = (typeof document !== 'undefined' ? document.activeElement : null) as HTMLElement | null;\n return !!active && active.hasAttribute('data-mj-capture-keys');\n }\n\n /**\n * The composer dock opened (strip Type control / T hotkey) or closed (the dock's hide\n * control). Opening raises the 'engaged' milestone for the cross-session ratchet —\n * but the dock itself stays a per-session, user-owned toggle either way.\n */\n public OnComposerOpenChanged(open: boolean): void {\n this.ComposerOpen = open;\n if (open) {\n this.Disclosure.Raise('engaged');\n setTimeout(() => this.composer?.FocusInput());\n }\n this.cdr.markForCheck();\n }\n\n ngOnDestroy(): void {\n this.stopAudioVisualLoop();\n if (this.IsPanelResizing) {\n this.teardownPanelResize();\n this.IsPanelResizing = false;\n }\n for (const sub of this.subs) {\n sub.unsubscribe();\n }\n this.subs = [];\n this.State.Detach();\n }\n\n /**\n * Registers (or updates) an INTERACTIVE-CHANNEL tab on the surface panel. The overlay\n * calls it for every registry-resolved plugin; hosts may also call it for bespoke\n * template-based panes. Until a registration supplies a plugin / template, the tab\n * renders the \"coming online…\" placeholder (re-register the same `Key` to upgrade).\n * Safe to call before the panel has rendered — registrations are queued and flushed.\n */\n public RegisterChannelTab(registration: RealtimeChannelTabRegistration): void {\n if (this.surfaceTabs) {\n this.surfaceTabs.RegisterChannelTab(registration);\n } else {\n this.pendingChannelTabs.push(registration);\n }\n }\n\n /**\n * A done delegation card / rail entry asked to view a produced artifact's tab — an\n * EXPLICIT user request, so it may open the (otherwise Details-controlled) panel.\n */\n public OnOpenArtifactRequested(artifact: ParsedDelegationArtifact): void {\n if (this.surfaceTabs) {\n this.surfaceTabs.FocusArtifact(artifact);\n return;\n }\n // Panel hidden — open it (Details mechanism) and focus once it exists.\n this.DetailsPeek = true;\n this.cdr.markForCheck();\n setTimeout(() => this.surfaceTabs?.FocusArtifact(artifact));\n }\n\n /**\n * Registers one surface tab per active channel plugin THAT HAS A SURFACE (key/title/icon from the\n * plugin). Server-only channels ({@link BaseRealtimeChannelClient.HasSurface} === `false`) render no\n * tab — their tools + perception are already wired by the session service; there is simply nothing\n * to show in the surface panel.\n */\n private registerChannelTabs(channels: BaseRealtimeChannelClient[]): void {\n this.cleanupStaleReviewBoardTab(channels);\n for (const plugin of channels) {\n if (!plugin.HasSurface()) {\n continue; // server-only channel — no surface to tab.\n }\n this.RegisterChannelTab({\n Key: plugin.ChannelName,\n Title: plugin.TabTitle,\n Icon: plugin.TabIcon,\n Plugin: plugin\n });\n }\n this.cdr.markForCheck();\n }\n\n /**\n * REVIEW→LIVE continuation edge: when the resumed live session resolves its channel set\n * WITHOUT a Whiteboard channel, the review-registered read-only board tab is now a dead\n * surface — remove it (Activity regains focus if it was active). When the set HAS a\n * Whiteboard channel, the plugin registration above upgrades the same tab key in place,\n * so the review flag is simply released. Review ARTIFACT tabs are deliberately kept —\n * they are wanted carryover into the live session.\n */\n private cleanupStaleReviewBoardTab(channels: BaseRealtimeChannelClient[]): void {\n if (!this.reviewWhiteboardTabRegistered) {\n return;\n }\n if (ShouldRemoveReviewWhiteboardTab(this.voice.IsActive, this.reviewWhiteboardTabRegistered, channels)) {\n this.surfaceTabs?.RemoveTab('Whiteboard');\n // Also drop a still-queued review registration (panel not rendered yet — rare but possible).\n this.pendingChannelTabs = this.pendingChannelTabs.filter(r => !(r.Key === 'Whiteboard' && r.Content));\n this.reviewWhiteboardTabRegistered = false;\n } else if (channels.some(c => c.ChannelName === 'Whiteboard')) {\n this.reviewWhiteboardTabRegistered = false; // live plugin owns the tab now (upgraded in place)\n }\n }\n\n /** Forwards channel registrations that arrived before the panel existed. */\n private flushPendingChannelTabs(): void {\n if (this.surfaceTabs && this.pendingChannelTabs.length > 0) {\n for (const reg of this.pendingChannelTabs) {\n this.surfaceTabs.RegisterChannelTab(reg);\n }\n this.pendingChannelTabs = [];\n }\n }\n\n /**\n * The captions toggle = the persisted text-vs-orb switch: on → the thread renders\n * (raising the text disclosure milestone); off → the orb hero owns the screen again,\n * at any level. Persisted per-user so the choice survives refresh and devices.\n */\n public OnCaptionsToggled(on: boolean): void {\n this.ShowCaptions = on;\n if (on) {\n this.Disclosure.Raise('text');\n }\n this.persistCaptionsPref();\n this.cdr.markForCheck();\n }\n\n /** Reflect the gear toggle from the controls into the dev affordances. */\n public OnDevModeToggled(on: boolean): void {\n this.DevMode = on;\n }\n\n /** A dev link asked to open a delegated agent run record. */\n public OnOpenRunRequested(runId: string): void {\n this.requestNavigate('MJ: AI Agent Runs', runId);\n }\n\n /** The banner's dev link asked to open the live agent session record. */\n public OnOpenSessionRequested(sessionId: string): void {\n this.requestNavigate('MJ: AI Agent Sessions', sessionId);\n }\n\n // ── Session review mode ────────────────────────────────────────────────────\n\n /** Review banner convenience accessors (null-safe against the review data). */\n public get ReviewStartedAt(): Date | null {\n return this._reviewData?.StartedAt ?? null;\n }\n public get ReviewClosedAt(): Date | null {\n return this._reviewData?.ClosedAt ?? null;\n }\n public get ReviewCloseReason(): string | null {\n return this._reviewData?.CloseReason ?? null;\n }\n\n /** The reviewed session record's id — feeds the banner's dev \"Open session\" link. */\n public get ReviewSessionID(): string | null {\n return this._reviewData?.SessionID ?? null;\n }\n\n /**\n * Review controls: resume the reviewed session as a NEW live call (host handles the\n * start). Flags the upcoming ReviewData→null transition as a CONTINUATION so the\n * historical thread is kept (divider appended) instead of cleared.\n */\n public OnStartLive(): void {\n const review = this._reviewData;\n if (!review) {\n return;\n }\n this.pendingLiveContinuation = true;\n this.StartLiveRequested.emit({\n TargetAgentId: review.TargetAgentID,\n ConversationId: review.ConversationID,\n LastSessionId: review.SessionID\n });\n }\n\n /** Review controls: close the review (host clears its review state). */\n public OnReviewClose(): void {\n this.ReviewClosed.emit();\n }\n\n /**\n * Enters review: replaces the shared state's thread with the historical items (all\n * chain legs, dividers between legs), names the cards after the reviewed agent,\n * rehydrates the saved whiteboard (when any), and registers the chain's history\n * ARTIFACTS as unfocused surface tabs.\n */\n private enterReview(review: RealtimeSessionReview): void {\n this.State.AgentName = review.AgentName;\n this.State.LoadHistoricalItems(BuildReviewThreadItems(review));\n this.ReviewWhiteboard = this.parseReviewWhiteboard(review);\n this.reviewArtifacts = review.Artifacts ?? [];\n if (this.viewReady) {\n // Let this CD pass create/refresh the surface panel before registering the tabs.\n // ngZone.run is REQUIRED: review often opens through the deep-link/query-param\n // path (a plain RxJS stream outside Angular's zone) — without re-entering the\n // zone, the registration's markForCheck never gets a change-detection pass and\n // the Whiteboard tab stays invisible until the user's next click.\n setTimeout(() => this.ngZone.run(() => {\n this.registerReviewBoardTab();\n this.registerReviewArtifactTabs();\n }), 0);\n }\n this.cdr.markForCheck();\n }\n\n /**\n * Leaves review. Two distinct exits:\n * - REVIEW→LIVE CONTINUATION ({@link OnStartLive} was clicked): KEEP the historical\n * thread and append the \"Resumed live session\" divider so the new live items read\n * as a new section of the same conversation. Artifact tabs are left in place — the\n * chain's artifacts carry into the live session.\n * - plain CLOSE: clear everything so the conversation view returns clean.\n */\n private exitReview(): void {\n this.ReviewWhiteboard = null;\n if (this.pendingLiveContinuation) {\n this.pendingLiveContinuation = false;\n this.State.StartLiveContinuation();\n } else {\n this.reviewArtifacts = [];\n this.State.Clear();\n }\n this.cdr.markForCheck();\n }\n\n /** Registers the reviewed chain's history artifacts as UNFOCUSED artifact tabs (idempotent). */\n private registerReviewArtifactTabs(): void {\n if (!this.surfaceTabs || this.reviewArtifacts.length === 0) {\n return;\n }\n for (const artifact of this.reviewArtifacts) {\n this.surfaceTabs.RegisterArtifactTab(artifact, false);\n }\n this.cdr.markForCheck();\n }\n\n /**\n * Rehydrates the reviewed session's saved Whiteboard channel state. TOLERANT: a missing\n * or malformed state returns null — review simply shows no whiteboard tab.\n */\n private parseReviewWhiteboard(review: RealtimeSessionReview): WhiteboardState | null {\n const channel = review.ChannelStates.find(c => c.ChannelName.toLowerCase() === 'whiteboard');\n if (!channel?.StateJson) {\n return null;\n }\n try {\n return WhiteboardState.FromJSON(channel.StateJson);\n } catch {\n console.warn('[RealtimeSessionReview] Saved whiteboard state was malformed — skipping the board tab.');\n return null;\n }\n }\n\n /**\n * Registers the read-only review whiteboard tab (no-op without a board / template) —\n * FOCUSED: the session's channel surface is what the reviewer came to see; the\n * Activity rail stays available but is never the default focus.\n */\n private registerReviewBoardTab(): void {\n if (!this.ReviewWhiteboard || !this.reviewBoardTpl) {\n return;\n }\n this.RegisterChannelTab({\n Key: 'Whiteboard',\n Title: 'Whiteboard',\n Icon: 'fa-solid fa-chalkboard',\n Content: this.reviewBoardTpl,\n Focus: true\n });\n this.reviewWhiteboardTabRegistered = true;\n this.cdr.markForCheck();\n }\n\n /**\n * A working delegation card's ✕ asked to cancel that delegated run — EXPLICIT user\n * intent (barge-in never cancels work, by deliberate policy). The service calls the\n * server cancel channel and flips the card to a failed \"Cancelled by user\" result.\n */\n public OnCancelDelegation(callId: string): void {\n void this.voice.CancelDelegation(callId);\n }\n\n /** Minimizes the live call (it stays running) and asks the host to open the record. */\n private requestNavigate(entityName: string, recordId: string): void {\n this.voice.SetMinimized(true);\n this.NavigateRequest.emit({ EntityName: entityName, RecordID: recordId });\n }\n\n // ── Focus layout + pill ────────────────────────────────────────────────────\n\n /** A channel requested (or released) the focus layout via its host context. */\n private onChannelFocus(channel: BaseRealtimeChannelClient, focused: boolean): void {\n this.ChannelFocusMode = focused;\n this.focusChannel = focused ? channel : null;\n this.cdr.markForCheck();\n }\n\n /** Focus pill: toggle the mic mute. */\n public OnFocusPillMute(): void {\n this.FocusPillMuted = this.voice.ToggleMute();\n }\n\n /** Focus pill: leave focus mode (show the thread column again). */\n public OnFocusPillExit(): void {\n // Route through the focus-holding channel so ITS surface toggle stays in sync — it\n // re-emits SetFocusMode(false) → onChannelFocus. Defensively clear the layout flag\n // too (idempotent), covering channels whose surface isn't instantiated.\n this.focusChannel?.RequestFocusExit();\n this.ChannelFocusMode = false;\n this.focusChannel = null;\n }\n\n /** Focus pill: end the call (mirrors the controls row's End button). */\n public async OnFocusPillEnd(): Promise<void> {\n await this.voice.EndVoiceSession();\n this.Ended.emit();\n }\n\n /** Short status line for the focus pill (first person — the co-agent owns the work). */\n public FocusStateLabel(state: VoiceConnectionState): string {\n switch (state) {\n case 'speaking': return `${this.AgentName} is speaking…`;\n case 'thinking': return `${this.AgentName} is working…`;\n case 'listening': return 'Listening';\n case 'connecting': return 'Connecting…';\n default: return '';\n }\n }\n}\n","@if (ConnectionState$ | async; as state) {\n <div class=\"call-overlay\"\n [class.call-overlay--hidden]=\"Hidden\"\n [class.call-overlay--review]=\"IsReviewing\"\n [class.board-focus]=\"ChannelFocusMode\"\n role=\"region\" [attr.aria-label]=\"IsReviewing ? 'Past session review' : 'Live voice session'\">\n\n <!-- PROGRESSIVE DISCLOSURE (the console that grows with you — Redesign A Progressive):\n level 0 is PURE AUDIO (the hero orb owns the main column; no thread, no composer;\n the strip's Details control peeks at the panels on demand); level 1 reveals the\n caption thread + captions control + type-to-type hint; level 2+ docks the composer\n and keeps the surface panel. CONTENT NEVER FLIPS THE CONSOLE OPEN: finished\n artifacts land as glowing unfocused tabs; the ONE auto-reveal is a channel's\n first agent activity (e.g. the first whiteboard write), which opens the panel as\n a peek with that tab focused — the left column stays exactly as it was.\n REVIEW always renders the full console. -->\n <div class=\"call-main\">\n <!-- The UNIFIED APP-BAR: identity + state + every session action (Redesign A). -->\n <mj-realtime-agent-banner\n [State]=\"state\"\n [AgentName]=\"AgentName\"\n [ModelName]=\"IsReviewing ? null : (ModelName$ | async)\"\n [DevMode]=\"DevMode\"\n [SessionID]=\"IsReviewing ? ReviewSessionID : SessionID\"\n [ReviewMode]=\"IsReviewing\"\n [ReviewStartedAt]=\"ReviewStartedAt\"\n [ReviewClosedAt]=\"ReviewClosedAt\"\n [ReviewCloseReason]=\"ReviewCloseReason\"\n [CaptionsOn]=\"ShowCaptions\"\n [ShowCaptionsControl]=\"!IsReviewing\"\n [ShowGear]=\"!IsReviewing && Disclosure.ShowGear\"\n [ShowEnd]=\"!IsReviewing && Disclosure.ShowComposer\"\n [ShowMinimize]=\"!IsReviewing\"\n [ShowPureAudio]=\"!IsReviewing && Disclosure.SessionLevel > 0\"\n [Density]=\"Disclosure.Milestones.Density\"\n (OpenSessionRequested)=\"OnOpenSessionRequested($event)\"\n (CaptionsToggled)=\"OnCaptionsToggled($event)\"\n (DevModeToggled)=\"OnDevModeToggled($event)\"\n (DensityChanged)=\"OnDensityChanged($event)\"\n (MinimizeRequested)=\"OnMinimize()\"\n (PureAudioRequested)=\"OnPureAudio()\"\n (EndRequested)=\"OnEndCall()\"\n (StartLiveRequested)=\"OnStartLive()\"\n (CloseRequested)=\"OnReviewClose()\">\n </mj-realtime-agent-banner>\n\n <!-- Ephemeral narration with no active working card to anchor to → under the banner -->\n @if (!IsReviewing && State.Narration && !State.ActiveCallId && Disclosure.ShowThread) {\n <div class=\"banner-live-note\" role=\"status\" aria-live=\"polite\">\n <i class=\"fa-solid fa-comment-dots\" aria-hidden=\"true\"></i>\n {{ State.Narration }}\n </div>\n }\n\n <div class=\"call-body\" [class.call-body--hero]=\"ShowHero && state !== 'connecting'\">\n @if (!IsReviewing && state === 'connecting') {\n <div class=\"call-connecting\">\n <mj-loading text=\"Connecting to the live session…\" size=\"medium\"></mj-loading>\n </div>\n } @else if (ShowHero) {\n <!-- PURE-AUDIO HERO (level 0): the orb IS the interface — it breathes with the\n audio inside expanding sound-wave rings; nothing to read, nothing to configure. -->\n <div class=\"hero\" [attr.data-state]=\"state\" role=\"status\" aria-live=\"polite\">\n <div class=\"hero__stage\">\n <span class=\"hero__ring\" aria-hidden=\"true\"></span>\n <span class=\"hero__ring hero__ring--2\" aria-hidden=\"true\"></span>\n <span class=\"hero__ring hero__ring--3\" aria-hidden=\"true\"></span>\n <div class=\"hero__orb\" [attr.data-state]=\"HeroOrbState(state)\" aria-hidden=\"true\"></div>\n </div>\n <div class=\"hero__eq\" aria-hidden=\"true\">\n <span></span><span></span><span></span><span></span><span></span>\n <span></span><span></span><span></span><span></span>\n </div>\n <div class=\"hero__name\">{{ AgentName }}</div>\n <div class=\"hero__sub\">{{ HeroStateLabel(state) }}</div>\n <button type=\"button\" class=\"hero__reveal\" (click)=\"OnTextReveal()\"\n title=\"Show the conversation as text\">\n <i class=\"fa-solid fa-closed-captioning\" aria-hidden=\"true\"></i>\n Show the conversation\n </button>\n </div>\n } @else {\n <mj-realtime-session-thread\n [State]=\"State\"\n [AgentName]=\"AgentName\"\n [UserName]=\"CurrentUser?.Name || 'You'\"\n [ShowCaptions]=\"IsReviewing ? true : ShowCaptions\"\n [DevMode]=\"DevMode\"\n (OpenRunRequested)=\"OnOpenRunRequested($event)\"\n (OpenArtifactRequested)=\"OnOpenArtifactRequested($event)\"\n (CancelRequested)=\"OnCancelDelegation($event)\">\n </mj-realtime-session-thread>\n }\n </div>\n\n @if (!IsReviewing) {\n <!-- Active channels (earned with the console at level 2+) -->\n @if (Disclosure.ShowComposer) {\n <mj-realtime-channel-strip></mj-realtime-channel-strip>\n }\n\n <!-- The BOTTOM DOCK: phone-call strip ⇄ fused minis+composer — the user's own\n two-way toggle (Type opens, hide closes), never level-forced. -->\n <mj-realtime-composer\n [Open]=\"ComposerOpen\"\n (OpenChanged)=\"OnComposerOpenChanged($event)\"\n [CaptionsOn]=\"ShowCaptions\"\n [ShowDetails]=\"ShowDetailsControl\"\n [DetailsOn]=\"DetailsPeek\"\n (CaptionsToggled)=\"OnCaptionsToggled($event)\"\n (DetailsToggled)=\"OnDetailsToggled()\"\n (EndRequested)=\"OnEndCall()\">\n </mj-realtime-composer>\n }\n </div>\n\n <!-- RIGHT: TABBED SURFACE PANEL — disclosure-gated: it EXISTS once earned (level 2+,\n which the first delegation forces), peeked on demand via the strip's Details\n control, or always in review. Slides in from the right when it arrives — the\n panel's arrival IS the progress cue. -->\n @if (ShowPanelArea) {\n <!-- Resize handle (hidden while the panel is collapsed or a channel holds focus). -->\n @if (!PanelResizeDisabled) {\n <div class=\"call-resizer\"\n [class.call-resizer--active]=\"IsPanelResizing\"\n role=\"separator\" aria-orientation=\"vertical\"\n aria-label=\"Resize the surface panel (double-click to reset)\"\n title=\"Drag to resize • double-click to reset\"\n (mousedown)=\"OnPanelResizeStart($event)\"\n (dblclick)=\"OnPanelResizeReset()\"></div>\n }\n\n <div class=\"call-panel\" [style.width.px]=\"ChannelFocusMode ? null : PanelAreaSize\">\n <mj-realtime-surface-tabs\n [State]=\"State\"\n [DevMode]=\"DevMode\"\n [CurrentUser]=\"CurrentUser\"\n [EnvironmentID]=\"EnvironmentID\"\n [Fill]=\"ChannelFocusMode\"\n (OpenRunRequested)=\"OnOpenRunRequested($event)\"\n (CollapsedChange)=\"OnPanelCollapsedChange($event)\"\n (WideChanged)=\"OnPanelWideChanged($event)\">\n </mj-realtime-surface-tabs>\n </div>\n }\n\n <!-- FOCUS floating call pill: the main column is hidden, so the live call's\n identity + state + mute / show-thread / end controls ride over the surface. -->\n @if (!IsReviewing && ChannelFocusMode) {\n <div class=\"board-focus-pill\" role=\"status\" aria-label=\"Live call (board focus)\">\n <span class=\"board-focus-pill__orb\" [attr.data-state]=\"state\" aria-hidden=\"true\"></span>\n <span class=\"board-focus-pill__text\">\n <span class=\"board-focus-pill__name\">Voice for {{ AgentName }}</span>\n @if (FocusStateLabel(state); as label) {\n <span class=\"board-focus-pill__state\">{{ label }}</span>\n }\n </span>\n <button type=\"button\" class=\"board-focus-pill__btn\"\n [class.board-focus-pill__btn--active]=\"FocusPillMuted\"\n (click)=\"OnFocusPillMute()\"\n [title]=\"FocusPillMuted ? 'Unmute' : 'Mute'\"\n [attr.aria-label]=\"FocusPillMuted ? 'Unmute microphone' : 'Mute microphone'\">\n <i class=\"fa-solid\" [class.fa-microphone]=\"!FocusPillMuted\" [class.fa-microphone-slash]=\"FocusPillMuted\" aria-hidden=\"true\"></i>\n </button>\n <button type=\"button\" class=\"board-focus-pill__btn\"\n (click)=\"OnFocusPillExit()\"\n title=\"Show thread\" aria-label=\"Show the conversation thread\">\n <i class=\"fa-solid fa-table-columns\" aria-hidden=\"true\"></i>\n </button>\n <button type=\"button\" class=\"board-focus-pill__btn board-focus-pill__btn--end\"\n (click)=\"OnFocusPillEnd()\"\n title=\"End call\" aria-label=\"End the call\">\n <i class=\"fa-solid fa-phone-slash\" aria-hidden=\"true\"></i>\n </button>\n </div>\n }\n\n </div>\n}\n\n<!-- SESSION REVIEW whiteboard pane body: the reviewed session's saved board, rehydrated\n locally (WhiteboardState.FromJSON) and rendered READ-ONLY (pan/zoom only). Registered\n as a template-based channel tab ONLY when a parseable Whiteboard state exists. -->\n<ng-template #reviewBoardTpl>\n @if (ReviewWhiteboard; as board) {\n <!-- The board host positions itself absolutely — give it a filling, positioned frame. -->\n <div class=\"review-board-host\">\n <mj-realtime-whiteboard\n [State]=\"board\"\n [AgentName]=\"AgentName\"\n [ReadOnly]=\"true\">\n </mj-realtime-whiteboard>\n </div>\n }\n</ng-template>\n"]}
1
+ {"version":3,"file":"realtime-session-overlay.component.js","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-session-overlay.component.ts","../../../../src/lib/components/realtime/realtime-session-overlay.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAA4B,iBAAiB,EAAE,MAAM,EAAe,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACtL,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,OAA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,KAAK;;kBAKL,KAAK;;kBAKL,KAAK;;kBAQL,KAAK;;kBAKL,KAAK;;kBAKL,KAAK;;kBASL,KAAK;;kBAKL,KAAK;;kBAeL,KAAK;;kBAaL,KAAK;;kBAiBL,MAAM;;kBAQN,MAAM;;kBAMN,MAAM;;kBAGN,MAAM;;kBAKN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAON,MAAM;;kBA8KN,SAAS;mBAAC,4BAA4B;;kBA8BtC,SAAS;mBAAC,yBAAyB;;kBAYnC,SAAS;mBAAC,gBAAgB;;kBAG1B,SAAS;mBAAC,cAAc;;kBA6rBxB,YAAY;mBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC;;kFAvnCjC,+BAA+B","sourcesContent":["import { Component, ElementRef, EventEmitter, HostListener, Input, Output, OnDestroy, AfterViewInit, ChangeDetectorRef, NgZone, TemplateRef, ViewChild, inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Subscription } from 'rxjs';\nimport { UserInfo } from '@memberjunction/core';\nimport { UserInfoEngine } from '@memberjunction/core-entities';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { SharedGenericModule } from '@memberjunction/ng-shared-generic';\nimport { MJStorageMediaPlayerComponent, MediaTranscriptCue } from '@memberjunction/ng-media-player';\nimport { RealtimeConnectionState, RealtimeSessionService } from '../../services/realtime-session.service';\nimport { ParsedDelegationArtifact } from '../../services/delegation-result-parser';\nimport { BuildReviewThreadItems, RealtimeSessionReview, RealtimeSessionReviewTurn } from '../../services/realtime-session-review.service';\nimport { RealtimeSessionState } from './realtime-session-state';\nimport { RealtimeAgentBannerComponent } from './realtime-agent-banner.component';\nimport { RealtimeSessionThreadComponent } from './realtime-session-thread.component';\nimport { RealtimeChannelStripComponent } from './realtime-channel-strip.component';\nimport { RealtimeComposerComponent } from './realtime-composer.component';\nimport { RealtimeSurfaceTabsComponent } from './realtime-surface-tabs.component';\nimport {\n ClampSurfacePanelWidth, DefaultSurfacePanelWidth, IsSurfacePanelDrag, ParseSurfacePanelPref,\n SerializeSurfacePanelPref, SurfacePanelDragWidth,\n SURFACE_PANEL_COLLAPSED_WIDTH, SURFACE_PANEL_DEFAULT_WIDTH, SURFACE_PANEL_PREF_KEY\n} from './realtime-surface-panel-prefs';\nimport { RealtimeDisclosureModel, RealtimeUxDensity, SerializeUxMilestones, REALTIME_UX_PREF_KEY } from './realtime-disclosure';\nimport {\n resolveRealtimeUi, DEFAULT_REALTIME_UI_INPUTS, DEFAULT_REALTIME_UI_SIGNALS,\n RealtimeUiInputs, RealtimeUiSignals, ResolvedRealtimeUi,\n RealtimeChromeMode, RealtimeControlId, RealtimeUiConnectionState\n} from './realtime-ui-config';\nimport { RealtimeAudioVisualFrame, RealtimeAudioVisualSmoother, RealtimeDirection } from './realtime-audio-visuals';\nimport { RealtimeChannelTabRegistration, ShouldRemoveReviewWhiteboardTab } from './realtime-surface-tabs.model';\nimport { ShouldRegisterChannelTabUpFront } from './realtime-surface-tab-style';\nimport { BaseRealtimeChannelClient } from './channels/base-realtime-channel-client';\nimport { RealtimeWhiteboardBoardComponent, WhiteboardState } from '@memberjunction/ng-whiteboard';\n\n/**\n * A request to open an entity record, emitted by the call overlay's gear-gated developer\n * links (\"Open run\" / \"Open session\"). The Generic host (chat area) converts it onto its\n * existing `openEntityRecord` output chain — the package never navigates itself (no Router).\n */\nexport interface RealtimeNavigateRequest {\n /** Entity to open (e.g. `MJ: AI Agent Runs`, `MJ: AI Agent Sessions`). */\n EntityName: string;\n /** ID of the record to open. */\n RecordID: string;\n}\n\n/**\n * A request to RESUME a reviewed session as a NEW live call, emitted by review mode's\n * \"Start live session\" button. The host (chat area) clears its review state and starts a\n * voice session through the same path the composer's mic uses, passing\n * {@link LastSessionId} so the server chains the new session to the reviewed one\n * (restoring saved channel states such as the whiteboard via `PriorChannelStatesJson`).\n */\nexport interface RealtimeStartLiveRequest {\n /** Agent the resumed session should front (review Config `targetAgentID`, else the session's `AgentID`). */\n TargetAgentId: string;\n /** Conversation the reviewed session was bound to, when any. */\n ConversationId: string | null;\n /** The reviewed session's id — chained as the new session's `lastSessionId`. */\n LastSessionId: string;\n}\n\n\n/**\n * The \"call mode\" overlay for a live real-time voice session. Hosted by the\n * conversation chat area (`<mj-conversation-chat-area>`) behind `Active$`, it fills the\n * conversation panel IN PLACE (`position:absolute; inset:0` over the panel — not a\n * fixed app-wide dialog), replacing the conversation view including the composer.\n *\n * Two-column layout:\n * - MAIN column — {@link RealtimeAgentBannerComponent} (the unified APP-BAR: identity +\n * turn-state + the disclosure-gated action cluster), the unified\n * {@link RealtimeSessionThreadComponent} (or the level-0 pure-audio hero), the channel\n * strip, and {@link RealtimeComposerComponent} (the bottom dock: phone-call strip ⇄\n * fused minis+composer).\n * - RIGHT PANEL — {@link RealtimeSurfaceTabsComponent}: the TABBED surface panel.\n * Tab 1 \"Activity\" hosts the session activity rail; one tab opens per ARTIFACT a\n * delegated run produces (auto-focused + flashed on arrival, viewed read-only via the\n * standard artifact viewer); ONE TAB PER INTERACTIVE CHANNEL the session resolved from\n * the `MJ: AI Agent Channels` registry. Collapsible to a slim strip at the panel level.\n *\n * INTERACTIVE CHANNELS ARE PLUGINS — this shell is channel-agnostic. It subscribes\n * {@link RealtimeSessionService.ActiveChannels$} and registers one surface tab per\n * {@link BaseRealtimeChannelClient} (key/title/icon from the plugin); the tab pane creates\n * the plugin's surface component dynamically and the PLUGIN wires its own inputs/outputs.\n * The only channel-generic affordance the shell owns is the FOCUS layout: any channel may\n * request it (via its context's `SetFocusMode` → {@link RealtimeSessionService.ChannelFocus$}),\n * which collapses the main call column (`.board-focus`) and shows the floating call pill.\n *\n * Owns the shared {@link RealtimeSessionState} — the SINGLE merge of the service's\n * caption/delegation/narration streams — and passes it to both thread and rail via\n * inputs, so neither duplicates subscription logic.\n *\n * DEVELOPER MODE: the controls row's gear toggles {@link DevMode} (per-session, off by\n * default, never persisted), revealing \"Open run\" links on delegation cards / rail items\n * and an \"Open session\" link in the banner. Clicking one emits {@link NavigateRequest}\n * and MINIMIZES the call (via {@link RealtimeSessionService.SetMinimized}) — the session\n * stays live while the host navigates to the record.\n *\n * SESSION REVIEW MODE: when the host supplies {@link ReviewData} (a loaded\n * `RealtimeSessionReview`) and NO live session is active, the overlay renders what went\n * down in that PAST session instead of a live call: the banner shows a \"Session review\"\n * badge + lifecycle range + close-reason chip; the SAME thread/rail components render the\n * historical caption turns and delegated-run cards (via\n * {@link RealtimeSessionState.LoadHistoricalItems}); a read-only Whiteboard tab is\n * registered ONLY when the session saved a parseable Whiteboard channel state. Everything\n * live is DEAD in review — no mic, no captions stream, no composer, no channel strip; the\n * controls collapse to a single \"Start live session\" button ({@link StartLiveRequested},\n * which resumes by chaining `lastSessionId`) and a Close button ({@link ReviewClosed}).\n */\n@Component({\n standalone: true,\n selector: 'mj-realtime-session-overlay',\n imports: [\n CommonModule,\n SharedGenericModule,\n RealtimeAgentBannerComponent,\n RealtimeSessionThreadComponent,\n RealtimeChannelStripComponent,\n RealtimeComposerComponent,\n RealtimeSurfaceTabsComponent,\n RealtimeWhiteboardBoardComponent,\n MJStorageMediaPlayerComponent\n ],\n templateUrl: './realtime-session-overlay.component.html',\n styleUrl: './realtime-session-overlay.component.css'\n})\nexport class RealtimeSessionOverlayComponent extends BaseAngularComponent implements AfterViewInit, OnDestroy {\n private _agentName = 'Sage';\n\n /**\n * True while the call is MINIMIZED: the overlay hides itself (CSS, not destruction) so\n * the host can show its floating \"on call\" pill WITHOUT losing this shell's merged\n * session state (delegation cards ride non-replaying streams) or view state (dev mode,\n * expanded chips, scroll position). The host binds this from `Minimized$`.\n */\n @Input() Hidden = false;\n\n /** Display name of the agent the voice session fronts (e.g. \"Sage\"). */\n @Input()\n set AgentName(value: string) {\n this._agentName = value || 'Sage';\n this.State.AgentName = this._agentName;\n }\n get AgentName(): string {\n return this._agentName;\n }\n\n /** The signed-in user, threaded to the surface panel's artifact viewer. */\n @Input() CurrentUser: UserInfo | null = null;\n\n /** The active environment id, threaded to the surface panel's artifact viewer. */\n @Input() EnvironmentID = '';\n\n // ── Declarative UI configuration (host controls every aspect of the surface) ──\n //\n // Each input is a thin, PascalCase setter over a private slot in {@link _uiInputs}.\n // When a host binds it, that field wins over the {@link UiConfig} bag (individual\n // input precedence). Setting any of these recomputes the resolved view-model so the\n // change takes effect on the next CD pass. Every field is optional and defaults to\n // the historical behaviour via {@link DEFAULT_REALTIME_UI_INPUTS}, so existing call\n // sites that bind none of them behave exactly as before.\n //\n // See {@link RealtimeUiInputs} / the package README for the full contract + recipes.\n\n /**\n * The chrome the widget renders: the ambient `'orb'`, the structured `'console'`, or\n * `'auto'` (default) which starts as an orb and graduates to a console once the\n * container is wide enough AND the user has revealed text. Mirrors\n * {@link RealtimeUiInputs.chrome}.\n *\n * @example Force the rich console for a full-screen route:\n * ```html\n * <mj-realtime-session-overlay [Chrome]=\"'console'\"></mj-realtime-session-overlay>\n * ```\n */\n @Input()\n set Chrome(value: RealtimeChromeMode | undefined) { this.setUiInput('chrome', value); }\n get Chrome(): RealtimeChromeMode | undefined { return this._uiInputs.chrome; }\n\n /**\n * In `'auto'` chrome, the container width (px) at/above which the widget may graduate\n * to a console (still gated on text being revealed). Default `560`. Mirrors\n * {@link RealtimeUiInputs.consoleBreakpointPx}.\n */\n @Input()\n set ConsoleBreakpointPx(value: number | undefined) { this.setUiInput('consoleBreakpointPx', value); }\n get ConsoleBreakpointPx(): number | undefined { return this._uiInputs.consoleBreakpointPx; }\n\n /**\n * Force dense spacing/typography regardless of width (useful for tight mobile sheets).\n * Default `false` — compactness is otherwise inferred from the container width.\n */\n @Input()\n set Compact(value: boolean | undefined) { this.setUiInput('compact', value); }\n get Compact(): boolean | undefined { return this._uiInputs.compact; }\n\n /** Fade non-essential controls when the session is idle (orb chrome only). Default `true`. */\n @Input()\n set AutoHideControls(value: boolean | undefined) { this.setUiInput('autoHideControls', value); }\n get AutoHideControls(): boolean | undefined { return this._uiInputs.autoHideControls; }\n\n /**\n * May the user reveal the transcript at all? `false` makes the widget a pure voice orb\n * with no path to text (and never graduates to a console in `'auto'`). Default `true`.\n */\n @Input()\n set AllowTextReveal(value: boolean | undefined) { this.setUiInput('allowTextReveal', value); }\n get AllowTextReveal(): boolean | undefined { return this._uiInputs.allowTextReveal; }\n\n /** Show the captions toggle. Default `true`. */\n @Input()\n set ShowCaptionsControl(value: boolean | undefined) { this.setUiInput('showCaptionsControl', value); }\n get ShowCaptionsControl(): boolean | undefined { return this._uiInputs.showCaptionsControl; }\n\n /** Show the density picker inside the gear menu. Default `true`. */\n @Input()\n set ShowDensityPicker(value: boolean | undefined) { this.setUiInput('showDensityPicker', value); }\n get ShowDensityPicker(): boolean | undefined { return this._uiInputs.showDensityPicker; }\n\n /** Show the minimize control (collapse the call without ending it). Default `true`. */\n @Input()\n set ShowMinimize(value: boolean | undefined) { this.setUiInput('showMinimize', value); }\n get ShowMinimize(): boolean | undefined { return this._uiInputs.showMinimize; }\n\n /** Show the end-call control. Default `true` (hosts that own their own end button may hide it). */\n @Input()\n set ShowEnd(value: boolean | undefined) { this.setUiInput('showEnd', value); }\n get ShowEnd(): boolean | undefined { return this._uiInputs.showEnd; }\n\n /**\n * Show the right-hand surface panel (whiteboard / browser / interactive channels).\n * Default `true`; only renders in console chrome and once a panel is actually earned.\n */\n @Input()\n set ShowSurfacePanel(value: boolean | undefined) { this.setUiInput('showSurfacePanel', value); }\n get ShowSurfacePanel(): boolean | undefined { return this._uiInputs.showSurfacePanel; }\n\n /** Show the channel strip (active interactive channels). Default `true`. */\n @Input()\n set ShowChannels(value: boolean | undefined) { this.setUiInput('showChannels', value); }\n get ShowChannels(): boolean | undefined { return this._uiInputs.showChannels; }\n\n /** Show the Activity rail/tab (delegations, artifacts timeline). Default `true`. */\n @Input()\n set ShowActivityRail(value: boolean | undefined) { this.setUiInput('showActivityRail', value); }\n get ShowActivityRail(): boolean | undefined { return this._uiInputs.showActivityRail; }\n\n /**\n * Show developer affordances (\"open session / open run\" links). Default `true`, but\n * still additionally gated by the per-session dev-mode toggle — a hard ceiling, not a\n * force-on.\n */\n @Input()\n set ShowDevLinks(value: boolean | undefined) { this.setUiInput('showDevLinks', value); }\n get ShowDevLinks(): boolean | undefined { return this._uiInputs.showDevLinks; }\n\n /** Allow drag-to-resize of the surface panel. Default `true`. */\n @Input()\n set AllowResize(value: boolean | undefined) { this.setUiInput('allowResize', value); }\n get AllowResize(): boolean | undefined { return this._uiInputs.allowResize; }\n\n /**\n * A programmatic override bag, merged UNDER the individual inputs — any field also set\n * via a dedicated `@Input()` wins over its entry here. Lets a host configure the whole\n * surface in one binding (e.g. a saved per-context preset) without enumerating a dozen\n * attributes.\n *\n * @example\n * ```html\n * <mj-realtime-session-overlay [UiConfig]=\"leanOverlayPreset\"></mj-realtime-session-overlay>\n * ```\n */\n @Input()\n set UiConfig(value: RealtimeUiInputs | null | undefined) {\n this._uiConfigBag = value ?? null;\n this.recomputeUi();\n }\n get UiConfig(): RealtimeUiInputs | null | undefined { return this._uiConfigBag; }\n\n /**\n * SESSION REVIEW data: when set (and no live session is active) the overlay renders\n * the reviewed past session instead of a live call. Setting it populates the shared\n * {@link State} with the historical thread and prepares the read-only whiteboard tab;\n * clearing it returns the state to its live-merge baseline.\n */\n @Input()\n set ReviewData(value: RealtimeSessionReview | null) {\n if (value === this._reviewData) {\n return;\n }\n this._reviewData = value;\n if (value && !this.realtime.IsActive) {\n this.enterReview(value);\n } else if (!value) {\n this.exitReview();\n }\n }\n get ReviewData(): RealtimeSessionReview | null {\n return this._reviewData;\n }\n\n /** Emitted after the call ends so the host can react (visibility is driven by Active$). */\n @Output() Ended = new EventEmitter<void>();\n\n /**\n * Emitted when a gear-gated developer link asks to open an entity record. The host is\n * expected to bubble this through its standard record-open path (the chat area re-emits\n * it on `openEntityRecord`, which Explorer routes via `NavigationService`). The overlay\n * minimizes itself first so the live call survives the navigation.\n */\n @Output() NavigateRequest = new EventEmitter<RealtimeNavigateRequest>();\n\n /**\n * Review mode's \"Start live session\": the host clears its review state and resumes the\n * reviewed session as a new live call (chaining `LastSessionId` to restore channel states).\n */\n @Output() StartLiveRequested = new EventEmitter<RealtimeStartLiveRequest>();\n\n /** Review mode's Close: the host clears its review state, returning to the conversation. */\n @Output() ReviewClosed = new EventEmitter<void>();\n\n // ── Declarative UI outputs (observe everything the surface does) ─────────────\n\n /** Emitted when the user minimizes the call view (the call stays live). */\n @Output() Minimized = new EventEmitter<void>();\n\n /** Emitted when the user reveals the transcript (opens text from the orb). */\n @Output() TextRevealed = new EventEmitter<void>();\n\n /** Emitted whenever the EFFECTIVE chrome flips between `'orb'` and `'console'`. */\n @Output() ChromeChanged = new EventEmitter<'orb' | 'console'>();\n\n /** Emitted when the connection lifecycle state changes (e.g. connecting → listening). */\n @Output() ConnectionStateChanged = new EventEmitter<RealtimeUiConnectionState>();\n\n /** Emitted when the mic mute is toggled; payload is the new muted state. */\n @Output() MuteChanged = new EventEmitter<boolean>();\n\n /** Emitted when the interface density changes. */\n @Output() DensityChanged = new EventEmitter<RealtimeUxDensity>();\n\n /** Emitted (px) when the user finishes resizing the surface panel. */\n @Output() SurfacePanelResized = new EventEmitter<number>();\n\n /**\n * A generic hook fired when ANY control is invoked — even one the host hid via inputs\n * and re-rendered itself. Lets a host observe/react to the full control surface from a\n * single binding.\n */\n @Output() ControlInvoked = new EventEmitter<RealtimeControlId>();\n\n private realtime = inject(RealtimeSessionService);\n private cdr = inject(ChangeDetectorRef);\n\n /**\n * The consumer's individually-bound UI inputs (each dedicated `@Input()` writes its own\n * slot here). Starts empty; only fields a host actually binds appear, so the resolver's\n * defaults fill the rest. Merged OVER {@link _uiConfigBag} (individual inputs win).\n */\n private _uiInputs: RealtimeUiInputs = {};\n\n /** The programmatic {@link UiConfig} override bag, merged UNDER the individual inputs. */\n private _uiConfigBag: RealtimeUiInputs | null = null;\n\n /**\n * The latest measured width (px) of the rendered overlay element, fed to the resolver as\n * {@link RealtimeUiSignals.containerWidthPx}. Maintained by a {@link ResizeObserver}; 0\n * until the first measurement (the resolver treats 0 as \"narrow\", i.e. an orb in auto).\n */\n private containerWidthPx = 0;\n\n /** Observes the rendered overlay element so chrome re-resolves as the host resizes. */\n private resizeObserver: ResizeObserver | null = null;\n\n /** The last connection state seen on {@link RealtimeSessionService.ConnectionState$}. */\n private currentConnectionState: RealtimeConnectionState = 'closed';\n\n /**\n * The resolved, render-ready view-model — the SINGLE source of truth the template binds\n * to (no `&&` chains in HTML). Rebuilt by {@link recomputeUi} whenever an input, the\n * disclosure model, the connection state, the container width, or the channel/activity\n * set changes. Read-only to consumers via the {@link Ui} getter.\n */\n // Seed from a dependency-free baseline — this runs as a field initializer, BEFORE the\n // disclosure model / session state / ResizeObserver exist. recomputeUi() produces the real\n // value once dependencies are ready (post-init + on every wired change source).\n private _ui: ResolvedRealtimeUi = resolveRealtimeUi(DEFAULT_REALTIME_UI_INPUTS, DEFAULT_REALTIME_UI_SIGNALS);\n\n /**\n * The current resolved UI view-model. Every visibility/affordance decision the template\n * makes reads from this — bind to its boolean fields rather than composing logic inline.\n *\n * @example\n * ```ts\n * if (this.voice.Ui.chrome === 'console') { ... }\n * ```\n */\n public get Ui(): ResolvedRealtimeUi {\n return this._ui;\n }\n\n /** Local mic-muted state, the single source the resolver-independent controls reflect. */\n public Muted = false;\n\n private _reviewData: RealtimeSessionReview | null = null;\n\n /**\n * Set by {@link OnStartLive} just before emitting {@link StartLiveRequested}, so the\n * ReviewData→null transition that follows is recognized as a REVIEW→LIVE CONTINUATION\n * (keep the historical thread + append the \"Resumed live session\" divider) rather than\n * a plain review close (clear everything).\n */\n private pendingLiveContinuation = false;\n\n /**\n * The reviewed chain's history artifacts, surfaced inside the Activity tab's \"Session\n * artifacts\" group (no longer their own tabs). Bound into the surface panel via\n * {@link ReviewArtifacts}. Empty for a live session.\n */\n private reviewArtifacts: ParsedDelegationArtifact[] = [];\n\n /** The reviewed chain's history artifacts for the surface panel's Activity tab. */\n public get ReviewArtifacts(): ParsedDelegationArtifact[] {\n return this.reviewArtifacts;\n }\n\n /**\n * True while the surface panel carries the REVIEW-registered (template-based, read-only)\n * Whiteboard tab. Drives the review→live continuation edge: when the resumed live\n * session's channel set resolves WITHOUT a Whiteboard channel, the stale review tab is\n * removed (see {@link cleanupStaleReviewBoardTab}); when it resolves WITH one, the live\n * plugin re-registers the same key and the tab upgrades in place.\n */\n private reviewWhiteboardTabRegistered = false;\n\n /** True while the overlay renders a PAST session (review data set, no live call). */\n public get IsReviewing(): boolean {\n return this._reviewData !== null && !this.realtime.IsActive;\n }\n\n /**\n * The reviewed session's rehydrated whiteboard, when it saved a parseable Whiteboard\n * channel state — rendered read-only by the review whiteboard tab. Null = no tab.\n */\n public ReviewWhiteboard: WhiteboardState | null = null;\n\n /**\n * The `MJ: Files` id of the reviewed session's recording, or null when nothing was recorded.\n * Bound into the storage media player, which resolves the authenticated audio itself.\n */\n public get ReviewRecordingFileID(): string | null {\n return this._reviewData?.RecordingFileID ?? null;\n }\n\n /**\n * The reviewed session's transcript cues (built from its turns) for the recording player's\n * transcript panel. Empty outside review.\n */\n public ReviewCues: MediaTranscriptCue[] = [];\n\n /** True while the Recording tab is registered (a recording exists for the reviewed session). */\n private reviewRecordingTabRegistered = false;\n\n /** Shared session state — single source for the thread AND the activity rail. */\n public readonly State = new RealtimeSessionState();\n\n /**\n * PROGRESSIVE DISCLOSURE: the levels/milestones model behind the pure-audio-first UX\n * (see {@link RealtimeDisclosureModel}). Loaded from UserInfoEngine at construction;\n * content events ({@link onSessionStateChanged}, {@link onChannelActivity}) raise the\n * volatile session level; milestones ratchet + persist when the call ends. REVIEW mode\n * bypasses disclosure entirely — a past session always renders the full console.\n */\n public readonly Disclosure = new RealtimeDisclosureModel();\n\n /**\n * The strip's Details peek: shows the surface panel ON DEMAND while it isn't earned yet\n * (disclosure level < 2) — Activity and channel surfaces exist before their content\n * does. Cleared automatically once content earns the panel for real.\n */\n public DetailsPeek = false;\n\n /**\n * Whether the typed-input dock is open — a TWO-WAY user door (the strip's Type\n * control / the T hotkey open it; the dock's hide control closes it), volatile and\n * reset per session. Typing never becomes permanent chrome.\n */\n public ComposerOpen = false;\n\n /** Live turn-state from the session service — drives the banner + connecting screen. */\n public readonly ConnectionState$ = this.realtime.ConnectionState$;\n\n /** Server-reported realtime model name for the active session — shown subtly in the banner. */\n public readonly ModelName$ = this.realtime.ModelName$;\n\n /**\n * Whether the conversation renders as TEXT (the thread) or stays voice-first (the\n * orb hero). A PERSISTED per-user preference (`mj.realtimeVoice.captions.v1`) —\n * default OFF: voice-first, the orb owns the screen until the user opts into text.\n */\n public ShowCaptions = false;\n\n /** UserInfoEngine key for the persisted captions (text-vs-orb) preference. */\n private static readonly CaptionsPrefKey = 'mj.realtimeVoice.captions.v1';\n\n /**\n * Whether developer affordances (open-record links) are revealed. Per-session view\n * state on this shell — off by default, reset with the overlay, never persisted.\n */\n public DevMode = false;\n\n /** ID of the live server-side agent session record, for the banner's dev link. */\n public get SessionID(): string | null {\n return this.realtime.CurrentAgentSessionId;\n }\n\n /**\n * The tabbed surface panel (right panel) — channel registrations are forwarded to it.\n * A SETTER because the panel is disclosure-gated (`@if`): it can be created LATE (the\n * first delegation / channel activity reveals it mid-call), at which point any queued\n * channel registrations and a pending auto-reveal must flush to the fresh instance.\n */\n private surfaceTabs?: RealtimeSurfaceTabsComponent;\n @ViewChild(RealtimeSurfaceTabsComponent)\n private set surfaceTabsRef(ref: RealtimeSurfaceTabsComponent | undefined) {\n this.surfaceTabs = ref;\n if (ref) {\n // A (re)created panel starts with a FRESH tab model. Re-register the live channel set\n // here (gated to whiteboard + already-used channels) so hiding the panel (pure-audio\n // return, Details off) never loses the Whiteboard or an already-used channel's tab.\n // Artifacts live in the Activity rail now (driven by session state), so there's\n // nothing artifact-specific to recover on the panel.\n this.registerChannelTabs([...this.realtime.ActiveChannels]);\n this.flushPendingChannelTabs();\n const reveal = this.pendingRevealKey;\n this.pendingRevealKey = null;\n // Deferred: focus/expand feed the parent's width bindings (wide tier) — never\n // mutate those inside the change-detection pass that created the panel.\n setTimeout(() => {\n if (reveal) {\n // The agent's first channel activity caused this creation — land ON the board.\n ref.RevealChannel(reveal);\n } else {\n // Default for a fresh panel (live AND review): the marquee surface — channels\n // lead the strip — NOT the Activity rail; agent-run plumbing is opt-in only.\n // (Review channel tabs register a beat later and take focus themselves.)\n ref.FocusFirstTab();\n }\n });\n }\n }\n\n /** The bottom dock — type-to-compose seeds + focuses its input. */\n @ViewChild(RealtimeComposerComponent) private composer?: RealtimeComposerComponent;\n\n /** Channel keys already auto-revealed this session (first activity only). */\n private revealedChannelKeys = new Set<string>();\n\n /** Auto-reveal that arrived before the (disclosure-gated) panel rendered. */\n private pendingRevealKey: string | null = null;\n\n /** Previous Active$ value — edges drive disclosure session begin/ratchet. */\n private prevActive = false;\n\n /** Template hosting the read-only review whiteboard (root-level, so always resolvable). */\n @ViewChild('reviewBoardTpl') private reviewBoardTpl?: TemplateRef<unknown>;\n\n /** Template hosting the review-mode recording player (root-level, so always resolvable). */\n @ViewChild('recordingTpl') private recordingTpl?: TemplateRef<unknown>;\n\n /** Channel registrations received before the surface panel rendered (flushed in ngAfterViewInit). */\n private pendingChannelTabs: RealtimeChannelTabRegistration[] = [];\n\n /** True once the view (and the review-board template ref) exists. */\n private viewReady = false;\n\n // ── Channel FOCUS layout (channel-generic — any plugin may request it) ─────\n\n /**\n * True while a channel surface is in FOCUS mode: the main call column collapses\n * (`.board-focus` on the overlay) and a compact floating call pill (orb + state +\n * mute / show-thread / end) rides over the surface.\n */\n public ChannelFocusMode = false;\n\n /** Mic-muted state reflected on the focus pill's mute button. */\n public FocusPillMuted = false;\n\n /** The channel currently holding the focus layout (the pill's exit routes back to it). */\n private focusChannel: BaseRealtimeChannelClient | null = null;\n\n private subs: Subscription[] = [];\n\n constructor() {\n super();\n this.loadPanelWidthPref();\n this.loadDisclosurePref();\n this.loadCaptionsPref();\n this.State.Attach(this.realtime);\n this.subs.push(\n // Re-render on merged-state changes; content arrival raises the disclosure level.\n this.State.Changed$.subscribe(() => this.onSessionStateChanged()),\n // Disclosure ratchet moved — re-resolve the view-model (thread/composer/gear gates).\n this.Disclosure.Changed$.subscribe(() => this.recomputeUi()),\n // One surface tab per registry-resolved channel plugin (replays the current set).\n this.realtime.ActiveChannels$.subscribe(channels => { this.registerChannelTabs(channels); this.recomputeUi(); }),\n // Any channel may request the focus layout through its host context.\n this.realtime.ChannelFocus$.subscribe(event => this.onChannelFocus(event.Channel, event.Focused)),\n // The agent ACTED on a channel — auto-reveal its surface tab on first activity.\n this.realtime.ChannelActivity$.subscribe(plugin => this.onChannelActivity(plugin)),\n // Live/idle flips: reset/ratchet disclosure + re-evaluate the review-vs-live branch.\n this.realtime.Active$.subscribe(active => this.onActiveChanged(active)),\n // Connection lifecycle drives chrome (the `connecting` loader) + the public output.\n this.realtime.ConnectionState$.subscribe(state => this.onConnectionStateChanged(state))\n );\n }\n\n ngAfterViewInit(): void {\n this.viewReady = true;\n this.startResizeObserver();\n this.flushPendingChannelTabs();\n this.registerReviewBoardTab();\n this.registerReviewArtifactTabs();\n // Cues were already built by enterReview() when ReviewData was set; here we only need to\n // (re)register the recording tab now that the #recordingTpl ref exists. The storage media\n // player resolves the authenticated audio itself from the RecordingFileID.\n this.registerReviewRecordingTab();\n }\n\n // ── Declarative UI config: inputs → signals → resolved view-model ────────────\n\n /**\n * Writes one individually-bound UI input into {@link _uiInputs} and re-resolves the\n * view-model. `undefined` clears the slot (so the {@link UiConfig} bag / default applies).\n * Called by every dedicated `@Input()` setter.\n *\n * @param key the {@link RealtimeUiInputs} field to set\n * @param value the bound value, or `undefined` to clear the override\n */\n private setUiInput<K extends keyof RealtimeUiInputs>(key: K, value: RealtimeUiInputs[K] | undefined): void {\n if (value === undefined) {\n delete this._uiInputs[key];\n } else {\n this._uiInputs[key] = value;\n }\n this.recomputeUi();\n }\n\n /**\n * The effective consumer inputs: the {@link UiConfig} bag with the individually-bound\n * inputs layered ON TOP, so a dedicated `@Input()` always wins over its bag entry.\n */\n private get mergedUiInputs(): RealtimeUiInputs {\n return { ...(this._uiConfigBag ?? {}), ...this._uiInputs };\n }\n\n /**\n * Maps the runtime {@link RealtimeConnectionState} onto the resolver's\n * {@link RealtimeUiConnectionState}. `'closed'` (no live call) maps to `'idle'`; the\n * other states pass through 1:1.\n */\n private mapConnectionState(state: RealtimeConnectionState): RealtimeUiConnectionState {\n return state === 'closed' ? 'idle' : state;\n }\n\n /**\n * Builds the live {@link RealtimeUiSignals} the resolver consumes, reading current facts\n * from the disclosure model, the session/channel state, review mode, focus mode, and the\n * {@link ResizeObserver}-measured width. Pure read — no side effects.\n */\n private buildSignals(): RealtimeUiSignals {\n // Defensive: this can be reached before every dependency is wired (field-init / early\n // change-detection). Fall back to the dependency-free baseline rather than throw — the\n // next recompute, once everything exists, produces the real value.\n const disclosure = this.Disclosure;\n if (!disclosure) {\n return DEFAULT_REALTIME_UI_SIGNALS;\n }\n const reviewing = this.IsReviewing;\n return {\n containerWidthPx: this.containerWidthPx ?? 0,\n // Text intent = the user EXPLICITLY asked to see text this session — i.e. captions are on\n // (the captions toggle, the hero's \"Show the conversation\", RevealText(), and SetCaptions()\n // all route through ShowCaptions). NOT the disclosure ratchet: a power user still opens to\n // the calm orb until they ask for text, matching the historical ShowHero = !ShowCaptions.\n textRevealed: this.ShowCaptions,\n disclosureShowThread: disclosure.ShowThread,\n disclosureShowComposer: disclosure.ShowComposer,\n disclosureShowPanel: disclosure.ShowPanel,\n disclosureShowGear: disclosure.ShowGear,\n // A surface to populate: the on-demand Details peek, or review (always has a surface).\n surfacePanelEarned: this.DetailsPeek || reviewing,\n hasChannels: (this.realtime?.ActiveChannels ?? []).some(c => c.HasSurface()),\n hasActivity: (this.State?.Cards?.length ?? 0) > 0,\n devMode: this.DevMode,\n isReviewing: reviewing,\n channelFocus: this.ChannelFocusMode,\n connectionState: this.mapConnectionState(this.currentConnectionState)\n };\n }\n\n /**\n * Re-resolves {@link Ui} from the merged inputs + current signals and emits the chrome /\n * connection-state outputs when they actually change. Safe to call on any of the wired\n * change sources (input write, disclosure ratchet, connection flip, resize, channel set);\n * the resolver is pure so redundant calls are cheap. Always marks for check.\n */\n private recomputeUi(): void {\n const next = resolveRealtimeUi(this.mergedUiInputs, this.buildSignals());\n const prevChrome = this._ui.chrome;\n this._ui = next;\n if (next.chrome !== prevChrome) {\n this.ChromeChanged.emit(next.chrome);\n }\n this.cdr.markForCheck();\n }\n\n /** Connection lifecycle changed: store it, re-resolve chrome, and surface the public output. */\n private onConnectionStateChanged(state: RealtimeConnectionState): void {\n if (state === this.currentConnectionState) {\n return;\n }\n this.currentConnectionState = state;\n this.ConnectionStateChanged.emit(this.mapConnectionState(state));\n this.recomputeUi();\n }\n\n // ── Container-width observation (drives the auto orb ↔ console graduation) ────\n\n /**\n * Starts observing the rendered overlay element's width so the resolver can graduate\n * `'auto'` chrome to a console when the host gives it room. Guards SSR / environments\n * without `ResizeObserver` (plain-node tests) — there the width simply stays 0 (an orb in\n * auto), which is the safe ambient default. Idempotent.\n */\n private startResizeObserver(): void {\n if (this.resizeObserver || typeof ResizeObserver !== 'function') {\n return;\n }\n const el = this.overlayElement() ?? (this.hostRef.nativeElement as HTMLElement);\n if (!el) {\n return;\n }\n // Seed an immediate measurement so the first resolve sees a real width. Deferred to a\n // microtask (same reasoning as OnPanelWideChanged above): ngAfterViewInit runs inside the\n // SAME change-detection pass that already checked bindings derived from Ui (e.g. the\n // template's `@if (ShowPanelArea)` and `[Compact]`) using the field-initializer's width-0\n // baseline. Recomputing synchronously here can flip chrome orb→console mid-pass and trip\n // ExpressionChangedAfterItHasBeenCheckedError (NG0100). Landing the seed measurement in a\n // fresh microtask lets it recompute in its own CD cycle instead.\n Promise.resolve().then(() => {\n this.applyContainerWidth(el.getBoundingClientRect ? el.getBoundingClientRect().width : 0);\n });\n this.resizeObserver = new ResizeObserver(entries => {\n const width = entries[0]?.contentRect?.width ?? 0;\n this.ngZone.run(() => Promise.resolve().then(() => this.applyContainerWidth(width)));\n });\n this.resizeObserver.observe(el);\n }\n\n /** Adopts a new measured width and re-resolves only when it actually changed. */\n private applyContainerWidth(width: number): void {\n const rounded = Math.round(width);\n if (rounded === this.containerWidthPx) {\n return;\n }\n this.containerWidthPx = rounded;\n this.recomputeUi();\n }\n\n /** Disconnects the container-width observer. */\n private stopResizeObserver(): void {\n this.resizeObserver?.disconnect();\n this.resizeObserver = null;\n }\n\n // ── Surface-panel sizing (flex layout + pointer-drag handle; width persisted per-user) ──\n //\n // The panel width is a PLAIN FIELD rendered via [style.width.px] — there is no split\n // library with its own internal size state to fight. The resize handle uses the same\n // mechanics as ui-components' slide-panel (`MjSlidePanelComponent`): mousedown →\n // document mousemove/mouseup registered OUTSIDE Angular, live clamp while dragging,\n // adopt + persist on release. A bare CLICK cannot move the panel by construction\n // (width follows the pointer delta) and the click-vs-drag guard keeps it from being\n // adopted or persisted.\n\n /** Whether the surface panel is collapsed to its slim strip (reported by the panel). */\n public PanelCollapsed = false;\n /** Wide tier active (a content tab is focused) — drives the DEFAULT width only. */\n public PanelWide = false;\n /** The user's explicit dragged width (persisted); null = follow the default tiers. */\n private userPanelWidth: number | null = null;\n /** Current expanded panel width in px (rendered as the panel's inline width). */\n public PanelWidthPx = SURFACE_PANEL_DEFAULT_WIDTH;\n /** True while the resize handle is mid-drag (brand-tints the handle). */\n public IsPanelResizing = false;\n private panelResizeStartX = 0;\n private panelResizeStartWidth = 0;\n private boundPanelResizeMove = this.onPanelResizeMove.bind(this);\n private boundPanelResizeEnd = this.onPanelResizeEnd.bind(this);\n private hostRef = inject(ElementRef);\n private ngZone = inject(NgZone);\n\n /** The panel's rendered width: slim strip when collapsed, otherwise the current width. */\n public get PanelAreaSize(): number {\n return this.PanelCollapsed ? SURFACE_PANEL_COLLAPSED_WIDTH : this.PanelWidthPx;\n }\n\n /**\n * Resizing is meaningless while collapsed or when the surface fills (focus mode), and a\n * host may hard-disable it via `[AllowResize]=\"false\"` — in review the resolver's\n * `allowResize` is false (no live surface to resize), so this also reads the host flag\n * directly (defaulting to the historical `true`) rather than the resolved value, keeping\n * drag available in review exactly as before.\n */\n public get PanelResizeDisabled(): boolean {\n const hostAllows = this.mergedUiInputs.allowResize ?? DEFAULT_REALTIME_UI_INPUTS.allowResize;\n return this.PanelCollapsed || this.ChannelFocusMode || !hostAllows;\n }\n\n public OnPanelCollapsedChange(collapsed: boolean): void {\n this.PanelCollapsed = collapsed;\n this.cdr.markForCheck();\n }\n\n /** Wide-tier flips only move the DEFAULT width — an explicit user width always wins. */\n public OnPanelWideChanged(wide: boolean): void {\n this.PanelWide = wide;\n if (this.userPanelWidth === null) {\n // This can fire synchronously from the surface-tabs child during the FIRST change-detection\n // pass, while hostWidth() transitions 0 → real across that same pass — setting the bound width\n // inline then trips ExpressionChangedAfterItHasBeenCheckedError (380 → 308). Defer to a\n // microtask so the recompute lands in a fresh CD cycle. (Drag/reset handlers stay synchronous —\n // those run on real user events, not during CD.)\n Promise.resolve().then(() => {\n if (this.userPanelWidth === null) {\n this.PanelWidthPx = DefaultSurfacePanelWidth(this.PanelWide, this.hostWidth());\n this.cdr.markForCheck();\n }\n });\n return;\n }\n this.cdr.markForCheck();\n }\n\n /** Mousedown on the resize handle: capture the start state and track the pointer document-wide. */\n public OnPanelResizeStart(event: MouseEvent): void {\n if (this.PanelResizeDisabled) {\n return;\n }\n event.preventDefault();\n this.IsPanelResizing = true;\n this.panelResizeStartX = event.clientX;\n this.panelResizeStartWidth = this.PanelWidthPx;\n document.body.style.cursor = 'col-resize';\n document.body.style.userSelect = 'none';\n this.ngZone.runOutsideAngular(() => {\n document.addEventListener('mousemove', this.boundPanelResizeMove);\n document.addEventListener('mouseup', this.boundPanelResizeEnd);\n });\n this.cdr.markForCheck();\n }\n\n /** Live drag: panel width follows the pointer delta, clamped to [min, 70% of the overlay]. */\n private onPanelResizeMove(event: MouseEvent): void {\n if (!this.IsPanelResizing) {\n return;\n }\n this.PanelWidthPx = SurfacePanelDragWidth(\n this.panelResizeStartWidth, this.panelResizeStartX, event.clientX, this.hostWidth()\n );\n this.ngZone.run(() => this.cdr.markForCheck());\n }\n\n /**\n * Release: a genuine DRAG adopts the width as the user's explicit preference and\n * persists it (debounced); a bare CLICK (movement under the tolerance) restores the\n * start width and persists nothing — the handle never snaps on a click.\n */\n private onPanelResizeEnd(event: MouseEvent): void {\n if (!this.IsPanelResizing) {\n return;\n }\n this.teardownPanelResize();\n let resizedTo: number | null = null;\n if (IsSurfacePanelDrag(this.panelResizeStartX, event.clientX)) {\n this.userPanelWidth = this.PanelWidthPx;\n this.persistPanelWidth(this.PanelWidthPx);\n resizedTo = this.PanelWidthPx;\n } else {\n this.PanelWidthPx = this.panelResizeStartWidth;\n }\n this.ngZone.run(() => {\n this.IsPanelResizing = false;\n // Surface the new width to the host only on a genuine drag (not a bare click).\n if (resizedTo !== null) {\n this.SurfacePanelResized.emit(resizedTo);\n }\n this.cdr.markForCheck();\n });\n }\n\n /** Double-click the handle: back to the default tier width; persist the reset. */\n public OnPanelResizeReset(): void {\n this.userPanelWidth = null;\n this.PanelWidthPx = DefaultSurfacePanelWidth(this.PanelWide, this.hostWidth());\n this.persistPanelWidth(null);\n this.cdr.markForCheck();\n }\n\n /** Removes the document-wide drag listeners and restores the body cursor/selection. */\n private teardownPanelResize(): void {\n document.removeEventListener('mousemove', this.boundPanelResizeMove);\n document.removeEventListener('mouseup', this.boundPanelResizeEnd);\n document.body.style.cursor = '';\n document.body.style.userSelect = '';\n }\n\n /**\n * The overlay's measurable width for clamping. The component host is\n * `display: contents` (zero rect) — measure the rendered `.call-overlay` div instead.\n */\n private hostWidth(): number {\n const host = this.hostRef.nativeElement as HTMLElement;\n const el = (host.firstElementChild as HTMLElement | null) ?? host;\n return el.getBoundingClientRect ? el.getBoundingClientRect().width : 0;\n }\n\n /** Reads the persisted width once per overlay instance (no-op when the engine isn't configured). */\n private loadPanelWidthPref(): void {\n try {\n const pref = ParseSurfacePanelPref(UserInfoEngine.Instance.GetSetting(SURFACE_PANEL_PREF_KEY));\n if (pref) {\n this.userPanelWidth = pref.Width;\n // hostWidth() is 0 before first layout — the clamp then enforces only the\n // minimum, and the 70% cap re-applies on the next real drag.\n this.PanelWidthPx = ClampSurfacePanelWidth(pref.Width, this.hostWidth());\n this.cdr.markForCheck();\n }\n } catch {\n // UserInfoEngine not configured (plain-node tests / early bootstrap) — default tiers apply.\n }\n }\n\n /** Persists the width preference server-side (debounced); reset serializes {\"width\":null}. */\n private persistPanelWidth(width: number | null): void {\n try {\n UserInfoEngine.Instance.SetSettingDebounced(SURFACE_PANEL_PREF_KEY, SerializeSurfacePanelPref(width));\n } catch {\n // engine unavailable — width still applies for this session\n }\n }\n\n // ── Progressive disclosure (the console that grows with you) ────────────────\n\n /**\n * True while the PURE-AUDIO hero (the orb) owns the main column. Now reads from the\n * resolved view-model ({@link Ui}): the resolver decides hero-vs-thread from the\n * effective chrome + text intent + review, so host inputs (`[Chrome]`,\n * `[AllowTextReveal]`, the breakpoint) gate it. Review still always shows the thread.\n */\n public get ShowHero(): boolean {\n return this._ui.showHero;\n }\n\n /**\n * Whether the surface-panel area renders. Driven by the resolved {@link Ui.showSurfacePanel}\n * (console + earned + host's `[ShowSurfacePanel]`) OR review mode, which always carries the\n * panel. The Details toggle still earns the panel on demand (it flips `surfacePanelEarned`).\n */\n public get ShowPanelArea(): boolean {\n return this._ui.showSurfacePanel || this.IsReviewing;\n }\n\n /** The Details (tabs) toggle is offered while live — it's the panel's one door. */\n public get ShowDetailsControl(): boolean {\n return !this.IsReviewing;\n }\n\n /**\n * Whether the active-channels strip renders. Preserves the historical disclosure gate\n * (level 2+, {@link RealtimeDisclosureModel.ShowComposer}) AND honours the host's\n * `[ShowChannels]` input + the resolver's focus rule: a host that sets `[ShowChannels]`\n * false hard-disables the strip, and channel-focus mode hides it. The strip component\n * itself self-hides when no channels are active, so this stays decluttered.\n */\n public get ChannelStripVisible(): boolean {\n // Reads the RESOLVED Ui.showChannelStrip flag — which already ANDs the host's\n // [ShowChannels] input, an active channel, console chrome, and the no-focus rule.\n // In orb/compact chrome it is false, so the overlay never shows the \"CHANNELS · Voice\"\n // strip (the lean Calm-Orb surface). The strip component itself still self-hides when\n // no channels are active, keeping the console decluttered too.\n return this._ui.showChannelStrip;\n }\n\n /**\n * Whether the surface panel's Activity tab should be shown. Reads the resolved\n * {@link Ui.showActivityTab} (host's `[ShowActivityRail]` AND activity/review AND console)\n * OR review mode — a past session's activity is always relevant even before the resolver's\n * console gate would otherwise allow it.\n */\n public get ShowActivityTab(): boolean {\n return this._ui.showActivityTab || this.IsReviewing;\n }\n\n /** Reads the persisted disclosure milestones (tolerant; defaults to day one). */\n private loadDisclosurePref(): void {\n try {\n this.Disclosure.Load(UserInfoEngine.Instance.GetSetting(REALTIME_UX_PREF_KEY));\n } catch {\n // UserInfoEngine not configured (plain-node tests / early bootstrap) — day-one defaults.\n this.Disclosure.Load(null);\n }\n }\n\n /** Reads the persisted text-vs-orb preference (tolerant; default = voice-first OFF). */\n private loadCaptionsPref(): void {\n try {\n this.ShowCaptions = UserInfoEngine.Instance.GetSetting(RealtimeSessionOverlayComponent.CaptionsPrefKey) === 'true';\n } catch {\n // UserInfoEngine not configured — voice-first default applies.\n }\n }\n\n /** Persists the text-vs-orb preference (debounced, best-effort). */\n private persistCaptionsPref(): void {\n try {\n UserInfoEngine.Instance.SetSettingDebounced(RealtimeSessionOverlayComponent.CaptionsPrefKey, String(this.ShowCaptions));\n } catch {\n // engine unavailable — the preference still applies for this session\n }\n }\n\n /** Persists the disclosure milestones server-side (debounced, best-effort). */\n private persistDisclosure(serialized: string): void {\n try {\n UserInfoEngine.Instance.SetSettingDebounced(REALTIME_UX_PREF_KEY, serialized);\n } catch {\n // engine unavailable — the ratchet still applies for this browser session\n }\n }\n\n /**\n * Merged-state change: re-render only. DELIBERATELY no disclosure raise — per product\n * direction, content never flips the console open: a running delegation is narrated\n * aloud, a finished artifact lands as a GLOWING (unfocused) tab, and the ONLY thing\n * that auto-reveals is a channel's first agent activity (the whiteboard demands eyes).\n * A pure-audio user stays in pure audio until THEY ask for more.\n */\n private onSessionStateChanged(): void {\n // State.Cards drives the resolver's hasActivity signal — re-resolve (also marks for check).\n this.recomputeUi();\n }\n\n /**\n * The agent ACTED on a channel (a tool call routed to its local executor — e.g. the\n * first whiteboard write). THE ONE AUTO-REVEAL: the surface panel opens (as a peek —\n * the left column stays exactly as it was, pure audio included) with the channel's tab\n * focused and flashed, exactly once per channel — so the user discovers the board the\n * moment it comes alive. Disclosure levels are NOT raised: no text, no composer, no\n * extra chrome — just the board.\n */\n private onChannelActivity(plugin: BaseRealtimeChannelClient): void {\n if (this.IsReviewing || this.revealedChannelKeys.has(plugin.ChannelName)) {\n return;\n }\n this.revealedChannelKeys.add(plugin.ChannelName);\n this.DetailsPeek = true; // the panel shows via the same on-demand mechanism Details uses\n // FIRST USE: a non-whiteboard channel was tab-less until now — register its tab\n // SYNCHRONOUSLY (before the reveal/focus below) so the channel exists to be revealed.\n // The whiteboard already has its tab from session start; re-registering is idempotent.\n if (plugin.HasSurface()) {\n this.registerPluginChannelTab(plugin);\n }\n if (this.surfaceTabs) {\n // Stream handler (a tool call), not a change-detection pass — reveal synchronously\n // so the board is the visible tab the instant the agent's first stroke lands. The\n // microtask-deferred RegisterChannelTab above is ordered before this RevealChannel,\n // so the tab is in place when the focus lands.\n this.surfaceTabs.RevealChannel(plugin.ChannelName);\n } else {\n // Panel not rendered yet (the peek just created it) — reveal once it exists.\n this.pendingRevealKey = plugin.ChannelName;\n }\n // DetailsPeek flipped — surfacePanelEarned changed; re-resolve (marks for check).\n this.recomputeUi();\n }\n\n /** Active$ edges: session start resets the volatile level; session end ratchets + persists. */\n private onActiveChanged(active: boolean): void {\n if (active && !this.prevActive) {\n this.Disclosure.BeginSession();\n this.DetailsPeek = false;\n this.ComposerOpen = false; // typing is opt-in per session (voice-first)\n this.revealedChannelKeys.clear();\n this.pendingRevealKey = null;\n this.startAudioVisualLoop();\n } else if (!active && this.prevActive) {\n this.persistDisclosure(this.Disclosure.RatchetOnSessionEnd());\n this.stopAudioVisualLoop();\n }\n this.prevActive = active;\n this.cdr.markForCheck();\n }\n\n // ── Audio-reactive visuals (the orb that vibrates like a speaker cone) ──────\n //\n // A requestAnimationFrame loop OUTSIDE Angular samples the client's audio meters\n // (RealtimeSessionService.GetAudioActivity → driver AnalyserNodes), runs the frame through\n // the smoothing state machine, and writes CSS custom properties + data attributes\n // straight onto the rendered overlay element — zero change detection per frame. CSS\n // gates on [data-audio-live]: with real metering the orb/EQ follow the waveform; when\n // the driver attached no meters the attribute stays 'false' and the turn-state-driven\n // keyframe animations keep working unchanged.\n\n /** Per-frame smoothing state (attack/decay envelopes + direction hysteresis). */\n private readonly audioSmoother = new RealtimeAudioVisualSmoother();\n private audioRafHandle: number | null = null;\n /** Last attribute values written (attributes are only touched on change). */\n private lastAudioLive: boolean | null = null;\n private lastDirection: RealtimeDirection | null = null;\n\n /** Starts the sampling loop (idempotent). Runs outside Angular — no CD per frame. */\n private startAudioVisualLoop(): void {\n if (this.audioRafHandle !== null || typeof requestAnimationFrame !== 'function') {\n return;\n }\n this.audioSmoother.Reset();\n this.ngZone.runOutsideAngular(() => {\n const tick = (): void => {\n this.audioRafHandle = requestAnimationFrame(tick);\n if (this.Hidden) {\n return; // minimized — skip the work, keep the loop armed\n }\n const frame = this.audioSmoother.Next(this.realtime.GetAudioActivity(), performance.now());\n this.applyAudioVisualFrame(frame);\n };\n this.audioRafHandle = requestAnimationFrame(tick);\n });\n }\n\n /** Stops the loop and returns the overlay to turn-state-driven animation. */\n private stopAudioVisualLoop(): void {\n if (this.audioRafHandle !== null) {\n cancelAnimationFrame(this.audioRafHandle);\n this.audioRafHandle = null;\n }\n this.audioSmoother.Reset();\n this.lastAudioLive = null;\n this.lastDirection = null;\n this.overlayElement()?.setAttribute('data-audio-live', 'false');\n }\n\n /** The rendered `.call-overlay` element (the :host is display:contents). */\n private overlayElement(): HTMLElement | null {\n const host = this.hostRef.nativeElement as HTMLElement;\n return (host.firstElementChild as HTMLElement | null) ?? null;\n }\n\n /** Writes one smoothed frame as CSS vars/attributes (attributes only on change). */\n private applyAudioVisualFrame(frame: RealtimeAudioVisualFrame | null): void {\n const el = this.overlayElement();\n if (!el) {\n return;\n }\n const live = frame !== null;\n if (live !== this.lastAudioLive) {\n this.lastAudioLive = live;\n el.setAttribute('data-audio-live', String(live));\n }\n if (!frame) {\n return;\n }\n el.style.setProperty('--voice-out', frame.OutputLevel.toFixed(3));\n el.style.setProperty('--voice-in', frame.InputLevel.toFixed(3));\n for (let i = 0; i < frame.Bins.length; i++) {\n el.style.setProperty(`--eq-${i + 1}`, frame.Bins[i].toFixed(3));\n }\n if (frame.Direction !== this.lastDirection) {\n this.lastDirection = frame.Direction;\n el.setAttribute('data-voice-dir', frame.Direction);\n }\n }\n\n /** The strip's Details control: peek at (or hide) the surface panel on demand. */\n public OnDetailsToggled(): void {\n this.DetailsPeek = !this.DetailsPeek;\n if (this.DetailsPeek) {\n // Land on the marquee surface (channels lead the strip; Activity is pinned last).\n setTimeout(() => this.surfaceTabs?.FocusFirstTab());\n }\n this.ControlInvoked.emit('surface');\n // DetailsPeek drives surfacePanelEarned — re-resolve (marks for check).\n this.recomputeUi();\n }\n\n /**\n * The gear popover picked an interface density — apply + persist + emit. `Simple` IS the\n * \"pure audio\" surface (the standalone headphones control was folded into the gear here): it\n * returns to the orb-only view AND makes it stick across refresh/next call, so picking it also\n * closes any open Details peek so the surface is genuinely orb-only — matching the old app-bar\n * \"Pure audio\" button exactly. In-session reveals (\"Show the conversation\", T-to-type, Details)\n * stay available and ephemeral; switching density back to Standard/Pro/Auto restores the console.\n */\n public OnDensityChanged(density: RealtimeUxDensity): void {\n this.Disclosure.SetDensity(density);\n this.persistDisclosure(SerializeUxMilestones(this.Disclosure.Milestones));\n if (density === 'simple') {\n this.DetailsPeek = false; // Simple = pure audio: collapse the surface peek back to the bare orb.\n }\n this.DensityChanged.emit(density);\n this.ControlInvoked.emit('density');\n // Density (and possibly DetailsPeek) changed — re-resolve (marks for check).\n this.recomputeUi();\n }\n\n /** The hero's \"Show the conversation\" affordance — turns the text preference on. */\n public OnTextReveal(): void {\n this.OnCaptionsToggled(true);\n this.TextRevealed.emit();\n this.ControlInvoked.emit('reveal-text');\n }\n\n /** App-bar Minimize: hide the call view (CSS) — the call stays fully live. */\n public OnMinimize(): void {\n this.realtime.SetMinimized(true);\n this.Minimized.emit();\n this.ControlInvoked.emit('minimize');\n }\n\n /** App-bar / strip End: tear the session down, then notify the host. */\n public async OnEndCall(): Promise<void> {\n this.ControlInvoked.emit('end');\n await this.realtime.EndRealtimeSession();\n this.Ended.emit();\n }\n\n /** Maps the realtime state onto the hero orb's `data-state` (active turn-states only). */\n public HeroOrbState(state: RealtimeConnectionState): 'speaking' | 'listening' | 'thinking' {\n switch (state) {\n case 'speaking': return 'speaking';\n case 'thinking': return 'thinking';\n default: return 'listening';\n }\n }\n\n /** Short first-person status line for the pure-audio hero. */\n public HeroStateLabel(state: RealtimeConnectionState): string {\n switch (state) {\n case 'speaking': return `${this.AgentName} is speaking…`;\n case 'thinking': return `${this.AgentName} is working…`;\n case 'listening': return 'Listening';\n case 'connecting': return 'Connecting…';\n case 'error': return 'Connection error';\n default: return 'On call';\n }\n }\n\n /**\n * TYPE-TO-COMPOSE: during a live call, pressing any single printable character (with nothing\n * focused) reveals the composer, raises disclosure to the engaged level, AND seeds that very\n * character into the draft — the user just starts typing and their first key is captured (the\n * old dedicated \"T\" key is gone; \"t\"/\"T\" now types like any other letter, and the visible\n * \"press T to type\" hint was removed in favour of this natural behaviour). Ignored while\n * review/minimized/inactive, with Ctrl/Cmd/Alt modifiers (don't hijack shortcuts), for\n * non-printable named keys (Enter/Tab/Arrow/Escape/F-keys → `key.length > 1`), for a bare\n * Space (ambiguous — no message starts with a space), or when an editable element / a\n * keyboard-capturing surface (the remote-browser canvas) already holds focus.\n */\n @HostListener('document:keydown', ['$event'])\n public OnDocumentKeydown(event: KeyboardEvent): void {\n if (this.Hidden || this.IsReviewing || !this.realtime.IsActive) {\n return;\n }\n if (event.metaKey || event.ctrlKey || event.altKey) {\n return;\n }\n if (event.key.length !== 1 || event.key === ' ') {\n return;\n }\n if (this.isEditableTarget(event.target) || this.isKeyboardCapturingSurfaceFocused()) {\n return;\n }\n event.preventDefault();\n const typedChar = event.key;\n this.OnComposerOpenChanged(true);\n // The dock may have just been created — seed the typed character + focus after this CD pass.\n setTimeout(() => this.composer?.AppendAndFocus(typedChar));\n }\n\n /**\n * True when the event target is a native text-editing element (an input, textarea, or contentEditable),\n * where a bare letter should type into that element — not trigger type-to-compose.\n *\n * @param eventTarget The keydown event's target.\n * @returns Whether the target is an editable element.\n */\n private isEditableTarget(eventTarget: EventTarget | null): boolean {\n const target = eventTarget as HTMLElement | null;\n return !!target && (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable);\n }\n\n /**\n * True when a surface that opts into capturing keyboard input currently holds focus — notably the Remote\n * Browser live canvas, which marks itself with `data-mj-capture-keys` while the user is driving it. When it\n * has focus, the overlay's global shortcuts (T-to-type) must stand down so the user's keystrokes land in the\n * remote browser, not the local composer. Decoupled by an attribute contract so the overlay needs no direct\n * reference to the surface component.\n *\n * @returns Whether a keyboard-capturing surface is focused.\n */\n private isKeyboardCapturingSurfaceFocused(): boolean {\n const active = (typeof document !== 'undefined' ? document.activeElement : null) as HTMLElement | null;\n return !!active && active.hasAttribute('data-mj-capture-keys');\n }\n\n /**\n * The composer dock opened (strip Type control / type-to-compose keystroke) or closed (the\n * dock's hide control). Opening raises the 'engaged' milestone for the cross-session ratchet —\n * but the dock itself stays a per-session, user-owned toggle either way.\n */\n public OnComposerOpenChanged(open: boolean): void {\n this.ComposerOpen = open;\n if (open) {\n this.Disclosure.Raise('engaged'); // emits Changed$ → recomputeUi()\n this.ControlInvoked.emit('type');\n setTimeout(() => this.composer?.FocusInput());\n }\n this.cdr.markForCheck();\n }\n\n ngOnDestroy(): void {\n this.stopAudioVisualLoop();\n this.stopResizeObserver();\n if (this.IsPanelResizing) {\n this.teardownPanelResize();\n this.IsPanelResizing = false;\n }\n for (const sub of this.subs) {\n sub.unsubscribe();\n }\n this.subs = [];\n this.State.Detach();\n }\n\n /**\n * Registers (or updates) an INTERACTIVE-CHANNEL tab on the surface panel. The overlay\n * calls it for every registry-resolved plugin; hosts may also call it for bespoke\n * template-based panes. Until a registration supplies a plugin / template, the tab\n * renders the \"coming online…\" placeholder (re-register the same `Key` to upgrade).\n * Safe to call before the panel has rendered — registrations are queued and flushed.\n */\n public RegisterChannelTab(registration: RealtimeChannelTabRegistration): void {\n if (this.surfaceTabs) {\n this.surfaceTabs.RegisterChannelTab(registration);\n } else {\n this.pendingChannelTabs.push(registration);\n }\n }\n\n /**\n * A done delegation card / rail entry asked to view a produced artifact's tab — an\n * EXPLICIT user request, so it may open the (otherwise Details-controlled) panel.\n */\n public OnOpenArtifactRequested(artifact: ParsedDelegationArtifact): void {\n if (this.surfaceTabs) {\n this.surfaceTabs.FocusArtifact(artifact);\n return;\n }\n // Panel hidden — open it (Details mechanism) and focus once it exists.\n this.DetailsPeek = true;\n this.cdr.markForCheck();\n setTimeout(() => this.surfaceTabs?.FocusArtifact(artifact));\n }\n\n /**\n * Registers a surface tab per active channel plugin THAT HAS A SURFACE — but ONLY for\n * channels already in play: the WHITEBOARD tabs immediately (a user may be the first to\n * draw), every OTHER channel stays tab-less until the agent first USES it (its first\n * {@link onChannelActivity}). This keeps the strip decluttered to surfaces actually in\n * play instead of pre-listing every registry-resolved channel.\n *\n * Server-only channels ({@link BaseRealtimeChannelClient.HasSurface} === `false`) render no\n * tab — their tools + perception are wired by the session service regardless.\n */\n private registerChannelTabs(channels: BaseRealtimeChannelClient[]): void {\n this.cleanupStaleReviewBoardTab(channels);\n for (const plugin of channels) {\n if (!plugin.HasSurface()) {\n continue; // server-only channel — no surface to tab.\n }\n if (!ShouldRegisterChannelTabUpFront(plugin.ChannelName, this.realtime.HasChannelBeenUsed(plugin.ChannelName))) {\n continue; // not the whiteboard and not used yet — it earns its tab on first activity.\n }\n this.registerPluginChannelTab(plugin);\n }\n this.cdr.markForCheck();\n }\n\n /** Registers (or upgrades) one channel plugin's surface tab on the panel. */\n private registerPluginChannelTab(plugin: BaseRealtimeChannelClient): void {\n this.RegisterChannelTab({\n Key: plugin.ChannelName,\n Title: plugin.TabTitle,\n Icon: plugin.TabIcon,\n Color: plugin.TabColor,\n Plugin: plugin\n });\n }\n\n /**\n * REVIEW→LIVE continuation edge: when the resumed live session resolves its channel set\n * WITHOUT a Whiteboard channel, the review-registered read-only board tab is now a dead\n * surface — remove it (Activity regains focus if it was active). When the set HAS a\n * Whiteboard channel, the plugin registration above upgrades the same tab key in place,\n * so the review flag is simply released. Review ARTIFACT tabs are deliberately kept —\n * they are wanted carryover into the live session.\n */\n private cleanupStaleReviewBoardTab(channels: BaseRealtimeChannelClient[]): void {\n if (!this.reviewWhiteboardTabRegistered) {\n return;\n }\n if (ShouldRemoveReviewWhiteboardTab(this.realtime.IsActive, this.reviewWhiteboardTabRegistered, channels)) {\n this.surfaceTabs?.RemoveTab('Whiteboard');\n // Also drop a still-queued review registration (panel not rendered yet — rare but possible).\n this.pendingChannelTabs = this.pendingChannelTabs.filter(r => !(r.Key === 'Whiteboard' && r.Content));\n this.reviewWhiteboardTabRegistered = false;\n } else if (channels.some(c => c.ChannelName === 'Whiteboard')) {\n this.reviewWhiteboardTabRegistered = false; // live plugin owns the tab now (upgraded in place)\n }\n }\n\n /** Forwards channel registrations that arrived before the panel existed. */\n private flushPendingChannelTabs(): void {\n if (this.surfaceTabs && this.pendingChannelTabs.length > 0) {\n for (const reg of this.pendingChannelTabs) {\n this.surfaceTabs.RegisterChannelTab(reg);\n }\n this.pendingChannelTabs = [];\n }\n }\n\n /**\n * The captions toggle = the persisted text-vs-orb switch: on → the thread renders\n * (raising the text disclosure milestone); off → the orb hero owns the screen again,\n * at any level. Persisted per-user so the choice survives refresh and devices.\n */\n public OnCaptionsToggled(on: boolean): void {\n this.ShowCaptions = on;\n if (on) {\n this.Disclosure.Raise('text'); // emits Changed$ → recomputeUi()\n }\n this.persistCaptionsPref();\n this.ControlInvoked.emit('captions');\n // ShowCaptions feeds the resolver's `textRevealed` signal (buildSignals), so BOTH directions must\n // re-resolve the view-model. Turning ON already recomputes via Disclosure.Raise → Changed$, but\n // turning OFF raises nothing — a bare markForCheck() would re-render against a STALE _ui (still\n // showThread=true / showHero=false), so the hero orb wouldn't return until the next unrelated\n // interaction recomputed. recomputeUi() rebuilds _ui from the current ShowCaptions and marks for\n // check itself; it's pure/idempotent, so the redundant call in the ON case is harmless.\n this.recomputeUi();\n }\n\n /** Reflect the gear toggle from the controls into the dev affordances. */\n public OnDevModeToggled(on: boolean): void {\n this.DevMode = on;\n this.ControlInvoked.emit('gear');\n // devMode drives the resolver's showDevLinks signal — re-resolve (marks for check).\n this.recomputeUi();\n }\n\n /** A dev link asked to open a delegated agent run record. */\n public OnOpenRunRequested(runId: string): void {\n this.requestNavigate('MJ: AI Agent Runs', runId);\n }\n\n /** The banner's dev link asked to open the live agent session record. */\n public OnOpenSessionRequested(sessionId: string): void {\n this.requestNavigate('MJ: AI Agent Sessions', sessionId);\n }\n\n // ── Session review mode ────────────────────────────────────────────────────\n\n /** Review banner convenience accessors (null-safe against the review data). */\n public get ReviewStartedAt(): Date | null {\n return this._reviewData?.StartedAt ?? null;\n }\n public get ReviewClosedAt(): Date | null {\n return this._reviewData?.ClosedAt ?? null;\n }\n public get ReviewCloseReason(): string | null {\n return this._reviewData?.CloseReason ?? null;\n }\n\n /** The reviewed session record's id — feeds the banner's dev \"Open session\" link. */\n public get ReviewSessionID(): string | null {\n return this._reviewData?.SessionID ?? null;\n }\n\n /**\n * Review controls: resume the reviewed session as a NEW live call (host handles the\n * start). Flags the upcoming ReviewData→null transition as a CONTINUATION so the\n * historical thread is kept (divider appended) instead of cleared.\n */\n public OnStartLive(): void {\n const review = this._reviewData;\n if (!review) {\n return;\n }\n this.pendingLiveContinuation = true;\n this.StartLiveRequested.emit({\n TargetAgentId: review.TargetAgentID,\n ConversationId: review.ConversationID,\n LastSessionId: review.SessionID\n });\n }\n\n /** Review controls: close the review (host clears its review state). */\n public OnReviewClose(): void {\n this.ReviewClosed.emit();\n }\n\n /**\n * Enters review: replaces the shared state's thread with the historical items (all\n * chain legs, dividers between legs), names the cards after the reviewed agent,\n * rehydrates the saved whiteboard (when any), and registers the chain's history\n * ARTIFACTS as unfocused surface tabs.\n */\n private enterReview(review: RealtimeSessionReview): void {\n this.State.AgentName = review.AgentName;\n this.State.LoadHistoricalItems(BuildReviewThreadItems(review));\n this.ReviewWhiteboard = this.parseReviewWhiteboard(review);\n this.reviewArtifacts = review.Artifacts ?? [];\n this.ReviewCues = this.buildReviewCues(review);\n if (this.viewReady) {\n // Let this CD pass create/refresh the surface panel before registering the tabs.\n // ngZone.run is REQUIRED: review often opens through the deep-link/query-param\n // path (a plain RxJS stream outside Angular's zone) — without re-entering the\n // zone, the registration's markForCheck never gets a change-detection pass and\n // the Whiteboard tab stays invisible until the user's next click.\n setTimeout(() => this.ngZone.run(() => {\n this.registerReviewBoardTab();\n this.registerReviewArtifactTabs();\n this.registerReviewRecordingTab();\n }), 0);\n }\n // isReviewing flipped on — review always wants the console (marks for check).\n this.recomputeUi();\n }\n\n /**\n * Builds time-aligned {@link MediaTranscriptCue}s from the reviewed session's turns, for the\n * storage media player's transcript panel. Skips turns with no text; derives each cue's start from\n * `UtteranceStartMs`, falling back to (turn-created − recording-start) ms, else 0. Sorts by start.\n */\n private buildReviewCues(review: RealtimeSessionReview): MediaTranscriptCue[] {\n const startedAt = review.RecordingStartedAt;\n const cues: MediaTranscriptCue[] = [];\n (review.Turns ?? []).forEach((turn, index) => {\n const text = (turn.Text ?? turn.Message ?? '').trim();\n if (text.length === 0) {\n return;\n }\n cues.push({\n Id: turn.ID || `turn-${index}`,\n StartMs: this.reviewCueStartMs(turn, startedAt),\n EndMs: turn.UtteranceEndMs ?? undefined,\n SpeakerLabel: turn.Role === 'User' ? 'You' : review.AgentName,\n Text: text\n });\n });\n cues.sort((a, b) => a.StartMs - b.StartMs);\n return cues;\n }\n\n /** A review turn's media-relative start (ms): precise offset, else derived from t0, else 0. */\n private reviewCueStartMs(turn: RealtimeSessionReviewTurn, startedAt: Date | null): number {\n if (turn.UtteranceStartMs != null) {\n return turn.UtteranceStartMs;\n }\n if (startedAt && turn.__mj_CreatedAt) {\n return Math.max(0, turn.__mj_CreatedAt.getTime() - startedAt.getTime());\n }\n return 0;\n }\n\n /**\n * Leaves review. Two distinct exits:\n * - REVIEW→LIVE CONTINUATION ({@link OnStartLive} was clicked): KEEP the historical\n * thread and append the \"Resumed live session\" divider so the new live items read\n * as a new section of the same conversation. Artifact tabs are left in place — the\n * chain's artifacts carry into the live session.\n * - plain CLOSE: clear everything so the conversation view returns clean.\n */\n private exitReview(): void {\n this.ReviewWhiteboard = null;\n this.ReviewCues = [];\n if (this.reviewRecordingTabRegistered) {\n this.surfaceTabs?.RemoveTab('Recording');\n this.pendingChannelTabs = this.pendingChannelTabs.filter(r => r.Key !== 'Recording');\n this.reviewRecordingTabRegistered = false;\n }\n if (this.pendingLiveContinuation) {\n this.pendingLiveContinuation = false;\n this.State.StartLiveContinuation();\n } else {\n this.reviewArtifacts = [];\n this.State.Clear();\n }\n // isReviewing flipped off — re-resolve the chrome/gates (marks for check).\n this.recomputeUi();\n }\n\n /**\n * Surfaces the reviewed chain's history artifacts inside the Activity tab. In the redesign\n * there are no per-artifact tabs — the artifacts ride the {@link ReviewArtifacts} input into\n * the rail's \"Session artifacts\" group, so this only needs to ensure the Activity tab is\n * shown (it carries the carryover artifacts). Idempotent; no-op without any review artifacts.\n */\n private registerReviewArtifactTabs(): void {\n if (!this.surfaceTabs || this.reviewArtifacts.length === 0) {\n return;\n }\n // Show the Activity tab (where the carryover artifacts now live); RegisterArtifactTab\n // flips the gate on without opening any tab of its own.\n this.surfaceTabs.RegisterArtifactTab(this.reviewArtifacts[0], false);\n this.cdr.markForCheck();\n }\n\n /**\n * Rehydrates the reviewed session's saved Whiteboard channel state. TOLERANT: a missing\n * or malformed state returns null — review simply shows no whiteboard tab.\n */\n private parseReviewWhiteboard(review: RealtimeSessionReview): WhiteboardState | null {\n const channel = review.ChannelStates.find(c => c.ChannelName.toLowerCase() === 'whiteboard');\n if (!channel?.StateJson) {\n return null;\n }\n try {\n return WhiteboardState.FromJSON(channel.StateJson);\n } catch {\n console.warn('[RealtimeSessionReview] Saved whiteboard state was malformed — skipping the board tab.');\n return null;\n }\n }\n\n /**\n * Registers the read-only review whiteboard tab (no-op without a board / template) —\n * FOCUSED: the session's channel surface is what the reviewer came to see; the\n * Activity rail stays available but is never the default focus.\n */\n private registerReviewBoardTab(): void {\n if (!this.ReviewWhiteboard || !this.reviewBoardTpl) {\n return;\n }\n this.RegisterChannelTab({\n Key: 'Whiteboard',\n Title: 'Whiteboard',\n Icon: 'fa-solid fa-chalkboard',\n Content: this.reviewBoardTpl,\n Focus: true\n });\n this.reviewWhiteboardTabRegistered = true;\n this.cdr.markForCheck();\n }\n\n /**\n * Registers the read-only review RECORDING tab (the time-aligned storage media player) — ONLY when\n * the reviewed session carried a `RecordingFileID`. Idempotent (re-registering the same key updates\n * it in place). The player resolves the authenticated audio itself from the `RecordingFileID` and\n * shows its own no-access / loading states; the click-to-seek transcript is usable immediately.\n * NOT focused — the channel surface / Activity rail keeps the default focus.\n */\n private registerReviewRecordingTab(): void {\n if (!this._reviewData?.RecordingFileID || !this.recordingTpl) {\n return;\n }\n this.RegisterChannelTab({\n Key: 'Recording',\n Title: 'Recording',\n Icon: 'fa-solid fa-circle-play',\n Content: this.recordingTpl\n });\n this.reviewRecordingTabRegistered = true;\n this.cdr.markForCheck();\n }\n\n /**\n * A working delegation card's ✕ asked to cancel that delegated run — EXPLICIT user\n * intent (barge-in never cancels work, by deliberate policy). The service calls the\n * server cancel channel and flips the card to a failed \"Cancelled by user\" result.\n */\n public OnCancelDelegation(callId: string): void {\n void this.realtime.CancelDelegation(callId);\n }\n\n /** Minimizes the live call (it stays running) and asks the host to open the record. */\n private requestNavigate(entityName: string, recordId: string): void {\n this.realtime.SetMinimized(true);\n this.NavigateRequest.emit({ EntityName: entityName, RecordID: recordId });\n }\n\n // ── Focus layout + pill ────────────────────────────────────────────────────\n\n /** A channel requested (or released) the focus layout via its host context. */\n private onChannelFocus(channel: BaseRealtimeChannelClient, focused: boolean): void {\n this.ChannelFocusMode = focused;\n this.focusChannel = focused ? channel : null;\n // channelFocus drives the resolver (hides panel + strip) — re-resolve (marks for check).\n this.recomputeUi();\n }\n\n /** Focus pill: toggle the mic mute (routes through the overlay's single mute path). */\n public OnFocusPillMute(): void {\n this.ToggleMute();\n }\n\n /** Focus pill: leave focus mode (show the thread column again). */\n public OnFocusPillExit(): void {\n // Route through the focus-holding channel so ITS surface toggle stays in sync — it\n // re-emits SetFocusMode(false) → onChannelFocus. Defensively clear the layout flag\n // too (idempotent), covering channels whose surface isn't instantiated.\n this.focusChannel?.RequestFocusExit();\n this.ChannelFocusMode = false;\n this.focusChannel = null;\n }\n\n /** Focus pill: end the call (mirrors the controls row's End button). */\n public async OnFocusPillEnd(): Promise<void> {\n await this.realtime.EndRealtimeSession();\n this.Ended.emit();\n }\n\n /** Short status line for the focus pill (first person — the co-agent owns the work). */\n public FocusStateLabel(state: RealtimeConnectionState): string {\n switch (state) {\n case 'speaking': return `${this.AgentName} is speaking…`;\n case 'thinking': return `${this.AgentName} is working…`;\n case 'listening': return 'Listening';\n case 'connecting': return 'Connecting…';\n default: return '';\n }\n }\n\n /**\n * The composer dock toggled the mic. Syncs the overlay's single {@link Muted} source (and\n * the focus pill) and surfaces the {@link MuteChanged} / {@link ControlInvoked} outputs.\n */\n public OnComposerMuteChanged(muted: boolean): void {\n if (muted !== this.Muted) {\n this.Muted = muted;\n this.FocusPillMuted = muted;\n this.cdr.markForCheck();\n }\n this.MuteChanged.emit(muted);\n this.ControlInvoked.emit('mute');\n }\n\n // ── Imperative API — drive the surface from a host via @ViewChild ────────────\n //\n // Each method maps to an existing internal handler/service so behaviour matches the\n // user clicking the corresponding control. See the package README's \"Methods\" table.\n\n /**\n * Override the chrome at runtime (equivalent to binding `[Chrome]`). Pass `'auto'` to\n * return to the size/intent-driven default.\n *\n * @param mode the chrome to force.\n * @example `voice.SetChrome('console');`\n */\n public SetChrome(mode: RealtimeChromeMode): void {\n this.setUiInput('chrome', mode);\n }\n\n /**\n * Reveal the transcript programmatically — the imperative twin of the orb's \"Show the\n * conversation\" affordance. Raises the text disclosure level, turns captions on, and\n * emits {@link TextRevealed}.\n */\n public RevealText(): void {\n this.OnTextReveal();\n }\n\n /**\n * Set the mic mute to an explicit state (no-op when already there). Drives the session\n * service, syncs every mute affordance, and emits {@link MuteChanged}.\n *\n * @param muted the desired muted state.\n */\n public SetMuted(muted: boolean): void {\n if (muted === this.Muted) {\n return;\n }\n this.ToggleMute();\n }\n\n /**\n * Toggle the mic mute. Drives the session service, syncs the overlay's {@link Muted}\n * source + the composer/focus-pill affordances, and emits {@link MuteChanged} +\n * {@link ControlInvoked}.\n */\n public ToggleMute(): void {\n this.Muted = this.realtime.ToggleMute();\n this.FocusPillMuted = this.Muted;\n this.MuteChanged.emit(this.Muted);\n this.ControlInvoked.emit('mute');\n this.cdr.markForCheck();\n }\n\n /**\n * Set captions (the text-vs-orb preference) to an explicit state. Persisted per-user;\n * turning them on also raises the text disclosure level.\n *\n * @param on whether captions/text should be shown.\n */\n public SetCaptions(on: boolean): void {\n if (on === this.ShowCaptions) {\n return;\n }\n this.OnCaptionsToggled(on);\n }\n\n /** Toggle captions (the text-vs-orb preference). */\n public ToggleCaptions(): void {\n this.OnCaptionsToggled(!this.ShowCaptions);\n }\n\n /**\n * Set the UX interface density (the gear's escape hatch). Applied + persisted immediately;\n * emits {@link DensityChanged}.\n *\n * @param density the density to apply.\n */\n public SetDensity(density: RealtimeUxDensity): void {\n this.OnDensityChanged(density);\n }\n\n /**\n * Open the surface panel (the on-demand Details peek), optionally focusing a specific\n * channel's tab. Equivalent to the strip's Details control plus a channel reveal.\n *\n * @param channelId when supplied, the channel tab to reveal once the panel is shown.\n */\n public OpenSurfacePanel(channelId?: string): void {\n if (!this.DetailsPeek) {\n this.DetailsPeek = true;\n this.ControlInvoked.emit('surface');\n this.recomputeUi();\n }\n setTimeout(() => {\n if (channelId) {\n this.surfaceTabs?.RevealChannel(channelId);\n } else {\n this.surfaceTabs?.FocusFirstTab();\n }\n });\n }\n\n /** Collapse the surface panel (hide the Details peek). No-op in review (always shown). */\n public CollapseSurfacePanel(): void {\n if (this.IsReviewing || !this.DetailsPeek) {\n return;\n }\n this.DetailsPeek = false;\n this.ControlInvoked.emit('surface');\n this.recomputeUi();\n }\n\n /** Minimize the call (it stays live) — the imperative twin of the app-bar Minimize. */\n public Minimize(): void {\n this.OnMinimize();\n }\n\n /** End the session (tear down the call) — the imperative twin of the End control. */\n public EndSession(): void {\n void this.OnEndCall();\n }\n}\n","@if (ConnectionState$ | async; as state) {\n <div class=\"call-overlay\"\n [class.call-overlay--hidden]=\"Hidden\"\n [class.call-overlay--review]=\"IsReviewing\"\n [class.board-focus]=\"ChannelFocusMode\"\n role=\"region\" [attr.aria-label]=\"IsReviewing ? 'Past session review' : 'Live voice session'\">\n\n <!-- PROGRESSIVE DISCLOSURE (the console that grows with you — Redesign A Progressive):\n level 0 is PURE AUDIO (the hero orb owns the main column; no thread, no composer;\n the strip's Details control peeks at the panels on demand); level 1 reveals the\n caption thread + captions control + type-to-type hint; level 2+ docks the composer\n and keeps the surface panel. CONTENT NEVER FLIPS THE CONSOLE OPEN: finished\n artifacts land as glowing unfocused tabs; the ONE auto-reveal is a channel's\n first agent activity (e.g. the first whiteboard write), which opens the panel as\n a peek with that tab focused — the left column stays exactly as it was.\n REVIEW always renders the full console. -->\n <div class=\"call-main\">\n <!-- The UNIFIED APP-BAR: identity + state + every session action (Redesign A). -->\n <mj-realtime-agent-banner\n [State]=\"state\"\n [Compact]=\"!IsReviewing && Ui.compact && Ui.chrome === 'orb'\"\n [AgentName]=\"AgentName\"\n [ModelName]=\"IsReviewing ? null : (ModelName$ | async)\"\n [DevMode]=\"DevMode\"\n [SessionID]=\"IsReviewing ? ReviewSessionID : SessionID\"\n [ReviewMode]=\"IsReviewing\"\n [ReviewStartedAt]=\"ReviewStartedAt\"\n [ReviewClosedAt]=\"ReviewClosedAt\"\n [ReviewCloseReason]=\"ReviewCloseReason\"\n [ShowGear]=\"!IsReviewing && Ui.showGear\"\n [ShowDensityPicker]=\"Ui.showDensityPicker\"\n [ShowMinimize]=\"!IsReviewing && Ui.showMinimize\"\n [Density]=\"Disclosure.Milestones.Density\"\n (OpenSessionRequested)=\"OnOpenSessionRequested($event)\"\n (DevModeToggled)=\"OnDevModeToggled($event)\"\n (DensityChanged)=\"OnDensityChanged($event)\"\n (MinimizeRequested)=\"OnMinimize()\"\n (StartLiveRequested)=\"OnStartLive()\"\n (CloseRequested)=\"OnReviewClose()\">\n </mj-realtime-agent-banner>\n\n <!-- Ephemeral narration with no active working card to anchor to → under the banner -->\n @if (!IsReviewing && State.Narration && !State.ActiveCallId && Disclosure.ShowThread) {\n <div class=\"banner-live-note\" role=\"status\" aria-live=\"polite\">\n <i class=\"fa-solid fa-comment-dots\" aria-hidden=\"true\"></i>\n {{ State.Narration }}\n </div>\n }\n\n <div class=\"call-body\" [class.call-body--hero]=\"ShowHero && state !== 'connecting'\">\n @if (!IsReviewing && state === 'connecting') {\n <div class=\"call-connecting\">\n <mj-loading text=\"Connecting to the live session…\" size=\"medium\"></mj-loading>\n </div>\n } @else if (ShowHero) {\n <!-- PURE-AUDIO HERO (level 0): the orb IS the interface — it breathes with the\n audio inside expanding sound-wave rings; nothing to read, nothing to configure. -->\n <div class=\"hero\" [attr.data-state]=\"state\" role=\"status\" aria-live=\"polite\">\n <div class=\"hero__stage\">\n <span class=\"hero__ring\" aria-hidden=\"true\"></span>\n <span class=\"hero__ring hero__ring--2\" aria-hidden=\"true\"></span>\n <span class=\"hero__ring hero__ring--3\" aria-hidden=\"true\"></span>\n <div class=\"hero__orb\" [attr.data-state]=\"HeroOrbState(state)\" aria-hidden=\"true\"></div>\n </div>\n <div class=\"hero__eq\" aria-hidden=\"true\">\n <span></span><span></span><span></span><span></span><span></span>\n <span></span><span></span><span></span><span></span>\n </div>\n <div class=\"hero__name\">{{ AgentName }}</div>\n <div class=\"hero__sub\">{{ HeroStateLabel(state) }}</div>\n <button type=\"button\" class=\"hero__reveal\" (click)=\"OnTextReveal()\"\n title=\"Show the conversation as text\">\n <i class=\"fa-solid fa-closed-captioning\" aria-hidden=\"true\"></i>\n Show the conversation\n </button>\n </div>\n } @else {\n <mj-realtime-session-thread\n [State]=\"State\"\n [AgentName]=\"AgentName\"\n [UserName]=\"CurrentUser?.Name || 'You'\"\n [ShowCaptions]=\"IsReviewing ? true : ShowCaptions\"\n [DevMode]=\"DevMode\"\n (OpenRunRequested)=\"OnOpenRunRequested($event)\"\n (OpenArtifactRequested)=\"OnOpenArtifactRequested($event)\"\n (CancelRequested)=\"OnCancelDelegation($event)\">\n </mj-realtime-session-thread>\n }\n </div>\n\n @if (!IsReviewing) {\n <!-- Active channels (earned with the console at level 2+, host-gated via [ShowChannels]).\n The strip component self-hides when there are no active channels. -->\n @if (ChannelStripVisible) {\n <mj-realtime-channel-strip></mj-realtime-channel-strip>\n }\n\n <!-- The BOTTOM DOCK: phone-call strip ⇄ fused minis+composer — the user's own\n two-way toggle (Type opens, hide closes), never level-forced. -->\n <mj-realtime-composer\n [Open]=\"ComposerOpen\"\n [Compact]=\"Ui.compact && Ui.chrome === 'orb'\"\n (OpenChanged)=\"OnComposerOpenChanged($event)\"\n [CaptionsOn]=\"ShowCaptions\"\n [IsMuted]=\"Muted\"\n [ShowDetails]=\"ShowDetailsControl\"\n [DetailsOn]=\"DetailsPeek\"\n (CaptionsToggled)=\"OnCaptionsToggled($event)\"\n (DetailsToggled)=\"OnDetailsToggled()\"\n (MuteChanged)=\"OnComposerMuteChanged($event)\"\n (EndRequested)=\"OnEndCall()\">\n </mj-realtime-composer>\n }\n </div>\n\n <!-- RIGHT: TABBED SURFACE PANEL — disclosure-gated: it EXISTS once earned (level 2+,\n which the first delegation forces), peeked on demand via the strip's Details\n control, or always in review. Slides in from the right when it arrives — the\n panel's arrival IS the progress cue. -->\n @if (ShowPanelArea) {\n <!-- Resize handle (hidden while the panel is collapsed or a channel holds focus). -->\n @if (!PanelResizeDisabled) {\n <div class=\"call-resizer\"\n [class.call-resizer--active]=\"IsPanelResizing\"\n role=\"separator\" aria-orientation=\"vertical\"\n aria-label=\"Resize the surface panel (double-click to reset)\"\n title=\"Drag to resize • double-click to reset\"\n (mousedown)=\"OnPanelResizeStart($event)\"\n (dblclick)=\"OnPanelResizeReset()\"></div>\n }\n\n <div class=\"call-panel\" [style.width.px]=\"ChannelFocusMode ? null : PanelAreaSize\">\n <mj-realtime-surface-tabs\n [State]=\"State\"\n [DevMode]=\"DevMode\"\n [CurrentUser]=\"CurrentUser\"\n [EnvironmentID]=\"EnvironmentID\"\n [ShowActivityTab]=\"ShowActivityTab\"\n [ExtraArtifacts]=\"ReviewArtifacts\"\n [Fill]=\"ChannelFocusMode\"\n (OpenRunRequested)=\"OnOpenRunRequested($event)\"\n (CollapsedChange)=\"OnPanelCollapsedChange($event)\"\n (WideChanged)=\"OnPanelWideChanged($event)\">\n </mj-realtime-surface-tabs>\n </div>\n }\n\n <!-- FOCUS floating call pill: the main column is hidden, so the live call's\n identity + state + mute / show-thread / end controls ride over the surface. -->\n @if (!IsReviewing && ChannelFocusMode) {\n <div class=\"board-focus-pill\" role=\"status\" aria-label=\"Live call (board focus)\">\n <span class=\"board-focus-pill__orb\" [attr.data-state]=\"state\" aria-hidden=\"true\"></span>\n <span class=\"board-focus-pill__text\">\n <span class=\"board-focus-pill__name\">Voice for {{ AgentName }}</span>\n @if (FocusStateLabel(state); as label) {\n <span class=\"board-focus-pill__state\">{{ label }}</span>\n }\n </span>\n <button type=\"button\" class=\"board-focus-pill__btn\"\n [class.board-focus-pill__btn--active]=\"FocusPillMuted\"\n (click)=\"OnFocusPillMute()\"\n [title]=\"FocusPillMuted ? 'Unmute' : 'Mute'\"\n [attr.aria-label]=\"FocusPillMuted ? 'Unmute microphone' : 'Mute microphone'\">\n <i class=\"fa-solid\" [class.fa-microphone]=\"!FocusPillMuted\" [class.fa-microphone-slash]=\"FocusPillMuted\" aria-hidden=\"true\"></i>\n </button>\n <button type=\"button\" class=\"board-focus-pill__btn\"\n (click)=\"OnFocusPillExit()\"\n title=\"Show thread\" aria-label=\"Show the conversation thread\">\n <i class=\"fa-solid fa-table-columns\" aria-hidden=\"true\"></i>\n </button>\n <button type=\"button\" class=\"board-focus-pill__btn board-focus-pill__btn--end\"\n (click)=\"OnFocusPillEnd()\"\n title=\"End call\" aria-label=\"End the call\">\n <i class=\"fa-solid fa-phone-slash\" aria-hidden=\"true\"></i>\n </button>\n </div>\n }\n\n </div>\n}\n\n<!-- SESSION REVIEW whiteboard pane body: the reviewed session's saved board, rehydrated\n locally (WhiteboardState.FromJSON) and rendered READ-ONLY (pan/zoom only). Registered\n as a template-based channel tab ONLY when a parseable Whiteboard state exists. -->\n<ng-template #reviewBoardTpl>\n @if (ReviewWhiteboard; as board) {\n <!-- The board host positions itself absolutely — give it a filling, positioned frame. -->\n <div class=\"review-board-host\">\n <mj-realtime-whiteboard\n [State]=\"board\"\n [AgentName]=\"AgentName\"\n [ReadOnly]=\"true\">\n </mj-realtime-whiteboard>\n </div>\n }\n</ng-template>\n\n<!-- SESSION REVIEW recording pane body: the reviewed session's recorded audio synced to its\n transcript, replayed via the shared storage media player (click-to-seek transcript + playhead\n highlight). Registered as a template-based channel tab ONLY when the reviewed session carries a\n RecordingFileID; the player resolves the authenticated audio itself from that file id. -->\n<ng-template #recordingTpl>\n <div class=\"review-recording-host\">\n <mj-storage-media-player\n [FileID]=\"ReviewRecordingFileID\"\n [Transcript]=\"ReviewCues\"\n [Provider]=\"Provider\">\n </mj-storage-media-player>\n </div>\n</ng-template>\n"]}
@@ -1,5 +1,5 @@
1
1
  import { Observable, Subject } from 'rxjs';
2
- import { VoiceCaption, VoiceDelegationProgress, VoiceDelegationResult, VoiceDelegationNarration } from '../../services/realtime-session.service';
2
+ import { RealtimeCaption, RealtimeDelegationProgress, RealtimeDelegationResult, RealtimeDelegationNarration } from '../../services/realtime-session.service';
3
3
  import { ParsedDelegationArtifact } from '../../services/delegation-result-parser';
4
4
  /**
5
5
  * The four reactive session streams {@link RealtimeSessionState} merges — structurally
@@ -8,13 +8,13 @@ import { ParsedDelegationArtifact } from '../../services/delegation-result-parse
8
8
  */
9
9
  export interface RealtimeSessionStreams {
10
10
  /** Growing user/assistant caption list. */
11
- Captions$: Observable<VoiceCaption[]>;
11
+ Captions$: Observable<RealtimeCaption[]>;
12
12
  /** Progress updates from delegated agent runs. */
13
- DelegationProgress$: Observable<VoiceDelegationProgress>;
13
+ DelegationProgress$: Observable<RealtimeDelegationProgress>;
14
14
  /** Terminal delegation results. */
15
- DelegationResult$: Observable<VoiceDelegationResult>;
15
+ DelegationResult$: Observable<RealtimeDelegationResult>;
16
16
  /** Ephemeral spoken progress narrations. */
17
- DelegationNarration$: Observable<VoiceDelegationNarration>;
17
+ DelegationNarration$: Observable<RealtimeDelegationNarration>;
18
18
  }
19
19
  /**
20
20
  * The view-model for one delegated tool/agent call in the live session. Built by