@burdenoff/fe-libs 2026.1024.2 → 2026.1024.4

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 (151) hide show
  1. package/dist/chrome/FooterBar.d.ts +1 -1
  2. package/dist/chrome/NativePageTransition.d.ts +1 -1
  3. package/dist/chrome/ProductPickerSheet.js +42 -42
  4. package/dist/chrome/ProductSwitcher.d.ts +8 -0
  5. package/dist/chrome/ProductSwitcher.js +83 -72
  6. package/dist/chrome/index.d.ts +9 -9
  7. package/dist/chrome/swipe/swipeMath.d.ts +1 -1
  8. package/dist/shared/assistant/api.d.ts +3 -3
  9. package/dist/shared/assistant/appControls/grammar.d.ts +21 -21
  10. package/dist/shared/assistant/appControls/languageReply.d.ts +1 -1
  11. package/dist/shared/assistant/appControls/names.d.ts +3 -3
  12. package/dist/shared/assistant/appControls/pageAdapters.d.ts +5 -5
  13. package/dist/shared/assistant/appControls/plan.d.ts +38 -38
  14. package/dist/shared/assistant/appControls/types.d.ts +15 -15
  15. package/dist/shared/assistant/appControls/useAssistantControl.d.ts +1 -1
  16. package/dist/shared/assistant/attachmentSources.d.ts +2 -2
  17. package/dist/shared/assistant/attachments.d.ts +5 -5
  18. package/dist/shared/assistant/autoRouting.d.ts +6 -6
  19. package/dist/shared/assistant/avatar/live/LiveAvatarMinutes.d.ts +24 -0
  20. package/dist/shared/assistant/avatar/live/LiveAvatarMinutes.js +161 -0
  21. package/dist/shared/assistant/avatar/live/LiveAvatarStage.js +95 -73
  22. package/dist/shared/assistant/avatar/live/LiveAvatarTabView.d.ts +6 -0
  23. package/dist/shared/assistant/avatar/live/LiveAvatarTabView.js +195 -171
  24. package/dist/shared/assistant/avatar/live/avatarSessionClient.d.ts +77 -1
  25. package/dist/shared/assistant/avatar/live/avatarSessionClient.js +193 -72
  26. package/dist/shared/assistant/avatar/live/createLiveAvatarSeam.d.ts +14 -1
  27. package/dist/shared/assistant/avatar/live/createLiveAvatarSeam.js +65 -40
  28. package/dist/shared/assistant/avatar/live/liveAvatarController.d.ts +64 -2
  29. package/dist/shared/assistant/avatar/live/liveAvatarController.js +403 -242
  30. package/dist/shared/assistant/avatar/live/liveAvatarMinutesView.d.ts +127 -0
  31. package/dist/shared/assistant/avatar/live/liveAvatarMinutesView.js +168 -0
  32. package/dist/shared/assistant/avatar/live/liveAvatarStatus.d.ts +3 -0
  33. package/dist/shared/assistant/avatar/live/liveAvatarStatus.js +11 -7
  34. package/dist/shared/assistant/avatar/useAvatarCopy.d.ts +127 -2
  35. package/dist/shared/assistant/avatar/useAvatarCopy.js +116 -7
  36. package/dist/shared/assistant/conversation.d.ts +20 -20
  37. package/dist/shared/assistant/displayContent.d.ts +4 -4
  38. package/dist/shared/assistant/documentText.d.ts +3 -3
  39. package/dist/shared/assistant/exportConversation.d.ts +1 -1
  40. package/dist/shared/assistant/history/historyControls.d.ts +4 -4
  41. package/dist/shared/assistant/history/historyErrors.d.ts +3 -3
  42. package/dist/shared/assistant/history/historyList.d.ts +5 -5
  43. package/dist/shared/assistant/history/historyMerge.d.ts +4 -4
  44. package/dist/shared/assistant/history/historyOperations.d.ts +1 -1
  45. package/dist/shared/assistant/history/historySearch.d.ts +5 -5
  46. package/dist/shared/assistant/history/historyStatus.d.ts +1 -1
  47. package/dist/shared/assistant/history/historyTypes.d.ts +12 -12
  48. package/dist/shared/assistant/history/profileBoundStorage.d.ts +2 -2
  49. package/dist/shared/assistant/i18n.d.ts +1 -1
  50. package/dist/shared/assistant/i18nManifest.d.ts +566 -535
  51. package/dist/shared/assistant/i18nManifest.js +55 -24
  52. package/dist/shared/assistant/index.d.ts +2 -0
  53. package/dist/shared/assistant/liveDeltas.d.ts +1 -1
  54. package/dist/shared/assistant/liveOverlay.d.ts +1 -1
  55. package/dist/shared/assistant/localUiCommandCopy.d.ts +1 -1
  56. package/dist/shared/assistant/localUiCommands.d.ts +22 -22
  57. package/dist/shared/assistant/localeCommands/engine.d.ts +5 -5
  58. package/dist/shared/assistant/localeCommands/evaluate.d.ts +8 -8
  59. package/dist/shared/assistant/localeCommands/fold.d.ts +2 -2
  60. package/dist/shared/assistant/localeCommands/frames.d.ts +3 -3
  61. package/dist/shared/assistant/localeCommands/gate.d.ts +3 -3
  62. package/dist/shared/assistant/localeCommands/languageNames.d.ts +1 -1
  63. package/dist/shared/assistant/localeCommands/normalise.d.ts +1 -1
  64. package/dist/shared/assistant/localeCommands/types.d.ts +4 -4
  65. package/dist/shared/assistant/modeCapabilities.d.ts +1 -1
  66. package/dist/shared/assistant/modeCopy.d.ts +2 -2
  67. package/dist/shared/assistant/permissionError.d.ts +2 -2
  68. package/dist/shared/assistant/preview/surfaceState.d.ts +1 -1
  69. package/dist/shared/assistant/preview/types.d.ts +5 -5
  70. package/dist/shared/assistant/preview/writeActionResults.d.ts +1 -1
  71. package/dist/shared/assistant/prewarm.d.ts +5 -5
  72. package/dist/shared/assistant/quota.d.ts +2 -2
  73. package/dist/shared/assistant/sandboxReadiness.d.ts +2 -2
  74. package/dist/shared/assistant/speech/speechFeed.d.ts +3 -3
  75. package/dist/shared/assistant/turnOutcome.d.ts +2 -2
  76. package/dist/shared/assistant/turnProgress.d.ts +1 -1
  77. package/dist/shared/assistant/turnState.d.ts +1 -1
  78. package/dist/shared/assistant/turnStream.d.ts +3 -3
  79. package/dist/shared/assistant/turnTimeline.d.ts +13 -13
  80. package/dist/shared/assistant/turnTimingReport.d.ts +1 -1
  81. package/dist/shared/assistant/turnTimingReporter.d.ts +3 -3
  82. package/dist/shared/assistant/ui/AssistantAvatarTabs.d.ts +1 -1
  83. package/dist/shared/assistant/ui/AssistantChatArea.js +17 -17
  84. package/dist/shared/assistant/ui/AssistantHistoryNotices.d.ts +1 -1
  85. package/dist/shared/assistant/ui/AssistantMarkdownRenderer.d.ts +5 -2
  86. package/dist/shared/assistant/ui/AssistantToolActivity.d.ts +1 -1
  87. package/dist/shared/assistant/ui/AssistantUiOfferLink.d.ts +2 -2
  88. package/dist/shared/assistant/ui/AssistantWriteConfirmDialog.d.ts +3 -3
  89. package/dist/shared/assistant/ui/assistantLiveAvatarSeam.d.ts +10 -2
  90. package/dist/shared/assistant/ui/avatar/AssistantAvatarTab.js +78 -76
  91. package/dist/shared/assistant/ui/avatar/avatarAskGate.d.ts +2 -0
  92. package/dist/shared/assistant/ui/avatar/avatarAskGate.js +1 -0
  93. package/dist/shared/assistant/ui/composer/AssistantAttachmentButton.d.ts +1 -1
  94. package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.d.ts +1 -1
  95. package/dist/shared/assistant/ui/leaveConfirmFocus.d.ts +1 -1
  96. package/dist/shared/assistant/ui/leaveConfirmNavigate.d.ts +3 -3
  97. package/dist/shared/assistant/ui/panelOverlays.d.ts +5 -5
  98. package/dist/shared/assistant/ui/useVoiceSession.d.ts +5 -5
  99. package/dist/shared/assistant/ui/useWriteProposalConfirm.d.ts +4 -4
  100. package/dist/shared/assistant/ui/useWriteProposals.d.ts +2 -2
  101. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +1 -1
  102. package/dist/shared/assistant/ui/voice/VoiceCaption.d.ts +1 -1
  103. package/dist/shared/assistant/ui/voice/VoiceWaveform.d.ts +1 -1
  104. package/dist/shared/assistant/ui/voice/voiceSessionEscape.d.ts +2 -2
  105. package/dist/shared/assistant/ui/voice/voiceStartGate.d.ts +6 -6
  106. package/dist/shared/assistant/ui/writeProposalPresentation.d.ts +1 -1
  107. package/dist/shared/assistant/uiActions/actOnResolve.d.ts +5 -5
  108. package/dist/shared/assistant/uiActions/assistantHref.d.ts +2 -2
  109. package/dist/shared/assistant/uiActions/backStack.d.ts +1 -1
  110. package/dist/shared/assistant/uiActions/deixis.d.ts +3 -3
  111. package/dist/shared/assistant/uiActions/entityRoutes.d.ts +1 -1
  112. package/dist/shared/assistant/uiActions/navigationOutcome.d.ts +8 -8
  113. package/dist/shared/assistant/uiActions/offerYesOnSurface.d.ts +1 -1
  114. package/dist/shared/assistant/uiActions/resolveTarget.d.ts +2 -2
  115. package/dist/shared/assistant/uiActions/uiOffers.d.ts +5 -5
  116. package/dist/shared/assistant/usageReporting.d.ts +2 -2
  117. package/dist/shared/assistant/useWorkspaceWriteAccess.d.ts +1 -1
  118. package/dist/shared/assistant/voice/affirmations.d.ts +1 -1
  119. package/dist/shared/assistant/voice/handsFree.d.ts +3 -3
  120. package/dist/shared/assistant/voice/handsfree/bargeIn.d.ts +5 -5
  121. package/dist/shared/assistant/voice/handsfree/echoGate.d.ts +6 -6
  122. package/dist/shared/assistant/voice/handsfree/handsFreeController.d.ts +7 -7
  123. package/dist/shared/assistant/voice/handsfree/handsFreeSetting.d.ts +2 -2
  124. package/dist/shared/assistant/voice/handsfree/micCapture.d.ts +1 -1
  125. package/dist/shared/assistant/voice/handsfree/playbackReference.d.ts +1 -1
  126. package/dist/shared/assistant/voice/handsfree/sttTransport.d.ts +3 -3
  127. package/dist/shared/assistant/voice/handsfree/useHandsFreeInterrupt.d.ts +4 -4
  128. package/dist/shared/assistant/voice/handsfree/vad.d.ts +1 -1
  129. package/dist/shared/assistant/voice/speechPlayback.d.ts +7 -7
  130. package/dist/shared/assistant/voice/useVoiceInput.d.ts +1 -1
  131. package/dist/shared/assistant/voice/voiceReopen.d.ts +8 -8
  132. package/dist/shared/assistant/writeConfirmSeam.d.ts +1 -1
  133. package/dist/shared/assistant/writeModeConsent.d.ts +7 -7
  134. package/dist/shared/assistant/writeProposalDiscovery.d.ts +3 -3
  135. package/dist/shared/assistant/writeProposalErrorCopy.d.ts +1 -1
  136. package/dist/shared/assistant/writeProposals.d.ts +23 -23
  137. package/dist/shared/assistant/writeReplyBinder.d.ts +11 -11
  138. package/dist/shared/assistant/writeReplySend.d.ts +7 -7
  139. package/dist/shared/components/LandingOrDashboardRedirect.d.ts +18 -3
  140. package/dist/shared/components/LandingOrDashboardRedirect.js +58 -28
  141. package/dist/shared/components/index.d.ts +2 -1
  142. package/dist/shared/events/index.d.ts +2 -1
  143. package/dist/shared/hooks/shell/globalSearchError.d.ts +2 -2
  144. package/dist/shared/navigation/productSwitchHandoff.d.ts +45 -0
  145. package/dist/shared/navigation/productSwitchHandoff.js +27 -0
  146. package/dist/shared/navigation/unsavedChanges.d.ts +1 -1
  147. package/dist/shared/utils/index.d.ts +3 -3
  148. package/dist/shared-assistant.js +227 -225
  149. package/dist/shared-components.js +7 -6
  150. package/dist/shared.js +71 -70
  151. package/package.json +3 -2
