@burdenoff/fe-libs 2026.1016.2 → 2026.1017.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/shared/assistant/avatar/live/AvatarFace.d.ts +13 -0
  2. package/dist/shared/assistant/avatar/live/AvatarFace.js +46 -0
  3. package/dist/shared/assistant/avatar/live/LiveAvatarTabView.d.ts +2 -0
  4. package/dist/shared/assistant/avatar/live/LiveAvatarTabView.js +172 -145
  5. package/dist/shared/assistant/avatar/live/avatarFaces.d.ts +31 -0
  6. package/dist/shared/assistant/avatar/live/avatarFaces.js +33 -0
  7. package/dist/shared/assistant/avatar/live/createLiveAvatarSeam.d.ts +12 -0
  8. package/dist/shared/assistant/avatar/live/createLiveAvatarSeam.js +142 -75
  9. package/dist/shared/assistant/avatar/live/liveAvatarController.d.ts +5 -0
  10. package/dist/shared/assistant/avatar/live/liveAvatarController.js +3 -1
  11. package/dist/shared/assistant/avatar/live/liveAvatarStatus.d.ts +14 -0
  12. package/dist/shared/assistant/avatar/live/liveAvatarStatus.js +11 -2
  13. package/dist/shared/assistant/avatar/useAvatarCopy.d.ts +42 -0
  14. package/dist/shared/assistant/avatar/useAvatarCopy.js +113 -75
  15. package/dist/shared/assistant/i18nManifest.d.ts +29 -0
  16. package/dist/shared/assistant/i18nManifest.js +29 -0
  17. package/dist/shared/assistant/index.d.ts +8 -0
  18. package/dist/shared/assistant/speech/hostedTtsSpeechEngine.d.ts +6 -0
  19. package/dist/shared/assistant/speech/hostedTtsSpeechEngine.js +118 -101
  20. package/dist/shared/assistant/speech/notifyCancellationSpeechEngine.js +3 -0
  21. package/dist/shared/assistant/speech/replySpeechRequests.d.ts +84 -0
  22. package/dist/shared/assistant/speech/replySpeechRequests.js +70 -0
  23. package/dist/shared/assistant/speech/routingSpeechEngine.js +13 -9
  24. package/dist/shared/assistant/speech/types.d.ts +39 -1
  25. package/dist/shared/assistant/ui/AIAssistantPanel.js +128 -119
  26. package/dist/shared/assistant/ui/AssistantChatArea.js +1572 -1430
  27. package/dist/shared/assistant/ui/AssistantMessageItem.js +110 -100
  28. package/dist/shared/assistant/ui/AssistantSpeechProvider.d.ts +10 -0
  29. package/dist/shared/assistant/ui/AssistantSpeechProvider.js +286 -225
  30. package/dist/shared/assistant/ui/assistantLiveAvatarSeam.d.ts +40 -0
  31. package/dist/shared/assistant/ui/avatar/AssistantAvatarTab.d.ts +6 -0
  32. package/dist/shared/assistant/ui/avatar/AssistantAvatarTab.js +99 -52
  33. package/dist/shared/assistant/ui/avatar/AvatarTabAskBox.d.ts +8 -0
  34. package/dist/shared/assistant/ui/avatar/AvatarTabAskBox.js +87 -0
  35. package/dist/shared/assistant/ui/avatar/AvatarTabLastExchange.d.ts +13 -0
  36. package/dist/shared/assistant/ui/avatar/AvatarTabLastExchange.js +97 -0
  37. package/dist/shared/assistant/ui/avatar/avatarAskGate.d.ts +104 -0
  38. package/dist/shared/assistant/ui/avatar/avatarAskGate.js +39 -0
  39. package/dist/shared/assistant/ui/avatar/avatarTabDraft.d.ts +17 -0
  40. package/dist/shared/assistant/ui/avatar/avatarTabDraft.js +22 -0
  41. package/dist/shared/assistant/ui/avatar/avatarTabExchange.d.ts +47 -0
  42. package/dist/shared/assistant/ui/avatar/avatarTabExchange.js +50 -0
  43. package/dist/shared/assistant/ui/panelOverlays.d.ts +8 -1
  44. package/dist/shared/assistant/ui/panelOverlays.js +1 -1
  45. package/dist/shared/assistant/ui/useVoiceSession.js +222 -227
  46. package/dist/shared/assistant/voice/handsfree/playbackReference.d.ts +15 -4
  47. package/dist/shared/assistant/voice/handsfree/playbackReference.js +9 -6
  48. package/dist/shared-assistant.js +270 -262
  49. package/package.json +1 -1
