@burdenoff/fe-libs 2026.1003.1 → 2026.1003.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/chrome/mobileTabBar/selectTabs.d.ts.map +1 -1
  2. package/dist/chrome/mobileTabBar/selectTabs.js +9 -8
  3. package/dist/chrome/sideNavigation/NavItemRenderer.d.ts.map +1 -1
  4. package/dist/chrome/sideNavigation/NavItemRenderer.js +62 -61
  5. package/dist/shared/assistant/conversation.d.ts +20 -6
  6. package/dist/shared/assistant/conversation.d.ts.map +1 -1
  7. package/dist/shared/assistant/history/historyMapping.d.ts.map +1 -1
  8. package/dist/shared/assistant/history/historyMapping.js +43 -24
  9. package/dist/shared/assistant/i18nManifest.d.ts +9 -0
  10. package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
  11. package/dist/shared/assistant/i18nManifest.js +9 -0
  12. package/dist/shared/assistant/index.d.ts +4 -0
  13. package/dist/shared/assistant/index.d.ts.map +1 -1
  14. package/dist/shared/assistant/localUiCommandCopy.d.ts +28 -0
  15. package/dist/shared/assistant/localUiCommandCopy.d.ts.map +1 -1
  16. package/dist/shared/assistant/localUiCommandCopy.js +54 -1
  17. package/dist/shared/assistant/localUiCommands.d.ts +33 -3
  18. package/dist/shared/assistant/localUiCommands.d.ts.map +1 -1
  19. package/dist/shared/assistant/localUiCommands.js +110 -59
  20. package/dist/shared/assistant/prewarm.d.ts +71 -0
  21. package/dist/shared/assistant/prewarm.d.ts.map +1 -1
  22. package/dist/shared/assistant/prewarm.js +49 -2
  23. package/dist/shared/assistant/speech/speechFeed.d.ts +63 -0
  24. package/dist/shared/assistant/speech/speechFeed.d.ts.map +1 -0
  25. package/dist/shared/assistant/speech/speechFeed.js +40 -0
  26. package/dist/shared/assistant/turnTimeline.d.ts +22 -2
  27. package/dist/shared/assistant/turnTimeline.d.ts.map +1 -1
  28. package/dist/shared/assistant/turnTimeline.js +18 -1
  29. package/dist/shared/assistant/turnTimingReport.d.ts.map +1 -1
  30. package/dist/shared/assistant/turnTimingReport.js +5 -4
  31. package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
  32. package/dist/shared/assistant/ui/AssistantChatArea.js +1096 -914
  33. package/dist/shared/assistant/ui/AssistantMarkdownRenderer.d.ts +18 -1
  34. package/dist/shared/assistant/ui/AssistantMarkdownRenderer.d.ts.map +1 -1
  35. package/dist/shared/assistant/ui/AssistantSpeechProvider.d.ts.map +1 -1
  36. package/dist/shared/assistant/ui/AssistantSpeechProvider.js +198 -169
  37. package/dist/shared/assistant/ui/assistantOverlayState.d.ts +2 -1
  38. package/dist/shared/assistant/ui/assistantOverlayState.d.ts.map +1 -1
  39. package/dist/shared/assistant/ui/assistantOverlayState.js +1 -7
  40. package/dist/shared/assistant/ui/useVoiceSession.d.ts.map +1 -1
  41. package/dist/shared/assistant/ui/useVoiceSession.js +165 -153
  42. package/dist/shared/assistant/uiActions/backStack.d.ts +35 -0
  43. package/dist/shared/assistant/uiActions/backStack.d.ts.map +1 -0
  44. package/dist/shared/assistant/uiActions/backStack.js +28 -0
  45. package/dist/shared/assistant/uiActions/navigateAction.d.ts +41 -0
  46. package/dist/shared/assistant/uiActions/navigateAction.d.ts.map +1 -0
  47. package/dist/shared/assistant/uiActions/navigateAction.js +40 -0
  48. package/dist/shared/assistant/uiActions/navigationOutcome.d.ts +52 -0
  49. package/dist/shared/assistant/uiActions/navigationOutcome.d.ts.map +1 -0
  50. package/dist/shared/assistant/uiActions/navigationOutcome.js +61 -0
  51. package/dist/shared/assistant/voice/speakableText.d.ts +16 -1
  52. package/dist/shared/assistant/voice/speakableText.d.ts.map +1 -1
  53. package/dist/shared/assistant/voice/speakableText.js +116 -102
  54. package/dist/shared/assistant/voice/voiceSession.d.ts +12 -0
  55. package/dist/shared/assistant/voice/voiceSession.d.ts.map +1 -1
  56. package/dist/shared/assistant/voice/voiceSession.js +6 -0
  57. package/dist/shared/navigation/navTargetPath.d.ts +23 -0
  58. package/dist/shared/navigation/navTargetPath.d.ts.map +1 -0
  59. package/dist/shared/navigation/navTargetPath.js +6 -0
  60. package/dist/shared-assistant.js +154 -150
  61. package/package.json +1 -1