@@ -2,164 +2,175 @@ import { HOSTED_SPEAKERS as e, isHostedSpeaker as t } from "../../speech/hostedV
2
2
  import { useAvatarCopy as n } from "../useAvatarCopy.js";
3
3
  import { useAssistantSpeech as ee } from "../../ui/AssistantSpeechProvider.js";
4
4
  import { resolveAvatarVoiceMode as te } from "../avatarPreferences.js";
5
+ import { avatarMinutesRefusal as ne } from "./avatarSessionClient.js";
5
6
  import "./liveAvatarController.js";
6
- import { liveAvatarStatusText as ne } from "./liveAvatarStatus.js";
7
- import { AvatarFace as re } from "./AvatarFace.js";
8
- import { hostedAvatarVoice as r } from "./avatarVoice.js";
9
- import { useCallback as i, useEffect as a, useId as o, useLayoutEffect as ie, useRef as s, useState as c, useSyncExternalStore as l } from "react";
10
- import { Volume2 as u } from "lucide-react";
11
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
7
+ import { liveAvatarMinutesActive as re, liveAvatarMinutesBlockStart as ie } from "./liveAvatarMinutesView.js";
8
+ import { liveAvatarStatusText as ae } from "./liveAvatarStatus.js";
9
+ import { AvatarFace as r } from "./AvatarFace.js";
10
+ import { hostedAvatarVoice as i } from "./avatarVoice.js";
11
+ import { LiveAvatarMinutes as oe } from "./LiveAvatarMinutes.js";
12
+ import { useCallback as se, useEffect as a, useId as o, useLayoutEffect as ce, useRef as s, useState as c, useSyncExternalStore as le } from "react";
13
+ import { Volume2 as ue } from "lucide-react";
14
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
12
15
  //#region src/shared/assistant/avatar/live/LiveAvatarTabView.tsx