@@ -0,0 +1,47 @@
1
+ import { AssistantConversationProcessing } from '../../conversation';
2
+ import { ReplySpeechOutcome } from '../../speech/replySpeechRequests';
3
+ import { AvatarTabExchange } from './avatarAskGate';
4
+ /**
5
+ * Where the exchange is:
6
+ * - `thinking`: the turn is on its way;
7
+ * - `speaking`: the answer is being read aloud now (Stop is offered);
8
+ * - `done`: the turn is over and nothing more will happen to its audio (read, stopped, or left to Chat's own rules);
9
+ * - `not-spoken`: the avatar was not there to take it (off, covered, ending, no hosted voice), or the reply was released;
10
+ * - `cut`: the avatar stopped part way through (Turn off, the time limit, the avatar leaving) after part of it was read;
11
+ * - `not-heard`: the avatar's audio output refused it, as what played before could not be shown to have stopped;
12
+ * - `failed`: the turn itself failed.
13
+ */
14
+ export type AvatarTabExchangeState = 'thinking' | 'speaking' | 'done' | 'not-spoken' | 'cut' | 'not-heard' | 'failed';
15
+ /** Pure: the state from the turn's processing entry, the reply's registry outcome, and the speech provider. */
16
+ export declare function avatarTabExchangeState(input: {
17
+ readonly replyId: string;
18
+ readonly processing: AssistantConversationProcessing | undefined;
19
+ readonly outcome: ReplySpeechOutcome | null;
20
+ /** The speech provider is reading this reply now. */
21
+ readonly speaking: boolean;
22
+ /**
23
+ * The reply's message exists yet. A local navigation's reply id is known when the question is written, and the reply
24
+ * itself only once the move settles: until then the conversation's processing entry may still be an earlier turn's.
25
+ */
26
+ readonly replied: boolean;
27
+ /**
28
+ * A navigation asked from the tab is still settling, and this is its reply. A move that settles with no reply (kept
29
+ * by the navigator, its conversation gone) clears it: nothing is on its way then.
30
+ */
31
+ readonly navigating: boolean;
32
+ }): AvatarTabExchangeState;
33
+ export interface AvatarTabExchangeView {
34
+ readonly exchange: AvatarTabExchange;
35
+ /** The question as it was sent. */
36
+ readonly question: string;
37
+ /** The answer's prose so far: tool lines stripped as the transcript strips them, so it is what the avatar reads. */
38
+ readonly answer: string;
39
+ /** The conversation's title when the question went into one that already had turns before it (critic m9), else null. */
40
+ readonly askedIn: string | null;
41
+ readonly state: AvatarTabExchangeState;
42
+ }
43
+ /**
44
+ * The last exchange the tab asked, live; null before the first (or once it is gone from the store). `navigatingReplyId`:
45
+ * the reply of a navigation asked from the tab that is still settling (`AvatarTabAsk.navigatingReplyId`).
46
+ */
47
+ export declare function useAvatarTabExchange(last: AvatarTabExchange | null, navigatingReplyId: string | null): AvatarTabExchangeView | null;
@@ -0,0 +1,50 @@
1
+ import { useAssistantStore as e } from "../../store.js";
2
+ import { replyRequestsVersion as t, replySpeechRequest as n, subscribeReplyRequests as r } from "../../speech/replySpeechRequests.js";
3
+ import { isTurnInFlight as i } from "../../turnState.js";
4
+ import { parseToolActivity as a } from "../AssistantToolActivity.js";
5
+ import { useAssistantSpeech as o } from "../AssistantSpeechProvider.js";
6
+ import { useSyncExternalStore as s } from "react";
7
+ //#region src/shared/assistant/ui/avatar/avatarTabExchange.ts
8
+ function c(e) {
9
+ let { processing: t, outcome: n } = e, r = t !== void 0 && (t.messageId === null || t.messageId === e.replyId);
10
+ if (r && t.status === "error") return "failed";
11
+ if (r && i(t.status)) return "thinking";
12
+ if (e.speaking || n === "speaking") return "speaking";
13
+ switch (n) {
14
+ case "not-cleared": return "not-heard";
15
+ case "cut": return "cut";
16
+ case "declined":
17
+ case "dropped":
18
+ case "failed": return "not-spoken";
19
+ case "pending":
20
+ case null: return !e.replied && e.navigating ? "thinking" : "done";
21
+ case "spoken":
22
+ case "stopped": return "done";
23
+ default: return n;
24
+ }
25
+ }
26
+ function l(i, l) {
27
+ let u = i?.conversationId ?? null, d = e((e) => u === null ? void 0 : e.conversations.find((e) => e.id === u)), f = e((e) => u === null ? void 0 : e.processingByConversationId[u]);
28
+ s(r, t, t);
29
+ let { speakingMessageId: p } = o();
30
+ if (i === null || d === void 0) return null;
31
+ let m = d.messages.findIndex((e) => e.id === i.questionId), h = d.messages[m];
32
+ if (h === void 0) return null;
33
+ let g = d.messages.find((e) => e.id === i.replyId), _ = a(g?.content ?? "").text.trim(), v = d.title.trim();
34
+ return {
35
+ exchange: i,
36
+ question: h.content,
37
+ answer: _,
38
+ askedIn: m > 0 && v !== "" ? v : null,
39
+ state: c({
40
+ replyId: i.replyId,
41
+ processing: f,
42
+ outcome: n(i.replyId)?.outcome ?? null,
43
+ speaking: p === i.replyId,
44
+ replied: g !== void 0,
45
+ navigating: l === i.replyId
46
+ })
47
+ };
48
+ }
49
+ //#endregion
50
+ export { c as avatarTabExchangeState, l as useAvatarTabExchange };
@@ -46,6 +46,13 @@ export declare function nextPanelOverlays(current: PanelOverlayState, toggled: "
46
46
  export interface PanelLayerState extends PanelOverlayState {
47
47
  /** The Avatar tab is the view on screen; absent where the panel offers none. */
48
48
  readonly avatarOpen?: boolean;
49
+ /**
50
+ * ★ BOFF-9360 (critic M5): the answer to the tab's own typed question is
51
+ * being read aloud, and the tab is shown. Escape stops that reading before
52
+ * it leaves the tab. Only the chat area says so (`setReplyEscape`), and only
53
+ * while nothing covers the tab.
54
+ */
55
+ readonly tabReplySpeaking?: boolean;
49
56
  }
50
57
  /**
51
58
  * What Escape should dismiss.
@@ -58,7 +65,7 @@ export interface PanelLayerState extends PanelOverlayState {
58
65
  * Escape is "back out of the thing I just opened"; here it destroyed a
59
66
  * conversation instead.
60
67
  */
61
- export declare function escapeDismisses(current: PanelLayerState): "overlay" | "tab" | "panel";
68
+ export declare function escapeDismisses(current: PanelLayerState): "overlay" | "tab-reply" | "tab" | "panel";
62
69
  /**
63
70
  * Attribute marking the assistant panel's root element.
64
71
  *
@@ -10,7 +10,7 @@ function t(t, n) {
10
10
  };
11
11
  }
12
12
  function n(e) {
13
- return e.historyOpen || e.previewOpen ? "overlay" : e.avatarOpen === !0 ? "tab" : "panel";
13
+ return e.historyOpen || e.previewOpen ? "overlay" : e.avatarOpen === !0 ? e.tabReplySpeaking === !0 ? "tab-reply" : "tab" : "panel";
14
14
  }
15
15
  var r = "data-assistant-panel", i = "data-assistant-overlay", a = "data-assistant-voice-session";
16
16
  function o(e) {