@memberjunction/ng-conversations 6.2.0-edge.6 → 6.2.0-edge.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
  2. package/dist/lib/components/collection/collection-view.component.js +1 -0
  3. package/dist/lib/components/collection/collection-view.component.js.map +1 -1
  4. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +174 -2
  5. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
  6. package/dist/lib/components/conversation/conversation-chat-area.component.js +1266 -443
  7. package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
  8. package/dist/lib/components/conversation/conversation-mode-picker.component.js +2 -2
  9. package/dist/lib/components/conversation/conversation-mode-picker.component.js.map +1 -1
  10. package/dist/lib/components/conversation/conversation-remote-browser-controller.d.ts +109 -0
  11. package/dist/lib/components/conversation/conversation-remote-browser-controller.d.ts.map +1 -0
  12. package/dist/lib/components/conversation/conversation-remote-browser-controller.js +298 -0
  13. package/dist/lib/components/conversation/conversation-remote-browser-controller.js.map +1 -0
  14. package/dist/lib/components/message/agent-handoff-card.component.d.ts +102 -0
  15. package/dist/lib/components/message/agent-handoff-card.component.d.ts.map +1 -0
  16. package/dist/lib/components/message/agent-handoff-card.component.js +439 -0
  17. package/dist/lib/components/message/agent-handoff-card.component.js.map +1 -0
  18. package/dist/lib/components/message/message-input.component.d.ts +80 -53
  19. package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
  20. package/dist/lib/components/message/message-input.component.js +381 -277
  21. package/dist/lib/components/message/message-input.component.js.map +1 -1
  22. package/dist/lib/components/message/message-item.component.d.ts +18 -1
  23. package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
  24. package/dist/lib/components/message/message-item.component.js +548 -426
  25. package/dist/lib/components/message/message-item.component.js.map +1 -1
  26. package/dist/lib/components/message/message-list.component.d.ts +8 -1
  27. package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
  28. package/dist/lib/components/message/message-list.component.js +40 -2
  29. package/dist/lib/components/message/message-list.component.js.map +1 -1
  30. package/dist/lib/components/realtime/interactive-component/run-view-component-artifact-source.js +1 -1
  31. package/dist/lib/components/realtime/interactive-component/run-view-component-artifact-source.js.map +1 -1
  32. package/dist/lib/components/realtime/media/media-channel-state.d.ts +5 -0
  33. package/dist/lib/components/realtime/media/media-channel-state.d.ts.map +1 -1
  34. package/dist/lib/components/realtime/media/media-channel-state.js +27 -1
  35. package/dist/lib/components/realtime/media/media-channel-state.js.map +1 -1
  36. package/dist/lib/components/realtime/media/media-channel.d.ts.map +1 -1
  37. package/dist/lib/components/realtime/media/media-channel.js +7 -2
  38. package/dist/lib/components/realtime/media/media-channel.js.map +1 -1
  39. package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts +19 -2
  40. package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts.map +1 -1
  41. package/dist/lib/components/realtime/media/realtime-media-surface.component.js +59 -10
  42. package/dist/lib/components/realtime/media/realtime-media-surface.component.js.map +1 -1
  43. package/dist/lib/components/realtime/realtime-agent-banner.component.d.ts +17 -6
  44. package/dist/lib/components/realtime/realtime-agent-banner.component.d.ts.map +1 -1
  45. package/dist/lib/components/realtime/realtime-agent-banner.component.js +61 -27
  46. package/dist/lib/components/realtime/realtime-agent-banner.component.js.map +1 -1
  47. package/dist/lib/components/realtime/realtime-composer.component.d.ts +26 -3
  48. package/dist/lib/components/realtime/realtime-composer.component.d.ts.map +1 -1
  49. package/dist/lib/components/realtime/realtime-composer.component.js +196 -102
  50. package/dist/lib/components/realtime/realtime-composer.component.js.map +1 -1
  51. package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +53 -15
  52. package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts.map +1 -1
  53. package/dist/lib/components/realtime/realtime-session-overlay.component.js +125 -51
  54. package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
  55. package/dist/lib/components/realtime/realtime-ui-config.d.ts +9 -12
  56. package/dist/lib/components/realtime/realtime-ui-config.d.ts.map +1 -1
  57. package/dist/lib/components/realtime/realtime-ui-config.js +38 -18
  58. package/dist/lib/components/realtime/realtime-ui-config.js.map +1 -1
  59. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts.map +1 -1
  60. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js +27 -4
  61. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js.map +1 -1
  62. package/dist/lib/components/realtime/remote-browser/remote-browser-tools.d.ts +8 -2
  63. package/dist/lib/components/realtime/remote-browser/remote-browser-tools.d.ts.map +1 -1
  64. package/dist/lib/components/realtime/remote-browser/remote-browser-tools.js +51 -10
  65. package/dist/lib/components/realtime/remote-browser/remote-browser-tools.js.map +1 -1
  66. package/dist/lib/components/realtime/whiteboard/whiteboard-channel-config.d.ts +46 -0
  67. package/dist/lib/components/realtime/whiteboard/whiteboard-channel-config.d.ts.map +1 -0
  68. package/dist/lib/components/realtime/whiteboard/whiteboard-channel-config.js +64 -0
  69. package/dist/lib/components/realtime/whiteboard/whiteboard-channel-config.js.map +1 -0
  70. package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts +131 -9
  71. package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts.map +1 -1
  72. package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js +347 -38
  73. package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js.map +1 -1
  74. package/dist/lib/conversations.module.d.ts +2 -1
  75. package/dist/lib/conversations.module.d.ts.map +1 -1
  76. package/dist/lib/conversations.module.js +9 -4
  77. package/dist/lib/conversations.module.js.map +1 -1
  78. package/dist/lib/events/chat-events.d.ts +5 -4
  79. package/dist/lib/events/chat-events.d.ts.map +1 -1
  80. package/dist/lib/events/chat-events.js +2 -2
  81. package/dist/lib/events/chat-events.js.map +1 -1
  82. package/dist/lib/models/agent-turn.model.d.ts +11 -7
  83. package/dist/lib/models/agent-turn.model.d.ts.map +1 -1
  84. package/dist/lib/models/agent-turn.model.js.map +1 -1
  85. package/dist/lib/services/active-tasks.service.d.ts +5 -0
  86. package/dist/lib/services/active-tasks.service.d.ts.map +1 -1
  87. package/dist/lib/services/active-tasks.service.js +16 -0
  88. package/dist/lib/services/active-tasks.service.js.map +1 -1
  89. package/dist/lib/services/agent-state.service.d.ts.map +1 -1
  90. package/dist/lib/services/agent-state.service.js +7 -1
  91. package/dist/lib/services/agent-state.service.js.map +1 -1
  92. package/dist/lib/services/artifact-permission.service.d.ts.map +1 -1
  93. package/dist/lib/services/artifact-permission.service.js +2 -0
  94. package/dist/lib/services/artifact-permission.service.js.map +1 -1
  95. package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
  96. package/dist/lib/services/artifact-state.service.js +1 -0
  97. package/dist/lib/services/artifact-state.service.js.map +1 -1
  98. package/dist/lib/services/collection-permission.service.d.ts.map +1 -1
  99. package/dist/lib/services/collection-permission.service.js +1 -0
  100. package/dist/lib/services/collection-permission.service.js.map +1 -1
  101. package/dist/lib/services/conversation-agent.service.d.ts +1 -4
  102. package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
  103. package/dist/lib/services/conversation-agent.service.js +7 -45
  104. package/dist/lib/services/conversation-agent.service.js.map +1 -1
  105. package/dist/lib/services/realtime-session-review.service.d.ts +2 -1
  106. package/dist/lib/services/realtime-session-review.service.d.ts.map +1 -1
  107. package/dist/lib/services/realtime-session-review.service.js.map +1 -1
  108. package/dist/lib/services/search.service.d.ts.map +1 -1
  109. package/dist/lib/services/search.service.js +1 -0
  110. package/dist/lib/services/search.service.js.map +1 -1
  111. package/dist/lib/utils/agent-handoff-map.d.ts +52 -0
  112. package/dist/lib/utils/agent-handoff-map.d.ts.map +1 -0
  113. package/dist/lib/utils/agent-handoff-map.js +270 -0
  114. package/dist/lib/utils/agent-handoff-map.js.map +1 -0
  115. package/dist/lib/utils/agent-turn-routing.d.ts +62 -7
  116. package/dist/lib/utils/agent-turn-routing.d.ts.map +1 -1
  117. package/dist/lib/utils/agent-turn-routing.js +147 -6
  118. package/dist/lib/utils/agent-turn-routing.js.map +1 -1
  119. package/dist/lib/utils/decision-routing.d.ts +17 -9
  120. package/dist/lib/utils/decision-routing.d.ts.map +1 -1
  121. package/dist/lib/utils/decision-routing.js +23 -14
  122. package/dist/lib/utils/decision-routing.js.map +1 -1
  123. package/dist/lib/utils/thread-replies.d.ts +34 -0
  124. package/dist/lib/utils/thread-replies.d.ts.map +1 -0
  125. package/dist/lib/utils/thread-replies.js +49 -0
  126. package/dist/lib/utils/thread-replies.js.map +1 -0
  127. package/dist/public-api.d.ts +5 -0
  128. package/dist/public-api.d.ts.map +1 -1
  129. package/dist/public-api.js +5 -0
  130. package/dist/public-api.js.map +1 -1
  131. package/package.json +36 -36