13
- var p = "mine", m = "paired", h = "speaker:", g = /-Chirp3-HD-([A-Za-z]+)$/;
14
- function _(e) {
15
- let n = g.exec(e)?.[1];
16
+ var d = "mine", f = "paired", p = "speaker:", m = /-Chirp3-HD-([A-Za-z]+)$/;
17
+ function de(e) {
18
+ let n = m.exec(e)?.[1];
16
19
  return n !== void 0 && t(n) ? n : e;
17
20
  }
18
- function v(e, t) {
21
+ function fe(e, t) {
19
22
  let n = t.find((e) => e.source === "hosted")?.lang;
20
- return n === void 0 ? null : r(e, n, t);
23
+ return n === void 0 ? null : i(e, n, t);
21
24
  }
22
- var y = "text-xs font-medium text-text-secondary", b = "text-xs text-text-muted", x = "focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong", S = `inline-flex min-h-11 w-full items-center justify-center gap-2 rounded-xl border border-border-default bg-bg-elevated px-4 text-sm font-medium text-text-primary transition-colors hover:bg-bg-raised aria-disabled:cursor-default aria-disabled:opacity-60 aria-disabled:hover:bg-bg-elevated ${x}`, ae = `inline-flex min-h-11 w-full items-center justify-center rounded-xl bg-action-primary-bg px-4 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg-hover aria-disabled:cursor-default aria-disabled:opacity-60 aria-disabled:hover:bg-action-primary-bg ${x}`, oe = "relative inline-flex min-h-11 min-w-0 max-w-full cursor-pointer items-center gap-2 rounded-full border ps-1.5 pe-4 text-sm font-medium transition-colors focus-within:ring-2 focus-within:ring-border-strong", se = "absolute inset-0 m-0 size-full cursor-pointer appearance-none rounded-full opacity-0", C = ({ controller: r, shown: g, voice: C, handsFreeOff: ce, leaveHintId: le, startVoiceRef: ue, askLine: w, avatarNames: de, avatarImages: fe, avatarVoices: pe, defaultAvatarVoiceMode: me, voiceStore: T, now: E = Date.now }) => {
23
- let D = n(), O = ee(), k = o(), he = o(), A = o(), j = o(), M = o(), N = s(null), P = l(r.subscribe, r.getSnapshot, r.getSnapshot), F = l(T.subscribe, T.getState, T.getState);
25
+ var h = "text-xs font-medium text-text-secondary", g = "text-xs text-text-muted", _ = "focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong", v = `inline-flex min-h-11 w-full items-center justify-center gap-2 rounded-xl border border-border-default bg-bg-elevated px-4 text-sm font-medium text-text-primary transition-colors hover:bg-bg-raised aria-disabled:cursor-default aria-disabled:opacity-60 aria-disabled:hover:bg-bg-elevated ${_}`, pe = `inline-flex min-h-11 w-full items-center justify-center rounded-xl bg-action-primary-bg px-4 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg-hover aria-disabled:cursor-default aria-disabled:opacity-60 aria-disabled:hover:bg-action-primary-bg ${_}`, me = "relative inline-flex min-h-11 min-w-0 max-w-full cursor-pointer items-center gap-2 rounded-full border ps-1.5 pe-4 text-sm font-medium transition-colors focus-within:ring-2 focus-within:ring-border-strong", he = "absolute inset-0 m-0 size-full cursor-pointer appearance-none rounded-full opacity-0", y = ({ controller: i, shown: m, voice: y, handsFreeOff: ge, leaveHintId: _e, startVoiceRef: ve, askLine: b, avatarNames: ye, avatarImages: be, avatarVoices: xe, defaultAvatarVoiceMode: Se, voiceStore: x, now: S = Date.now, navigate: Ce, minutesPurchase: we }) => {
26
+ let C = n(), w = ee(), T = o(), Te = o(), E = o(), D = o(), O = o(), k = o(), Ee = o(), A = s(null), j = le(i.subscribe, i.getSnapshot, i.getSnapshot), M = le(x.subscribe, x.getState, x.getState);
24
27
  a(() => {
25
- if (g) return r.setStageMounted(!0), () => r.setStageMounted(!1);
26
- }, [r, g]), a(() => {
27
- let e = r.getSnapshot();
28
- e.phase === "off" && e.avatars.length === 0 && r.requestOn({ start: !1 });
29
- }, [r]);
30
- let { phase: I } = P, L = I === "starting" || I === "connecting" || I === "ready" || I === "ending", [R, z] = c(!1);
31
- R && (I === "off" || I === "choosing" || I === "ready" || I === "ending") && z(!1);
32
- let B = E(), V = P.retryAt !== null && P.retryAt > B, H = ne(P, D, B), U = P.selectedAvatarId, W = (e) => {
33
- let t = P.avatars.indexOf(e);
34
- return de?.[e] ?? (t === -1 ? D.chooserNone : `${D.chooserLabel} ${t + 1}`);
35
- }, G = I === "ready" ? { kind: "turn-off" } : I === "ending" ? { kind: "ending" } : R || I === "starting" || I === "connecting" ? { kind: "starting" } : P.offered ? {
28
+ if (m) return i.setStageMounted(!0), () => i.setStageMounted(!1);
29
+ }, [i, m]), a(() => {
30
+ let e = i.getSnapshot();
31
+ e.phase === "off" && e.avatars.length === 0 && i.requestOn({ start: !1 });
32
+ }, [i]);
33
+ let { phase: N } = j, P = N === "starting" || N === "connecting" || N === "ready" || N === "ending", [De, F] = c(!1);
34
+ De && (N === "off" || N === "choosing" || N === "ready" || N === "ending") && F(!1);
35
+ let I = S(), L = j.retryAt !== null && j.retryAt > I, R = ae(j, C, I), Oe = re(j), z = ie(j, I), B = z && R !== null, V = j.selectedAvatarId, H = (e) => {
36
+ let t = j.avatars.indexOf(e);
37
+ return ye?.[e] ?? (t === -1 ? C.chooserNone : `${C.chooserLabel} ${t + 1}`);
38
+ }, U = N === "ready" ? { kind: "turn-off" } : N === "ending" ? { kind: "ending" } : De || N === "starting" || N === "connecting" ? { kind: "starting" } : j.offered ? {
36
39
  kind: "turn-on",
37
- ready: !V && U !== null && (I === "choosing" || I === "off" && P.avatars.includes(U))
38
- } : null, K = s(null), ge = G?.kind === "turn-off";
39
- ie(() => {
40
- K.current = ge ? E() : null;
41
- }, [ge, E]);
42
- let _e = i((e) => {
40
+ ready: !L && !z && V !== null && (N === "choosing" || N === "off" && j.avatars.includes(V))
41
+ } : null, W = s(null), G = U?.kind === "turn-off";
42
+ ce(() => {
43
+ W.current = G ? S() : null;
44
+ }, [G, S]);
45
+ let ke = se((e) => {
43
46
  if (e !== null) return () => {
44
- e.ownerDocument.activeElement === e && N.current?.focus();
47
+ e.ownerDocument.activeElement === e && A.current?.focus();
45
48
  };
46
- }, []), ve = () => {
47
- if (G !== null) switch (G.kind) {
48
- case "turn-on":
49
- if (!G.ready || U === null) {
50
- V && r.recheckRetry();
49
+ }, []), Ae = () => {
50
+ if (U !== null) switch (U.kind) {
51
+ case "turn-on": {
52
+ if (!U.ready || V === null) {
53
+ (L || j.retryAt !== null) && i.recheckRetry();
51
54
  return;
52
55
  }
53
- z(!0), I === "choosing" ? r.confirm() : r.requestOn({
56
+ F(!0);
57
+ let e = ne(j.minutes)?.problem;
58
+ if (N === "choosing" && !(e === "minutes-in-use" || e === "minutes-in-use-self")) {
59
+ i.confirm();
60
+ return;
61
+ }
62
+ N === "choosing" && i.cancelChoice(), i.requestOn({
54
63
  start: !0,
55
- avatarId: U
64
+ avatarId: V
56
65
  });
57
66
  return;
67
+ }
58
68
  case "turn-off": {
59
- let e = K.current;
60
- if (e !== null && E() - e < 1e3) return;
61
- r.switchOff();
69
+ let e = W.current;
70
+ if (e !== null && S() - e < 1e3) return;
71
+ i.switchOff();
62
72
  return;
63
73
  }
64
74
  case "starting":
65
75
  case "ending": return;
66
76
  }
67
- }, ye = te(F, me), q = U === null ? null : pe.get(U) ?? null, J = ye === "speaker" && F.avatarSpeaker !== null ? `${h}${F.avatarSpeaker}` : ye === "paired" && q !== null ? m : p, be = J === m ? q : J.startsWith(h) ? F.avatarSpeaker : null, Y = J === p ? O.activeVoiceName : be === null ? null : v(be, O.voiceChoices)?.name ?? null, xe = O.speakingMessageId !== null || O.spokenChunks !== null, Se = Y !== null && !C.live && !xe, Ce = O.activeVoiceName ? D.voiceModeMineNamed(_(O.activeVoiceName)) : D.voiceModeMine, we = (e) => {
68
- if (e === p || e === m) {
69
- T.setVoiceMode(e);
77
+ }, K = te(M, Se), q = V === null ? null : xe.get(V) ?? null, J = K === "speaker" && M.avatarSpeaker !== null ? `${p}${M.avatarSpeaker}` : K === "paired" && q !== null ? f : d, je = J === f ? q : J.startsWith(p) ? M.avatarSpeaker : null, Y = J === d ? w.activeVoiceName : je === null ? null : fe(je, w.voiceChoices)?.name ?? null, Me = w.speakingMessageId !== null || w.spokenChunks !== null, Ne = Y !== null && !y.live && !Me, Pe = w.activeVoiceName ? C.voiceModeMineNamed(de(w.activeVoiceName)) : C.voiceModeMine, Fe = (e) => {
78
+ if (e === d || e === f) {
79
+ x.setVoiceMode(e);
70
80
  return;
71
81
  }
72
82
  let n = e.slice(8);
73
- e.startsWith(h) && t(n) && T.setAvatarSpeaker(n);
74
- }, Te = I === "ending" ? D.stateEnding : I === "connecting" || I === "ready" ? D.stageWaiting : I === "starting" ? D.stateStarting : D.stateOff, [Ee, De] = c(() => /* @__PURE__ */ new Set()), Oe = i((e) => {
75
- De((t) => t.has(e) ? t : new Set(t).add(e));
76
- }, []), ke = (e) => {
77
- let t = fe?.get(e);
78
- return t === void 0 || Ee.has(t) ? null : t;
79
- }, X = !L && U !== null ? ke(U) : null, Z = L ? null : w === void 0 ? C.impossible ? D.askNeedsVoice : null : w === "by-typing" ? D.askByTyping : w === "needs-voice" ? D.askNeedsVoice : w === "nothing" ? D.askNothing : null, Ae = I === "off" && P.avatars.length === 0 && P.offered, [Q, je] = c(!1), $ = Ae && (Q || P.problem !== null);
80
- return $ !== Q && je($), /* @__PURE__ */ f("div", {
81
- ref: N,
83
+ e.startsWith(p) && t(n) && x.setAvatarSpeaker(n);
84
+ }, Ie = N === "ending" ? C.stateEnding : N === "connecting" || N === "ready" ? C.stageWaiting : N === "starting" ? C.stateStarting : C.stateOff, [Le, Re] = c(() => /* @__PURE__ */ new Set()), ze = se((e) => {
85
+ Re((t) => t.has(e) ? t : new Set(t).add(e));
86
+ }, []), Be = (e) => {
87
+ let t = be?.get(e);
88
+ return t === void 0 || Le.has(t) ? null : t;
89
+ }, X = !P && V !== null ? Be(V) : null, Z = P ? null : b === void 0 ? y.impossible ? C.askNeedsVoice : null : b === "by-typing" ? C.askByTyping : b === "needs-voice" ? C.askNeedsVoice : b === "nothing" ? C.askNothing : null, Ve = N === "off" && j.avatars.length === 0 && j.offered, [Q, He] = c(!1), $ = Ve && (Q || j.problem !== null);
90
+ return $ !== Q && He($), /* @__PURE__ */ u("div", {
91
+ ref: A,
82
92
  tabIndex: -1,
83
93
  className: "flex min-h-full shrink-0 flex-col gap-3 focus:outline-none",
84
94
  "data-testid": "assistant-avatar-tab-view",
85
95
  children: [
86
- /* @__PURE__ */ d("div", {
96
+ /* @__PURE__ */ l("div", {
87
97
  className: "flex max-h-80 min-h-[7.5rem] grow basis-30 justify-center",
88
- children: /* @__PURE__ */ f("div", {
98
+ children: /* @__PURE__ */ u("div", {
89
99
  className: "relative aspect-square h-full max-w-full overflow-hidden rounded-2xl border border-border-subtle bg-bg-sunken",
90
100
  "data-testid": "assistant-avatar-tab-frame",
91
- "data-phase": I,
101
+ "data-phase": N,
92
102
  children: [
93
- L ? /* @__PURE__ */ d("video", {
94
- ref: r.attachVideo,
95
- className: `size-full object-cover ${P.videoReady ? "" : "invisible"}`,
96
- "aria-label": D.stageLabel,
103
+ P ? /* @__PURE__ */ l("video", {
104
+ ref: i.attachVideo,
105
+ className: `size-full object-cover ${j.videoReady ? "" : "invisible"}`,
106
+ "aria-label": C.stageLabel,
97
107
  autoPlay: !0,
98
108
  muted: !0,
99
109
  playsInline: !0,
100
110
  "data-testid": "assistant-avatar-tab-video"
101
111
  }) : null,
102
- X !== null && U !== null ? /* @__PURE__ */ d(re, {
112
+ X !== null && V !== null ? /* @__PURE__ */ l(r, {
103
113
  size: "frame",
104
- name: W(U),
114
+ name: H(V),
105
115
  src: X,
106
- onError: Oe
116
+ onError: ze
107
117
  }) : null,
108
- L && P.videoReady ? null : /* @__PURE__ */ d("p", {
118
+ P && j.videoReady ? null : /* @__PURE__ */ l("p", {
109
119
  className: X === null ? "absolute inset-0 flex items-center justify-center p-3 text-center text-sm text-text-secondary" : "absolute inset-x-0 bottom-0 bg-bg-elevated/90 px-3 py-1.5 text-center text-xs text-text-secondary",
110
120
  "data-testid": "assistant-avatar-tab-frame-text",
111
- children: Te
121
+ children: Ie
112
122
  }),
113
- P.audioBlocked ? /* @__PURE__ */ f("button", {
123
+ j.audioBlocked ? /* @__PURE__ */ u("button", {
114
124
  type: "button",
115
- onClick: () => r.resumeAudio(),
116
- className: `absolute inset-x-2 bottom-2 inline-flex min-h-11 items-center justify-center gap-1.5 rounded-xl bg-bg-elevated px-3 text-xs font-medium text-text-primary ${x}`,
125
+ onClick: () => i.resumeAudio(),
126
+ className: `absolute inset-x-2 bottom-2 inline-flex min-h-11 items-center justify-center gap-1.5 rounded-xl bg-bg-elevated px-3 text-xs font-medium text-text-primary ${_}`,
117
127
  "data-testid": "assistant-avatar-tab-sound",
118
- children: [/* @__PURE__ */ d(u, {
128
+ children: [/* @__PURE__ */ l(ue, {
119
129
  className: "size-4 shrink-0",
120
130
  "aria-hidden": "true"
121
- }), /* @__PURE__ */ d("span", { children: D.problem("playback-blocked") })]
131
+ }), /* @__PURE__ */ l("span", { children: C.problem("playback-blocked") })]
122
132
  }) : null
123
133
  ]
124
134
  })
125
135
  }),
126
- /* @__PURE__ */ d("p", {
127
- className: H === null ? "sr-only" : "text-center text-sm text-text-secondary",
136
+ /* @__PURE__ */ l("p", {
137
+ id: B ? Ee : void 0,
138
+ className: R === null ? "sr-only" : "text-center text-sm text-text-secondary",
128
139
  role: "status",
129
140
  "data-testid": "assistant-avatar-tab-status",
130
- children: H ?? ""
141
+ children: R ?? ""
131
142
  }),
132
- P.avatars.length > 1 && !L ? /* @__PURE__ */ f("fieldset", {
143
+ j.avatars.length > 1 && !P ? /* @__PURE__ */ u("fieldset", {
133
144
  className: "flex min-w-0 flex-col gap-1.5",
134
145
  "data-testid": "assistant-avatar-tab-chooser",
135
- children: [/* @__PURE__ */ d("legend", {
136
- className: y,
137
- children: D.chooserTitle
138
- }), /* @__PURE__ */ d("div", {
146
+ children: [/* @__PURE__ */ l("legend", {
147
+ className: h,
148
+ children: C.chooserTitle
149
+ }), /* @__PURE__ */ l("div", {
139
150
  className: "flex flex-wrap gap-2",
140
- children: P.avatars.map((e) => {
141
- let t = e === U, n = W(e);
142
- return /* @__PURE__ */ f("label", {
143
- className: `${oe} ${t ? "border-transparent bg-action-primary-bg text-action-primary-text" : "border-border-default bg-bg-elevated text-text-secondary hover:bg-bg-raised hover:text-text-primary"}`,
144
- title: t ? D.chooserSelected(n) : D.chooserOption(n),
151
+ children: j.avatars.map((e) => {
152
+ let t = e === V, n = H(e);
153
+ return /* @__PURE__ */ u("label", {
154
+ className: `${me} ${t ? "border-transparent bg-action-primary-bg text-action-primary-text" : "border-border-default bg-bg-elevated text-text-secondary hover:bg-bg-raised hover:text-text-primary"}`,
155
+ title: t ? C.chooserSelected(n) : C.chooserOption(n),
145
156
  children: [
146
- /* @__PURE__ */ d("input", {
157
+ /* @__PURE__ */ l("input", {
147
158
  type: "radio",
148
- name: he,
159
+ name: Te,
149
160
  value: e,
150
161
  checked: t,
151
- onChange: () => r.selectAvatar(e),
152
- className: se,
162
+ onChange: () => i.selectAvatar(e),
163
+ className: he,
153
164
  "data-avatar-id": e
154
165
  }),
155
- /* @__PURE__ */ d(re, {
166
+ /* @__PURE__ */ l(r, {
156
167
  size: "pill",
157
168
  name: n,
158
- src: ke(e),
169
+ src: Be(e),
159
170
  selected: t,
160
- onError: Oe
171
+ onError: ze
161
172
  }),
162
- /* @__PURE__ */ d("span", {
173
+ /* @__PURE__ */ l("span", {
163
174
  className: "truncate",
164
175
  children: n
165
176
  })
@@ -167,142 +178,155 @@ var y = "text-xs font-medium text-text-secondary", b = "text-xs text-text-muted"
167
178
  }, e);
168
179
  })
169
180
  })]
170
- }) : P.avatars.length > 0 && U !== null ? /* @__PURE__ */ f("div", {
181
+ }) : j.avatars.length > 0 && V !== null ? /* @__PURE__ */ u("div", {
171
182
  className: "flex flex-col gap-0.5",
172
183
  "data-testid": "assistant-avatar-tab-chosen",
173
- children: [/* @__PURE__ */ f("p", {
184
+ children: [/* @__PURE__ */ u("p", {
174
185
  className: "flex min-w-0 items-baseline gap-2 text-sm",
175
- children: [/* @__PURE__ */ d("span", {
176
- className: y,
177
- children: D.chooserLabel
178
- }), /* @__PURE__ */ d("span", {
186
+ children: [/* @__PURE__ */ l("span", {
187
+ className: h,
188
+ children: C.chooserLabel
189
+ }), /* @__PURE__ */ l("span", {
179
190
  className: "truncate text-text-primary",
180
- children: W(U)
191
+ children: H(V)
181
192
  })]
182
- }), L && P.avatars.length > 1 ? /* @__PURE__ */ d("p", {
183
- className: b,
184
- children: D.chooserLocked
193
+ }), P && j.avatars.length > 1 ? /* @__PURE__ */ l("p", {
194
+ className: g,
195
+ children: C.chooserLocked
185
196
  }) : null]
186
- }) : I === "choosing" ? /* @__PURE__ */ d("p", {
187
- className: b,
197
+ }) : N === "choosing" ? /* @__PURE__ */ l("p", {
198
+ className: g,
188
199
  "data-testid": "assistant-avatar-tab-empty",
189
- children: D.chooserEmpty
200
+ children: C.chooserEmpty
190
201
  }) : null,
191
- /* @__PURE__ */ f("div", {
202
+ /* @__PURE__ */ u("div", {
192
203
  className: "flex flex-col gap-1",
193
204
  children: [
194
- /* @__PURE__ */ d("label", {
195
- htmlFor: A,
196
- className: y,
197
- children: D.voiceModeLabel
205
+ /* @__PURE__ */ l("label", {
206
+ htmlFor: E,
207
+ className: h,
208
+ children: C.voiceModeLabel
198
209
  }),
199
- /* @__PURE__ */ f("div", {
210
+ /* @__PURE__ */ u("div", {
200
211
  className: "flex items-center gap-2",
201
- children: [/* @__PURE__ */ f("select", {
202
- id: A,
212
+ children: [/* @__PURE__ */ u("select", {
213
+ id: E,
203
214
  value: J,
204
- onChange: (e) => we(e.target.value),
205
- "aria-describedby": j,
206
- className: `min-h-11 min-w-0 flex-1 rounded-xl border border-border-default bg-bg-elevated px-3 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary ${x}`,
215
+ onChange: (e) => Fe(e.target.value),
216
+ "aria-describedby": D,
217
+ className: `min-h-11 min-w-0 flex-1 rounded-xl border border-border-default bg-bg-elevated px-3 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary ${_}`,
207
218
  "data-testid": "assistant-avatar-tab-voice",
208
219
  children: [
209
- /* @__PURE__ */ d("option", {
210
- value: p,
211
- children: Ce
220
+ /* @__PURE__ */ l("option", {
221
+ value: d,
222
+ children: Pe
212
223
  }),
213
- q === null ? null : /* @__PURE__ */ d("option", {
214
- value: m,
215
- children: D.voiceModeDefaultNamed(q)
224
+ q === null ? null : /* @__PURE__ */ l("option", {
225
+ value: f,
226
+ children: C.voiceModeDefaultNamed(q)
216
227
  }),
217
- e.map((e) => /* @__PURE__ */ d("option", {
218
- value: `${h}${e}`,
228
+ e.map((e) => /* @__PURE__ */ l("option", {
229
+ value: `${p}${e}`,
219
230
  children: e
220
231
  }, e))
221
232
  ]
222
- }), /* @__PURE__ */ d("button", {
233
+ }), /* @__PURE__ */ l("button", {
223
234
  type: "button",
224
235
  onClick: () => {
225
- Se && Y !== null && O.previewVoice(Y);
236
+ Ne && Y !== null && w.previewVoice(Y);
226
237
  },
227
- "aria-disabled": !Se,
228
- "aria-label": D.hearVoice,
229
- title: D.hearVoice,
230
- className: `inline-flex size-11 shrink-0 items-center justify-center rounded-xl border border-border-default bg-bg-elevated text-text-secondary transition-colors hover:bg-bg-raised hover:text-text-primary aria-disabled:cursor-default aria-disabled:opacity-60 ${x}`,
238
+ "aria-disabled": !Ne,
239
+ "aria-label": C.hearVoice,
240
+ title: C.hearVoice,
241
+ className: `inline-flex size-11 shrink-0 items-center justify-center rounded-xl border border-border-default bg-bg-elevated text-text-secondary transition-colors hover:bg-bg-raised hover:text-text-primary aria-disabled:cursor-default aria-disabled:opacity-60 ${_}`,
231
242
  "data-testid": "assistant-avatar-tab-hear",
232
- children: /* @__PURE__ */ d(u, {
243
+ children: /* @__PURE__ */ l(ue, {
233
244
  className: "size-5",
234
245
  "aria-hidden": "true"
235
246
  })
236
247
  })]
237
248
  }),
238
- /* @__PURE__ */ d("p", {
239
- id: j,
240
- className: b,
241
- children: D.voiceModeHint
249
+ /* @__PURE__ */ l("p", {
250
+ id: D,
251
+ className: g,
252
+ children: C.voiceModeHint
242
253
  })
243
254
  ]
244
255
  }),
245
- L ? null : /* @__PURE__ */ d("p", {
246
- id: k,
256
+ Oe ? /* @__PURE__ */ l(oe, {
257
+ controller: i,
258
+ snapshot: j,
259
+ minutesPurchase: we,
260
+ navigate: Ce,
261
+ now: S,
262
+ textId: k,
263
+ viewRef: A
264
+ }) : null,
265
+ P ? null : /* @__PURE__ */ l("p", {
266
+ id: T,
247
267
  className: "text-xs text-text-secondary",
248
268
  "data-testid": "assistant-avatar-tab-disclosure",
249
- children: D.consent
269
+ children: C.consent
250
270
  }),
251
- G === null ? null : /* @__PURE__ */ d("button", {
252
- ref: _e,
271
+ U === null ? null : /* @__PURE__ */ l("button", {
272
+ ref: ke,
253
273
  type: "button",
254
- onClick: ve,
255
- "aria-disabled": G.kind === "turn-on" ? !G.ready : G.kind !== "turn-off",
256
- "aria-describedby": G.kind === "turn-on" ? k : void 0,
257
- className: G.kind === "turn-off" ? S : ae,
274
+ onClick: Ae,
275
+ "aria-disabled": U.kind === "turn-on" ? !U.ready : U.kind !== "turn-off",
276
+ "aria-describedby": U.kind === "turn-on" ? z ? [
277
+ T,
278
+ B ? Ee : null,
279
+ k
280
+ ].filter((e) => e !== null).join(" ") : T : void 0,
281
+ className: U.kind === "turn-off" ? v : pe,
258
282
  "data-testid": "assistant-avatar-tab-switch",
259
- "data-slot": G.kind,
260
- children: G.kind === "turn-off" ? D.stop : G.kind === "starting" ? D.turnOnStarting : G.kind === "ending" ? D.stateEnding : D.consentConfirm
283
+ "data-slot": U.kind,
284
+ children: U.kind === "turn-off" ? C.stop : U.kind === "starting" ? C.turnOnStarting : U.kind === "ending" ? C.stateEnding : C.consentConfirm
261
285
  }),
262
- $ ? /* @__PURE__ */ d("button", {
286
+ $ ? /* @__PURE__ */ l("button", {
263
287
  type: "button",
264
- onClick: () => r.requestOn({ start: !1 }),
265
- className: S,
288
+ onClick: () => i.requestOn({ start: !1 }),
289
+ className: v,
266
290
  "data-testid": "assistant-avatar-tab-retry",
267
- children: D.chooserRetry
291
+ children: C.chooserRetry
268
292
  }) : null,
269
- C.live ? null : /* @__PURE__ */ f("div", {
293
+ y.live ? null : /* @__PURE__ */ u("div", {
270
294
  className: "flex flex-col gap-1",
271
- children: [/* @__PURE__ */ d("button", {
272
- ref: ue,
295
+ children: [/* @__PURE__ */ l("button", {
296
+ ref: ve,
273
297
  type: "button",
274
298
  onClick: () => {
275
- C.blocked === null && C.start();
299
+ y.blocked === null && y.start();
276
300
  },
277
- "aria-disabled": C.blocked !== null,
278
- "aria-describedby": C.blocked === null ? void 0 : M,
279
- className: S,
301
+ "aria-disabled": y.blocked !== null,
302
+ "aria-describedby": y.blocked === null ? void 0 : O,
303
+ className: v,
280
304
  "data-testid": "assistant-avatar-tab-start-voice",
281
- children: D.startVoice
282
- }), C.blocked === null ? Z === null ? null : /* @__PURE__ */ d("p", {
283
- className: b,
305
+ children: C.startVoice
306
+ }), y.blocked === null ? Z === null ? null : /* @__PURE__ */ l("p", {
307
+ className: g,
284
308
  "data-testid": "assistant-avatar-tab-ask-note",
285
309
  children: Z
286
- }) : /* @__PURE__ */ d("p", {
287
- id: M,
288
- className: b,
310
+ }) : /* @__PURE__ */ l("p", {
311
+ id: O,
312
+ className: g,
289
313
  "data-testid": "assistant-avatar-tab-voice-blocked",
290
- children: Z === null ? C.blocked : `${C.blocked} ${Z}`
314
+ children: Z === null ? y.blocked : `${y.blocked} ${Z}`
291
315
  })]
292
316
  }),
293
- ce && !P.voiceLive ? /* @__PURE__ */ d("p", {
294
- className: b,
317
+ ge && !j.voiceLive ? /* @__PURE__ */ l("p", {
318
+ className: g,
295
319
  "data-testid": "assistant-avatar-tab-hands-free",
296
- children: D.handsFreeOff
320
+ children: C.handsFreeOff
297
321
  }) : null,
298
- L && !P.heldByVoice ? /* @__PURE__ */ d("p", {
299
- id: le,
300
- className: b,
322
+ P && !j.heldByVoice ? /* @__PURE__ */ l("p", {
323
+ id: _e,
324
+ className: g,
301
325
  "data-testid": "assistant-avatar-tab-leave-hint",
302
- children: D.tabLeaveHint
326
+ children: C.tabLeaveHint
303
327
  }) : null
304
328
  ]
305
329
  });
306
330
  };
307
331
  //#endregion
308
- export { C as LiveAvatarTabView, v as avatarPreviewVoice, _ as avatarVoiceDisplayName };
332
+ export { y as LiveAvatarTabView, fe as avatarPreviewVoice, de as avatarVoiceDisplayName };
@@ -19,6 +19,63 @@ export type AvatarAvailabilityReason = (typeof AVAILABILITY_REASONS)[number];
19
19
  */
20
20
  declare const BUDGET_SCOPES: readonly ["person", "workspace", "everyone"];
21
21
  export type AvatarBudgetScope = (typeof BUDGET_SCOPES)[number];
22
+ /** BOFF-9446: the only `minutes.version` this client reads (contract v2). A block of any other version reads as no block. */
23
+ export declare const AVATAR_MINUTES_CONTRACT_VERSION = 2;
24
+ /** BOFF-9446: the states of an availability `minutes` block. Any other value reads as no block. */
25
+ export declare const AVATAR_MINUTES_STATES: readonly ["AVAILABLE", "IN_USE", "EXHAUSTED", "UNAVAILABLE"];
26
+ export type AvatarMinutesState = (typeof AVATAR_MINUTES_STATES)[number];
27
+ /**
28
+ * BOFF-9446: why no credits are left for this person. `FREE_CEILING`: their free credits for the month are used (plan credits would
29
+ * still work); `ZERO_SESSION_LIMIT`: too many sessions today that charged nothing (a 402 only, until the next UTC midnight; a plan does
30
+ * not lift it); `NOT_INCLUDED`: this workspace has no avatar credits at all; `OWN_SESSION`: the credits left are held by this person's
31
+ * own session on another device (a block's IN_USE only). Any other value reads as none.
32
+ */
33
+ export declare const AVATAR_MINUTES_REASONS: readonly ["FREE_CEILING", "ZERO_SESSION_LIMIT", "NOT_INCLUDED", "OWN_SESSION"];
34
+ export type AvatarMinutesReason = (typeof AVATAR_MINUTES_REASONS)[number];
35
+ /**
36
+ * BOFF-9446: the balance of an AVAILABLE, IN_USE or EXHAUSTED block, the workspace's. Counts are whole credits (1 credit = 1 minute of
37
+ * avatar time), 0 or more.
38
+ */
39
+ export interface AvatarMinutesBalance {
40
+ /** Credits left for this person now: carried, then free within their ceiling, then plan. */
41
+ readonly availableMinutes: number;
42
+ /** Reserved by open sessions in the workspace. */
43
+ readonly heldMinutes: number;
44
+ /** The workspace's free credits each month; 0 without a free allowance. */
45
+ readonly freeMinutesPerMonth: number;
46
+ /** The workspace's free credits left this month, before the person's ceiling. */
47
+ readonly freeRemaining: number;
48
+ /** The credits the workspace's counted plans give each month, summed. */
49
+ readonly planMinutesPerMonth: number;
50
+ readonly planRemaining: number;
51
+ /** Credits given back by a full-session credit, still unused. */
52
+ readonly carriedRemaining: number;
53
+ /** The free credits one person may use each month, across workspaces; null while billing has the ceiling off. */
54
+ readonly personFreeCeiling: number | null;
55
+ /** This person's free credits left this month; null while billing has the ceiling off. */
56
+ readonly personFreeRemaining: number | null;
57
+ /** When the free and plan credits reset (the next 1st, 00:00 UTC), as UTC epoch milliseconds: shown as a UTC date, never local. */
58
+ readonly resetsAt: number;
59
+ /** A plan with more avatar credits exists for this app: display only (it offers "See plans"), never an entitlement. */
60
+ readonly morePlanCreditsAvailable: boolean;
61
+ }
62
+ /** BOFF-9446: the availability `minutes` block, as the client keeps it. */
63
+ export interface AvatarMinutes {
64
+ readonly state: AvatarMinutesState;
65
+ /** When the server gave one the client knows, where it may stand: OWN_SESSION with IN_USE, FREE_CEILING or NOT_INCLUDED with EXHAUSTED. */
66
+ readonly reason: AvatarMinutesReason | null;
67
+ /** With AVAILABLE, IN_USE and EXHAUSTED; null with UNAVAILABLE, which carries no numbers. */
68
+ readonly balance: AvatarMinutesBalance | null;
69
+ /** W, the seconds of the stale-presence margin the counting rules name (20 to 120); null when the answer had none in that range. */
70
+ readonly staleSeconds: number | null;
71
+ }
72
+ /** BOFF-9446: what a start answer says about the session's minutes (enforce only). */
73
+ export interface AvatarSessionMinutes {
74
+ /** The minutes reserved for this session, 1 or more. */
75
+ readonly reserved: number;
76
+ /** The session's length D' is shorter than the server's D: a session that reaches D' ends because its minutes ran out. */
77
+ readonly limitedByBalance: boolean;
78
+ }
22
79
  export interface AvatarAvailability {
23
80
  readonly available: boolean;
24
81
  readonly reason: AvatarAvailabilityReason | null;
@@ -28,6 +85,8 @@ export interface AvatarAvailability {
28
85
  readonly consentVersion: string;
29
86
  /** The server's session cap, D. */
30
87
  readonly maxSessionSeconds: number;
88
+ /** ★ BOFF-9446: the avatar-minutes block (enforce only). Absent when the answer had none, or none the client can read. */
89
+ readonly minutes?: AvatarMinutes;
31
90
  }
32
91
  export interface AvatarSessionStart {
33
92
  readonly sessionId: string;
@@ -40,6 +99,10 @@ export interface AvatarSessionStart {
40
99
  readonly connectBy: number;
41
100
  /** Wall-clock milliseconds: the server's hard end (create + D - 5 s). */
42
101
  readonly endsAt: number;
102
+ /** ★ BOFF-9446: D', this session's own length in seconds (enforce only): its hard end is create + D' - 5 s. */
103
+ readonly maxSessionSeconds?: number;
104
+ /** ★ BOFF-9446: the session's minutes (enforce only). */
105
+ readonly minutes?: AvatarSessionMinutes;
43
106
  }
44
107
  export type AvatarSessionState = 'starting' | 'ready' | 'ending' | 'ended' | 'failed' | 'canceled';
45
108
  export interface AvatarSessionStatus {
@@ -58,11 +121,15 @@ export declare class AvatarApiError extends Error {
58
121
  readonly retryAfterSeconds: number | null;
59
122
  /** On `budget_exhausted` only, whose budget the body names when it is one of the three we know; null in every other answer. */
60
123
  readonly scope: AvatarBudgetScope | null;
124
+ /** ★ BOFF-9446: on `minutes_exhausted` only, the body's reason when the client knows it; null otherwise. */
125
+ readonly minutesReason: AvatarMinutesReason | null;
61
126
  constructor(status: number,
62
127
  /** The server's or the gateway's code, `invalid_response` for a body we refused, `network` for no answer. */
63
128
  code: string, retryAfterSeconds: number | null,
64
129
  /** On `budget_exhausted` only, whose budget the body names when it is one of the three we know; null in every other answer. */
65
- scope?: AvatarBudgetScope | null);
130
+ scope?: AvatarBudgetScope | null,
131
+ /** ★ BOFF-9446: on `minutes_exhausted` only, the body's reason when the client knows it; null otherwise. */
132
+ minutesReason?: AvatarMinutesReason | null);
66
133
  }
67
134
  export interface AvatarSessionClientOptions {
68
135
  /** `https://<gateway>/api/avatar/v1` (avatarApiBaseFromTtsEndpoint). */
@@ -120,6 +187,8 @@ export interface AvatarRefusal {
120
187
  * Absent when it named none (today's server) and with every other refusal: the person is then told the general line.
121
188
  */
122
189
  readonly scope?: AvatarBudgetScope;
190
+ /** ★ BOFF-9446: with `minutes-exhausted`, the reason the server gave, when the client knows it. Absent otherwise. */
191
+ readonly minutesReason?: AvatarMinutesReason;
123
192
  }
124
193
  /**
125
194
  * The person's side of every failure (§3.4): the normal voice always continues; this says what to show. 404 means "not here" (the module
@@ -132,4 +201,11 @@ export declare function avatarRefusalFor(error: unknown): AvatarRefusal;
132
201
  * enabled, not permitted), or only not now when the gateway could not check the permission (`unavailable`): the toggle stays.
133
202
  */
134
203
  export declare function avatarAvailabilityRefusal(reason: AvatarAvailabilityReason | null): AvatarRefusal;
204
+ /**
205
+ * ★ BOFF-9446: what a minutes block means for a start, as the server's create would answer it: EXHAUSTED and IN_USE cannot start a
206
+ * session, so the person is told why instead of sending a create that would be refused (and, for IN_USE with OWN_SESSION, that would
207
+ * meet the person's own session on another device). AVAILABLE can, and UNAVAILABLE stays startable as the retry (the server decides).
208
+ * No block, today's answers: nothing in the way. Never a reason to hide, and no time (an availability answer carries no Retry-After).
209
+ */
210
+ export declare function avatarMinutesRefusal(minutes: AvatarMinutes | null | undefined): AvatarRefusal | null;
135
211
  export {};