@@ -0,0 +1,61 @@
1
+ import { isCurrentPath as e } from "../localUiCommands.js";
2
+ //#region src/shared/assistant/uiActions/navigationOutcome.ts
3
+ var t = 50, n = 250, r = 1500;
4
+ function i(e) {
5
+ let [t = ""] = e.split("#"), [n = ""] = t.split("?");
6
+ return n.length > 1 ? n.replace(/\/+$/, "") : n;
7
+ }
8
+ function a(t, n, r, a) {
9
+ let o = i(r);
10
+ if (e(t, r)) return {
11
+ status: "arrived",
12
+ landedPath: o
13
+ };
14
+ if (r === n) return { status: "unconfirmed" };
15
+ let s = i(t);
16
+ return s !== "/" && o.startsWith(`${s}/`) && !a(r) ? {
17
+ status: "arrived",
18
+ landedPath: o
19
+ } : {
20
+ status: "redirected",
21
+ landedPath: o
22
+ };
23
+ }
24
+ function o(e, t, n) {
25
+ if (!e) return Promise.resolve({
26
+ status: "refused",
27
+ reason: "no-router"
28
+ });
29
+ let r = n.readPath(), i;
30
+ try {
31
+ i = e(t);
32
+ } catch {
33
+ return Promise.resolve({
34
+ status: "refused",
35
+ reason: "not-routable"
36
+ });
37
+ }
38
+ return i && i.kind === "new-tab" ? Promise.resolve({ status: "new-tab" }) : i && i.kind === "refused" ? Promise.resolve({
39
+ status: "refused",
40
+ reason: i.reason
41
+ }) : new Promise((e) => {
42
+ let i = n.now(), o = n.readPath(), s = i, c = () => {
43
+ let l;
44
+ try {
45
+ l = n.readPath();
46
+ } catch {
47
+ e({ status: "unconfirmed" });
48
+ return;
49
+ }
50
+ let u = n.now();
51
+ if (l !== o && (o = l, s = u), u - s >= 250 || u - i >= 1500) {
52
+ e(a(t, r, l, n.isShellLess));
53
+ return;
54
+ }
55
+ n.schedule(c, 50);
56
+ };
57
+ n.schedule(c, 50);
58
+ });
59
+ }
60
+ //#endregion
61
+ export { r as NAVIGATION_CEILING_MS, t as NAVIGATION_POLL_MS, n as NAVIGATION_QUIET_MS, i as pathnameOf, o as runNavigation };
@@ -80,6 +80,19 @@ export declare const SPEECH_CHUNK_CHARS = 180;
80
80
  * is ~7–10 seconds, the same target the Latin limit is aiming at.
81
81
  */
82
82
  export declare const SPEECH_CHUNK_CJK_CHARS = 40;
83
+ /**
84
+ * Ceiling for the FIRST chunk of a voice-session reply spoken from the speech
85
+ * feed (BOFF-8062, speed design C1), in characters.
86
+ *
87
+ * Nothing is heard until chunk 0 has made a full round trip to the TTS proxy,
88
+ * and that trip scales with the text. The design's range is about 100-120
89
+ * characters; 110 is its midpoint, taken as the default because the alpha TTS
90
+ * latency sweep (V-C1) is not part of this change. Applies ONLY to replies
91
+ * spoken from the feed — never to panel announcements, readbacks or the
92
+ * Listen button, so their chunking (and the local-command RT4 check) is
93
+ * unchanged.
94
+ */
95
+ export declare const SPEECH_FIRST_CHUNK_MAX_CHARS = 110;
83
96
  export interface SpeakableOptions {
84
97
  labels?: Partial<SpeakableLabels>;
85
98
  maxChars?: number;
@@ -117,5 +130,7 @@ export declare function containsCjk(text: string): boolean;
117
130
  * listener expects) rather than an arbitrary character offset. A CJK sentence
118
131
  * gets the tighter CJK ceiling, because a character there is a whole syllable.
119
132
  */
120
- export declare function chunkForSpeech(text: string, maxChars?: number, cjkMaxChars?: number): string[];
133
+ export declare function chunkForSpeech(text: string, maxChars?: number, cjkMaxChars?: number, options?: {
134
+ firstChunkMaxChars?: number;
135
+ }): string[];
121
136
  //# sourceMappingURL=speakableText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"speakableText.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/voice/speakableText.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,WAAW,eAAe;IAC9B,8EAA8E;IAC9E,SAAS,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E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,GAAG,SAAQ,GAAG,MAAM,CAE9E;AAkLD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,MAAM,CAiJxF;AAiMD,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;AAkFD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,MAA2B,EACrC,WAAW,GAAE,MAA+B,EAC5C,OAAO,GAAE;IAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAO,GAC5C,MAAM,EAAE,CAyEV"}
