@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.
- package/dist/chrome/FooterBar.d.ts +1 -1
- package/dist/chrome/NativePageTransition.d.ts +1 -1
- package/dist/chrome/ProductPickerSheet.js +42 -42
- package/dist/chrome/ProductSwitcher.d.ts +8 -0
- package/dist/chrome/ProductSwitcher.js +83 -72
- package/dist/chrome/index.d.ts +9 -9
- package/dist/chrome/swipe/swipeMath.d.ts +1 -1
- package/dist/shared/assistant/api.d.ts +3 -3
- package/dist/shared/assistant/appControls/grammar.d.ts +21 -21
- package/dist/shared/assistant/appControls/languageReply.d.ts +1 -1
- package/dist/shared/assistant/appControls/names.d.ts +3 -3
- package/dist/shared/assistant/appControls/pageAdapters.d.ts +5 -5
- package/dist/shared/assistant/appControls/plan.d.ts +38 -38
- package/dist/shared/assistant/appControls/types.d.ts +15 -15
- package/dist/shared/assistant/appControls/useAssistantControl.d.ts +1 -1
- package/dist/shared/assistant/attachmentSources.d.ts +2 -2
- package/dist/shared/assistant/attachments.d.ts +5 -5
- package/dist/shared/assistant/autoRouting.d.ts +6 -6
- package/dist/shared/assistant/avatar/live/LiveAvatarMinutes.d.ts +24 -0
- package/dist/shared/assistant/avatar/live/LiveAvatarMinutes.js +161 -0
- package/dist/shared/assistant/avatar/live/LiveAvatarStage.js +95 -73
- package/dist/shared/assistant/avatar/live/LiveAvatarTabView.d.ts +6 -0
- package/dist/shared/assistant/avatar/live/LiveAvatarTabView.js +195 -171
- package/dist/shared/assistant/avatar/live/avatarSessionClient.d.ts +77 -1
- package/dist/shared/assistant/avatar/live/avatarSessionClient.js +193 -72
- package/dist/shared/assistant/avatar/live/createLiveAvatarSeam.d.ts +14 -1
- package/dist/shared/assistant/avatar/live/createLiveAvatarSeam.js +65 -40
- package/dist/shared/assistant/avatar/live/liveAvatarController.d.ts +64 -2
- package/dist/shared/assistant/avatar/live/liveAvatarController.js +403 -242
- package/dist/shared/assistant/avatar/live/liveAvatarMinutesView.d.ts +127 -0
- package/dist/shared/assistant/avatar/live/liveAvatarMinutesView.js +168 -0
- package/dist/shared/assistant/avatar/live/liveAvatarStatus.d.ts +3 -0
- package/dist/shared/assistant/avatar/live/liveAvatarStatus.js +11 -7
- package/dist/shared/assistant/avatar/useAvatarCopy.d.ts +127 -2
- package/dist/shared/assistant/avatar/useAvatarCopy.js +116 -7
- package/dist/shared/assistant/conversation.d.ts +20 -20
- package/dist/shared/assistant/displayContent.d.ts +4 -4
- package/dist/shared/assistant/documentText.d.ts +3 -3
- package/dist/shared/assistant/exportConversation.d.ts +1 -1
- package/dist/shared/assistant/history/historyControls.d.ts +4 -4
- package/dist/shared/assistant/history/historyErrors.d.ts +3 -3
- package/dist/shared/assistant/history/historyList.d.ts +5 -5
- package/dist/shared/assistant/history/historyMerge.d.ts +4 -4
- package/dist/shared/assistant/history/historyOperations.d.ts +1 -1
- package/dist/shared/assistant/history/historySearch.d.ts +5 -5
- package/dist/shared/assistant/history/historyStatus.d.ts +1 -1
- package/dist/shared/assistant/history/historyTypes.d.ts +12 -12
- package/dist/shared/assistant/history/profileBoundStorage.d.ts +2 -2
- package/dist/shared/assistant/i18n.d.ts +1 -1
- package/dist/shared/assistant/i18nManifest.d.ts +566 -535
- package/dist/shared/assistant/i18nManifest.js +55 -24
- package/dist/shared/assistant/index.d.ts +2 -0
- package/dist/shared/assistant/liveDeltas.d.ts +1 -1
- package/dist/shared/assistant/liveOverlay.d.ts +1 -1
- package/dist/shared/assistant/localUiCommandCopy.d.ts +1 -1
- package/dist/shared/assistant/localUiCommands.d.ts +22 -22
- package/dist/shared/assistant/localeCommands/engine.d.ts +5 -5
- package/dist/shared/assistant/localeCommands/evaluate.d.ts +8 -8
- package/dist/shared/assistant/localeCommands/fold.d.ts +2 -2
- package/dist/shared/assistant/localeCommands/frames.d.ts +3 -3
- package/dist/shared/assistant/localeCommands/gate.d.ts +3 -3
- package/dist/shared/assistant/localeCommands/languageNames.d.ts +1 -1
- package/dist/shared/assistant/localeCommands/normalise.d.ts +1 -1
- package/dist/shared/assistant/localeCommands/types.d.ts +4 -4
- package/dist/shared/assistant/modeCapabilities.d.ts +1 -1
- package/dist/shared/assistant/modeCopy.d.ts +2 -2
- package/dist/shared/assistant/permissionError.d.ts +2 -2
- package/dist/shared/assistant/preview/surfaceState.d.ts +1 -1
- package/dist/shared/assistant/preview/types.d.ts +5 -5
- package/dist/shared/assistant/preview/writeActionResults.d.ts +1 -1
- package/dist/shared/assistant/prewarm.d.ts +5 -5
- package/dist/shared/assistant/quota.d.ts +2 -2
- package/dist/shared/assistant/sandboxReadiness.d.ts +2 -2
- package/dist/shared/assistant/speech/speechFeed.d.ts +3 -3
- package/dist/shared/assistant/turnOutcome.d.ts +2 -2
- package/dist/shared/assistant/turnProgress.d.ts +1 -1
- package/dist/shared/assistant/turnState.d.ts +1 -1
- package/dist/shared/assistant/turnStream.d.ts +3 -3
- package/dist/shared/assistant/turnTimeline.d.ts +13 -13
- package/dist/shared/assistant/turnTimingReport.d.ts +1 -1
- package/dist/shared/assistant/turnTimingReporter.d.ts +3 -3
- package/dist/shared/assistant/ui/AssistantAvatarTabs.d.ts +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.js +17 -17
- package/dist/shared/assistant/ui/AssistantHistoryNotices.d.ts +1 -1
- package/dist/shared/assistant/ui/AssistantMarkdownRenderer.d.ts +5 -2
- package/dist/shared/assistant/ui/AssistantToolActivity.d.ts +1 -1
- package/dist/shared/assistant/ui/AssistantUiOfferLink.d.ts +2 -2
- package/dist/shared/assistant/ui/AssistantWriteConfirmDialog.d.ts +3 -3
- package/dist/shared/assistant/ui/assistantLiveAvatarSeam.d.ts +10 -2
- package/dist/shared/assistant/ui/avatar/AssistantAvatarTab.js +78 -76
- package/dist/shared/assistant/ui/avatar/avatarAskGate.d.ts +2 -0
- package/dist/shared/assistant/ui/avatar/avatarAskGate.js +1 -0
- package/dist/shared/assistant/ui/composer/AssistantAttachmentButton.d.ts +1 -1
- package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.d.ts +1 -1
- package/dist/shared/assistant/ui/leaveConfirmFocus.d.ts +1 -1
- package/dist/shared/assistant/ui/leaveConfirmNavigate.d.ts +3 -3
- package/dist/shared/assistant/ui/panelOverlays.d.ts +5 -5
- package/dist/shared/assistant/ui/useVoiceSession.d.ts +5 -5
- package/dist/shared/assistant/ui/useWriteProposalConfirm.d.ts +4 -4
- package/dist/shared/assistant/ui/useWriteProposals.d.ts +2 -2
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +1 -1
- package/dist/shared/assistant/ui/voice/VoiceCaption.d.ts +1 -1
- package/dist/shared/assistant/ui/voice/VoiceWaveform.d.ts +1 -1
- package/dist/shared/assistant/ui/voice/voiceSessionEscape.d.ts +2 -2
- package/dist/shared/assistant/ui/voice/voiceStartGate.d.ts +6 -6
- package/dist/shared/assistant/ui/writeProposalPresentation.d.ts +1 -1
- package/dist/shared/assistant/uiActions/actOnResolve.d.ts +5 -5
- package/dist/shared/assistant/uiActions/assistantHref.d.ts +2 -2
- package/dist/shared/assistant/uiActions/backStack.d.ts +1 -1
- package/dist/shared/assistant/uiActions/deixis.d.ts +3 -3
- package/dist/shared/assistant/uiActions/entityRoutes.d.ts +1 -1
- package/dist/shared/assistant/uiActions/navigationOutcome.d.ts +8 -8
- package/dist/shared/assistant/uiActions/offerYesOnSurface.d.ts +1 -1
- package/dist/shared/assistant/uiActions/resolveTarget.d.ts +2 -2
- package/dist/shared/assistant/uiActions/uiOffers.d.ts +5 -5
- package/dist/shared/assistant/usageReporting.d.ts +2 -2
- package/dist/shared/assistant/useWorkspaceWriteAccess.d.ts +1 -1
- package/dist/shared/assistant/voice/affirmations.d.ts +1 -1
- package/dist/shared/assistant/voice/handsFree.d.ts +3 -3
- package/dist/shared/assistant/voice/handsfree/bargeIn.d.ts +5 -5
- package/dist/shared/assistant/voice/handsfree/echoGate.d.ts +6 -6
- package/dist/shared/assistant/voice/handsfree/handsFreeController.d.ts +7 -7
- package/dist/shared/assistant/voice/handsfree/handsFreeSetting.d.ts +2 -2
- package/dist/shared/assistant/voice/handsfree/micCapture.d.ts +1 -1
- package/dist/shared/assistant/voice/handsfree/playbackReference.d.ts +1 -1
- package/dist/shared/assistant/voice/handsfree/sttTransport.d.ts +3 -3
- package/dist/shared/assistant/voice/handsfree/useHandsFreeInterrupt.d.ts +4 -4
- package/dist/shared/assistant/voice/handsfree/vad.d.ts +1 -1
- package/dist/shared/assistant/voice/speechPlayback.d.ts +7 -7
- package/dist/shared/assistant/voice/useVoiceInput.d.ts +1 -1
- package/dist/shared/assistant/voice/voiceReopen.d.ts +8 -8
- package/dist/shared/assistant/writeConfirmSeam.d.ts +1 -1
- package/dist/shared/assistant/writeModeConsent.d.ts +7 -7
- package/dist/shared/assistant/writeProposalDiscovery.d.ts +3 -3
- package/dist/shared/assistant/writeProposalErrorCopy.d.ts +1 -1
- package/dist/shared/assistant/writeProposals.d.ts +23 -23
- package/dist/shared/assistant/writeReplyBinder.d.ts +11 -11
- package/dist/shared/assistant/writeReplySend.d.ts +7 -7
- package/dist/shared/components/LandingOrDashboardRedirect.d.ts +18 -3
- package/dist/shared/components/LandingOrDashboardRedirect.js +58 -28
- package/dist/shared/components/index.d.ts +2 -1
- package/dist/shared/events/index.d.ts +2 -1
- package/dist/shared/hooks/shell/globalSearchError.d.ts +2 -2
- package/dist/shared/navigation/productSwitchHandoff.d.ts +45 -0
- package/dist/shared/navigation/productSwitchHandoff.js +27 -0
- package/dist/shared/navigation/unsavedChanges.d.ts +1 -1
- package/dist/shared/utils/index.d.ts +3 -3
- package/dist/shared-assistant.js +227 -225
- package/dist/shared-components.js +7 -6
- package/dist/shared.js +71 -70
- 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 {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
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
|
|
14
|
-
function
|
|
15
|
-
let n =
|
|
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
|
|
21
|
+
function fe(e, t) {
|
|
19
22
|
let n = t.find((e) => e.source === "hosted")?.lang;
|
|
20
|
-
return n === void 0 ? null :
|
|
23
|
+
return n === void 0 ? null : i(e, n, t);
|
|
21
24
|
}
|
|
22
|
-
var
|
|
23
|
-
let
|
|
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 (
|
|
26
|
-
}, [
|
|
27
|
-
let e =
|
|
28
|
-
e.phase === "off" && e.avatars.length === 0 &&
|
|
29
|
-
}, [
|
|
30
|
-
let { phase:
|
|
31
|
-
|
|
32
|
-
let
|
|
33
|
-
let t =
|
|
34
|
-
return
|
|
35
|
-
},
|
|
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: !
|
|
38
|
-
} : null,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}, [
|
|
42
|
-
let
|
|
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 &&
|
|
47
|
+
e.ownerDocument.activeElement === e && A.current?.focus();
|
|
45
48
|
};
|
|
46
|
-
}, []),
|
|
47
|
-
if (
|
|
48
|
-
case "turn-on":
|
|
49
|
-
if (!
|
|
50
|
-
|
|
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
|
-
|
|
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:
|
|
64
|
+
avatarId: V
|
|
56
65
|
});
|
|
57
66
|
return;
|
|
67
|
+
}
|
|
58
68
|
case "turn-off": {
|
|
59
|
-
let e =
|
|
60
|
-
if (e !== null &&
|
|
61
|
-
|
|
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
|
-
},
|
|
68
|
-
if (e ===
|
|
69
|
-
|
|
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(
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
}, []),
|
|
77
|
-
let t =
|
|
78
|
-
return t === void 0 ||
|
|
79
|
-
}, X = !
|
|
80
|
-
return $ !== Q &&
|
|
81
|
-
ref:
|
|
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__ */
|
|
96
|
+
/* @__PURE__ */ l("div", {
|
|
87
97
|
className: "flex max-h-80 min-h-[7.5rem] grow basis-30 justify-center",
|
|
88
|
-
children: /* @__PURE__ */
|
|
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":
|
|
101
|
+
"data-phase": N,
|
|
92
102
|
children: [
|
|
93
|
-
|
|
94
|
-
ref:
|
|
95
|
-
className: `size-full object-cover ${
|
|
96
|
-
"aria-label":
|
|
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 &&
|
|
112
|
+
X !== null && V !== null ? /* @__PURE__ */ l(r, {
|
|
103
113
|
size: "frame",
|
|
104
|
-
name:
|
|
114
|
+
name: H(V),
|
|
105
115
|
src: X,
|
|
106
|
-
onError:
|
|
116
|
+
onError: ze
|
|
107
117
|
}) : null,
|
|
108
|
-
|
|
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:
|
|
121
|
+
children: Ie
|
|
112
122
|
}),
|
|
113
|
-
|
|
123
|
+
j.audioBlocked ? /* @__PURE__ */ u("button", {
|
|
114
124
|
type: "button",
|
|
115
|
-
onClick: () =>
|
|
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 ${
|
|
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__ */
|
|
128
|
+
children: [/* @__PURE__ */ l(ue, {
|
|
119
129
|
className: "size-4 shrink-0",
|
|
120
130
|
"aria-hidden": "true"
|
|
121
|
-
}), /* @__PURE__ */
|
|
131
|
+
}), /* @__PURE__ */ l("span", { children: C.problem("playback-blocked") })]
|
|
122
132
|
}) : null
|
|
123
133
|
]
|
|
124
134
|
})
|
|
125
135
|
}),
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
|
|
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:
|
|
141
|
+
children: R ?? ""
|
|
131
142
|
}),
|
|
132
|
-
|
|
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__ */
|
|
136
|
-
className:
|
|
137
|
-
children:
|
|
138
|
-
}), /* @__PURE__ */
|
|
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:
|
|
141
|
-
let t = e ===
|
|
142
|
-
return /* @__PURE__ */
|
|
143
|
-
className: `${
|
|
144
|
-
title: t ?
|
|
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__ */
|
|
157
|
+
/* @__PURE__ */ l("input", {
|
|
147
158
|
type: "radio",
|
|
148
|
-
name:
|
|
159
|
+
name: Te,
|
|
149
160
|
value: e,
|
|
150
161
|
checked: t,
|
|
151
|
-
onChange: () =>
|
|
152
|
-
className:
|
|
162
|
+
onChange: () => i.selectAvatar(e),
|
|
163
|
+
className: he,
|
|
153
164
|
"data-avatar-id": e
|
|
154
165
|
}),
|
|
155
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ l(r, {
|
|
156
167
|
size: "pill",
|
|
157
168
|
name: n,
|
|
158
|
-
src:
|
|
169
|
+
src: Be(e),
|
|
159
170
|
selected: t,
|
|
160
|
-
onError:
|
|
171
|
+
onError: ze
|
|
161
172
|
}),
|
|
162
|
-
/* @__PURE__ */
|
|
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
|
-
}) :
|
|
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__ */
|
|
184
|
+
children: [/* @__PURE__ */ u("p", {
|
|
174
185
|
className: "flex min-w-0 items-baseline gap-2 text-sm",
|
|
175
|
-
children: [/* @__PURE__ */
|
|
176
|
-
className:
|
|
177
|
-
children:
|
|
178
|
-
}), /* @__PURE__ */
|
|
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:
|
|
191
|
+
children: H(V)
|
|
181
192
|
})]
|
|
182
|
-
}),
|
|
183
|
-
className:
|
|
184
|
-
children:
|
|
193
|
+
}), P && j.avatars.length > 1 ? /* @__PURE__ */ l("p", {
|
|
194
|
+
className: g,
|
|
195
|
+
children: C.chooserLocked
|
|
185
196
|
}) : null]
|
|
186
|
-
}) :
|
|
187
|
-
className:
|
|
197
|
+
}) : N === "choosing" ? /* @__PURE__ */ l("p", {
|
|
198
|
+
className: g,
|
|
188
199
|
"data-testid": "assistant-avatar-tab-empty",
|
|
189
|
-
children:
|
|
200
|
+
children: C.chooserEmpty
|
|
190
201
|
}) : null,
|
|
191
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ u("div", {
|
|
192
203
|
className: "flex flex-col gap-1",
|
|
193
204
|
children: [
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
-
htmlFor:
|
|
196
|
-
className:
|
|
197
|
-
children:
|
|
205
|
+
/* @__PURE__ */ l("label", {
|
|
206
|
+
htmlFor: E,
|
|
207
|
+
className: h,
|
|
208
|
+
children: C.voiceModeLabel
|
|
198
209
|
}),
|
|
199
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ u("div", {
|
|
200
211
|
className: "flex items-center gap-2",
|
|
201
|
-
children: [/* @__PURE__ */
|
|
202
|
-
id:
|
|
212
|
+
children: [/* @__PURE__ */ u("select", {
|
|
213
|
+
id: E,
|
|
203
214
|
value: J,
|
|
204
|
-
onChange: (e) =>
|
|
205
|
-
"aria-describedby":
|
|
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 ${
|
|
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__ */
|
|
210
|
-
value:
|
|
211
|
-
children:
|
|
220
|
+
/* @__PURE__ */ l("option", {
|
|
221
|
+
value: d,
|
|
222
|
+
children: Pe
|
|
212
223
|
}),
|
|
213
|
-
q === null ? null : /* @__PURE__ */
|
|
214
|
-
value:
|
|
215
|
-
children:
|
|
224
|
+
q === null ? null : /* @__PURE__ */ l("option", {
|
|
225
|
+
value: f,
|
|
226
|
+
children: C.voiceModeDefaultNamed(q)
|
|
216
227
|
}),
|
|
217
|
-
e.map((e) => /* @__PURE__ */
|
|
218
|
-
value: `${
|
|
228
|
+
e.map((e) => /* @__PURE__ */ l("option", {
|
|
229
|
+
value: `${p}${e}`,
|
|
219
230
|
children: e
|
|
220
231
|
}, e))
|
|
221
232
|
]
|
|
222
|
-
}), /* @__PURE__ */
|
|
233
|
+
}), /* @__PURE__ */ l("button", {
|
|
223
234
|
type: "button",
|
|
224
235
|
onClick: () => {
|
|
225
|
-
|
|
236
|
+
Ne && Y !== null && w.previewVoice(Y);
|
|
226
237
|
},
|
|
227
|
-
"aria-disabled": !
|
|
228
|
-
"aria-label":
|
|
229
|
-
title:
|
|
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 ${
|
|
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__ */
|
|
243
|
+
children: /* @__PURE__ */ l(ue, {
|
|
233
244
|
className: "size-5",
|
|
234
245
|
"aria-hidden": "true"
|
|
235
246
|
})
|
|
236
247
|
})]
|
|
237
248
|
}),
|
|
238
|
-
/* @__PURE__ */
|
|
239
|
-
id:
|
|
240
|
-
className:
|
|
241
|
-
children:
|
|
249
|
+
/* @__PURE__ */ l("p", {
|
|
250
|
+
id: D,
|
|
251
|
+
className: g,
|
|
252
|
+
children: C.voiceModeHint
|
|
242
253
|
})
|
|
243
254
|
]
|
|
244
255
|
}),
|
|
245
|
-
|
|
246
|
-
|
|
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:
|
|
269
|
+
children: C.consent
|
|
250
270
|
}),
|
|
251
|
-
|
|
252
|
-
ref:
|
|
271
|
+
U === null ? null : /* @__PURE__ */ l("button", {
|
|
272
|
+
ref: ke,
|
|
253
273
|
type: "button",
|
|
254
|
-
onClick:
|
|
255
|
-
"aria-disabled":
|
|
256
|
-
"aria-describedby":
|
|
257
|
-
|
|
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":
|
|
260
|
-
children:
|
|
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__ */
|
|
286
|
+
$ ? /* @__PURE__ */ l("button", {
|
|
263
287
|
type: "button",
|
|
264
|
-
onClick: () =>
|
|
265
|
-
className:
|
|
288
|
+
onClick: () => i.requestOn({ start: !1 }),
|
|
289
|
+
className: v,
|
|
266
290
|
"data-testid": "assistant-avatar-tab-retry",
|
|
267
|
-
children:
|
|
291
|
+
children: C.chooserRetry
|
|
268
292
|
}) : null,
|
|
269
|
-
|
|
293
|
+
y.live ? null : /* @__PURE__ */ u("div", {
|
|
270
294
|
className: "flex flex-col gap-1",
|
|
271
|
-
children: [/* @__PURE__ */
|
|
272
|
-
ref:
|
|
295
|
+
children: [/* @__PURE__ */ l("button", {
|
|
296
|
+
ref: ve,
|
|
273
297
|
type: "button",
|
|
274
298
|
onClick: () => {
|
|
275
|
-
|
|
299
|
+
y.blocked === null && y.start();
|
|
276
300
|
},
|
|
277
|
-
"aria-disabled":
|
|
278
|
-
"aria-describedby":
|
|
279
|
-
className:
|
|
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:
|
|
282
|
-
}),
|
|
283
|
-
className:
|
|
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__ */
|
|
287
|
-
id:
|
|
288
|
-
className:
|
|
310
|
+
}) : /* @__PURE__ */ l("p", {
|
|
311
|
+
id: O,
|
|
312
|
+
className: g,
|
|
289
313
|
"data-testid": "assistant-avatar-tab-voice-blocked",
|
|
290
|
-
children: Z === null ?
|
|
314
|
+
children: Z === null ? y.blocked : `${y.blocked} ${Z}`
|
|
291
315
|
})]
|
|
292
316
|
}),
|
|
293
|
-
|
|
294
|
-
className:
|
|
317
|
+
ge && !j.voiceLive ? /* @__PURE__ */ l("p", {
|
|
318
|
+
className: g,
|
|
295
319
|
"data-testid": "assistant-avatar-tab-hands-free",
|
|
296
|
-
children:
|
|
320
|
+
children: C.handsFreeOff
|
|
297
321
|
}) : null,
|
|
298
|
-
|
|
299
|
-
id:
|
|
300
|
-
className:
|
|
322
|
+
P && !j.heldByVoice ? /* @__PURE__ */ l("p", {
|
|
323
|
+
id: _e,
|
|
324
|
+
className: g,
|
|
301
325
|
"data-testid": "assistant-avatar-tab-leave-hint",
|
|
302
|
-
children:
|
|
326
|
+
children: C.tabLeaveHint
|
|
303
327
|
}) : null
|
|
304
328
|
]
|
|
305
329
|
});
|
|
306
330
|
};
|
|
307
331
|
//#endregion
|
|
308
|
-
export {
|
|
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 {};
|