@@ -108,8 +108,7 @@ export interface RealtimeUiInputs {
108
108
  */
109
109
  compact?: boolean;
110
110
  /**
111
- * Fade non-essential controls when the session is idle (orb chrome only), for
112
- * a cinematic feel. Default `true`.
111
+ * @deprecated No-op since 6.2: the idle fade was never implemented. Kept so existing `UiConfig` bags compile.
113
112
  */
114
113
  autoHideControls?: boolean;
115
114
  /**
@@ -118,6 +117,12 @@ export interface RealtimeUiInputs {
118
117
  * console in `'auto'` mode). Default `true`.
119
118
  */
120
119
  allowTextReveal?: boolean;
120
+ /**
121
+ * May the participant type into the live session? `false` removes every road to the typed composer — the strip and
122
+ * lean-sheet Type buttons, the type-to-compose hotkey and programmatic open — and nothing else: transcript, captions,
123
+ * surface panel and channel strip are untouched. `allowTextReveal=false` implies `false`. Default `true`.
124
+ */
125
+ allowTyping?: boolean;
121
126
  /** Show the captions toggle. Default `true`. */
122
127
  showCaptionsControl?: boolean;
123
128
  /** Show the density picker inside the gear menu. Default `true`. */
@@ -169,8 +174,6 @@ export interface RealtimeUiSignals {
169
174
  TextRevealed: boolean;
170
175
  /** Disclosure model says a transcript may be shown. */
171
176
  DisclosureShowThread: boolean;
172
- /** Disclosure model says the composer/text dock may be shown. */
173
- DisclosureShowComposer: boolean;
174
177
  /** Disclosure model says a surface panel may be shown. */
175
178
  DisclosureShowPanel: boolean;
176
179
  /** Disclosure model says the gear/settings menu may be shown. */
@@ -200,14 +203,10 @@ export interface ResolvedRealtimeUi {
200
203
  chrome: 'orb' | 'console';
201
204
  /** Whether compact spacing/typography applies. */
202
205
  compact: boolean;
203
- /** True while connecting — hosts can show a single, size-independent loader. */
204
- connecting: boolean;
205
206
  /** The big ambient hero orb is the primary surface. */
206
207
  showHero: boolean;
207
208
  /** The transcript/thread is visible. */
208
209
  showThread: boolean;
209
- /** The text composer dock is visible. */
210
- showComposer: boolean;
211
210
  /** The right-hand surface panel is visible. */
212
211
  showSurfacePanel: boolean;
213
212
  /**
@@ -232,12 +231,10 @@ export interface ResolvedRealtimeUi {
232
231
  showMinimize: boolean;
233
232
  /** The end-call control is available. */
234
233
  showEnd: boolean;
235
- /** The surface panel may be drag-resized. */
236
- allowResize: boolean;
237
234
  /** The user has a path to reveal text. */
238
235
  allowTextReveal: boolean;
239
- /** Non-essential controls should auto-fade when idle. */
240
- autoHideControls: boolean;
236
+ /** Typing into the session is allowed (see RealtimeUiInputs.allowTyping). */
237
+ allowTyping: boolean;
241
238
  }
242
239
  /**
243
240
  * A safe, dependency-free baseline {@link RealtimeUiSignals}. Use this to seed a
@@ -1 +1 @@
1
- {"version":3,"file":"realtime-ui-config.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-ui-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAIH;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC;AAE5D;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,QAAQ,GACR,OAAO;AACT,mEAAmE;GACjE,SAAS,GACT,UAAU,GACV,MAAM,GACN,KAAK,GACL,U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IACtB,yCAAyC;IACzC,YAAY,EAAE,OAAO,CAAC;IACtB,yCAAyC;IACzC,OAAO,EAAE,OAAO,CAAC;IAEjB,6CAA6C;IAC7C,WAAW,EAAE,OAAO,CAAC;IACrB,0CAA0C;IAC1C,eAAe,EAAE,OAAO,CAAC;IACzB,yDAAyD;IACzD,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,EAAE,iBAczC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,EAC3C,OAAO,EAAE,iBAAiB,GACzB,kBAAkB,CAqEpB;AAED,iDAAiD;AACjD,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,EAC3C,OAAO,EAAE,iBAAiB,GACzB,kBAAkB,CAEpB"}
1
+ {"version":3,"file":"realtime-ui-config.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-ui-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAIH;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC;AAE5D;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,QAAQ,GACR,OAAO;AACT,mEAAmE;GACjE,SAAS,GACT,UAAU,GACV,MAAM,GACN,KAAK,GACL,UAAU,GACV,SAAS,GACT,MAAM,GACN,aAAa,GACb,YAAY,GACZ,SAAS,CAAC;AAEd;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GACjC,YAAY,GACZ,WAAW,GACX,UAAU,GACV,UAAU,GACV,MAAM,GACN,OAAO,CAAC;AAEZ;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC,MAAM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AiB,CAC/B,MAAM,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,EAC3C,OAAO,EAAE,iBAAiB,GACzB,kBAAkB,CAiEpB;AAED,iDAAiD;AACjD,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,EAC3C,OAAO,EAAE,iBAAiB,GACzB,kBAAkB,CAEpB"}
@@ -65,6 +65,7 @@ export const DEFAULT_REALTIME_UI_INPUTS = {
65
65
  compact: false,
66
66
  autoHideControls: true,
67
67
  allowTextReveal: true,
68
+ allowTyping: true,
68
69
  showCaptionsControl: true,
69
70
  showDensityPicker: true,
70
71
  showMinimize: true,
@@ -87,7 +88,6 @@ export const DEFAULT_REALTIME_UI_SIGNALS = {
87
88
  ContainerWidthPx: 0,
88
89
  TextRevealed: false,
89
90
  DisclosureShowThread: false,
90
- DisclosureShowComposer: false,
91
91
  DisclosureShowPanel: false,
92
92
  DisclosureShowGear: false,
93
93
  SurfacePanelEarned: false,
@@ -98,6 +98,30 @@ export const DEFAULT_REALTIME_UI_SIGNALS = {
98
98
  channelFocus: false,
99
99
  ConnectionState: 'connecting',
100
100
  };
101
+ /**
102
+ * The host's inputs laid over {@link DEFAULT_REALTIME_UI_INPUTS}. An explicit `undefined` ("not set") falls back to
103
+ * the default, which a plain spread would overwrite with `undefined`.
104
+ */
105
+ function withDefaults(inputs) {
106
+ const cfg = { ...DEFAULT_REALTIME_UI_INPUTS };
107
+ if (inputs) {
108
+ for (const key of Object.keys(inputs)) {
109
+ assignDefined(cfg, inputs, key);
110
+ }
111
+ }
112
+ return cfg;
113
+ }
114
+ /**
115
+ * Copies one input onto the resolved config when the host set it. The target is typed as the optional shape
116
+ * because TypeScript cannot write a generic key into a `Required<>`; only a defined value is ever written, so
117
+ * the config stays complete.
118
+ */
119
+ function assignDefined(target, inputs, key) {
120
+ const value = inputs[key];
121
+ if (value !== undefined) {
122
+ target[key] = value;
123
+ }
124
+ }
101
125
  /**
102
126
  * Resolve the consumer config + live signals into a render-ready view-model.
103
127
  *
@@ -127,21 +151,19 @@ export const DEFAULT_REALTIME_UI_SIGNALS = {
127
151
  * ```
128
152
  */
129
153
  export function ResolveRealtimeUi(inputs, signals) {
130
- const cfg = { ...DEFAULT_REALTIME_UI_INPUTS, ...(inputs ?? {}) };
131
- const connecting = signals.ConnectionState === 'connecting';
154
+ const cfg = withDefaults(inputs);
132
155
  const allowTextReveal = cfg.allowTextReveal;
133
156
  const chrome = resolveChrome(cfg, signals, allowTextReveal);
134
157
  const isConsole = chrome === 'console';
135
158
  const compact = cfg.compact || signals.ContainerWidthPx < cfg.consoleBreakpointPx;
136
- // The transcript shows when the user has EXPLICITLY revealed text this session
137
- // (`textRevealed`), OR we're in a console (consoles always carry the thread), OR we're
138
- // reviewing a recording. We deliberately do NOT consult the disclosure ratchet here: a
139
- // power user with a high base level still opens to the calm orb, exactly like the historical
140
- // `ShowHero = !ShowCaptions` behaviour — "keep the orb until the user asks for text".
141
- const showThread = allowTextReveal && (signals.TextRevealed || isConsole || signals.IsReviewing);
142
- // The hero orb owns the surface in orb chrome (and there's nothing else to show).
143
- const showHero = chrome === 'orb' && !showThread;
144
- const showComposer = isConsole && allowTextReveal && signals.DisclosureShowComposer && !signals.IsReviewing;
159
+ // Review always carries the thread. Live, the thread shows when the user has EXPLICITLY revealed text this session
160
+ // (`TextRevealed`) or we're in a console (consoles carry the thread) — both only if text is allowed at all. We
161
+ // deliberately do NOT consult the disclosure ratchet: a power user with a high base level still opens to the calm
162
+ // orb ("keep the orb until the user asks for text").
163
+ const showThread = signals.IsReviewing || (allowTextReveal && (signals.TextRevealed || isConsole));
164
+ // The hero is the surface whenever there is no thread (a forced console with text disallowed included).
165
+ const showHero = !showThread;
166
+ const allowTyping = cfg.allowTyping && allowTextReveal;
145
167
  // The surface/Details panel opens ON DEMAND when earned (the Details peek, the agent's
146
168
  // OpenSurfacePanel, content auto-reveal — all set surfacePanelEarned). It is an INDEPENDENT
147
169
  // right-hand peek that rides ALONGSIDE whatever the main column shows — it must NOT require the
@@ -164,27 +186,25 @@ export function ResolveRealtimeUi(inputs, signals) {
164
186
  const showSurfacePanel = surfacePanelWanted && roomForSurfacePanel;
165
187
  const showActivityTab = cfg.showActivityRail && (signals.HasActivity || signals.IsReviewing) && isConsole;
166
188
  const showChannelStrip = cfg.showChannels && signals.hasChannels && isConsole && !signals.channelFocus;
167
- const showGear = signals.DisclosureShowGear || isConsole;
189
+ // An empty gear menu is not worth an affordance: it needs at least one entry (density picker or dev links).
190
+ const showGear = (signals.DisclosureShowGear || isConsole) && (cfg.showDensityPicker || cfg.showDevLinks);
168
191
  return {
169
192
  chrome,
170
193
  compact,
171
- connecting,
172
194
  showHero,
173
195
  showThread,
174
- showComposer,
175
196
  showSurfacePanel,
176
197
  SurfacePanelWaitsForRoom: surfacePanelWanted && !roomForSurfacePanel,
177
198
  showActivityTab,
178
199
  showChannelStrip,
179
- showCaptionsControl: cfg.showCaptionsControl,
200
+ showCaptionsControl: cfg.showCaptionsControl && allowTextReveal,
180
201
  showDensityPicker: cfg.showDensityPicker && showGear,
181
202
  showGear,
182
203
  showDevLinks: cfg.showDevLinks && signals.DevMode,
183
204
  showMinimize: cfg.showMinimize && !signals.IsReviewing,
184
205
  showEnd: cfg.showEnd,
185
- allowResize: cfg.allowResize && showSurfacePanel,
186
206
  allowTextReveal,
187
- autoHideControls: cfg.autoHideControls && chrome === 'orb',
207
+ allowTyping,
188
208
  };
189
209
  }
190
210
  /** @deprecated Use {@link ResolveRealtimeUi}. */
@@ -1 +1 @@
1
- {"version":3,"file":"realtime-ui-config.js","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-ui-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAmDH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,GAAG,CAAC;AAqEvD;;;;GAIG;AACH,MAAM,CAAC,MAAM,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AAG,OAAO,CAAC,gBAAgB,IAAI,GAAG,CAAC,mBAAmB,CAAC;IACpE,OAAO,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;AAC7D,CAAC","sourcesContent":["/**\n * @fileoverview Declarative UI configuration for the realtime voice widget.\n *\n * The realtime widget historically decided *what to show* from an internal\n * \"disclosure ratchet\" ({@link import('./realtime-disclosure').RealtimeDisclosureModel})\n * plus a handful of scattered getters. That made it impossible for a host\n * (the chat overlay, a full-screen route, an embedded demo surface, a kiosk,\n * a mobile sheet…) to tailor the surface to its context.\n *\n * This module introduces a single, pure, side-effect-free resolution step that\n * sits between three concerns:\n *\n * 1. **{@link RealtimeUiInputs}** — the *consumer's intent*. A flat bag of\n * `@Input()`-friendly feature switches (\"show the surface panel?\",\n * \"allow text?\", \"which chrome?\") with documented defaults. A host sets\n * only what it cares about; everything else stays on its sensible default,\n * so the widget behaves exactly as before when no inputs are provided.\n *\n * 2. **{@link RealtimeUiSignals}** — the *live runtime state*. Read-only facts\n * the widget already knows: how wide its container is, whether the user has\n * revealed text, what the disclosure model currently permits, whether a\n * surface/channel/activity exists, the connection state, review/focus modes.\n *\n * 3. **{@link ResolvedRealtimeUi}** — the *answer*. A fully-resolved, boolean\n * view-model the template binds to directly. No `&&` chains in the HTML; no\n * business logic in getters. One source of truth, trivially unit-testable.\n *\n * ## The headline behaviour: auto orb ↔ console\n *\n * The default {@link RealtimeChromeMode} is `'auto'`. In auto mode the widget is\n * a calm **orb** until *two* things are true at once:\n *\n * - the container is at least {@link RealtimeUiInputs.consoleBreakpointPx}\n * wide (there's room for a structured console), **and**\n * - the user has actually asked to see text (`textRevealed`), or the widget\n * is reviewing a past session (which always shows the transcript).\n *\n * In other words: **getting bigger is not enough — if the user hasn't asked for\n * text, we keep the orb.** This preserves the loved \"ambient by default\"\n * feeling while letting the experience graduate to a full command console the\n * moment it earns the space *and* the intent. Hosts that want to force one\n * chrome forever can pass `chrome: 'orb'` or `chrome: 'console'`.\n *\n * The resolver is intentionally framework-free (no Angular import) so it can be\n * unit-tested in isolation and reused by any host.\n *\n * @module realtime-ui-config\n */\n\nimport { RealtimeUxDensity } from './realtime-disclosure';\n\n/**\n * Which visual chrome the widget renders.\n *\n * - `'orb'` — the ambient hero orb. Minimal controls; transcript/console hidden\n * unless the user reveals them. Best for narrow/overlay/mobile contexts.\n * - `'console'` — the structured command console: header, transcript, composer\n * dock, and (when room allows) the surface panel. Best for full-screen.\n * - `'auto'` — *(default)* start as an orb; graduate to a console when the\n * container is wide enough **and** the user has revealed text. See the module\n * docs for the exact rule.\n */\nexport type RealtimeChromeMode = 'orb' | 'console' | 'auto';\n\n/**\n * Identifies a control the user invoked. Emitted by the widget's `ControlInvoked`\n * output so a host can observe (or react to) any control — even one it has hidden\n * via inputs and re-rendered itself. Extend the union as new controls are added.\n */\nexport type RealtimeControlId =\n | 'mute'\n | 'camera'\n | 'share'\n /** A microphone or camera picked in the composer's device menu. */\n | 'devices'\n | 'captions'\n | 'type'\n | 'end'\n | 'minimize'\n | 'surface'\n | 'gear'\n | 'reveal-text'\n | 'pure-audio'\n | 'density';\n\n/**\n * The connection lifecycle states the widget cares about for layout decisions.\n * Mirrors the widget's runtime `RealtimeConnectionState`; duplicated as a string\n * union here so this module stays import-free of the Angular component.\n */\nexport type RealtimeUiConnectionState =\n | 'connecting'\n | 'listening'\n | 'speaking'\n | 'thinking'\n | 'idle'\n | 'error';\n\n/**\n * The default container width (px) at or above which `'auto'` chrome is *allowed*\n * to graduate from orb to console — provided the user has also revealed text.\n * Chosen so a typical 390px chat overlay stays an orb, while a half-screen or\n * full-screen surface can become a console. Override per-host via\n * {@link RealtimeUiInputs.consoleBreakpointPx}.\n */\nexport const REALTIME_CONSOLE_BREAKPOINT_DEFAULT = 560;\n\n/**\n * Consumer-facing configuration for the realtime widget — every field is a\n * declarative switch a host can set via an `@Input()`. **All fields are\n * optional**; omitted fields fall back to {@link DEFAULT_REALTIME_UI_INPUTS},\n * which reproduces the widget's historical behaviour. This is the surface that\n * lets the chat overlay slim the widget down, a full-screen route open it up,\n * and unexpected hosts (kiosks, demos, embeds) compose their own variant.\n *\n * A `false` here is a **hard disable** — it removes the affordance regardless of\n * what the disclosure model or runtime state would otherwise permit. A `true`\n * means \"allow it\"; the affordance still only appears when it's also *earned* by\n * the runtime (e.g. a surface panel only renders once a channel actually exists).\n */\nexport interface RealtimeUiInputs {\n /** Which chrome to render. Default `'auto'`. */\n chrome?: RealtimeChromeMode; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /**\n * In `'auto'` chrome, the container width (px) at/above which the widget may\n * graduate to a console (still gated on text being revealed). Default\n * {@link REALTIME_CONSOLE_BREAKPOINT_DEFAULT}.\n */\n consoleBreakpointPx?: number; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /**\n * Force compact spacing/typography regardless of size — useful for dense\n * mobile sheets. Default `false` (the widget infers compactness from width).\n */\n compact?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /**\n * Fade non-essential controls when the session is idle (orb chrome only), for\n * a cinematic feel. Default `true`.\n */\n autoHideControls?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /**\n * May the user reveal the transcript at all? When `false`, the widget is a\n * pure voice orb with no path to text (and therefore never graduates to a\n * console in `'auto'` mode). Default `true`.\n */\n allowTextReveal?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n\n /** Show the captions toggle. Default `true`. */\n showCaptionsControl?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** Show the density picker inside the gear menu. Default `true`. */\n showDensityPicker?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** Show the minimize control (collapse the call without ending it). Default `true`. */\n showMinimize?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** Show the end-call control. Default `true`. (Hosts that own their own end button may hide it.) */\n showEnd?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /**\n * Show the right-hand surface panel (whiteboard / browser / interactive\n * channels). Default `true`. Only renders in console chrome and once a panel\n * is actually earned.\n */\n showSurfacePanel?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** Show the channel strip (active interactive channels). Default `true`. */\n showChannels?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** Show the Activity rail/tab (delegations, artifacts timeline). Default `true`. */\n showActivityRail?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /**\n * Show developer affordances (\"open session / open run\" links, dev-only\n * panels). Default `true`, but still additionally gated by the per-session\n * dev-mode toggle, so this is a hard *ceiling*, not a force-on.\n */\n showDevLinks?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** Allow drag-to-resize of the surface panel. Default `true`. */\n allowResize?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n}\n\n/**\n * The complete, defaulted input set. Spreading this over a partial\n * {@link RealtimeUiInputs} yields a fully-populated config; the resolver does\n * exactly that, so callers never deal with `undefined`.\n */\nexport const DEFAULT_REALTIME_UI_INPUTS: Required<RealtimeUiInputs> = {\n chrome: 'auto',\n consoleBreakpointPx: REALTIME_CONSOLE_BREAKPOINT_DEFAULT,\n compact: false,\n autoHideControls: true,\n allowTextReveal: true,\n showCaptionsControl: true,\n showDensityPicker: true,\n showMinimize: true,\n showEnd: true,\n showSurfacePanel: true,\n showChannels: true,\n showActivityRail: true,\n showDevLinks: true,\n allowResize: true,\n};\n\n/**\n * Live runtime facts the widget feeds into the resolver. These are *observed*,\n * not configured — they come from the disclosure model, a `ResizeObserver`, and\n * the session/channel state. Pure data so the resolver stays testable.\n */\nexport interface RealtimeUiSignals {\n /** Current width of the widget's container, in px (from a `ResizeObserver`). */\n ContainerWidthPx: number;\n /**\n * Has the user revealed text this session? (i.e. tapped \"show the\n * conversation\" / engaged the composer — disclosure level ≥ 1.) This is the\n * intent half of the auto orb↔console rule. While the agent's video presents\n * in the hero, captions alone run over the video, so the overlay reports this\n * only once the user asks for the conversation.\n */\n TextRevealed: boolean;\n /** Disclosure model says a transcript may be shown. */\n DisclosureShowThread: boolean;\n /** Disclosure model says the composer/text dock may be shown. */\n DisclosureShowComposer: boolean;\n /** Disclosure model says a surface panel may be shown. */\n DisclosureShowPanel: boolean;\n /** Disclosure model says the gear/settings menu may be shown. */\n DisclosureShowGear: boolean;\n /** A surface/channel actually exists to populate the panel. */\n SurfacePanelEarned: boolean;\n /** ≥ 1 interactive channel is active. */\n hasChannels: boolean; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n /** ≥ 1 delegation/activity has occurred (Activity rail has content). */\n HasActivity: boolean;\n /** Per-session developer mode is on. */\n DevMode: boolean;\n /** The widget is reviewing a past (recorded) session, not a live call. */\n IsReviewing: boolean;\n /** A single channel surface is maximized (focus mode); the main column is hidden. */\n channelFocus: boolean; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n /** Current connection lifecycle state. */\n ConnectionState: RealtimeUiConnectionState;\n}\n\n/**\n * The resolved, render-ready view-model. Every field is a final boolean (or the\n * effective chrome) — the template binds straight to these with no further\n * logic. This is the single source of truth for \"what is on screen right now\".\n */\nexport interface ResolvedRealtimeUi {\n /** The effective chrome after resolving `'auto'`. */\n chrome: 'orb' | 'console'; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** Whether compact spacing/typography applies. */\n compact: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** True while connecting — hosts can show a single, size-independent loader. */\n connecting: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n\n /** The big ambient hero orb is the primary surface. */\n showHero: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** The transcript/thread is visible. */\n showThread: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** The text composer dock is visible. */\n showComposer: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** The right-hand surface panel is visible. */\n showSurfacePanel: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /**\n * The surface panel is hidden only because the call has no room for it: the host allows it, it is earned and no\n * channel holds the stage, but the call is narrower than the console breakpoint outside console chrome. It shows again\n * once the call is wide enough. The overlay keeps the user's collapse of the panel through this, and only this.\n */\n SurfacePanelWaitsForRoom: boolean;\n /** The Activity tab/rail is available. */\n showActivityTab: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** The channel strip is visible. */\n showChannelStrip: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n\n /** The captions toggle is available. */\n showCaptionsControl: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** The density picker is available (inside the gear). */\n showDensityPicker: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** The gear/settings affordance is available. */\n showGear: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** Developer links/panels are available. */\n showDevLinks: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** The minimize control is available. */\n showMinimize: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** The end-call control is available. */\n showEnd: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n\n /** The surface panel may be drag-resized. */\n allowResize: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** The user has a path to reveal text. */\n allowTextReveal: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** Non-essential controls should auto-fade when idle. */\n autoHideControls: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n}\n\n/**\n * A safe, dependency-free baseline {@link RealtimeUiSignals}. Use this to seed a\n * resolved view-model **before** the component's runtime dependencies (the\n * disclosure model, the session state, the `ResizeObserver`) exist — e.g. in a\n * field initializer. It describes a freshly-connecting widget at zero width with\n * nothing earned yet, so the first paint is a calm orb until `recomputeUi()`\n * runs with real signals. Never read `this` to build the first value.\n */\nexport const DEFAULT_REALTIME_UI_SIGNALS: RealtimeUiSignals = {\n ContainerWidthPx: 0,\n TextRevealed: false,\n DisclosureShowThread: false,\n DisclosureShowComposer: false,\n DisclosureShowPanel: false,\n DisclosureShowGear: false,\n SurfacePanelEarned: false,\n hasChannels: false,\n HasActivity: false,\n DevMode: false,\n IsReviewing: false,\n channelFocus: false,\n ConnectionState: 'connecting',\n};\n\n/**\n * Resolve the consumer config + live signals into a render-ready view-model.\n *\n * Pure and deterministic: same inputs ⇒ same output, no side effects, no clock,\n * no DOM. Safe to call on every change-detection pass and trivial to unit test.\n *\n * The resolution order is:\n * 1. fill defaults,\n * 2. decide the effective {@link RealtimeChromeMode} (the orb↔console rule),\n * 3. for each affordance, AND the consumer's switch with the runtime gate.\n *\n * @param inputs consumer configuration (partial; defaults fill the rest)\n * @param signals live runtime facts\n * @returns the fully-resolved {@link ResolvedRealtimeUi}\n *\n * @example Chat overlay (lean, ambient):\n * ```ts\n * resolveRealtimeUi(\n * { chrome: 'auto', showSurfacePanel: false, showActivityRail: false, showDevLinks: false },\n * signals\n * );\n * ```\n *\n * @example Full-screen route (rich console):\n * ```ts\n * resolveRealtimeUi({ chrome: 'auto', consoleBreakpointPx: 480 }, wideSignals);\n * ```\n */\nexport function ResolveRealtimeUi(\n inputs: RealtimeUiInputs | null | undefined,\n signals: RealtimeUiSignals,\n): ResolvedRealtimeUi {\n const cfg: Required<RealtimeUiInputs> = { ...DEFAULT_REALTIME_UI_INPUTS, ...(inputs ?? {}) };\n\n const connecting = signals.ConnectionState === 'connecting';\n const allowTextReveal = cfg.allowTextReveal;\n const chrome = resolveChrome(cfg, signals, allowTextReveal);\n const isConsole = chrome === 'console';\n const compact = cfg.compact || signals.ContainerWidthPx < cfg.consoleBreakpointPx;\n\n // The transcript shows when the user has EXPLICITLY revealed text this session\n // (`textRevealed`), OR we're in a console (consoles always carry the thread), OR we're\n // reviewing a recording. We deliberately do NOT consult the disclosure ratchet here: a\n // power user with a high base level still opens to the calm orb, exactly like the historical\n // `ShowHero = !ShowCaptions` behaviour — \"keep the orb until the user asks for text\".\n const showThread = allowTextReveal && (signals.TextRevealed || isConsole || signals.IsReviewing);\n\n // The hero orb owns the surface in orb chrome (and there's nothing else to show).\n const showHero = chrome === 'orb' && !showThread;\n\n const showComposer = isConsole && allowTextReveal && signals.DisclosureShowComposer && !signals.IsReviewing;\n\n // The surface/Details panel opens ON DEMAND when earned (the Details peek, the agent's\n // OpenSurfacePanel, content auto-reveal — all set surfacePanelEarned). It is an INDEPENDENT\n // right-hand peek that rides ALONGSIDE whatever the main column shows — it must NOT require the\n // cross-session disclosure ratchet (disclosureShowPanel = SessionLevel >= 2), and it must NOT\n // require the user to have revealed text.\n //\n // It was previously gated on `isConsole`, which bundled TWO things: \"there's room\" (legitimate —\n // don't cram a side panel into a narrow overlay) AND \"the user revealed text\" (wrong for a peek).\n // The text-reveal coupling meant opening Details with captions OFF flipped the whole left column\n // from the hero orb to an empty transcript (the orb vanished), and toggling captions back off\n // yanked the panel out from under an open peek. The design intent (see the auto-reveal comment in\n // the overlay component: \"the left column stays exactly as it was, pure audio included\") is a peek\n // beside the orb. So we keep only the ROOM half: the panel shows when earned and either the chrome\n // is already a console (incl. review / forced-console at any width) OR the container is at least as\n // wide as the console breakpoint — never in a cramped narrow overlay, and never dependent on text.\n const roomForSurfacePanel = isConsole || signals.ContainerWidthPx >= cfg.consoleBreakpointPx;\n // Everything the panel needs but room. Kept apart so the overlay can tell a panel that waits for room from one that\n // was hidden on purpose (SurfacePanelWaitsForRoom).\n const surfacePanelWanted = cfg.showSurfacePanel && signals.SurfacePanelEarned && !signals.channelFocus;\n const showSurfacePanel = surfacePanelWanted && roomForSurfacePanel;\n\n const showActivityTab = cfg.showActivityRail && (signals.HasActivity || signals.IsReviewing) && isConsole;\n\n const showChannelStrip = cfg.showChannels && signals.hasChannels && isConsole && !signals.channelFocus;\n\n const showGear = signals.DisclosureShowGear || isConsole;\n\n return {\n chrome,\n compact,\n connecting,\n showHero,\n showThread,\n showComposer,\n showSurfacePanel,\n SurfacePanelWaitsForRoom: surfacePanelWanted && !roomForSurfacePanel,\n showActivityTab,\n showChannelStrip,\n showCaptionsControl: cfg.showCaptionsControl,\n showDensityPicker: cfg.showDensityPicker && showGear,\n showGear,\n showDevLinks: cfg.showDevLinks && signals.DevMode,\n showMinimize: cfg.showMinimize && !signals.IsReviewing,\n showEnd: cfg.showEnd,\n allowResize: cfg.allowResize && showSurfacePanel,\n allowTextReveal,\n autoHideControls: cfg.autoHideControls && chrome === 'orb',\n };\n}\n\n/** @deprecated Use {@link ResolveRealtimeUi}. */\nexport function resolveRealtimeUi(\n inputs: RealtimeUiInputs | null | undefined,\n signals: RealtimeUiSignals,\n): ResolvedRealtimeUi {\n return ResolveRealtimeUi(inputs, signals);\n}\n\n/**\n * Decide the effective chrome. Forced modes win outright; `'auto'` graduates to a\n * console only when there's both **room** (width ≥ breakpoint) and **intent**\n * (text revealed) — or when reviewing, which always wants the transcript.\n *\n * @internal\n */\nfunction resolveChrome(\n cfg: Required<RealtimeUiInputs>,\n signals: RealtimeUiSignals,\n allowTextReveal: boolean,\n): 'orb' | 'console' {\n if (cfg.chrome === 'orb') {\n return 'orb';\n }\n if (cfg.chrome === 'console') {\n return 'console';\n }\n // auto\n if (signals.IsReviewing) {\n return 'console';\n }\n if (!allowTextReveal) {\n return 'orb';\n }\n // Intent is the USER explicitly revealing text this session — NOT the disclosure ratchet.\n // Wider-alone keeps the orb; a power user who hasn't asked for text keeps the orb too.\n const hasRoom = signals.ContainerWidthPx >= cfg.consoleBreakpointPx;\n return hasRoom && signals.TextRevealed ? 'console' : 'orb';\n}\n"]}
1
+ {"version":3,"file":"realtime-ui-config.js","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-ui-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAmDH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,GAAG,CAAC;AA0EvD;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAA+B;IACpE,MAAM,EAAE,MAAM;IACd,mBAAmB,EAAE,mCAAmC;IACxD,OAAO,EAAE,KAAK;IACd,gBAAgB,EAAE,IAAI;IACtB,eAAe,EAAE,IAAI;IACrB,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,CAAC;IACD,OAAO;IACP,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;QACxB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,0FAA0F;IAC1F,uFAAuF;IACvF,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,IAAI,GAAG,CAAC,mBAAmB,CAAC;IACpE,OAAO,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;AAC7D,CAAC","sourcesContent":["/**\n * @fileoverview Declarative UI configuration for the realtime voice widget.\n *\n * The realtime widget historically decided *what to show* from an internal\n * \"disclosure ratchet\" ({@link import('./realtime-disclosure').RealtimeDisclosureModel})\n * plus a handful of scattered getters. That made it impossible for a host\n * (the chat overlay, a full-screen route, an embedded demo surface, a kiosk,\n * a mobile sheet…) to tailor the surface to its context.\n *\n * This module introduces a single, pure, side-effect-free resolution step that\n * sits between three concerns:\n *\n * 1. **{@link RealtimeUiInputs}** — the *consumer's intent*. A flat bag of\n * `@Input()`-friendly feature switches (\"show the surface panel?\",\n * \"allow text?\", \"which chrome?\") with documented defaults. A host sets\n * only what it cares about; everything else stays on its sensible default,\n * so the widget behaves exactly as before when no inputs are provided.\n *\n * 2. **{@link RealtimeUiSignals}** — the *live runtime state*. Read-only facts\n * the widget already knows: how wide its container is, whether the user has\n * revealed text, what the disclosure model currently permits, whether a\n * surface/channel/activity exists, the connection state, review/focus modes.\n *\n * 3. **{@link ResolvedRealtimeUi}** — the *answer*. A fully-resolved, boolean\n * view-model the template binds to directly. No `&&` chains in the HTML; no\n * business logic in getters. One source of truth, trivially unit-testable.\n *\n * ## The headline behaviour: auto orb ↔ console\n *\n * The default {@link RealtimeChromeMode} is `'auto'`. In auto mode the widget is\n * a calm **orb** until *two* things are true at once:\n *\n * - the container is at least {@link RealtimeUiInputs.consoleBreakpointPx}\n * wide (there's room for a structured console), **and**\n * - the user has actually asked to see text (`textRevealed`), or the widget\n * is reviewing a past session (which always shows the transcript).\n *\n * In other words: **getting bigger is not enough — if the user hasn't asked for\n * text, we keep the orb.** This preserves the loved \"ambient by default\"\n * feeling while letting the experience graduate to a full command console the\n * moment it earns the space *and* the intent. Hosts that want to force one\n * chrome forever can pass `chrome: 'orb'` or `chrome: 'console'`.\n *\n * The resolver is intentionally framework-free (no Angular import) so it can be\n * unit-tested in isolation and reused by any host.\n *\n * @module realtime-ui-config\n */\n\nimport { RealtimeUxDensity } from './realtime-disclosure';\n\n/**\n * Which visual chrome the widget renders.\n *\n * - `'orb'` — the ambient hero orb. Minimal controls; transcript/console hidden\n * unless the user reveals them. Best for narrow/overlay/mobile contexts.\n * - `'console'` — the structured command console: header, transcript, composer\n * dock, and (when room allows) the surface panel. Best for full-screen.\n * - `'auto'` — *(default)* start as an orb; graduate to a console when the\n * container is wide enough **and** the user has revealed text. See the module\n * docs for the exact rule.\n */\nexport type RealtimeChromeMode = 'orb' | 'console' | 'auto';\n\n/**\n * Identifies a control the user invoked. Emitted by the widget's `ControlInvoked`\n * output so a host can observe (or react to) any control — even one it has hidden\n * via inputs and re-rendered itself. Extend the union as new controls are added.\n */\nexport type RealtimeControlId =\n | 'mute'\n | 'camera'\n | 'share'\n /** A microphone or camera picked in the composer's device menu. */\n | 'devices'\n | 'captions'\n | 'type'\n | 'end'\n | 'minimize'\n | 'surface'\n | 'gear'\n | 'reveal-text'\n | 'pure-audio'\n | 'density';\n\n/**\n * The connection lifecycle states the widget cares about for layout decisions.\n * Mirrors the widget's runtime `RealtimeConnectionState`; duplicated as a string\n * union here so this module stays import-free of the Angular component.\n */\nexport type RealtimeUiConnectionState =\n | 'connecting'\n | 'listening'\n | 'speaking'\n | 'thinking'\n | 'idle'\n | 'error';\n\n/**\n * The default container width (px) at or above which `'auto'` chrome is *allowed*\n * to graduate from orb to console — provided the user has also revealed text.\n * Chosen so a typical 390px chat overlay stays an orb, while a half-screen or\n * full-screen surface can become a console. Override per-host via\n * {@link RealtimeUiInputs.consoleBreakpointPx}.\n */\nexport const REALTIME_CONSOLE_BREAKPOINT_DEFAULT = 560;\n\n/**\n * Consumer-facing configuration for the realtime widget — every field is a\n * declarative switch a host can set via an `@Input()`. **All fields are\n * optional**; omitted fields fall back to {@link DEFAULT_REALTIME_UI_INPUTS},\n * which reproduces the widget's historical behaviour. This is the surface that\n * lets the chat overlay slim the widget down, a full-screen route open it up,\n * and unexpected hosts (kiosks, demos, embeds) compose their own variant.\n *\n * A `false` here is a **hard disable** — it removes the affordance regardless of\n * what the disclosure model or runtime state would otherwise permit. A `true`\n * means \"allow it\"; the affordance still only appears when it's also *earned* by\n * the runtime (e.g. a surface panel only renders once a channel actually exists).\n */\nexport interface RealtimeUiInputs {\n /** Which chrome to render. Default `'auto'`. */\n chrome?: RealtimeChromeMode; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /**\n * In `'auto'` chrome, the container width (px) at/above which the widget may\n * graduate to a console (still gated on text being revealed). Default\n * {@link REALTIME_CONSOLE_BREAKPOINT_DEFAULT}.\n */\n consoleBreakpointPx?: number; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /**\n * Force compact spacing/typography regardless of size — useful for dense\n * mobile sheets. Default `false` (the widget infers compactness from width).\n */\n compact?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /**\n * @deprecated No-op since 6.2: the idle fade was never implemented. Kept so existing `UiConfig` bags compile.\n */\n autoHideControls?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /**\n * May the user reveal the transcript at all? When `false`, the widget is a\n * pure voice orb with no path to text (and therefore never graduates to a\n * console in `'auto'` mode). Default `true`.\n */\n allowTextReveal?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /**\n * May the participant type into the live session? `false` removes every road to the typed composer — the strip and\n * lean-sheet Type buttons, the type-to-compose hotkey and programmatic open — and nothing else: transcript, captions,\n * surface panel and channel strip are untouched. `allowTextReveal=false` implies `false`. Default `true`.\n */\n allowTyping?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n\n /** Show the captions toggle. Default `true`. */\n showCaptionsControl?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** Show the density picker inside the gear menu. Default `true`. */\n showDensityPicker?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** Show the minimize control (collapse the call without ending it). Default `true`. */\n showMinimize?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** Show the end-call control. Default `true`. (Hosts that own their own end button may hide it.) */\n showEnd?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /**\n * Show the right-hand surface panel (whiteboard / browser / interactive\n * channels). Default `true`. Only renders in console chrome and once a panel\n * is actually earned.\n */\n showSurfacePanel?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** Show the channel strip (active interactive channels). Default `true`. */\n showChannels?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** Show the Activity rail/tab (delegations, artifacts timeline). Default `true`. */\n showActivityRail?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /**\n * Show developer affordances (\"open session / open run\" links, dev-only\n * panels). Default `true`, but still additionally gated by the per-session\n * dev-mode toggle, so this is a hard *ceiling*, not a force-on.\n */\n showDevLinks?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** Allow drag-to-resize of the surface panel. Default `true`. */\n allowResize?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n}\n\n/**\n * The complete, defaulted input set. Spreading this over a partial\n * {@link RealtimeUiInputs} yields a fully-populated config; the resolver does\n * exactly that, so callers never deal with `undefined`.\n */\nexport const DEFAULT_REALTIME_UI_INPUTS: Required<RealtimeUiInputs> = {\n chrome: 'auto',\n consoleBreakpointPx: REALTIME_CONSOLE_BREAKPOINT_DEFAULT,\n compact: false,\n autoHideControls: true,\n allowTextReveal: true,\n allowTyping: true,\n showCaptionsControl: true,\n showDensityPicker: true,\n showMinimize: true,\n showEnd: true,\n showSurfacePanel: true,\n showChannels: true,\n showActivityRail: true,\n showDevLinks: true,\n allowResize: true,\n};\n\n/**\n * Live runtime facts the widget feeds into the resolver. These are *observed*,\n * not configured — they come from the disclosure model, a `ResizeObserver`, and\n * the session/channel state. Pure data so the resolver stays testable.\n */\nexport interface RealtimeUiSignals {\n /** Current width of the widget's container, in px (from a `ResizeObserver`). */\n ContainerWidthPx: number;\n /**\n * Has the user revealed text this session? (i.e. tapped \"show the\n * conversation\" / engaged the composer — disclosure level ≥ 1.) This is the\n * intent half of the auto orb↔console rule. While the agent's video presents\n * in the hero, captions alone run over the video, so the overlay reports this\n * only once the user asks for the conversation.\n */\n TextRevealed: boolean;\n /** Disclosure model says a transcript may be shown. */\n DisclosureShowThread: boolean;\n /** Disclosure model says a surface panel may be shown. */\n DisclosureShowPanel: boolean;\n /** Disclosure model says the gear/settings menu may be shown. */\n DisclosureShowGear: boolean;\n /** A surface/channel actually exists to populate the panel. */\n SurfacePanelEarned: boolean;\n /** ≥ 1 interactive channel is active. */\n hasChannels: boolean; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n /** ≥ 1 delegation/activity has occurred (Activity rail has content). */\n HasActivity: boolean;\n /** Per-session developer mode is on. */\n DevMode: boolean;\n /** The widget is reviewing a past (recorded) session, not a live call. */\n IsReviewing: boolean;\n /** A single channel surface is maximized (focus mode); the main column is hidden. */\n channelFocus: boolean; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n /** Current connection lifecycle state. */\n ConnectionState: RealtimeUiConnectionState;\n}\n\n/**\n * The resolved, render-ready view-model. Every field is a final boolean (or the\n * effective chrome) — the template binds straight to these with no further\n * logic. This is the single source of truth for \"what is on screen right now\".\n */\nexport interface ResolvedRealtimeUi {\n /** The effective chrome after resolving `'auto'`. */\n chrome: 'orb' | 'console'; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** Whether compact spacing/typography applies. */\n compact: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n\n /** The big ambient hero orb is the primary surface. */\n showHero: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** The transcript/thread is visible. */\n showThread: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** The right-hand surface panel is visible. */\n showSurfacePanel: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /**\n * The surface panel is hidden only because the call has no room for it: the host allows it, it is earned and no\n * channel holds the stage, but the call is narrower than the console breakpoint outside console chrome. It shows again\n * once the call is wide enough. The overlay keeps the user's collapse of the panel through this, and only this.\n */\n SurfacePanelWaitsForRoom: boolean;\n /** The Activity tab/rail is available. */\n showActivityTab: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** The channel strip is visible. */\n showChannelStrip: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n\n /** The captions toggle is available. */\n showCaptionsControl: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** The density picker is available (inside the gear). */\n showDensityPicker: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** The gear/settings affordance is available. */\n showGear: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** Developer links/panels are available. */\n showDevLinks: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** The minimize control is available. */\n showMinimize: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** The end-call control is available. */\n showEnd: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n\n /** The user has a path to reveal text. */\n allowTextReveal: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /** Typing into the session is allowed (see RealtimeUiInputs.allowTyping). */\n allowTyping: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n}\n\n/**\n * A safe, dependency-free baseline {@link RealtimeUiSignals}. Use this to seed a\n * resolved view-model **before** the component's runtime dependencies (the\n * disclosure model, the session state, the `ResizeObserver`) exist — e.g. in a\n * field initializer. It describes a freshly-connecting widget at zero width with\n * nothing earned yet, so the first paint is a calm orb until `recomputeUi()`\n * runs with real signals. Never read `this` to build the first value.\n */\nexport const DEFAULT_REALTIME_UI_SIGNALS: RealtimeUiSignals = {\n ContainerWidthPx: 0,\n TextRevealed: false,\n DisclosureShowThread: false,\n DisclosureShowPanel: false,\n DisclosureShowGear: false,\n SurfacePanelEarned: false,\n hasChannels: false,\n HasActivity: false,\n DevMode: false,\n IsReviewing: false,\n channelFocus: false,\n ConnectionState: 'connecting',\n};\n\n/**\n * The host's inputs laid over {@link DEFAULT_REALTIME_UI_INPUTS}. An explicit `undefined` (\"not set\") falls back to\n * the default, which a plain spread would overwrite with `undefined`.\n */\nfunction withDefaults(inputs: RealtimeUiInputs | null | undefined): Required<RealtimeUiInputs> {\n const cfg: Required<RealtimeUiInputs> = { ...DEFAULT_REALTIME_UI_INPUTS };\n if (inputs) {\n for (const key of Object.keys(inputs) as Array<keyof RealtimeUiInputs>) {\n assignDefined(cfg, inputs, key);\n }\n }\n return cfg;\n}\n\n/**\n * Copies one input onto the resolved config when the host set it. The target is typed as the optional shape\n * because TypeScript cannot write a generic key into a `Required<>`; only a defined value is ever written, so\n * the config stays complete.\n */\nfunction assignDefined<K extends keyof RealtimeUiInputs>(target: RealtimeUiInputs, inputs: RealtimeUiInputs, key: K): void {\n const value = inputs[key];\n if (value !== undefined) {\n target[key] = value;\n }\n}\n\n/**\n * Resolve the consumer config + live signals into a render-ready view-model.\n *\n * Pure and deterministic: same inputs ⇒ same output, no side effects, no clock,\n * no DOM. Safe to call on every change-detection pass and trivial to unit test.\n *\n * The resolution order is:\n * 1. fill defaults,\n * 2. decide the effective {@link RealtimeChromeMode} (the orb↔console rule),\n * 3. for each affordance, AND the consumer's switch with the runtime gate.\n *\n * @param inputs consumer configuration (partial; defaults fill the rest)\n * @param signals live runtime facts\n * @returns the fully-resolved {@link ResolvedRealtimeUi}\n *\n * @example Chat overlay (lean, ambient):\n * ```ts\n * resolveRealtimeUi(\n * { chrome: 'auto', showSurfacePanel: false, showActivityRail: false, showDevLinks: false },\n * signals\n * );\n * ```\n *\n * @example Full-screen route (rich console):\n * ```ts\n * resolveRealtimeUi({ chrome: 'auto', consoleBreakpointPx: 480 }, wideSignals);\n * ```\n */\nexport function ResolveRealtimeUi(\n inputs: RealtimeUiInputs | null | undefined,\n signals: RealtimeUiSignals,\n): ResolvedRealtimeUi {\n const cfg = withDefaults(inputs);\n\n const allowTextReveal = cfg.allowTextReveal;\n const chrome = resolveChrome(cfg, signals, allowTextReveal);\n const isConsole = chrome === 'console';\n const compact = cfg.compact || signals.ContainerWidthPx < cfg.consoleBreakpointPx;\n\n // Review always carries the thread. Live, the thread shows when the user has EXPLICITLY revealed text this session\n // (`TextRevealed`) or we're in a console (consoles carry the thread) — both only if text is allowed at all. We\n // deliberately do NOT consult the disclosure ratchet: a power user with a high base level still opens to the calm\n // orb (\"keep the orb until the user asks for text\").\n const showThread = signals.IsReviewing || (allowTextReveal && (signals.TextRevealed || isConsole));\n\n // The hero is the surface whenever there is no thread (a forced console with text disallowed included).\n const showHero = !showThread;\n\n const allowTyping = cfg.allowTyping && allowTextReveal;\n\n // The surface/Details panel opens ON DEMAND when earned (the Details peek, the agent's\n // OpenSurfacePanel, content auto-reveal — all set surfacePanelEarned). It is an INDEPENDENT\n // right-hand peek that rides ALONGSIDE whatever the main column shows — it must NOT require the\n // cross-session disclosure ratchet (disclosureShowPanel = SessionLevel >= 2), and it must NOT\n // require the user to have revealed text.\n //\n // It was previously gated on `isConsole`, which bundled TWO things: \"there's room\" (legitimate —\n // don't cram a side panel into a narrow overlay) AND \"the user revealed text\" (wrong for a peek).\n // The text-reveal coupling meant opening Details with captions OFF flipped the whole left column\n // from the hero orb to an empty transcript (the orb vanished), and toggling captions back off\n // yanked the panel out from under an open peek. The design intent (see the auto-reveal comment in\n // the overlay component: \"the left column stays exactly as it was, pure audio included\") is a peek\n // beside the orb. So we keep only the ROOM half: the panel shows when earned and either the chrome\n // is already a console (incl. review / forced-console at any width) OR the container is at least as\n // wide as the console breakpoint — never in a cramped narrow overlay, and never dependent on text.\n const roomForSurfacePanel = isConsole || signals.ContainerWidthPx >= cfg.consoleBreakpointPx;\n // Everything the panel needs but room. Kept apart so the overlay can tell a panel that waits for room from one that\n // was hidden on purpose (SurfacePanelWaitsForRoom).\n const surfacePanelWanted = cfg.showSurfacePanel && signals.SurfacePanelEarned && !signals.channelFocus;\n const showSurfacePanel = surfacePanelWanted && roomForSurfacePanel;\n\n const showActivityTab = cfg.showActivityRail && (signals.HasActivity || signals.IsReviewing) && isConsole;\n\n const showChannelStrip = cfg.showChannels && signals.hasChannels && isConsole && !signals.channelFocus;\n\n // An empty gear menu is not worth an affordance: it needs at least one entry (density picker or dev links).\n const showGear = (signals.DisclosureShowGear || isConsole) && (cfg.showDensityPicker || cfg.showDevLinks);\n\n return {\n chrome,\n compact,\n showHero,\n showThread,\n showSurfacePanel,\n SurfacePanelWaitsForRoom: surfacePanelWanted && !roomForSurfacePanel,\n showActivityTab,\n showChannelStrip,\n showCaptionsControl: cfg.showCaptionsControl && allowTextReveal,\n showDensityPicker: cfg.showDensityPicker && showGear,\n showGear,\n showDevLinks: cfg.showDevLinks && signals.DevMode,\n showMinimize: cfg.showMinimize && !signals.IsReviewing,\n showEnd: cfg.showEnd,\n allowTextReveal,\n allowTyping,\n };\n}\n\n/** @deprecated Use {@link ResolveRealtimeUi}. */\nexport function resolveRealtimeUi(\n inputs: RealtimeUiInputs | null | undefined,\n signals: RealtimeUiSignals,\n): ResolvedRealtimeUi {\n return ResolveRealtimeUi(inputs, signals);\n}\n\n/**\n * Decide the effective chrome. Forced modes win outright; `'auto'` graduates to a\n * console only when there's both **room** (width ≥ breakpoint) and **intent**\n * (text revealed) — or when reviewing, which always wants the transcript.\n *\n * @internal\n */\nfunction resolveChrome(\n cfg: Required<RealtimeUiInputs>,\n signals: RealtimeUiSignals,\n allowTextReveal: boolean,\n): 'orb' | 'console' {\n if (cfg.chrome === 'orb') {\n return 'orb';\n }\n if (cfg.chrome === 'console') {\n return 'console';\n }\n // auto\n if (signals.IsReviewing) {\n return 'console';\n }\n if (!allowTextReveal) {\n return 'orb';\n }\n // Intent is the USER explicitly revealing text this session — NOT the disclosure ratchet.\n // Wider-alone keeps the orb; a power user who hasn't asked for text keeps the orb too.\n const hasRoom = signals.ContainerWidthPx >= cfg.consoleBreakpointPx;\n return hasRoom && signals.TextRevealed ? 'console' : 'orb';\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"remote-browser-channel.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/realtime/remote-browser/remote-browser-channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,EAA0C,sBAAsB,EAAiB,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC5I,OAAO,EAA6B,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAqC,KAAK,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACjH,OAAO,EAAE,yBAAyB,EAAwB,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC7H,OAAO,EAA2D,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAS5I,OAAO,EAAwB,4BAA4B,EAA4B,MAAM,+BAA+B,CAAC;AA2P7H;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBACa,oBAAqB,SAAQ,yBAAyB,CAAC,6BAA6B,CAAE,YAAW,qBAAqB;IACjI,2EAA2E;IAC3E,OAAO,CAAC,OAAO,CAA8C;IAE7D,uGAAuG;IACvG,OAAO,CAAC,WAAW,CAA0C;IAE7D;;OAEG;IACa,gBAAgB,IAAI,SAAS,uBAAuB,EAAE;IAItE;;;;OAIG;IACU,cAAc,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IASrD,4FAA4F;IAC5F,OAAO,CAAC,aAAa,CAA6B;IAElD;;;;OAIG;IACH,OAAO,CAAC,SAAS,CAAS;IAE1B;;;;OAIG;IACH,OAAO,CAAC,cAAc,CAAS;IAE/B;;;;OAIG;IACH,OAAO,CAAC,YAAY,CAAuB;IAE3C;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,iBAAiB,CAAK;IAE9B,yGAAyG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AsB,CAAmE;IAEjG,2EAA2E;IAC3E,OAAO,CAAC,4BAA4B;IAOpC;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAO3B;;;;OAIG;IACH,OAAO,CAAC,2BAA2B;IAqBnC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACI,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAmD9E;;;;;;OAMG;IACI,YAAY,CAAC,KAAK,EAAE,4BAA4B,GAAG,IAAI;IAM9D;;;;OAIG;YACW,eAAe;IAY7B;;;;;;;OAOG;YACW,gBAAgB;IAe9B,yGAAyG;YAC3F,eAAe;IAY7B;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;IAqBvB;;;;;OAKG;YACW,cAAc;IAS5B,0FAA0F;YAC5E,cAAc;IAe5B;;;;;;;OAOG;YACW,aAAa;IAW3B;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,OAAO,CAAC,cAAc;IAuBtB;;;;;;OAMG;YACW,gBAAgB;IAS9B;;;;;;OAMG;IACU,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IA2DhF,iGAAiG;IACjG,OAAO,CAAC,cAAc;IAgBtB;;;;;;;OAOG;YACW,WAAW;IA0CzB;;;;;;;;OAQG;YACW,cAAc;IAqB5B;;;;;;;;;OASG;YACW,aAAa;IAoC3B,iGAAiG;IACjG,OAAO,CAAC,WAAW;IAInB,6FAA6F;IAC7F,OAAO,CAAC,SAAS;IAajB,iEAAiE;IACjE,OAAO,CAAC,EAAE;IAWV,6DAA6D;IAC7D,OAAO,CAAC,IAAI;CAIb;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,IAAI,IAAI,CAEvD"}
1
+ {"version":3,"file":"remote-browser-channel.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/realtime/remote-browser/remote-browser-channel.ts"],"names":[],"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MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAmD9E;;;;;;OAMG;IACI,YAAY,CAAC,KAAK,EAAE,4BAA4B,GAAG,IAAI;IAM9D;;;;OAIG;YACW,eAAe;IAY7B;;;;;;;OAOG;YACW,gBAAgB;IAe9B,yGAAyG;YAC3F,eAAe;IAY7B;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;IAqBvB;;;;;OAKG;YACW,cAAc;IAS5B,0FAA0F;YAC5E,cAAc;IAe5B;;;;;;;OAOG;YACW,aAAa;IAW3B;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,OAAO,CAAC,cAAc;IAuBtB;;;;;;OAMG;YACW,gBAAgB;IAS9B;;;;;;OAMG;IACU,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IA2DhF,iGAAiG;IACjG,OAAO,CAAC,cAAc;IAkBtB;;;;;;;OAOG;YACW,WAAW;IA0CzB;;;;;;;;OAQG;YACW,cAAc;IAqB5B;;;;;;;;;OASG;YACW,aAAa;IAoC3B,iGAAiG;IACjG,OAAO,CAAC,WAAW;IAInB,6FAA6F;IAC7F,OAAO,CAAC,SAAS;IAajB,iEAAiE;IACjE,OAAO,CAAC,EAAE;IA8BV,6DAA6D;IAC7D,OAAO,CAAC,IAAI;CAIb;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,IAAI,IAAI,CAEvD"}
@@ -21,16 +21,20 @@ const EXECUTE_REMOTE_BROWSER_ACTION_MUTATION = `
21
21
  mutation ExecuteRemoteBrowserAction(
22
22
  $agentSessionID: String!, $kind: String!, $url: String, $selector: String,
23
23
  $x: Float, $y: Float, $text: String, $key: String,
24
- $deltaX: Float, $deltaY: Float, $ms: Float
24
+ $deltaX: Float, $deltaY: Float, $ms: Float,
25
+ $ref: String, $valuesJson: String
25
26
  ) {
26
27
  ExecuteRemoteBrowserAction(
27
28
  agentSessionID: $agentSessionID, kind: $kind, url: $url, selector: $selector,
28
29
  x: $x, y: $y, text: $text, key: $key,
29
- deltaX: $deltaX, deltaY: $deltaY, ms: $ms
30
+ deltaX: $deltaX, deltaY: $deltaY, ms: $ms,
31
+ ref: $ref, valuesJson: $valuesJson
30
32
  ) {
31
33
  Success
32
34
  CurrentUrl
33
35
  Detail
36
+ ObservationJson
37
+ FilledJson
34
38
  }
35
39
  }
36
40
  `;
@@ -308,6 +312,7 @@ let RemoteBrowserChannel = class RemoteBrowserChannel extends BaseRealtimeChanne
308
312
  // Reading the page is what exposure limits: its text is the page's state, and what the vision model makes of the
309
313
  // screenshot (or where it finds an element) is derived from its pixels. A goal's result reports what the browser found.
310
314
  Verbs: BuildToolBackedVerbs(this.GetToolDefinitions(), this.ToolNamePrefix, 'agent', {
315
+ [REMOTE_BROWSER_TOOL_NAMES.Inspect]: 'state',
311
316
  [REMOTE_BROWSER_TOOL_NAMES.GetPageText]: 'state',
312
317
  [REMOTE_BROWSER_TOOL_NAMES.DescribePage]: 'pixels',
313
318
  [REMOTE_BROWSER_TOOL_NAMES.LocateElement]: 'pixels',
@@ -781,7 +786,7 @@ let RemoteBrowserChannel = class RemoteBrowserChannel extends BaseRealtimeChanne
781
786
  // PERCEPTION: tell the agent where the page is now (background — no spoken reply), and refresh
782
787
  // the live-view bar, which in streaming mode has no poll feeding it.
783
788
  this.notePageChange(result.CurrentUrl, 'agent');
784
- return this.ok(result.CurrentUrl, result.Detail);
789
+ return this.ok(result.CurrentUrl, result.Detail, result.ObservationJson, result.FilledJson);
785
790
  });
786
791
  }
787
792
  /** Builds the flat mutation variables from a normalized action (omitted fields ride as null). */
@@ -798,6 +803,8 @@ let RemoteBrowserChannel = class RemoteBrowserChannel extends BaseRealtimeChanne
798
803
  deltaX: action.DeltaX ?? null,
799
804
  deltaY: action.DeltaY ?? null,
800
805
  ms: action.Ms ?? null,
806
+ ...(action.Ref !== undefined ? { ref: action.Ref } : {}),
807
+ ...(action.ValuesJson !== undefined ? { valuesJson: action.ValuesJson } : {}),
801
808
  };
802
809
  }
803
810
  /**
@@ -938,7 +945,7 @@ let RemoteBrowserChannel = class RemoteBrowserChannel extends BaseRealtimeChanne
938
945
  }
939
946
  }
940
947
  /** Builds a successful tool-result JSON string for the model. */
941
- ok(currentUrl, detail) {
948
+ ok(currentUrl, detail, observationJson, filledJson) {
942
949
  const result = { success: true };
943
950
  if (currentUrl) {
944
951
  result.currentUrl = currentUrl;
@@ -946,6 +953,22 @@ let RemoteBrowserChannel = class RemoteBrowserChannel extends BaseRealtimeChanne
946
953
  if (detail) {
947
954
  result.detail = detail;
948
955
  }
956
+ if (observationJson) {
957
+ try {
958
+ result.observation = JSON.parse(observationJson);
959
+ }
960
+ catch {
961
+ // Ignore malformed observation JSON
962
+ }
963
+ }
964
+ if (filledJson) {
965
+ try {
966
+ result.filled = JSON.parse(filledJson);
967
+ }
968
+ catch {
969
+ // Ignore malformed filled JSON
970
+ }
971
+ }
949
972
  return JSON.stringify(result);
950
973
  }
951
974
  /** Builds a failed tool-result JSON string for the model. */