@@ -8,15 +8,15 @@ var e = {
8
8
  nestedItem: "Sub-item {{ordinal}}",
9
9
  emailAt: "at",
10
10
  emailDot: "dot"
11
- }, t = 3, n = 8e3, r = 180, i = 40, a = /^\s{0,3}(?:`{3,}|~{3,})/, o = /^\s{0,3}#{1,6}\s+(.*)$/, s = /^\s{0,3}([-*_])(?:\s*\1){2,}\s*$/, c = /^\s{0,3}(?:>\s?)+/, l = /^(\s*)(?:[-*+]|(\d{1,9})[.)])\s+/, u = /^\[[ xX]\]\s*/, d = /[.!?…⋯:;。!?;.।॥۔؟؛]$/, f = /^\s{0,3}=+\s*$/, p = /^(?: {4}|\t)/;
12
- function m(e, t) {
11
+ }, t = 3, n = 8e3, r = 180, i = 40, a = 110, o = 40, s = /^\s{0,3}(?:`{3,}|~{3,})/, c = /^\s{0,3}#{1,6}\s+(.*)$/, l = /^\s{0,3}([-*_])(?:\s*\1){2,}\s*$/, u = /^\s{0,3}(?:>\s?)+/, d = /^(\s*)(?:[-*+]|(\d{1,9})[.)])\s+/, f = /^\[[ xX]\]\s*/, p = /[.!?…⋯:;。!?;.।॥۔؟؛]$/, m = /^\s{0,3}=+\s*$/, h = /^(?: {4}|\t)/;
12
+ function g(e, t) {
13
13
  return Object.entries(t).reduce((e, [t, n]) => e.replace(RegExp(`\\{\\{${t}\\}\\}`, "g"), String(n)), e);
14
14
  }
