@vellumai/assistant 0.10.11-dev.202607221733.6d056db → 0.10.11-dev.202607221815.530ef8d
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/package.json
CHANGED
|
@@ -37,29 +37,16 @@ import {
|
|
|
37
37
|
|
|
38
38
|
export { ESCALATE_VERDICT_TOKEN, HOLD_VERDICT_TOKEN };
|
|
39
39
|
|
|
40
|
-
/** Feature-flag key gating the whole behavior. Off by default. */
|
|
41
|
-
export const VOICE_TRIAGE_ESCALATE_FLAG = "voice-triage-escalate";
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Feature-flag key for the unified front-door (requires the triage flag
|
|
45
|
-
* too): live-voice endpointing merges into the front-door leg. At each
|
|
46
|
-
* pause the leg is dispatched speculatively and its leading tokens carry
|
|
47
|
-
* the full verdict — {@link HOLD_VERDICT_TOKEN} (mid-thought, keep
|
|
48
|
-
* listening), {@link ESCALATE_VERDICT_TOKEN} plus a spoken bridge, or the
|
|
49
|
-
* answer itself. Replaces the separate endpoint-decider call on that path.
|
|
50
|
-
* Off by default.
|
|
51
|
-
*/
|
|
52
|
-
export const VOICE_UNIFIED_FRONT_DOOR_FLAG = "voice-unified-front-door";
|
|
53
|
-
|
|
54
40
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
41
|
+
* Feature-flag key gating the whole behavior: a fast model fronts each
|
|
42
|
+
* live-voice turn, and endpointing rides that same leg. At each pause the
|
|
43
|
+
* leg is dispatched speculatively and its leading tokens carry the full
|
|
44
|
+
* verdict — {@link HOLD_VERDICT_TOKEN} (mid-thought, keep listening),
|
|
45
|
+
* {@link ESCALATE_VERDICT_TOKEN} plus a spoken bridge, or the answer
|
|
46
|
+
* itself. Off by default; when off, live voice runs the single-leg path
|
|
47
|
+
* with the separate endpoint decider.
|
|
57
48
|
*/
|
|
58
|
-
export
|
|
59
|
-
config: AssistantConfig = getConfig(),
|
|
60
|
-
): boolean {
|
|
61
|
-
return isAssistantFeatureFlagEnabled(VOICE_UNIFIED_FRONT_DOOR_FLAG, config);
|
|
62
|
-
}
|
|
49
|
+
export const VOICE_TRIAGE_ESCALATE_FLAG = "voice-triage-escalate";
|
|
63
50
|
|
|
64
51
|
// The fast model fronting every turn is pinned by the `voiceFrontDoor` call
|
|
65
52
|
// site (see config/call-site-defaults.ts) — no per-turn profile override.
|
|
@@ -107,20 +107,12 @@
|
|
|
107
107
|
"description": "Show the live voice conversation button in the composer",
|
|
108
108
|
"defaultEnabled": false
|
|
109
109
|
},
|
|
110
|
-
{
|
|
111
|
-
"id": "voice-unified-front-door",
|
|
112
|
-
"scope": "assistant",
|
|
113
|
-
"key": "voice-unified-front-door",
|
|
114
|
-
"label": "Voice Unified Front Door",
|
|
115
|
-
"description": "Merge live-voice endpointing into the triage front-door leg: one per-pause call whose first token decides hold / escalate / answer, replacing the separate endpoint-decider call",
|
|
116
|
-
"defaultEnabled": false
|
|
117
|
-
},
|
|
118
110
|
{
|
|
119
111
|
"id": "voice-triage-escalate",
|
|
120
112
|
"scope": "assistant",
|
|
121
113
|
"key": "voice-triage-escalate",
|
|
122
114
|
"label": "Voice Triage & Escalate",
|
|
123
|
-
"description": "Front
|
|
115
|
+
"description": "Front each live-voice turn with a fast model that answers simple turns and escalates tricky ones to the quality model, cutting perceived latency. The same leg decides the endpoint: its first token holds a mid-thought pause, escalates, or begins the answer, replacing the separate endpoint-decider call",
|
|
124
116
|
"defaultEnabled": false
|
|
125
117
|
},
|
|
126
118
|
{
|
|
@@ -28,12 +28,12 @@ import {
|
|
|
28
28
|
FALLBACK_ESCALATION_BRIDGE,
|
|
29
29
|
isEscalationBridgeComplete,
|
|
30
30
|
isVoiceTriageEscalateEnabled,
|
|
31
|
-
isVoiceUnifiedFrontDoorEnabled,
|
|
32
31
|
MIN_SPOKEN_BRIDGE_CHARS,
|
|
33
32
|
type VoiceRoutingLeg,
|
|
34
33
|
} from "../calls/voice-triage-escalate.js";
|
|
35
34
|
import { isAssistantFeatureFlagEnabled } from "../config/assistant-feature-flags.js";
|
|
36
35
|
import { getConfig } from "../config/loader.js";
|
|
36
|
+
import type { AssistantConfig } from "../config/schema.js";
|
|
37
37
|
import {
|
|
38
38
|
type LiveVoiceFrontModelConfig,
|
|
39
39
|
LiveVoiceFrontModelConfigSchema,
|
|
@@ -1628,7 +1628,7 @@ export class LiveVoiceSession implements LiveVoiceSessionContract {
|
|
|
1628
1628
|
// event ordering — an extra await here would shift utterance release
|
|
1629
1629
|
// across the persistent-transcriber flush attribution.
|
|
1630
1630
|
if (reason === "silence" && !manualRelease) {
|
|
1631
|
-
if (this.
|
|
1631
|
+
if (this.frontDoorRoutingActive()) {
|
|
1632
1632
|
// Unified front-door: the leg itself is the endpoint decision.
|
|
1633
1633
|
// When it launches, the boundary is deferred to the verdict —
|
|
1634
1634
|
// commit releases the utterance, hold replays the boundary via
|
|
@@ -1759,16 +1759,17 @@ export class LiveVoiceSession implements LiveVoiceSessionContract {
|
|
|
1759
1759
|
}
|
|
1760
1760
|
|
|
1761
1761
|
/**
|
|
1762
|
-
* Whether
|
|
1763
|
-
*
|
|
1764
|
-
*
|
|
1762
|
+
* Whether front-door routing is active: the voice-mode surface flag and
|
|
1763
|
+
* the triage-escalate routing flag both on. Governs both halves of the
|
|
1764
|
+
* unified front door — the speculative leg that decides the endpoint, and
|
|
1765
|
+
* the escalation hand-off — so the two can never disagree. The
|
|
1766
|
+
* decider-based hold path runs only when this is false.
|
|
1765
1767
|
*/
|
|
1766
|
-
private
|
|
1767
|
-
const cfg = getConfig();
|
|
1768
|
+
private frontDoorRoutingActive(config?: AssistantConfig): boolean {
|
|
1769
|
+
const cfg = config ?? getConfig();
|
|
1768
1770
|
return (
|
|
1769
1771
|
isAssistantFeatureFlagEnabled("voice-mode", cfg) &&
|
|
1770
|
-
isVoiceTriageEscalateEnabled(cfg)
|
|
1771
|
-
isVoiceUnifiedFrontDoorEnabled(cfg)
|
|
1772
|
+
isVoiceTriageEscalateEnabled(cfg)
|
|
1772
1773
|
);
|
|
1773
1774
|
}
|
|
1774
1775
|
|
|
@@ -2664,9 +2665,7 @@ export class LiveVoiceSession implements LiveVoiceSessionContract {
|
|
|
2664
2665
|
// surface flag and the voice-triage-escalate routing flag are on. A
|
|
2665
2666
|
// live-voice session already implies voice-mode client-side; the explicit
|
|
2666
2667
|
// check keeps the "gated behind both flags" contract true server-side.
|
|
2667
|
-
const escalateEnabled =
|
|
2668
|
-
isAssistantFeatureFlagEnabled("voice-mode", cfg) &&
|
|
2669
|
-
isVoiceTriageEscalateEnabled(cfg);
|
|
2668
|
+
const escalateEnabled = this.frontDoorRoutingActive(cfg);
|
|
2670
2669
|
|
|
2671
2670
|
// Front-door leg: with routing on, a fast model fronts the turn (the
|
|
2672
2671
|
// `voiceFrontDoor` call site pins it) and may hand off on the escalate
|