@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
|
@@ -28,11 +28,11 @@ export interface PrewarmInput {
|
|
|
28
28
|
/** The active conversation, if any. */
|
|
29
29
|
active?: {
|
|
30
30
|
mode: AssistantMode;
|
|
31
|
-
routedBy?:
|
|
31
|
+
routedBy?: 'auto';
|
|
32
32
|
} | undefined;
|
|
33
33
|
selectedMode: AssistantMode;
|
|
34
34
|
autoReadMode: AssistantMode;
|
|
35
|
-
modes: readonly Pick<AssistantModeConfig,
|
|
35
|
+
modes: readonly Pick<AssistantModeConfig, 'id' | 'writeCapable' | 'requiresAdmin'>[];
|
|
36
36
|
acknowledgedWriteModes: readonly AssistantMode[];
|
|
37
37
|
/** The role check that admin-only modes wait on (`adminModeAccessGate`). */
|
|
38
38
|
adminAccess: {
|
|
@@ -95,7 +95,7 @@ export interface WarmOutcome {
|
|
|
95
95
|
}
|
|
96
96
|
/** Thrown inside a warm to stop it where it stands. Never surfaces. */
|
|
97
97
|
export declare class WarmCancelled extends Error {
|
|
98
|
-
constructor(reason:
|
|
98
|
+
constructor(reason: 'cancelled' | 'no-create');
|
|
99
99
|
}
|
|
100
100
|
export interface WarmHandle {
|
|
101
101
|
readonly workspaceId: string;
|
|
@@ -126,7 +126,7 @@ export interface WarmHandle {
|
|
|
126
126
|
finish(outcome: WarmOutcome): void;
|
|
127
127
|
}
|
|
128
128
|
/** This workspace's warm state, shaped for `prewarmTarget`. */
|
|
129
|
-
export declare function warmState(workspaceId: string): Pick<PrewarmInput,
|
|
129
|
+
export declare function warmState(workspaceId: string): Pick<PrewarmInput, 'warming' | 'lastPrewarmAt' | 'unusedCreates'>;
|
|
130
130
|
/** Register a warm. The caller must have checked `prewarmTarget` first. */
|
|
131
131
|
export declare function startWarm(workspaceId: string, plan: PrewarmPlan, now: number): WarmHandle;
|
|
132
132
|
/** What a send learned from settling a warm (see `settleWarmBeforeSend`). */
|
|
@@ -136,7 +136,7 @@ export interface WarmSettlement {
|
|
|
136
136
|
* waited for one that failed (the wait still cost it); null — neither: no
|
|
137
137
|
* warm, a cancelled one, or one that only probed or trusted a proof.
|
|
138
138
|
*/
|
|
139
|
-
joined:
|
|
139
|
+
joined: 'joined' | 'joinedFailed' | null;
|
|
140
140
|
/**
|
|
141
141
|
* The send waited on a live warm in its mode, whatever that warm did. Such
|
|
142
142
|
* a warm did not finish ahead of the send, so it is never a `hit`.
|
|
@@ -40,7 +40,7 @@ export declare function isQuotaExhaustedError(error: unknown): boolean;
|
|
|
40
40
|
* covers this" would otherwise be reported to a farmer as "you have reached your limit". The
|
|
41
41
|
* daily limit is a 429 too (the svc's prompt-async refusal), and a 402 or 429 `turnTerminal`.
|
|
42
42
|
*/
|
|
43
|
-
export type QuotaRefusal =
|
|
43
|
+
export type QuotaRefusal = 'exhausted' | 'not-provisioned' | 'daily-limit';
|
|
44
44
|
/**
|
|
45
45
|
* Which refusal this is, or null when the error is not a quota wall at all.
|
|
46
46
|
*
|
|
@@ -102,7 +102,7 @@ export declare function extensionObjectsIn(error: unknown): Record<string, unkno
|
|
|
102
102
|
* the chat area already catches.
|
|
103
103
|
*/
|
|
104
104
|
export declare function describeQuotaError(error: unknown): QuotaRefusalDetail | null;
|
|
105
|
-
export type QuotaKind =
|
|
105
|
+
export type QuotaKind = 'sandbox' | 'ai-credits' | 'generic';
|
|
106
106
|
/**
|
|
107
107
|
* Event the assistant dispatches on a quota wall, namespaced by product.
|
|
108
108
|
*
|
|
@@ -68,7 +68,7 @@ export type ReadinessTracker = ReturnType<typeof createReadinessTracker>;
|
|
|
68
68
|
* - `reprobe` — anything else temporary: the gap the cache opened. Probe for
|
|
69
69
|
* real, as every turn did before the cache.
|
|
70
70
|
*/
|
|
71
|
-
export type TrustedSandboxFailurePlan =
|
|
71
|
+
export type TrustedSandboxFailurePlan = 'rethrow' | 'check-network' | 'replace' | 'reprobe';
|
|
72
72
|
export declare function planTrustedSandboxFailure(error: unknown, abandoned: boolean): TrustedSandboxFailurePlan;
|
|
73
73
|
/**
|
|
74
74
|
* A transport failure at session create: the person's network, or the
|
|
@@ -80,4 +80,4 @@ export declare function planTrustedSandboxFailure(error: unknown, abandoned: boo
|
|
|
80
80
|
* - the gateway answers (even with an error of its own) → `reprobe`: the
|
|
81
81
|
* network is up, so the sandbox hop is what failed.
|
|
82
82
|
*/
|
|
83
|
-
export declare function planAfterTransportFailure(askGateway: () => Promise<unknown>): Promise<
|
|
83
|
+
export declare function planAfterTransportFailure(askGateway: () => Promise<unknown>): Promise<'rethrow' | 'reprobe'>;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
export interface SpeechFeedItem {
|
|
28
28
|
/** The conversation the message belongs to. */
|
|
29
29
|
conversationId: string;
|
|
30
|
-
channel:
|
|
30
|
+
channel: 'voice' | 'chat';
|
|
31
31
|
/** The live voice session that asked, when `channel` is voice. */
|
|
32
32
|
voiceSessionId?: string | undefined;
|
|
33
33
|
/** The reply as `applyAssistantResponse` stores it (sanitised, markdown). */
|
|
@@ -38,11 +38,11 @@ export interface SpeechFeedItem {
|
|
|
38
38
|
final: true;
|
|
39
39
|
}
|
|
40
40
|
export type SpeechFeedEvent = {
|
|
41
|
-
type:
|
|
41
|
+
type: 'publish';
|
|
42
42
|
messageId: string;
|
|
43
43
|
item: SpeechFeedItem;
|
|
44
44
|
} | {
|
|
45
|
-
type:
|
|
45
|
+
type: 'abort';
|
|
46
46
|
messageId: string;
|
|
47
47
|
};
|
|
48
48
|
type Listener = (event: SpeechFeedEvent) => void;
|
|
@@ -3,7 +3,7 @@ import { TurnOutcomeCopyId } from './turnOutcomeCopy';
|
|
|
3
3
|
import { AssistantMode } from './types';
|
|
4
4
|
import { SandboxWriteCapabilities } from './writeProposals';
|
|
5
5
|
/** Why a send was refused before it reached the backend. */
|
|
6
|
-
export type SendRefusalReason =
|
|
6
|
+
export type SendRefusalReason = 'confirm-write-mode' | 'voice-in-write-mode' | 'mode-unavailable' | 'mode-admin-only' | 'mode-access-pending' | 'usage-not-permitted' | 'usage-not-recorded';
|
|
7
7
|
/**
|
|
8
8
|
* A send refused on the client, before it reached the backend: something must
|
|
9
9
|
* be confirmed, chosen or waited for first. Thrown instead of a bare `Error` so
|
|
@@ -13,7 +13,7 @@ export declare class AssistantSendRefusal extends Error {
|
|
|
13
13
|
readonly reason: SendRefusalReason;
|
|
14
14
|
constructor(reason: SendRefusalReason, message: string);
|
|
15
15
|
}
|
|
16
|
-
export type TurnOutcomeKind =
|
|
16
|
+
export type TurnOutcomeKind = 'usage' | 'permission' | 'confirmation' | 'temporary';
|
|
17
17
|
export interface TurnOutcome {
|
|
18
18
|
kind: TurnOutcomeKind;
|
|
19
19
|
/** The copy that says it. */
|
|
@@ -151,7 +151,7 @@ export declare const NO_FIRST_TEXT: FirstTextTracker;
|
|
|
151
151
|
* Not for `accumulateNarration` modes, where the narration IS the answer and
|
|
152
152
|
* its first appearance counts at once.
|
|
153
153
|
*/
|
|
154
|
-
export declare function trackFirstText(tracker: FirstTextTracker, progress: Pick<AssistantTurnProgress,
|
|
154
|
+
export declare function trackFirstText(tracker: FirstTextTracker, progress: Pick<AssistantTurnProgress, 'hasText' | 'messageId' | 'done'>, now: number): {
|
|
155
155
|
tracker: FirstTextTracker;
|
|
156
156
|
confirmedAt: number | null;
|
|
157
157
|
};
|
|
@@ -72,7 +72,7 @@ export declare function planAbandonedTurn(args: {
|
|
|
72
72
|
clearProcessing: boolean;
|
|
73
73
|
};
|
|
74
74
|
/** Why an abort was or was not sent. Carried so callers can log the near-miss. */
|
|
75
|
-
export type TurnAbortReason =
|
|
75
|
+
export type TurnAbortReason = 'send' | 'nothing-running' | 'superseded' | 'already-requested';
|
|
76
76
|
/**
|
|
77
77
|
* Should this cancellation actually be sent to the sandbox?
|
|
78
78
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LiveDeltaState } from './liveDeltas';
|
|
2
2
|
import { StreamAccess } from './types';
|
|
3
|
-
export type TurnStreamStatus =
|
|
4
|
-
export type WakeResult =
|
|
3
|
+
export type TurnStreamStatus = 'minting' | 'connecting' | 'open' | 'closed' | 'unavailable';
|
|
4
|
+
export type WakeResult = 'wake' | 'idle' | 'timeout' | 'abort';
|
|
5
5
|
/** The slice of the browser `EventSource` this client uses. */
|
|
6
6
|
export interface EventSourceLike {
|
|
7
7
|
readonly readyState: number;
|
|
@@ -11,7 +11,7 @@ export interface EventSourceLike {
|
|
|
11
11
|
close(): void;
|
|
12
12
|
}
|
|
13
13
|
/** The timeline marks the stream makes (`turnTimeline.ts`). */
|
|
14
|
-
export type TurnStreamMark =
|
|
14
|
+
export type TurnStreamMark = 'streamOpen' | 'streamIdle' | 'streamRemint';
|
|
15
15
|
export interface TurnStreamOptions {
|
|
16
16
|
/** Mint a stream URL, or null when there is none. Never throws into here. */
|
|
17
17
|
mint: () => Promise<StreamAccess | null>;
|
|
@@ -107,7 +107,7 @@ export type TurnMilestone = (typeof TURN_MILESTONES)[number];
|
|
|
107
107
|
* Written once the runtime is READY; while an attempt still waits out a boot
|
|
108
108
|
* it found, the `bootAdopted` mark says so.
|
|
109
109
|
*/
|
|
110
|
-
export type TurnRuntime =
|
|
110
|
+
export type TurnRuntime = 'warm' | 'preopened' | 'new-session' | 'probed' | 'adopted' | 'cold';
|
|
111
111
|
/**
|
|
112
112
|
* Counted as the person was SHOWN it (`classifyTurnFailure`):
|
|
113
113
|
* - `refused`: a usage wall, a permission refusal (server 403/429 included),
|
|
@@ -118,14 +118,14 @@ export type TurnRuntime = "warm" | "preopened" | "new-session" | "probed" | "ado
|
|
|
118
118
|
* Only `answered` turns carry `firstText`; a timed-out turn's unconfirmed text
|
|
119
119
|
* is not recorded.
|
|
120
120
|
*/
|
|
121
|
-
export type TurnTimelineOutcome =
|
|
121
|
+
export type TurnTimelineOutcome = 'answered' | 'timedOut' | 'refused' | 'failed' | 'stopped';
|
|
122
122
|
export interface TurnDimensions {
|
|
123
|
-
channel:
|
|
123
|
+
channel: 'chat' | 'voice';
|
|
124
124
|
mode: string;
|
|
125
125
|
product: string;
|
|
126
126
|
/** The reply language the turn asked for. */
|
|
127
127
|
language: string;
|
|
128
|
-
device:
|
|
128
|
+
device: 'touch' | 'pointer' | 'unknown';
|
|
129
129
|
/** Auto chose the mode (an Auto escalation can cost a cold start). */
|
|
130
130
|
routedByAuto: boolean;
|
|
131
131
|
}
|
|
@@ -151,17 +151,17 @@ export interface TurnAttemptFacts {
|
|
|
151
151
|
* Written when the warm SETTLES; while the send still waits on its boot,
|
|
152
152
|
* the `prewarmJoined` mark says so.
|
|
153
153
|
*/
|
|
154
|
-
prewarm?:
|
|
154
|
+
prewarm?: 'hit' | 'joined' | 'joinedFailed';
|
|
155
155
|
/**
|
|
156
156
|
* BOFF-7914 S3: how this attempt learnt about the reply — `sse` when the turn
|
|
157
157
|
* stream reached `open`, else `poll`. Timeline-only; the production latency
|
|
158
158
|
* report builds from an allowlist and does not carry it (until S0b).
|
|
159
159
|
*/
|
|
160
|
-
transport?:
|
|
160
|
+
transport?: 'sse' | 'poll';
|
|
161
161
|
/** How much of the text the stream carried: all of it, some, or none. */
|
|
162
|
-
live?:
|
|
162
|
+
live?: 'full' | 'partial' | 'none';
|
|
163
163
|
/** The session: `reused`, `created` (new) or `preopened` (BOFF-8015). */
|
|
164
|
-
session?:
|
|
164
|
+
session?: 'reused' | 'created' | 'preopened';
|
|
165
165
|
}
|
|
166
166
|
export interface TurnAttempt extends TurnAttemptFacts {
|
|
167
167
|
at: Partial<Record<TurnMilestone, number>>;
|
|
@@ -177,7 +177,7 @@ export interface TurnTimeline extends TurnDimensions, TurnAttemptFacts {
|
|
|
177
177
|
outcome?: TurnTimelineOutcome;
|
|
178
178
|
}
|
|
179
179
|
/** Marks a voice turn brings with it, taken before the panel has an id for it. */
|
|
180
|
-
export type VoiceTurnTiming = Partial<Record<
|
|
180
|
+
export type VoiceTurnTiming = Partial<Record<'speechEnded' | 'graceStarted' | 'graceEnded' | 'handedOver', number>>;
|
|
181
181
|
/** Announced on `window` with a copy of the timeline each time it changes. */
|
|
182
182
|
export declare const TURN_TIMELINE_EVENT = "burdenoff:assistant-turn-timeline";
|
|
183
183
|
/** Receives a copy of a timeline each time it changes. */
|
|
@@ -192,7 +192,7 @@ export type TurnTimelineListener = (timeline: TurnTimeline) => void;
|
|
|
192
192
|
export declare function subscribeTurnTimelines(listener: TurnTimelineListener): () => void;
|
|
193
193
|
export declare function turnClockMs(): number;
|
|
194
194
|
/** Coarse pointer = a finger. The split the latency report needs, not a device model. */
|
|
195
|
-
export declare function detectTurnDevice(): TurnDimensions[
|
|
195
|
+
export declare function detectTurnDevice(): TurnDimensions['device'];
|
|
196
196
|
/**
|
|
197
197
|
* Start recording a turn. `carried` holds marks taken before the turn had an
|
|
198
198
|
* id — a voice turn's end of speech, end of grace and hand-over.
|
|
@@ -208,7 +208,7 @@ export declare function beginTurn(turnId: string, dimensions: TurnDimensions, ca
|
|
|
208
208
|
*/
|
|
209
209
|
export declare function markTurn(turnId: string, milestone: TurnMilestone, at?: number): void;
|
|
210
210
|
/** Facts about the turn learnt along the way. The first answer to each stands. */
|
|
211
|
-
export declare function describeTurn(turnId: string, facts: TurnAttemptFacts & Pick<TurnTimeline,
|
|
211
|
+
export declare function describeTurn(turnId: string, facts: TurnAttemptFacts & Pick<TurnTimeline, 'outcome'>): void;
|
|
212
212
|
/**
|
|
213
213
|
* The turn is starting over on a new runtime. File this attempt's marks and
|
|
214
214
|
* facts under `attempts`, stamped with when it ended, and clear them, so the
|
|
@@ -343,12 +343,12 @@ export declare const TURN_SEGMENTS: readonly [{
|
|
|
343
343
|
readonly from: "speechEnded";
|
|
344
344
|
readonly to: "firstAudio";
|
|
345
345
|
}];
|
|
346
|
-
export type TurnSegmentName = (typeof TURN_SEGMENTS)[number][
|
|
346
|
+
export type TurnSegmentName = (typeof TURN_SEGMENTS)[number]['name'];
|
|
347
347
|
/**
|
|
348
348
|
* A segment whose end came BEFORE its start is left out: it can only be a
|
|
349
349
|
* wiring fault, and a negative duration averaged in would hide the slow case.
|
|
350
350
|
*/
|
|
351
|
-
export declare function turnSegments(timeline: Pick<TurnTimeline,
|
|
351
|
+
export declare function turnSegments(timeline: Pick<TurnTimeline, 'at'>): Partial<Record<TurnSegmentName, number>>;
|
|
352
352
|
export interface SegmentStats {
|
|
353
353
|
n: number;
|
|
354
354
|
median: number;
|
|
@@ -26,7 +26,7 @@ export interface AssistantTurnTimingReport {
|
|
|
26
26
|
* - `final`: from the attempt that finished the turn;
|
|
27
27
|
* - `omit`: not reported — it describes one attempt's runtime, not the turn's.
|
|
28
28
|
*/
|
|
29
|
-
export type TurnTimingRetryRule =
|
|
29
|
+
export type TurnTimingRetryRule = 'earliest' | 'final' | 'omit';
|
|
30
30
|
/** Each operator stage, the timeline mark it is read from, and its retry rule. */
|
|
31
31
|
export declare const TURN_TIMING_STAGES: readonly [{
|
|
32
32
|
readonly field: "runtimeReadyMs";
|
|
@@ -27,12 +27,12 @@ export interface TurnTimingBatch {
|
|
|
27
27
|
* is gone; it is never re-sent.
|
|
28
28
|
*/
|
|
29
29
|
export type TurnTimingSendOutcome = {
|
|
30
|
-
kind:
|
|
30
|
+
kind: 'receipt';
|
|
31
31
|
receipt: AssistantTurnTimingsReceipt;
|
|
32
32
|
} | {
|
|
33
|
-
kind:
|
|
33
|
+
kind: 'unsupported';
|
|
34
34
|
} | {
|
|
35
|
-
kind:
|
|
35
|
+
kind: 'dropped';
|
|
36
36
|
};
|
|
37
37
|
export type TurnTimingSender = (batch: TurnTimingBatch) => Promise<TurnTimingSendOutcome>;
|
|
38
38
|
export declare const TURN_TIMING_REPORTING: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { LiveAvatarTabIds } from './assistantLiveAvatarSeam';
|
|
3
3
|
/** The two views of the panel when the live avatar offers its tab. */
|
|
4
|
-
export type AssistantPanelView =
|
|
4
|
+
export type AssistantPanelView = 'chat' | 'avatar';
|
|
5
5
|
export interface AssistantAvatarTabsProps {
|
|
6
6
|
readonly selected: AssistantPanelView;
|
|
7
7
|
readonly onSelect: (view: AssistantPanelView) => void;
|
|
@@ -31,10 +31,10 @@ import { resolveAssistantLanguage as $e } from "../voice/languages.js";
|
|
|
31
31
|
import { resolveLanguagePair as et } from "../voice/languagePair.js";
|
|
32
32
|
import { INITIAL_TRANSCRIPT_AUTO_OPEN as tt, isAwaitingOwnConversation as nt, maySendSpokenTurn as C, planTranscriptAutoOpen as rt, planVoiceSessionBinding as it, planVoiceSessionStart as at, planVoiceSpokenEntry as ot, voiceBindingAtStart as st, voiceBindingConversationId as ct } from "../voice/voiceReopen.js";
|
|
33
33
|
import { countInlineImageCandidates as lt, countInlinedImageParts as ut, largestInlineCharsPerFile as dt, resolveAssistantInlineLimits as ft, toMessageAttachment as pt } from "../attachments.js";
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
34
|
+
import { useAvatarCopy as mt } from "../avatar/useAvatarCopy.js";
|
|
35
|
+
import { WRITE_PROPOSAL_VOICE_COPY as ht, isVoiceProposalBound as gt, voiceProposalChip as _t, voiceProposalChipText as vt, voiceReadbacksDue as yt, voiceWaitingProposals as bt, writeProposalVoiceLine as xt, writeProposalVoiceReadback as St } from "../writeProposalVoice.js";
|
|
36
|
+
import { createAdminModeAccessGate as Ct, resolveAssistantSendModeAfterAccess as wt } from "../adminModeSendGate.js";
|
|
37
|
+
import { buildBoundedAttachmentTurn as Tt } from "../attachmentTurn.js";
|
|
38
38
|
import { attachmentUrlIsStale as Et, refreshStaleAttachmentUrls as Dt } from "../attachmentCommit.js";
|
|
39
39
|
import { VOICE_COMMIT_BUDGET_MS as Ot, settleAndCommitSpokenTurn as kt } from "../voiceCommit.js";
|
|
40
40
|
import { getOrganizationId as At, getWorkspaceId as w } from "../context.js";
|
|
@@ -126,7 +126,7 @@ function M() {
|
|
|
126
126
|
var Ei = () => () => {}, Di = () => "off", Oi = ({ visible: Oi = !0, writeAccess: ki = "unknown" }) => {
|
|
127
127
|
let N = a(), { product: P, modes: F, gatherPageContext: Ai, buildPrompt: ji, reportTurnTimings: Mi, reportTokenUsage: Ni, localUiCommands: Pi } = i(), I = De(i().writeApproval), Fi = E((e, t) => {
|
|
128
128
|
let n = _.getState(), r = t ?? n.sandboxesByMode[e]?.sandboxId ?? null;
|
|
129
|
-
return
|
|
129
|
+
return gt({
|
|
130
130
|
mode: e,
|
|
131
131
|
productWriteApproval: I,
|
|
132
132
|
capabilities: r ? n.sandboxWriteCapabilities[r] : null
|
|
@@ -158,7 +158,7 @@ var Ei = () => () => {}, Di = () => "off", Oi = ({ visible: Oi = !0, writeAccess
|
|
|
158
158
|
let e = window.setTimeout(() => Ma(Na), Ci);
|
|
159
159
|
return () => window.clearTimeout(e);
|
|
160
160
|
}, [Na]);
|
|
161
|
-
let { canUseApiCalls: Pa, loading: Fa } = _r(w(), R), Ia = k(
|
|
161
|
+
let { canUseApiCalls: Pa, loading: Fa } = _r(w(), R), Ia = k(Ct({
|
|
162
162
|
loading: Fa,
|
|
163
163
|
canUseAdminModes: Pa
|
|
164
164
|
})).current, La = k(F);
|
|
@@ -223,7 +223,7 @@ var Ei = () => () => {}, Di = () => "off", Oi = ({ visible: Oi = !0, writeAccess
|
|
|
223
223
|
}, [W]), fo = k({}), q = k(Sn()), J = k(new wr()), po = k(/* @__PURE__ */ new Set()), mo = O(() => F.find((e) => e.id === V), [F, V]), ho = _((e) => {
|
|
224
224
|
let t = e.sandboxesByMode[V]?.sandboxId;
|
|
225
225
|
return t ? e.sandboxWriteCapabilities[t] : void 0;
|
|
226
|
-
}), go = mo !== void 0 &&
|
|
226
|
+
}), go = mo !== void 0 && gt({
|
|
227
227
|
mode: V,
|
|
228
228
|
productWriteApproval: I,
|
|
229
229
|
capabilities: ho
|
|
@@ -1601,7 +1601,7 @@ var Ei = () => () => {}, Di = () => "off", Oi = ({ visible: Oi = !0, writeAccess
|
|
|
1601
1601
|
conversationId: v,
|
|
1602
1602
|
writeReply: ce === "proposal-v1" ? n.writeReplyBound?.writeReply ?? null : null,
|
|
1603
1603
|
...ue ? { uiCatalogue: ue } : {}
|
|
1604
|
-
}, { prompt: me, parts: he } =
|
|
1604
|
+
}, { prompt: me, parts: he } = Tt({
|
|
1605
1605
|
content: ie ? `${ie}${ae}` : ae,
|
|
1606
1606
|
attachments: t,
|
|
1607
1607
|
limits: ft(le),
|
|
@@ -1756,7 +1756,7 @@ var Ei = () => () => {}, Di = () => "off", Oi = ({ visible: Oi = !0, writeAccess
|
|
|
1756
1756
|
code: "UNAUTHENTICATED",
|
|
1757
1757
|
authFailure: "WORKSPACE_CONTEXT_MISSING"
|
|
1758
1758
|
} });
|
|
1759
|
-
let e = await
|
|
1759
|
+
let e = await wt(g, () => La.current.find((e) => e.id === g), Ia);
|
|
1760
1760
|
le = e.config, fe = e.capabilities;
|
|
1761
1761
|
let t = le, n = Ae();
|
|
1762
1762
|
if (n.abandon) {
|
|
@@ -2052,7 +2052,7 @@ var Ei = () => () => {}, Di = () => "off", Oi = ({ visible: Oi = !0, writeAccess
|
|
|
2052
2052
|
D(() => {
|
|
2053
2053
|
ws.current = rc;
|
|
2054
2054
|
}, [rc]);
|
|
2055
|
-
let ic = $.active, ac = O(() =>
|
|
2055
|
+
let ic = $.active, ac = O(() => bt(Object.values(xa), B, Sa), [
|
|
2056
2056
|
xa,
|
|
2057
2057
|
B,
|
|
2058
2058
|
Sa
|
|
@@ -2073,7 +2073,7 @@ var Ei = () => () => {}, Di = () => "off", Oi = ({ visible: Oi = !0, writeAccess
|
|
|
2073
2073
|
ac,
|
|
2074
2074
|
ba,
|
|
2075
2075
|
cc
|
|
2076
|
-
]), uc = ic ?
|
|
2076
|
+
]), uc = ic ? _t(ac) : null, dc = oc ? xa[oc] : void 0, fc = ic && dc && dc.session.conversationId === B ? {
|
|
2077
2077
|
content: /* @__PURE__ */ j(kn, {
|
|
2078
2078
|
refs: [{
|
|
2079
2079
|
proposalId: dc.view.proposalId,
|
|
@@ -2089,7 +2089,7 @@ var Ei = () => () => {}, Di = () => "off", Oi = ({ visible: Oi = !0, writeAccess
|
|
|
2089
2089
|
onReview: cc,
|
|
2090
2090
|
retiredSandboxes: Sa
|
|
2091
2091
|
}),
|
|
2092
|
-
closeLabel:
|
|
2092
|
+
closeLabel: xt(N, ht.trayClose),
|
|
2093
2093
|
onClose: () => sc(null)
|
|
2094
2094
|
} : null, pc = Ca.asking, mc = xs?.asking === !0, hc = Ss?.asking === !0, gc = er(), _c = $.holdListening;
|
|
2095
2095
|
r("assistant.transcript", O(() => ic || K ? null : { run: () => to ? { status: "already" } : (ao(!0), { status: "done" }) }, [
|
|
@@ -2121,15 +2121,15 @@ var Ei = () => () => {}, Di = () => "off", Oi = ({ visible: Oi = !0, writeAccess
|
|
|
2121
2121
|
vc.current = new Set(Object.keys(xa));
|
|
2122
2122
|
return;
|
|
2123
2123
|
}
|
|
2124
|
-
for (let { view: t, session: n } of
|
|
2124
|
+
for (let { view: t, session: n } of yt(ac, e)) {
|
|
2125
2125
|
e.add(t.proposalId);
|
|
2126
2126
|
let r = ba[n.sandboxId];
|
|
2127
|
-
if (!
|
|
2127
|
+
if (!gt({
|
|
2128
2128
|
mode: "api-calls",
|
|
2129
2129
|
productWriteApproval: I,
|
|
2130
2130
|
capabilities: r
|
|
2131
2131
|
})) continue;
|
|
2132
|
-
let i =
|
|
2132
|
+
let i = St(t, Tn(t, r).offerConfirm, N), a = t.proposalId;
|
|
2133
2133
|
yc({
|
|
2134
2134
|
id: `write-readback:${a}`,
|
|
2135
2135
|
text: i.text,
|
|
@@ -2221,7 +2221,7 @@ var Ei = () => () => {}, Di = () => "off", Oi = ({ visible: Oi = !0, writeAccess
|
|
|
2221
2221
|
busy: _a || Co !== null || Oa || Qo,
|
|
2222
2222
|
committing: kc.committing,
|
|
2223
2223
|
dictating: kc.dictating
|
|
2224
|
-
}), Mc =
|
|
2224
|
+
}), Mc = mt(), [Nc, Pc] = A(null);
|
|
2225
2225
|
D(() => {
|
|
2226
2226
|
Nc !== null && (!K || Nc.conversationId !== B) && Pc(null);
|
|
2227
2227
|
}, [
|
|
@@ -2587,7 +2587,7 @@ var Ei = () => () => {}, Di = () => "off", Oi = ({ visible: Oi = !0, writeAccess
|
|
|
2587
2587
|
onToggleMute: $.toggleMute,
|
|
2588
2588
|
onEnd: Oc,
|
|
2589
2589
|
proposalChip: uc ? {
|
|
2590
|
-
label:
|
|
2590
|
+
label: vt(uc, N),
|
|
2591
2591
|
onOpen: lc
|
|
2592
2592
|
} : null,
|
|
2593
2593
|
proposalTray: fc,
|
|
@@ -46,8 +46,11 @@ export type AssistantNavigateResult =
|
|
|
46
46
|
* navigator that does not say is treated as the assistant's.
|
|
47
47
|
*/
|
|
48
48
|
export type AssistantNavigateInitiator = NavigationInitiator;
|
|
49
|
-
/**
|
|
50
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Which assistant surface the person tapped; only ever used for counting. `avatar-minutes` (★ BOFF-9446): the Avatar tab's "See plans",
|
|
51
|
+
* for avatar credits.
|
|
52
|
+
*/
|
|
53
|
+
export type AssistantNavigateSurface = 'offer' | 'reply-link' | 'connect-source' | 'avatar-minutes';
|
|
51
54
|
export interface AssistantNavigateContext {
|
|
52
55
|
surface?: AssistantNavigateSurface;
|
|
53
56
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
export type AssistantToolStepStatus =
|
|
2
|
+
export type AssistantToolStepStatus = 'queued' | 'running' | 'completed' | 'failed';
|
|
3
3
|
export interface AssistantToolStep {
|
|
4
4
|
/** Stable key within the message. */
|
|
5
5
|
id: string;
|
|
@@ -26,13 +26,13 @@ export interface AssistantUiOfferLinkProps extends AssistantUiOfferLinkItem {
|
|
|
26
26
|
onOpen: (offerId: string, label: string) => void;
|
|
27
27
|
}
|
|
28
28
|
/** A click the browser should handle itself: new tab, new window, download. */
|
|
29
|
-
export declare function isModifiedClick(event: Pick<MouseEvent,
|
|
29
|
+
export declare function isModifiedClick(event: Pick<MouseEvent, 'button' | 'metaKey' | 'ctrlKey' | 'shiftKey' | 'altKey'>): boolean;
|
|
30
30
|
export declare const UI_OFFER_LINK_CLASS = "inline-flex items-center gap-2 min-h-11 ps-3 pe-3 rounded-md bg-bg-elevated text-text-link border border-border-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-strong";
|
|
31
31
|
export declare const AssistantUiOfferLink: FC<AssistantUiOfferLinkProps>;
|
|
32
32
|
export interface AssistantUiOfferLinksProps {
|
|
33
33
|
offers: readonly AssistantUiOfferLinkItem[];
|
|
34
34
|
/** `read`: "…or “yes”" may be said; `link`: tap or "take me there" only. */
|
|
35
|
-
hint:
|
|
35
|
+
hint: 'read' | 'link';
|
|
36
36
|
onOpen: (offerId: string, label: string) => void;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
@@ -52,11 +52,11 @@ export interface AssistantWriteConfirmDialogProps {
|
|
|
52
52
|
* Confirm was pressed: armed, trusted, not by Enter. Return the approve
|
|
53
53
|
* call's promise; both buttons stay disabled until it settles.
|
|
54
54
|
*/
|
|
55
|
-
onApprove: (surface:
|
|
55
|
+
onApprove: (surface: 'assistant_modal') => void | Promise<unknown>;
|
|
56
56
|
/** Cancel was pressed. Same latch as `onApprove`. */
|
|
57
|
-
onDecline: (reason:
|
|
57
|
+
onDecline: (reason: 'user_declined', surface: 'assistant_modal') => void | Promise<unknown>;
|
|
58
58
|
/** The dialog opened on a pending proposal. Once per opening. */
|
|
59
|
-
onPresented: (surface:
|
|
59
|
+
onPresented: (surface: 'modal') => void;
|
|
60
60
|
/** Esc, the overlay or the close button: close only; nothing is declined. */
|
|
61
61
|
onDismiss: () => void;
|
|
62
62
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentType, FC, ReactNode, RefObject } from 'react';
|
|
2
2
|
import { SpeechEngine } from '../speech/types';
|
|
3
|
+
import { AssistantNavigate } from './AssistantMarkdownRenderer';
|
|
3
4
|
import { VoiceView } from './voice/AssistantVoiceSession';
|
|
4
5
|
export interface LiveAvatarStageProps {
|
|
5
6
|
/** Full-screen (true) or the in-panel stage (false). */
|
|
@@ -39,9 +40,10 @@ export interface LiveAvatarTabOfferedStore {
|
|
|
39
40
|
/**
|
|
40
41
|
* ★ BOFF-9360: whether the avatar can take the answer to a typed question now (`liveAvatarAskState` maps the
|
|
41
42
|
* controller's snapshot): `ready`; `sound-blocked` (on, its sound blocked until a tap); `ending` (stopping, or near its
|
|
42
|
-
* time limit); `starting`; `locked` (off until the time a refusal named); `off
|
|
43
|
+
* time limit); `starting`; `locked` (off until the time a refusal named); `no-minutes` (★ BOFF-9446: off, and Turn on
|
|
44
|
+
* cannot start it for avatar credits: none left for this person); `off`.
|
|
43
45
|
*/
|
|
44
|
-
export type LiveAvatarAskState = 'off' | 'locked' | 'starting' | 'ready' | 'sound-blocked' | 'ending';
|
|
46
|
+
export type LiveAvatarAskState = 'off' | 'locked' | 'no-minutes' | 'starting' | 'ready' | 'sound-blocked' | 'ending';
|
|
45
47
|
/** `LiveAvatarAskState` as a store read with `useSyncExternalStore`. STABLE. */
|
|
46
48
|
export interface LiveAvatarAskStore {
|
|
47
49
|
subscribe: (onChange: () => void) => () => void;
|
|
@@ -118,6 +120,12 @@ export interface LiveAvatarTabProps {
|
|
|
118
120
|
* `voice.impossible` alone ("…you ask it questions in a voice conversation").
|
|
119
121
|
*/
|
|
120
122
|
readonly askLine?: LiveAvatarTabAskLine;
|
|
123
|
+
/**
|
|
124
|
+
* ★ BOFF-9446: the panel's navigator (the host's `onNavigate`, behind the leave-page guard): the tab's "See plans" opens the app's
|
|
125
|
+
* plans page with it, as the person's own navigation, and never changes the page's location itself. Absent or null: no navigation,
|
|
126
|
+
* so nothing offers to open billing.
|
|
127
|
+
*/
|
|
128
|
+
readonly navigate?: AssistantNavigate | null;
|
|
121
129
|
}
|
|
122
130
|
/** The ids the tab row and the two tab panels share (`AIAssistantPanel` makes them). */
|
|
123
131
|
export interface LiveAvatarTabIds {
|