15
- function h(e) {
15
+ function _(e) {
16
16
  let t = e.trim();
17
17
  return t.includes("|") && t.includes("-") && /^[\s:|-]+$/.test(t);
18
18
  }
19
- function g(e) {
19
+ function v(e) {
20
20
  let t = e.trim().replace(/^\|/, "").replace(/\|$/, ""), n = [], r = "";
21
21
  for (let e = 0; e < t.length; e += 1) {
22
22
  let i = t[e];
@@ -32,7 +32,7 @@ function g(e) {
32
32
  }
33
33
  return n.push(r), n.map((e) => e.trim());
34
34
  }
35
- var _ = {
35
+ var y = {
36
36
  "&amp;": " and ",
37
37
  "&lt;": " less than ",
38
38
  "&gt;": " greater than ",
@@ -40,89 +40,89 @@ var _ = {
40
40
  "&#39;": "'",
41
41
  "&apos;": "'",
42
42
  "&nbsp;": " "
43
- }, v = "[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(?:\\.[A-Za-z0-9-]+)+", y = RegExp(`<(?:mailto:)?(${v})>`, "g"), b = RegExp(`\\bmailto:(${v})`, "g"), x = new RegExp(v, "g");
44
- function S(e, t = "at", n = "dot") {
43
+ }, b = "[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(?:\\.[A-Za-z0-9-]+)+", x = RegExp(`<(?:mailto:)?(${b})>`, "g"), S = RegExp(`\\bmailto:(${b})`, "g"), C = new RegExp(b, "g");
44
+ function w(e, t = "at", n = "dot") {
45
45
  return e.replace(/@/g, ` ${t} `).replace(/\./g, ` ${n} `).replace(/\s+/g, " ").trim();
46
46
  }
47
- var C = 57600, w = /[\ue121-\ue17e]/g, T = "", E = /\ue180/g, D = /[\ue100-\ue1ff]/g;
48
- function O(e, t) {
49
- let n = e.replace(D, "").replace(/\\[!-/:-@[-`{-~]|(`+)[^`]*?\1(?!`)/g, (e, t) => t ? e.replace(/\\/g, T) : e).replace(/\\([!-/:-@[-`{-~])/g, (e, t) => String.fromCharCode(C + t.charCodeAt(0)));
50
- n = n.replace(/!\[([^\]]*)\]\([^)]*\)/g, (e, n) => n.trim() || ` ${t.image} `), n = n.replace(/\[([^\]]*)\]\([^)]*\)/g, (e, n) => n.trim() || ` ${t.link} `), n = n.replace(/\[([^\]]*)\]\[[^\]]*\]/g, (e, n) => n.trim() || ` ${t.link} `), n = n.replace(/<https?:\/\/[^>\s]+>/g, ` ${t.link} `), n = n.replace(/\bhttps?:\/\/\S+/g, ` ${t.link} `), n = n.replace(y, (e, n) => ` ${S(n, t.emailAt, t.emailDot)} `), n = n.replace(b, (e, n) => ` ${S(n, t.emailAt, t.emailDot)} `), n = n.replace(x, (e) => ` ${S(e, t.emailAt, t.emailDot)} `), n = n.replace(/`+([^`]*)`+/g, (e, t) => t), n = n.replace(/<\/?[a-zA-Z][^>]*>/g, " ");
51
- for (let [e, t] of Object.entries(_)) n = n.split(e).join(t);
52
- return n = n.replace(/(\*\*\*|___)(\S(?:[\s\S]*?\S)?)\1/g, "$2"), n = n.replace(/(\*\*|__)(\S(?:[\s\S]*?\S)?)\1/g, "$2"), n = n.replace(/~~(\S(?:[\s\S]*?\S)?)~~/g, "$1"), n = n.replace(/(^|[\s([{"'])\*(\S(?:[\s\S]*?\S)?)\*(?=$|[\s)\]}"'.,!?;:])/g, "$1$2"), n = n.replace(/(^|[\s([{"'])_(\S(?:[\s\S]*?\S)?)_(?=$|[\s)\]}"'.,!?;:])/g, "$1$2"), n = n.replace(/[\p{Extended_Pictographic}\uFE0F\u200D]/gu, " "), n = n.replace(/[•·▪▫◦‣⁃∙●○■□▶▸►➤➜→←↑↓⇒⇔★☆⭐✦✧✓✔✗✘✕✖]/gu, " "), n = n.replace(/(\d)?\s*[—–―]\s*(\d)?/g, (e, t, n) => t !== void 0 && n !== void 0 ? e : `${t ?? ""}, ${n ?? ""}`), n = n.replace(/\*{2,}/g, ""), n.replace(/\s+/g, " ").replace(/\s+([.,!?;:)\]}])/g, "$1").replace(/([([{])\s+/g, "$1").trim().replace(w, (e) => String.fromCharCode(e.charCodeAt(0) - C)).replace(E, "\\");
47
+ var T = 57600, E = /[\ue121-\ue17e]/g, D = "", O = /\ue180/g, k = /[\ue100-\ue1ff]/g;
48
+ function A(e, t) {
49
+ let n = e.replace(k, "").replace(/\\[!-/:-@[-`{-~]|(`+)[^`]*?\1(?!`)/g, (e, t) => t ? e.replace(/\\/g, D) : e).replace(/\\([!-/:-@[-`{-~])/g, (e, t) => String.fromCharCode(T + t.charCodeAt(0)));
50
+ n = n.replace(/!\[([^\]]*)\]\([^)]*\)/g, (e, n) => n.trim() || ` ${t.image} `), n = n.replace(/\[([^\]]*)\]\([^)]*\)/g, (e, n) => n.trim() || ` ${t.link} `), n = n.replace(/\[([^\]]*)\]\[[^\]]*\]/g, (e, n) => n.trim() || ` ${t.link} `), n = n.replace(/<https?:\/\/[^>\s]+>/g, ` ${t.link} `), n = n.replace(/\bhttps?:\/\/\S+/g, ` ${t.link} `), n = n.replace(x, (e, n) => ` ${w(n, t.emailAt, t.emailDot)} `), n = n.replace(S, (e, n) => ` ${w(n, t.emailAt, t.emailDot)} `), n = n.replace(C, (e) => ` ${w(e, t.emailAt, t.emailDot)} `), n = n.replace(/`+([^`]*)`+/g, (e, t) => t), n = n.replace(/<\/?[a-zA-Z][^>]*>/g, " ");
51
+ for (let [e, t] of Object.entries(y)) n = n.split(e).join(t);
52
+ return n = n.replace(/(\*\*\*|___)(\S(?:[\s\S]*?\S)?)\1/g, "$2"), n = n.replace(/(\*\*|__)(\S(?:[\s\S]*?\S)?)\1/g, "$2"), n = n.replace(/~~(\S(?:[\s\S]*?\S)?)~~/g, "$1"), n = n.replace(/(^|[\s([{"'])\*(\S(?:[\s\S]*?\S)?)\*(?=$|[\s)\]}"'.,!?;:])/g, "$1$2"), n = n.replace(/(^|[\s([{"'])_(\S(?:[\s\S]*?\S)?)_(?=$|[\s)\]}"'.,!?;:])/g, "$1$2"), n = n.replace(/[\p{Extended_Pictographic}\uFE0F\u200D]/gu, " "), n = n.replace(/[•·▪▫◦‣⁃∙●○■□▶▸►➤➜→←↑↓⇒⇔★☆⭐✦✧✓✔✗✘✕✖]/gu, " "), n = n.replace(/(\d)?\s*[—–―]\s*(\d)?/g, (e, t, n) => t !== void 0 && n !== void 0 ? e : `${t ?? ""}, ${n ?? ""}`), n = n.replace(/\*{2,}/g, ""), n.replace(/\s+/g, " ").replace(/\s+([.,!?;:)\]}])/g, "$1").replace(/([([{])\s+/g, "$1").trim().replace(E, (e) => String.fromCharCode(e.charCodeAt(0) - T)).replace(O, "\\");
53
53
  }
54
- function k(e) {
54
+ function j(e) {
55
55
  let t = e.trim();
56
- return t ? d.test(t) ? t : `${t}.` : "";
56
+ return t ? p.test(t) ? t : `${t}.` : "";
57
57
  }
58
- function A(e, t, n) {
58
+ function M(e, t, n) {
59
59
  if (e.length <= t) return e;
60
60
  let r = e.slice(0, t), i = Math.max(r.lastIndexOf(". "), r.lastIndexOf("\n")), a = r.lastIndexOf(" "), o = i > t * .5 ? i + 1 : a > 0 ? a : t;
61
61
  return `${r.slice(0, o).trim()}\n${n}`;
62
62
  }
63
- function j(e) {
63
+ function N(e) {
64
64
  let t = 0;
65
65
  for (let n of e) t += n === " " ? 4 : 1;
66
66
  return t;
67
67
  }
68
- function M(e, t) {
68
+ function P(e, t) {
69
69
  let n = e[e.length - 1];
70
70
  if (!n?.ordinal) return "";
71
71
  if (e.length === 1) return `${n.ordinal}. `;
72
72
  let r = e.map((e) => e.ordinal);
73
- return r.every((e) => !!e) ? `${r.join(".")}. ` : `${m(t.nestedItem, { ordinal: n.ordinal })}. `;
73
+ return r.every((e) => !!e) ? `${r.join(".")}. ` : `${g(t.nestedItem, { ordinal: n.ordinal })}. `;
74
74
  }
75
- function N(t, n = {}) {
75
+ function F(t, n = {}) {
76
76
  let r = {
77
77
  ...e,
78
78
  ...n.labels
79
- }, i = n.maxChars ?? 8e3, d = n.maxSpokenTableRows ?? 3;
79
+ }, i = n.maxChars ?? 8e3, a = n.maxSpokenTableRows ?? 3;
80
80
  if (!t) return "";
81
- let _ = t.replace(/\r\n?/g, "\n").split("\n"), v = [], y = [], b = 0;
82
- for (; b < _.length;) {
83
- let e = _[b].replace(c, ""), t = b === 0 || !_[b - 1].replace(c, "").trim();
84
- if (a.test(e)) {
85
- for (b += 1; b < _.length && !a.test(_[b].replace(c, ""));) b += 1;
86
- b += 1, v.push(k(r.codeBlock));
81
+ let o = t.replace(/\r\n?/g, "\n").split("\n"), p = [], y = [], b = 0;
82
+ for (; b < o.length;) {
83
+ let e = o[b].replace(u, ""), t = b === 0 || !o[b - 1].replace(u, "").trim();
84
+ if (s.test(e)) {
85
+ for (b += 1; b < o.length && !s.test(o[b].replace(u, ""));) b += 1;
86
+ b += 1, p.push(j(r.codeBlock));
87
87
  continue;
88
88
  }
89
- if (t && y.length === 0 && e.trim() && p.test(e)) {
90
- for (b += 1; b < _.length;) {
91
- let e = _[b].replace(c, "");
92
- if (e.trim() && p.test(e)) {
89
+ if (t && y.length === 0 && e.trim() && h.test(e)) {
90
+ for (b += 1; b < o.length;) {
91
+ let e = o[b].replace(u, "");
92
+ if (e.trim() && h.test(e)) {
93
93
  b += 1;
94
94
  continue;
95
95
  }
96
96
  if (e.trim()) break;
97
97
  let t = b;
98
- for (; t < _.length && !_[t].replace(c, "").trim();) t += 1;
99
- let n = t < _.length ? _[t].replace(c, "") : "";
100
- if (!n.trim() || !p.test(n)) break;
98
+ for (; t < o.length && !o[t].replace(u, "").trim();) t += 1;
99
+ let n = t < o.length ? o[t].replace(u, "") : "";
100
+ if (!n.trim() || !h.test(n)) break;
101
101
  b = t;
102
102
  }
103
- v.push(k(r.codeBlock));
103
+ p.push(j(r.codeBlock));
104
104
  continue;
105
105
  }
106
- if (s.test(e)) {
106
+ if (l.test(e)) {
107
107
  b += 1;
108
108
  continue;
109
109
  }
110
- if (f.test(e)) {
110
+ if (m.test(e)) {
111
111
  b += 1;
112
112
  continue;
113
113
  }
114
- let n = b + 1 < _.length ? _[b + 1].replace(c, "") : "";
115
- if (e.includes("|") && h(n)) {
114
+ let n = b + 1 < o.length ? o[b + 1].replace(u, "") : "";
115
+ if (e.includes("|") && _(n)) {
116
116
  y.length = 0;
117
- let t = g(e).map((e) => O(e, r));
117
+ let t = v(e).map((e) => A(e, r));
118
118
  b += 2;
119
119
  let n = [];
120
- for (; b < _.length;) {
121
- let e = _[b].replace(c, "");
120
+ for (; b < o.length;) {
121
+ let e = o[b].replace(u, "");
122
122
  if (!e.includes("|") || !e.trim()) break;
123
- n.push(g(e).map((e) => O(e, r))), b += 1;
123
+ n.push(v(e).map((e) => A(e, r))), b += 1;
124
124
  }
125
- if (n.length > d) v.push(k(m(r.largeTable, {
125
+ if (n.length > a) p.push(j(g(r.largeTable, {
126
126
  rows: n.length,
127
127
  columns: t.length
128
128
  })));
@@ -132,44 +132,44 @@ function N(t, n = {}) {
132
132
  let r = t[n];
133
133
  return r ? `${r}: ${e}` : e;
134
134
  }).filter(Boolean);
135
- n.length && v.push(k(n.join(", ")));
135
+ n.length && p.push(j(n.join(", ")));
136
136
  }
137
137
  continue;
138
138
  }
139
139
  if (b += 1, !e.trim()) continue;
140
- let i = o.exec(e);
140
+ let i = c.exec(e);
141
141
  if (i) {
142
142
  y.length = 0;
143
- let e = O(i[1].replace(/\s+#+\s*$/, ""), r);
144
- e && v.push(k(e));
143
+ let e = A(i[1].replace(/\s+#+\s*$/, ""), r);
144
+ e && p.push(j(e));
145
145
  continue;
146
146
  }
147
- let x = l.exec(e), S = e, C = "";
147
+ let x = d.exec(e), S = e, C = "";
148
148
  if (x) {
149
- S = e.slice(x[0].length).replace(u, "");
150
- let t = j(x[1]);
149
+ S = e.slice(x[0].length).replace(f, "");
150
+ let t = N(x[1]);
151
151
  for (; y.length > 0 && y[y.length - 1].indent >= t;) y.pop();
152
152
  y.push({
153
153
  indent: t,
154
154
  ordinal: x[2] ?? null
155
- }), C = M(y, r);
155
+ }), C = P(y, r);
156
156
  } else /^\s/.test(e) || (y.length = 0);
157
- if (!x && f.test(n)) {
157
+ if (!x && m.test(n)) {
158
158
  y.length = 0, b += 1;
159
- let t = O(e, r);
160
- t && v.push(k(t));
159
+ let t = A(e, r);
160
+ t && p.push(j(t));
161
161
  continue;
162
162
  }
163
- let w = O(S, r);
164
- w && v.push(k(`${C}${w}`));
163
+ let w = A(S, r);
164
+ w && p.push(j(`${C}${w}`));
165
165
  }
166
- return A(v.join("\n").replace(/\n{2,}/g, "\n").trim(), i, k(r.truncated));
166
+ return M(p.join("\n").replace(/\n{2,}/g, "\n").trim(), i, j(r.truncated));
167
167
  }
168
- var P = new Set([
168
+ var I = new Set([
169
169
  ".",
170
170
  "!",
171
171
  "?"
172
- ]), F = new Set([
172
+ ]), L = new Set([
173
173
  "。",
174
174
  "!",
175
175
  "?",
@@ -183,7 +183,7 @@ var P = new Set([
183
183
  "۔",
184
184
  "؟",
185
185
  "؛"
186
- ]), I = new Set([
186
+ ]), R = new Set([
187
187
  "\"",
188
188
  "'",
189
189
  ")",
@@ -198,25 +198,25 @@ var P = new Set([
198
198
  "』",
199
199
  "】",
200
200
  ")"
201
- ]), L = new Set(/* @__PURE__ */ "i.e,e.g,etc,approx,vs,cf,viz,al,est,dept,fig,figs,ref,min,max,avg,qty,temp,mr,mrs,ms,dr,prof,sr,jr,st,inc,ltd,co,corp,univ,ca,kg,mg,gm,ha,cm,mm,km,ml,lb,oz,sq,hrs,wk,yr,mo,vol,pp".split(",")), R = new Set([
201
+ ]), z = new Set(/* @__PURE__ */ "i.e,e.g,etc,approx,vs,cf,viz,al,est,dept,fig,figs,ref,min,max,avg,qty,temp,mr,mrs,ms,dr,prof,sr,jr,st,inc,ltd,co,corp,univ,ca,kg,mg,gm,ha,cm,mm,km,ml,lb,oz,sq,hrs,wk,yr,mo,vol,pp".split(",")), B = new Set([
202
202
  "no",
203
203
  "nos",
204
204
  "p",
205
205
  "ch",
206
206
  "sec",
207
207
  "art"
208
- ]), z = /^\d+(?:\.\d+)*$/, B = /^[A-Za-z]$/;
209
- function V(e, t, n) {
210
- for (let r = t; r < n; r += 1) if (F.has(e[r])) return !0;
208
+ ]), V = /^\d+(?:\.\d+)*$/, H = /^[A-Za-z]$/;
209
+ function U(e, t, n) {
210
+ for (let r = t; r < n; r += 1) if (L.has(e[r])) return !0;
211
211
  if (n < e.length && !/\s/.test(e[n])) return !1;
212
212
  if (e[t] !== ".") return !0;
213
213
  let r = e.slice(0, t), i = /(\S+)$/.exec(r)?.[1] ?? "";
214
214
  if (!i) return !0;
215
- if (z.test(i) && !r.slice(0, r.length - i.length).trim()) return !1;
215
+ if (V.test(i) && !r.slice(0, r.length - i.length).trim()) return !1;
216
216
  let a = i.toLowerCase();
217
- return B.test(i) || L.has(a) ? !1 : R.has(a) ? !/^\s*\d/.test(e.slice(n)) : !0;
217
+ return H.test(i) || z.has(a) ? !1 : B.has(a) ? !/^\s*\d/.test(e.slice(n)) : !0;
218
218
  }
219
- function H(e) {
219
+ function W(e) {
220
220
  let t = [];
221
221
  for (let n of e.split("\n")) {
222
222
  let e = n.trim();
@@ -224,14 +224,14 @@ function H(e) {
224
224
  let r = 0, i = 0;
225
225
  for (; i < e.length;) {
226
226
  let n = e[i];
227
- if (!P.has(n) && !F.has(n)) {
227
+ if (!I.has(n) && !L.has(n)) {
228
228
  i += 1;
229
229
  continue;
230
230
  }
231
231
  let a = i;
232
- for (; a < e.length && (P.has(e[a]) || F.has(e[a]));) a += 1;
233
- for (; a < e.length && I.has(e[a]);) a += 1;
234
- if (V(e, i, a)) {
232
+ for (; a < e.length && (I.has(e[a]) || L.has(e[a]));) a += 1;
233
+ for (; a < e.length && R.has(e[a]);) a += 1;
234
+ if (U(e, i, a)) {
235
235
  let n = e.slice(r, a).trim();
236
236
  n && t.push(n), r = a;
237
237
  }
@@ -242,40 +242,40 @@ function H(e) {
242
242
  }
243
243
  return t;
244
244
  }
245
- var U = /[\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff\uff66-\uff9f]/, W = /[\u3000-\u303f\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff\uff01-\uff9f]/, G = /[、,,;;::。!?!?]/, K = /[A-Za-z0-9][A-Za-z0-9._,:%/+-]*[A-Za-z0-9%]|[\s\S]/gu;
246
- function q(e) {
247
- return U.test(e);
245
+ var G = /[\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff\uff66-\uff9f]/, K = /[\u3000-\u303f\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff\uff01-\uff9f]/, q = /[、,,;;::。!?!?]/, J = /[A-Za-z0-9][A-Za-z0-9._,:%/+-]*[A-Za-z0-9%]|[\s\S]/gu;
246
+ function Y(e) {
247
+ return G.test(e);
248
248
  }
249
- function J(e, t) {
249
+ function X(e, t) {
250
250
  let n = `${e.slice(-1)}${t.slice(0, 1)}`;
251
- return W.test(n) ? `${e}${t}` : `${e} ${t}`;
251
+ return K.test(n) ? `${e}${t}` : `${e} ${t}`;
252
252
  }
253
- function Y(e, t) {
253
+ function Z(e, t) {
254
254
  let n = t.trim();
255
255
  n && e.push(n);
256
256
  }
257
- function X(e, t) {
257
+ function Q(e, t) {
258
258
  let n = [], r = "", i = -1;
259
- for (let a of e.match(K) ?? []) {
259
+ for (let a of e.match(J) ?? []) {
260
260
  if (r.length + a.length > t && r.trim()) {
261
261
  if (i > 0 && i < r.length && i >= t * .4) {
262
- Y(n, r.slice(0, i));
262
+ Z(n, r.slice(0, i));
263
263
  let e = r.slice(i);
264
- e.trim().length + a.length > t ? (Y(n, e), r = "") : r = e;
265
- } else Y(n, r), r = "";
264
+ e.trim().length + a.length > t ? (Z(n, e), r = "") : r = e;
265
+ } else Z(n, r), r = "";
266
266
  i = -1;
267
267
  }
268
268
  if (a.length > t) {
269
- Y(n, r), r = "", i = -1;
269
+ Z(n, r), r = "", i = -1;
270
270
  for (let e = 0; e < a.length; e += t) n.push(a.slice(e, e + t));
271
271
  continue;
272
272
  }
273
- r += a, G.test(a) && (i = r.length);
273
+ r += a, q.test(a) && (i = r.length);
274
274
  }
275
- return Y(n, r), n;
275
+ return Z(n, r), n;
276
276
  }
277
- function Z(e, t) {
278
- if (q(e)) return X(e, t);
277
+ function $(e, t) {
278
+ if (Y(e)) return Q(e, t);
279
279
  let n = [], r = "";
280
280
  for (let i of e.split(/\s+/)) {
281
281
  if (i.length > t) {
@@ -287,29 +287,43 @@ function Z(e, t) {
287
287
  }
288
288
  return r && n.push(r), n;
289
289
  }
290
- function Q(e, t = 180, n = 40) {
291
- let r = Math.max(1, t), i = Math.max(1, Math.min(n, r)), a = [], o = "", s = r;
292
- for (let t of H(e)) {
293
- let e = q(t) ? i : r;
290
+ function ee(e, t = 180, n = 40, r = {}) {
291
+ let i = Math.max(1, t), a = Math.max(1, Math.min(n, i)), o = [], s = "", c = i;
292
+ for (let t of W(e)) {
293
+ let e = Y(t) ? a : i;
294
294
  if (t.length > e) {
295
- o &&= (a.push(o), ""), a.push(...Z(t, e)), s = r;
295
+ s &&= (o.push(s), ""), o.push(...$(t, e)), c = i;
296
296
  continue;
297
297
  }
298
- if (!o) {
299
- o = t, s = e;
298
+ if (!s) {
299
+ s = t, c = e;
300
300
  continue;
301
301
  }
302
- let n = J(o, t), c = Math.min(s, e);
303
- n.length <= c ? (o = n, s = c) : (a.push(o), o = t, s = e);
302
+ let n = X(s, t), r = Math.min(c, e);
303
+ n.length <= r ? (s = n, c = r) : (o.push(s), s = t, c = e);
304
304
  }
305
- if (o && a.push(o), a.length > 1) {
306
- let e = H(a[0]);
305
+ if (s && o.push(s), o.length > 1) {
306
+ let e = W(o[0]);
307
307
  if (e.length > 1) {
308
308
  let [t, ...n] = e;
309
- a.splice(0, 1, t, n.reduce((e, t) => J(e, t)));
309
+ o.splice(0, 1, t, n.reduce((e, t) => X(e, t)));
310
310
  }
311
311
  }
312
- return a;
312
+ if (r.firstChunkMaxChars !== void 0 && o.length > 0) {
313
+ let [e, t] = te(o[0], r.firstChunkMaxChars);
314
+ t && o.splice(0, 1, e, t);
315
+ }
316
+ return o;
317
+ }
318
+ function te(e, t) {
319
+ if (e.length <= t || Y(e)) return [e, null];
320
+ for (let n = Math.min(t, e.length - 1); n >= o; --n) {
321
+ let t = e[n - 1], r = e[n];
322
+ if (!("—–".includes(t) || ",;:".includes(t) && /\s/.test(r))) continue;
323
+ let i = e.slice(0, n).trimEnd(), a = e.slice(n).trimStart();
324
+ if (i && a) return [i, a];
325
+ }
326
+ return [e, null];
313
327
  }
314
328
  //#endregion
315
- export { e as DEFAULT_SPEAKABLE_LABELS, n as MAX_SPEAKABLE_CHARS, t as MAX_SPOKEN_TABLE_ROWS, r as SPEECH_CHUNK_CHARS, i as SPEECH_CHUNK_CJK_CHARS, Q as chunkForSpeech, q as containsCjk, S as speakableEmail, g as splitTableRow, N as toSpeakableText };
329
+ export { e as DEFAULT_SPEAKABLE_LABELS, n as MAX_SPEAKABLE_CHARS, t as MAX_SPOKEN_TABLE_ROWS, r as SPEECH_CHUNK_CHARS, i as SPEECH_CHUNK_CJK_CHARS, a as SPEECH_FIRST_CHUNK_MAX_CHARS, ee as chunkForSpeech, Y as containsCjk, w as speakableEmail, v as splitTableRow, F as toSpeakableText };
@@ -70,6 +70,18 @@ export type VoiceSessionEvent =
70
70
  } | {
71
71
  type: 'reply';
72
72
  text: string;
73
+ }
74
+ /**
75
+ * ★ BOFF-8062 (C1): this turn's reply has STARTED being spoken from the
76
+ * speech feed — at the turn's `answerDone`, before the reply message is
77
+ * complete in the store. Only a `thinking` moves, to `speaking`, exactly as
78
+ * `reply` does; the later `reply` for the same id is then a no-op because the
79
+ * caller claimed it (`planReplyConsumption`). C1 never pauses a reply, so no
80
+ * path strands the session in `thinking`.
81
+ */
82
+ | {
83
+ type: 'reply-audio-started';
84
+ replyId: string;
73
85
  } | {
74
86
  type: 'speech-ended';
75
87
  } | {
@@ -1 +1 @@
1
- {"version":3,"file":"voiceSession.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/voice/voiceSession.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAAE,CAY1C;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,oBAAoB,GAAG,OAAO,CAKnE;AAED,gFAAgF;AAChF,wBAAgB,OAAO,CAAC,QAAQ,EAAE,oBAAoB,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,CAatG"}
@@ -100,6 +100,12 @@ function m(e, t, n = null) {
100
100
  pending: "",
101
101
  interim: ""
102
102
  } : e;
103
+ case "reply-audio-started": return e.phase === "thinking" ? {
104
+ ...e,
105
+ phase: "speaking",
106
+ pending: "",
107
+ interim: ""
108
+ } : e;
103
109
  case "speech-ended": return e.phase === "speaking" ? {
104
110
  ...e,
105
111
  phase: "listening",
@@ -0,0 +1,23 @@
1
+ /**
2
+ * ★ BOFF-8060 (N1a): where a navigation entry TAKES the person.
3
+ *
4
+ * One rule, three users: the collapsed sidebar, the mobile tab bar and the
5
+ * assistant's "go to <page>". A parent entry does not necessarily navigate to
6
+ * its own `path`: the sidebar opens its `homePath`, otherwise its first
7
+ * child, and only then its own `path`. The assistant used to navigate to
8
+ * `path` alone, so on a parent like HealthyBowl's "Account & Security" it
9
+ * landed on a route the sidebar never opens (`/auth`, which redirects to a
10
+ * shell-less login page and unmounts the panel).
11
+ *
12
+ * Layer 0 and pure on purpose: `localUiCommands.ts` imports it without
13
+ * importing anything under `chrome/`.
14
+ */
15
+ export interface NavTargetEntry {
16
+ path: string;
17
+ homePath?: string | undefined;
18
+ children?: ReadonlyArray<{
19
+ path: string;
20
+ }> | undefined;
21
+ }
22
+ export declare function navTargetPath(item: NavTargetEntry): string;
23
+ //# sourceMappingURL=navTargetPath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navTargetPath.d.ts","sourceRoot":"","sources":["../../../src/shared/navigation/navTargetPath.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,QAAQ,CAAC,EAAE,aAAa,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;CACxD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAE1D"}
@@ -0,0 +1,6 @@
1
+ //#region src/shared/navigation/navTargetPath.ts
2
+ function e(e) {
3
+ return e.homePath || e.children?.[0]?.path || e.path;
4
+ }
5
+ //#endregion
6
+ export { e as navTargetPath };