@burdenoff/fe-libs 2026.1001.3 → 2026.1001.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/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.js +1013 -971
- package/dist/shared/assistant/voice/turnVisibility.d.ts +9 -0
- package/dist/shared/assistant/voice/turnVisibility.d.ts.map +1 -1
- package/dist/shared/assistant/voice/voiceReopen.d.ts +134 -11
- package/dist/shared/assistant/voice/voiceReopen.d.ts.map +1 -1
- package/dist/shared/assistant/voice/voiceReopen.js +83 -25
- package/dist/shared-assistant.js +132 -132
- package/package.json +1 -1
|
@@ -20,6 +20,15 @@
|
|
|
20
20
|
* we left off" work. Genuinely separate backend sessions are a larger change
|
|
21
21
|
* and would cost that.
|
|
22
22
|
*
|
|
23
|
+
* ★★ BOFF-8159 S5 (operator, 2026-09-30: VOICE IS ALWAYS SEPARATE): a live
|
|
24
|
+
* voice session now speaks into a conversation of its OWN, created at its first
|
|
25
|
+
* spoken entry (`planVoiceSessionStart`), and never into an unrelated chat. The
|
|
26
|
+
* split still matters wherever both channels meet in one conversation: a
|
|
27
|
+
* session that took over an empty placeholder and was later typed into, an
|
|
28
|
+
* entry attached to the open conversation for a waiting proposal or a running
|
|
29
|
+
* turn, and every mixed conversation saved before S5 (shown filtered, never
|
|
30
|
+
* split).
|
|
31
|
+
*
|
|
23
32
|
* ★ Product-agnostic by construction: it knows about turns and surfaces, never
|
|
24
33
|
* about crops, workflows or nodes. Nothing here needs to change for a product
|
|
25
34
|
* whose modes are `fluidgrids-node` rather than `api-calls`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turnVisibility.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/voice/turnVisibility.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"turnVisibility.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/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,yBAAyB,CAAC,CAAC,EACzC,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,SAAS,GAC3C,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAWxB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;;;;OASG;IACH,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B"}
|
|
@@ -8,13 +8,131 @@
|
|
|
8
8
|
* read-only transcript", "end the session" and "drop a spoken turn". None can
|
|
9
9
|
* start one.
|
|
10
10
|
*/
|
|
11
|
+
/**
|
|
12
|
+
* ★★ BOFF-8159 S5 — VOICE IS ALWAYS SEPARATE (operator, 2026-09-30). A live
|
|
13
|
+
* session that has not yet spoken into a conversation of its OWN.
|
|
14
|
+
*
|
|
15
|
+
* The session used to adopt whatever conversation was open when the mic was
|
|
16
|
+
* tapped — including one restored from storage days ago, since
|
|
17
|
+
* `activeConversationId` is persisted — so a reload left the next spoken
|
|
18
|
+
* exchange (and its spoken local commands) inside an unrelated typed thread.
|
|
19
|
+
* Now nothing is adopted: the session's conversation is created LAZILY, at
|
|
20
|
+
* its first spoken entry, exactly as a send with no conversation open creates
|
|
21
|
+
* one. A session that says nothing leaves no conversation, no save and no
|
|
22
|
+
* tombstone behind.
|
|
23
|
+
*
|
|
24
|
+
* Conversation identity is separate from sandbox, runtime and model-session
|
|
25
|
+
* identity: the sandbox for the new conversation's mode is warmed at the mic
|
|
26
|
+
* tap (and reused when warm), but no conversation id is ever shared to save
|
|
27
|
+
* the session's start-up.
|
|
28
|
+
*/
|
|
29
|
+
export interface VoiceSessionAwaitingOwn {
|
|
30
|
+
readonly pending: "own";
|
|
31
|
+
/**
|
|
32
|
+
* The conversation on screen when the session started (null: none). It is
|
|
33
|
+
* not the session's: opening another one before the session has its own
|
|
34
|
+
* ends the session, as a switch always has.
|
|
35
|
+
*/
|
|
36
|
+
readonly openAtStart: string | null;
|
|
37
|
+
}
|
|
11
38
|
/**
|
|
12
39
|
* The conversation a live voice session belongs to.
|
|
13
40
|
*
|
|
14
|
-
* `undefined`: no session is live.
|
|
15
|
-
*
|
|
41
|
+
* `undefined`: no session is live. A string: the session's conversation — its
|
|
42
|
+
* own, or the empty placeholder it took over. `VoiceSessionAwaitingOwn`: live,
|
|
43
|
+
* with no conversation of its own yet (`planVoiceSpokenEntry` decides where
|
|
44
|
+
* each entry goes until it has one). `null`: the pre-S5 "adopt the next active
|
|
45
|
+
* conversation" value, kept for compatibility; no start path writes it now.
|
|
46
|
+
*/
|
|
47
|
+
export type VoiceSessionBinding = string | null | undefined | VoiceSessionAwaitingOwn;
|
|
48
|
+
/** The session is live and still awaits a conversation of its own. */
|
|
49
|
+
export declare function isAwaitingOwnConversation(binding: VoiceSessionBinding): binding is VoiceSessionAwaitingOwn;
|
|
50
|
+
/**
|
|
51
|
+
* The conversation a binding names: the session's own, or — while it awaits
|
|
52
|
+
* one — the conversation that was on screen when it started.
|
|
53
|
+
*/
|
|
54
|
+
export declare function voiceBindingConversationId(binding: VoiceSessionBinding): string | null;
|
|
55
|
+
/** The open conversation, as the voice start and entry rules read it. */
|
|
56
|
+
export interface VoiceOpenConversation {
|
|
57
|
+
id: string;
|
|
58
|
+
/**
|
|
59
|
+
* An empty, unsent placeholder this device would save as a new
|
|
60
|
+
* conversation (`isReusableHistoryDraft`): nothing in it to keep apart.
|
|
61
|
+
*/
|
|
62
|
+
reusableDraft: boolean;
|
|
63
|
+
/** Its 5a proposals still waiting for a person's button. */
|
|
64
|
+
liveProposals: number;
|
|
65
|
+
/** One of its turns is in flight. */
|
|
66
|
+
turnInFlight: boolean;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Where a new voice session goes: a conversation of its own, or — the two
|
|
70
|
+
* operator exceptions — the open one.
|
|
71
|
+
*
|
|
72
|
+
* - `draft`: an empty unsent placeholder BECOMES the voice conversation.
|
|
73
|
+
* - `proposal` / `turn`: a waiting 5a proposal or a turn in flight keeps the
|
|
74
|
+
* session attached to the open conversation, for that transaction only: a
|
|
75
|
+
* spoken correction, decline or "yes" still binds to the card there
|
|
76
|
+
* (`planWriteReply`), and nothing is withdrawn by leaving. Once it resolves,
|
|
77
|
+
* the session's next entry goes to a conversation of its own.
|
|
78
|
+
*/
|
|
79
|
+
export type VoiceStartPlan = {
|
|
80
|
+
kind: "own";
|
|
81
|
+
} | {
|
|
82
|
+
kind: "join";
|
|
83
|
+
conversationId: string;
|
|
84
|
+
why: "draft" | "proposal" | "turn";
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* ★★ BOFF-8159 S5: the rules, in order. Pure; the panel applies them at the
|
|
88
|
+
* mic tap (`voiceBindingAtStart`) and again at every spoken entry while the
|
|
89
|
+
* session has no conversation of its own (`planVoiceSpokenEntry`).
|
|
90
|
+
*
|
|
91
|
+
* 1. Nothing open: its own (created at the first spoken entry).
|
|
92
|
+
* 2. An empty reusable placeholder: it becomes the session's.
|
|
93
|
+
* 3. A waiting proposal or a turn in flight: attached, for the transaction.
|
|
94
|
+
* 4. Anything else — a typed chat, a voice conversation of an earlier
|
|
95
|
+
* session, one restored from storage: its own. There is no "recently
|
|
96
|
+
* used" window (the operator overrode it).
|
|
97
|
+
*/
|
|
98
|
+
export declare function planVoiceSessionStart(open: VoiceOpenConversation | null): VoiceStartPlan;
|
|
99
|
+
/**
|
|
100
|
+
* The binding a session starts with. Only the placeholder is taken over at
|
|
101
|
+
* the tap; every other plan — its own, or attached for a transaction — starts
|
|
102
|
+
* AWAITING its own, so nothing is created or made active at the tap (and
|
|
103
|
+
* nothing is withdrawn from the conversation on screen), and an attachment
|
|
104
|
+
* lasts no longer than the transaction that caused it.
|
|
16
105
|
*/
|
|
17
|
-
export
|
|
106
|
+
export declare function voiceBindingAtStart(plan: VoiceStartPlan, openAtStart: string | null): VoiceSessionBinding;
|
|
107
|
+
/**
|
|
108
|
+
* Where ONE spoken entry (a turn, or a local command) of a session still
|
|
109
|
+
* awaiting its own conversation goes — decided with what the open
|
|
110
|
+
* conversation holds NOW, not at the tap: a proposal restored after a reload
|
|
111
|
+
* may have arrived since (BOFF-8128), and a transaction that was open at the
|
|
112
|
+
* tap may have resolved.
|
|
113
|
+
*
|
|
114
|
+
* - `own`: start the session's conversation now, the way a send with no
|
|
115
|
+
* conversation open starts one (Auto routing and its consent hold apply
|
|
116
|
+
* unchanged), and bind the session to it.
|
|
117
|
+
* - `adopt`: the open conversation is an empty placeholder; it becomes the
|
|
118
|
+
* session's.
|
|
119
|
+
* - `attach`: into the open conversation, for its waiting proposal or running
|
|
120
|
+
* turn; the session still awaits its own.
|
|
121
|
+
* - `gone`: another conversation was opened since the session started — the
|
|
122
|
+
* session is ending, and the entry goes nowhere.
|
|
123
|
+
*/
|
|
124
|
+
export type VoiceSpokenEntry = {
|
|
125
|
+
kind: "own";
|
|
126
|
+
} | {
|
|
127
|
+
kind: "adopt";
|
|
128
|
+
conversationId: string;
|
|
129
|
+
} | {
|
|
130
|
+
kind: "attach";
|
|
131
|
+
conversationId: string;
|
|
132
|
+
} | {
|
|
133
|
+
kind: "gone";
|
|
134
|
+
};
|
|
135
|
+
export declare function planVoiceSpokenEntry(binding: VoiceSessionAwaitingOwn, activeConversationId: string | null, open: VoiceOpenConversation | null): VoiceSpokenEntry;
|
|
18
136
|
/**
|
|
19
137
|
* Keep a live voice session in the conversation it started in.
|
|
20
138
|
*
|
|
@@ -25,18 +143,20 @@ export type VoiceSessionBinding = string | null | undefined;
|
|
|
25
143
|
* answers aloud — into a conversation the person was no longer talking to. The
|
|
26
144
|
* session now ends instead; nothing is moved.
|
|
27
145
|
*
|
|
28
|
-
* A session
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* caller's effect belongs to.
|
|
146
|
+
* A session awaiting its own conversation (BOFF-8159 S5) is bound to the one
|
|
147
|
+
* its own first entry creates. A conversation the session's own turn starts
|
|
148
|
+
* (the send path records it as the new binding first) is not a switch —
|
|
149
|
+
* provided the caller passes where the store is NOW: the send moves the store
|
|
150
|
+
* and the binding together, after the render the caller's effect belongs to.
|
|
34
151
|
*/
|
|
35
152
|
export declare function planVoiceSessionBinding(args: {
|
|
36
153
|
sessionLive: boolean;
|
|
37
154
|
bound: VoiceSessionBinding;
|
|
38
155
|
activeConversationId: string | null;
|
|
39
|
-
/**
|
|
156
|
+
/**
|
|
157
|
+
* The conversation the binding names (`voiceBindingConversationId`) is
|
|
158
|
+
* still in the store.
|
|
159
|
+
*/
|
|
40
160
|
boundConversationExists: boolean;
|
|
41
161
|
}): {
|
|
42
162
|
bound: VoiceSessionBinding;
|
|
@@ -64,7 +184,10 @@ export declare function maySendSpokenTurn(args: {
|
|
|
64
184
|
/** The session's conversation when the turn was asked. */
|
|
65
185
|
boundAtSubmit: VoiceSessionBinding;
|
|
66
186
|
activeConversationId: string | null;
|
|
67
|
-
/**
|
|
187
|
+
/**
|
|
188
|
+
* The conversation `boundAtSubmit` names (`voiceBindingConversationId`) is
|
|
189
|
+
* still in the store.
|
|
190
|
+
*/
|
|
68
191
|
boundConversationExists: boolean;
|
|
69
192
|
}): boolean;
|
|
70
193
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voiceReopen.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/voice/voiceReopen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH
|
|
1
|
+
{"version":3,"file":"voiceReopen.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/voice/voiceReopen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,uBAAuB;IACtC,QA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E,OAAO,CAAC;IACrB;;;OAGG;IACH,cAAc,EAAE,mBAAmB,CAAC;IACpC,YAAY,EAAE,OAAO,CAAC;CACvB,GACA;IAAE,KAAK,EAAE,uBAAuB,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAuBnD"}
|
|
@@ -1,49 +1,107 @@
|
|
|
1
1
|
//#region src/shared/assistant/voice/voiceReopen.ts
|
|
2
2
|
function e(e) {
|
|
3
|
-
return
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
return typeof e == "object" && !!e;
|
|
4
|
+
}
|
|
5
|
+
function t(t) {
|
|
6
|
+
return typeof t == "string" ? t : e(t) ? t.openAtStart : null;
|
|
7
|
+
}
|
|
8
|
+
function n(e) {
|
|
9
|
+
return e === null ? { kind: "own" } : e.reusableDraft ? {
|
|
10
|
+
kind: "join",
|
|
11
|
+
conversationId: e.id,
|
|
12
|
+
why: "draft"
|
|
13
|
+
} : e.liveProposals > 0 ? {
|
|
14
|
+
kind: "join",
|
|
15
|
+
conversationId: e.id,
|
|
16
|
+
why: "proposal"
|
|
17
|
+
} : e.turnInFlight ? {
|
|
18
|
+
kind: "join",
|
|
19
|
+
conversationId: e.id,
|
|
20
|
+
why: "turn"
|
|
21
|
+
} : { kind: "own" };
|
|
22
|
+
}
|
|
23
|
+
function r(e, t) {
|
|
24
|
+
return e.kind === "join" && e.why === "draft" ? e.conversationId : {
|
|
25
|
+
pending: "own",
|
|
26
|
+
openAtStart: t
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function i(e, t, r) {
|
|
30
|
+
if (t !== e.openAtStart) return { kind: "gone" };
|
|
31
|
+
let i = n(r);
|
|
32
|
+
return i.kind === "own" ? { kind: "own" } : i.why === "draft" ? {
|
|
33
|
+
kind: "adopt",
|
|
34
|
+
conversationId: i.conversationId
|
|
9
35
|
} : {
|
|
10
|
-
|
|
36
|
+
kind: "attach",
|
|
37
|
+
conversationId: i.conversationId
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function a(t) {
|
|
41
|
+
if (!t.sessionLive) return {
|
|
42
|
+
bound: void 0,
|
|
11
43
|
end: !1
|
|
44
|
+
};
|
|
45
|
+
if (t.bound === void 0) return {
|
|
46
|
+
bound: {
|
|
47
|
+
pending: "own",
|
|
48
|
+
openAtStart: t.activeConversationId
|
|
49
|
+
},
|
|
50
|
+
end: !1
|
|
51
|
+
};
|
|
52
|
+
if (e(t.bound)) {
|
|
53
|
+
let { openAtStart: e } = t.bound, n = t.activeConversationId !== e || e !== null && !t.boundConversationExists;
|
|
54
|
+
return {
|
|
55
|
+
bound: t.bound,
|
|
56
|
+
end: n
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
return t.bound === null ? {
|
|
60
|
+
bound: t.activeConversationId,
|
|
61
|
+
end: !1
|
|
62
|
+
} : t.activeConversationId !== t.bound || !t.boundConversationExists ? {
|
|
63
|
+
bound: t.bound,
|
|
64
|
+
end: !0
|
|
12
65
|
} : {
|
|
13
|
-
bound:
|
|
66
|
+
bound: t.bound,
|
|
14
67
|
end: !1
|
|
15
68
|
};
|
|
16
69
|
}
|
|
17
|
-
function t
|
|
18
|
-
|
|
70
|
+
function o(t) {
|
|
71
|
+
if (!t.sessionLive) return !1;
|
|
72
|
+
if (e(t.boundAtSubmit)) {
|
|
73
|
+
let { openAtStart: e } = t.boundAtSubmit;
|
|
74
|
+
return t.activeConversationId === e && (e === null || t.boundConversationExists);
|
|
75
|
+
}
|
|
76
|
+
return typeof t.boundAtSubmit == "string" ? t.activeConversationId === t.boundAtSubmit && t.boundConversationExists : !0;
|
|
19
77
|
}
|
|
20
|
-
var
|
|
78
|
+
var s = {
|
|
21
79
|
conversationId: null,
|
|
22
80
|
settled: !0
|
|
23
81
|
};
|
|
24
|
-
function
|
|
25
|
-
let
|
|
26
|
-
conversationId:
|
|
27
|
-
settled:
|
|
82
|
+
function c(e, n) {
|
|
83
|
+
let r = e.conversationId === n.activeConversationId ? e : {
|
|
84
|
+
conversationId: n.activeConversationId,
|
|
85
|
+
settled: n.activeConversationId === null
|
|
28
86
|
};
|
|
29
|
-
if (
|
|
30
|
-
state:
|
|
87
|
+
if (r.settled) return {
|
|
88
|
+
state: r,
|
|
31
89
|
open: !1
|
|
32
90
|
};
|
|
33
|
-
let
|
|
34
|
-
...
|
|
91
|
+
let i = {
|
|
92
|
+
...r,
|
|
35
93
|
settled: !0
|
|
36
94
|
};
|
|
37
|
-
return
|
|
38
|
-
state:
|
|
95
|
+
return n.sessionLive && (n.sessionBoundTo === void 0 || n.sessionBoundTo === null || t(n.sessionBoundTo) === n.activeConversationId) || n.turnInFlight || n.chatTurnCount > 0 ? {
|
|
96
|
+
state: i,
|
|
39
97
|
open: !1
|
|
40
|
-
} :
|
|
41
|
-
state:
|
|
98
|
+
} : n.voiceTurnCount === 0 ? {
|
|
99
|
+
state: r,
|
|
42
100
|
open: !1
|
|
43
101
|
} : {
|
|
44
|
-
state:
|
|
102
|
+
state: i,
|
|
45
103
|
open: !0
|
|
46
104
|
};
|
|
47
105
|
}
|
|
48
106
|
//#endregion
|
|
49
|
-
export {
|
|
107
|
+
export { s as INITIAL_TRANSCRIPT_AUTO_OPEN, e as isAwaitingOwnConversation, o as maySendSpokenTurn, c as planTranscriptAutoOpen, a as planVoiceSessionBinding, n as planVoiceSessionStart, i as planVoiceSpokenEntry, r as voiceBindingAtStart, t as voiceBindingConversationId };
|