@belonguniverseai/react-sdk 0.4.3 → 0.6.0

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 (65) hide show
  1. package/dist/api/client.d.ts +100 -2
  2. package/dist/api/skills.d.ts +6 -1
  3. package/dist/component/{arc-ByLm_58u.js → arc-DpA4gw3l.js} +2 -2
  4. package/dist/component/{architectureDiagram-3BPJPVTR-DcYT4v9Q.js → architectureDiagram-3BPJPVTR-C8WjH-Q1.js} +3 -3
  5. package/dist/component/{blockDiagram-GPEHLZMM-CHk-YSun.js → blockDiagram-GPEHLZMM-O9IURu7q.js} +4 -4
  6. package/dist/component/{c4Diagram-AAUBKEIU-CEV2fwh-.js → c4Diagram-AAUBKEIU-B4cFy6te.js} +3 -3
  7. package/dist/component/{channel-D67v09ii.js → channel-7qPdE580.js} +2 -2
  8. package/dist/component/{chunk-2J33WTMH-Bsl2GBCp.js → chunk-2J33WTMH-CUyqMMUN.js} +2 -2
  9. package/dist/component/{chunk-4BX2VUAB-BKmdmdRY.js → chunk-4BX2VUAB-4MjzMD47.js} +2 -2
  10. package/dist/component/{chunk-55IACEB6-DnliqOsL.js → chunk-55IACEB6-BOiOLlJY.js} +2 -2
  11. package/dist/component/{chunk-727SXJPM-O0BgSnK_.js → chunk-727SXJPM-D7rQvYjL.js} +6 -6
  12. package/dist/component/{chunk-AQP2D5EJ-CwBA3VVY.js → chunk-AQP2D5EJ-B4yIZLgM.js} +4 -4
  13. package/dist/component/{chunk-FMBD7UC4-CG5DaKp9.js → chunk-FMBD7UC4-CHC657o0.js} +2 -2
  14. package/dist/component/{chunk-ND2GUHAM-COsoTCa0.js → chunk-ND2GUHAM-BAq6BoPv.js} +2 -2
  15. package/dist/component/{chunk-QZHKN3VN-9FjIin4_.js → chunk-QZHKN3VN-DSE2KpkL.js} +2 -2
  16. package/dist/component/{classDiagram-4FO5ZUOK-DyQO35S9.js → classDiagram-4FO5ZUOK-Dp6GpqVA.js} +3 -3
  17. package/dist/component/{classDiagram-v2-Q7XG4LA2-DyQO35S9.js → classDiagram-v2-Q7XG4LA2-Dp6GpqVA.js} +3 -3
  18. package/dist/component/{cose-bilkent-S5V4N54A-BTN6Bz9E.js → cose-bilkent-S5V4N54A-D7qy0jl5.js} +2 -2
  19. package/dist/component/{dagre-BM42HDAG-COU3yvtF.js → dagre-BM42HDAG-Bp1xKCuc.js} +2 -2
  20. package/dist/component/{diagram-2AECGRRQ-r4LO_uyu.js → diagram-2AECGRRQ-BgnTJHhy.js} +3 -3
  21. package/dist/component/{diagram-5GNKFQAL-CraSe8h_.js → diagram-5GNKFQAL-D2Sf6fvv.js} +4 -4
  22. package/dist/component/{diagram-KO2AKTUF-Dh-L6_aX.js → diagram-KO2AKTUF-B6q2Givz.js} +3 -3
  23. package/dist/component/{diagram-LMA3HP47-Bv8QREaH.js → diagram-LMA3HP47-Dd-PZ9QO.js} +3 -3
  24. package/dist/component/{diagram-OG6HWLK6-Jf-6CDV4.js → diagram-OG6HWLK6-v65-inn8.js} +4 -4
  25. package/dist/component/{erDiagram-TEJ5UH35-CN8X2drH.js → erDiagram-TEJ5UH35-s5ngcfah.js} +5 -5
  26. package/dist/component/{flowDiagram-I6XJVG4X-CloAsK8k.js → flowDiagram-I6XJVG4X-C-3l7ZN2.js} +7 -7
  27. package/dist/component/{ganttDiagram-6RSMTGT7-DAlRM4jt.js → ganttDiagram-6RSMTGT7-AFajly3C.js} +3 -3
  28. package/dist/component/{gitGraphDiagram-PVQCEYII-BPVdEwuf.js → gitGraphDiagram-PVQCEYII-DLcn7CA-.js} +4 -4
  29. package/dist/component/{highlighted-body-OFNGDK62-BEd7ynwt.js → highlighted-body-OFNGDK62-C7pDeGQU.js} +2 -2
  30. package/dist/component/index.js +1 -1
  31. package/dist/component/{infoDiagram-5YYISTIA-CyJi6c7l.js → infoDiagram-5YYISTIA-BuR4-KVY.js} +2 -2
  32. package/dist/component/{ishikawaDiagram-YF4QCWOH-CNKCQHOP.js → ishikawaDiagram-YF4QCWOH-DlsfzgFK.js} +2 -2
  33. package/dist/component/{journeyDiagram-JHISSGLW-DFN0WY5F.js → journeyDiagram-JHISSGLW-D0rpdvR5.js} +5 -5
  34. package/dist/component/{kanban-definition-UN3LZRKU-BT6YDPZA.js → kanban-definition-UN3LZRKU-Cz0Dixqc.js} +3 -3
  35. package/dist/component/{linear-BcyQd0z0.js → linear-BVVr39mA.js} +2 -2
  36. package/dist/component/{mermaid-GHXKKRXX-DiPCfS1n.js → mermaid-GHXKKRXX-BEhqkLaB.js} +24629 -24036
  37. package/dist/component/{mindmap-definition-RKZ34NQL-BND7KvId.js → mindmap-definition-RKZ34NQL-wo3l0Jy7.js} +4 -4
  38. package/dist/component/{pieDiagram-4H26LBE5-CvDdRFnN.js → pieDiagram-4H26LBE5-TtxT_WMN.js} +4 -4
  39. package/dist/component/{quadrantDiagram-W4KKPZXB-DMHCLEev.js → quadrantDiagram-W4KKPZXB-DK6ShvdY.js} +3 -3
  40. package/dist/component/{requirementDiagram-4Y6WPE33-BomcVKb4.js → requirementDiagram-4Y6WPE33-Z0IavHMQ.js} +4 -4
  41. package/dist/component/{sankeyDiagram-5OEKKPKP-D4rmtFCn.js → sankeyDiagram-5OEKKPKP-C408nFHk.js} +2 -2
  42. package/dist/component/{sequenceDiagram-3UESZ5HK-C0iEDbuE.js → sequenceDiagram-3UESZ5HK-CMFVhmkn.js} +4 -4
  43. package/dist/component/{stateDiagram-AJRCARHV-x0PonbWT.js → stateDiagram-AJRCARHV-C6Z5V-Yt.js} +3 -3
  44. package/dist/component/{stateDiagram-v2-BHNVJYJU-6Lq1LlSV.js → stateDiagram-v2-BHNVJYJU-CztCn1yf.js} +3 -3
  45. package/dist/component/{timeline-definition-PNZ67QCA-CIx8lwoQ.js → timeline-definition-PNZ67QCA-D_9a8hKa.js} +3 -3
  46. package/dist/component/{vennDiagram-CIIHVFJN-B27Ya-3D.js → vennDiagram-CIIHVFJN-HuWQgr4e.js} +2 -2
  47. package/dist/component/{wardleyDiagram-YWT4CUSO-efmvFwPj.js → wardleyDiagram-YWT4CUSO-CeUvdi76.js} +3 -3
  48. package/dist/component/{xychartDiagram-2RQKCTM6-DNJmorKa.js → xychartDiagram-2RQKCTM6-DNmBGn_r.js} +3 -3
  49. package/dist/components/ui/badge.d.ts +1 -1
  50. package/dist/embed/approval-bus.d.ts +5 -0
  51. package/dist/embed/slash-commands.d.ts +24 -7
  52. package/dist/embed/voice/agent-queue.d.ts +106 -0
  53. package/dist/embed/voice/call-roster-store.d.ts +110 -0
  54. package/dist/embed/voice/line-dispatch.d.ts +6 -2
  55. package/dist/embed/voice/line-run-reader.d.ts +3 -1
  56. package/dist/embed/voice-call-lines.d.ts +20 -0
  57. package/dist/embed/voice-call-pacing.d.ts +47 -9
  58. package/dist/embed/voice-call.d.ts +70 -14
  59. package/dist/i18n/messages/en.d.ts +29 -15
  60. package/dist/i18n/messages/surfaces/stream.d.ts +46 -0
  61. package/dist/stream/ai-sdk-part-renderers.d.ts +23 -6
  62. package/dist/stream/belong-chat-transport.d.ts +57 -0
  63. package/dist/stream/belong-data-parts.d.ts +44 -1
  64. package/dist/types/public.d.ts +1 -1
  65. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- import { g as oe } from "./chunk-55IACEB6-DnliqOsL.js";
2
- import { s as ae } from "./chunk-2J33WTMH-Bsl2GBCp.js";
3
- import { _ as l, l as C, p as ce, r as le, G as he, K as G, c as B, i as F, b6 as de, af as ge, ag as ue, ah as pe } from "./mermaid-GHXKKRXX-DiPCfS1n.js";
1
+ import { g as oe } from "./chunk-55IACEB6-BOiOLlJY.js";
2
+ import { s as ae } from "./chunk-2J33WTMH-CUyqMMUN.js";
3
+ import { _ as l, l as C, p as ce, r as le, G as he, K as G, c as B, i as F, b6 as de, af as ge, ag as ue, ah as pe } from "./mermaid-GHXKKRXX-BEhqkLaB.js";
4
4
  globalThis.process = globalThis.process || { env: {} };
5
5
  globalThis.global = globalThis.global || globalThis;
6
6
  const b = [];
@@ -830,4 +830,4 @@ var _e = Y, ke = 12, N = {
830
830
  export {
831
831
  we as diagram
832
832
  };
833
- //# sourceMappingURL=mindmap-definition-RKZ34NQL-BND7KvId.js.map
833
+ //# sourceMappingURL=mindmap-definition-RKZ34NQL-wo3l0Jy7.js.map
@@ -1,7 +1,7 @@
1
- import { a0 as S, S as R, b5 as J, g as Q, s as Y, a as tt, b as et, t as at, q as nt, _ as g, l as W, c as rt, I as it, N as st, a7 as lt, e as ot, B as ct, K as ut } from "./mermaid-GHXKKRXX-DiPCfS1n.js";
2
- import { p as gt } from "./chunk-4BX2VUAB-BKmdmdRY.js";
1
+ import { a0 as S, S as R, b5 as J, g as Q, s as Y, a as tt, b as et, t as at, q as nt, _ as g, l as W, c as rt, I as it, N as st, a7 as lt, e as ot, B as ct, K as ut } from "./mermaid-GHXKKRXX-BEhqkLaB.js";
2
+ import { p as gt } from "./chunk-4BX2VUAB-4MjzMD47.js";
3
3
  import { p as dt } from "./wardley-L42UT6IY-HA1eSIS_.js";
4
- import { d as P } from "./arc-ByLm_58u.js";
4
+ import { d as P } from "./arc-DpA4gw3l.js";
5
5
  import { o as pt } from "./ordinal-D0x7izaa.js";
6
6
  globalThis.process = globalThis.process || { env: {} };
7
7
  globalThis.global = globalThis.global || globalThis;
@@ -163,4 +163,4 @@ var vt = ut.pie, z = {
163
163
  export {
164
164
  Lt as diagram
165
165
  };
166
- //# sourceMappingURL=pieDiagram-4H26LBE5-CvDdRFnN.js.map
166
+ //# sourceMappingURL=pieDiagram-4H26LBE5-TtxT_WMN.js.map
@@ -1,5 +1,5 @@
1
- import { s as Se, g as _e, t as ee, q as Ae, a as ke, b as Fe, _ as r, c as Et, l as qt, d as vt, e as Pe, B as ve, K as z, i as Ce, a4 as Le } from "./mermaid-GHXKKRXX-DiPCfS1n.js";
2
- import { l as te } from "./linear-BcyQd0z0.js";
1
+ import { s as Se, g as _e, t as ee, q as Ae, a as ke, b as Fe, _ as r, c as Et, l as qt, d as vt, e as Pe, B as ve, K as z, i as Ce, a4 as Le } from "./mermaid-GHXKKRXX-BEhqkLaB.js";
2
+ import { l as te } from "./linear-BVVr39mA.js";
3
3
  globalThis.process = globalThis.process || { env: {} };
4
4
  globalThis.global = globalThis.global || globalThis;
5
5
  var Ct = (function() {
@@ -1030,4 +1030,4 @@ var Ve = /* @__PURE__ */ r(function() {
1030
1030
  export {
1031
1031
  We as diagram
1032
1032
  };
1033
- //# sourceMappingURL=quadrantDiagram-W4KKPZXB-DMHCLEev.js.map
1033
+ //# sourceMappingURL=quadrantDiagram-W4KKPZXB-DK6ShvdY.js.map
@@ -1,6 +1,6 @@
1
- import { g as Ge } from "./chunk-55IACEB6-DnliqOsL.js";
2
- import { s as ze } from "./chunk-2J33WTMH-Bsl2GBCp.js";
3
- import { _ as h, G as Ye, b as Xe, a as Je, s as Ze, g as et, q as tt, t as st, c as ke, l as Ne, B as it, F as rt, p as nt, r as at, u as lt } from "./mermaid-GHXKKRXX-DiPCfS1n.js";
1
+ import { g as Ge } from "./chunk-55IACEB6-BOiOLlJY.js";
2
+ import { s as ze } from "./chunk-2J33WTMH-CUyqMMUN.js";
3
+ import { _ as h, G as Ye, b as Xe, a as Je, s as Ze, g as et, q as tt, t as st, c as ke, l as Ne, B as it, F as rt, p as nt, r as at, u as lt } from "./mermaid-GHXKKRXX-BEhqkLaB.js";
4
4
  globalThis.process = globalThis.process || { env: {} };
5
5
  globalThis.global = globalThis.global || globalThis;
6
6
  var qe = (function() {
@@ -885,4 +885,4 @@ var mt = /* @__PURE__ */ h(async function(e, u, o, n) {
885
885
  export {
886
886
  Rt as diagram
887
887
  };
888
- //# sourceMappingURL=requirementDiagram-4Y6WPE33-BomcVKb4.js.map
888
+ //# sourceMappingURL=requirementDiagram-4Y6WPE33-Z0IavHMQ.js.map
@@ -1,4 +1,4 @@
1
- import { q as kt, t as mt, s as xt, g as _t, b as vt, a as bt, _ as y, c as ot, C as St, d as G, ai as wt, B as Lt, k as Et } from "./mermaid-GHXKKRXX-DiPCfS1n.js";
1
+ import { q as kt, t as mt, s as xt, g as _t, b as vt, a as bt, _ as y, c as ot, C as St, d as G, ai as wt, B as Lt, k as Et } from "./mermaid-GHXKKRXX-BEhqkLaB.js";
2
2
  import { o as Tt } from "./ordinal-D0x7izaa.js";
3
3
  globalThis.process = globalThis.process || { env: {} };
4
4
  globalThis.global = globalThis.global || globalThis;
@@ -859,4 +859,4 @@ var ge = {
859
859
  export {
860
860
  ge as diagram
861
861
  };
862
- //# sourceMappingURL=sankeyDiagram-5OEKKPKP-D4rmtFCn.js.map
862
+ //# sourceMappingURL=sankeyDiagram-5OEKKPKP-C408nFHk.js.map
@@ -1,6 +1,6 @@
1
- import { _ as g, o as tr, c as $, d as Mt, l as at, j as Ce, e as er, f as rr, k as P, b as ke, s as ar, q as sr, a as ir, g as nr, t as or, v as cr, J as lr, B as hr, i as Bt, u as Z, a5 as Q, a6 as wt, a7 as Me, a8 as dr, G as Yt, a9 as Tr, aa as Be } from "./mermaid-GHXKKRXX-DiPCfS1n.js";
2
- import { a as pr, b as ee, g as dt, d as Er, e as re, f as ae } from "./chunk-ND2GUHAM-COsoTCa0.js";
3
- import { I as ur } from "./chunk-QZHKN3VN-9FjIin4_.js";
1
+ import { _ as g, o as tr, c as $, d as Mt, l as at, j as Ce, e as er, f as rr, k as P, b as ke, s as ar, q as sr, a as ir, g as nr, t as or, v as cr, J as lr, B as hr, i as Bt, u as Z, a5 as Q, a6 as wt, a7 as Me, a8 as dr, G as Yt, a9 as Tr, aa as Be } from "./mermaid-GHXKKRXX-BEhqkLaB.js";
2
+ import { a as pr, b as ee, g as dt, d as Er, e as re, f as ae } from "./chunk-ND2GUHAM-BAq6BoPv.js";
3
+ import { I as ur } from "./chunk-QZHKN3VN-DSE2KpkL.js";
4
4
  globalThis.process = globalThis.process || { env: {} };
5
5
  globalThis.global = globalThis.global || globalThis;
6
6
  var $t = (function() {
@@ -2894,4 +2894,4 @@ var ra = /* @__PURE__ */ g(async function(e, t, a) {
2894
2894
  export {
2895
2895
  Ta as diagram
2896
2896
  };
2897
- //# sourceMappingURL=sequenceDiagram-3UESZ5HK-C0iEDbuE.js.map
2897
+ //# sourceMappingURL=sequenceDiagram-3UESZ5HK-CMFVhmkn.js.map
@@ -1,5 +1,5 @@
1
- import { s as R, a as W, S as N } from "./chunk-AQP2D5EJ-CwBA3VVY.js";
2
- import { _ as f, c as t, d as M, l as S, e as P, k as z, ac as _, ad as U, a9 as C, u as F } from "./mermaid-GHXKKRXX-DiPCfS1n.js";
1
+ import { s as R, a as W, S as N } from "./chunk-AQP2D5EJ-B4yIZLgM.js";
2
+ import { _ as f, c as t, d as M, l as S, e as P, k as z, ac as _, ad as U, a9 as C, u as F } from "./mermaid-GHXKKRXX-BEhqkLaB.js";
3
3
  import { G as O } from "./graph-BZLHvygk.js";
4
4
  import { l as J } from "./layout-Bu6nRdWm.js";
5
5
  globalThis.process = globalThis.process || { env: {} };
@@ -263,4 +263,4 @@ var X = /* @__PURE__ */ f((e) => e.append("circle").attr("class", "start-state")
263
263
  export {
264
264
  ot as diagram
265
265
  };
266
- //# sourceMappingURL=stateDiagram-AJRCARHV-x0PonbWT.js.map
266
+ //# sourceMappingURL=stateDiagram-AJRCARHV-C6Z5V-Yt.js.map
@@ -1,5 +1,5 @@
1
- import { s as e, b as r, a as s, S as t } from "./chunk-AQP2D5EJ-CwBA3VVY.js";
2
- import { _ as l } from "./mermaid-GHXKKRXX-DiPCfS1n.js";
1
+ import { s as e, b as r, a as s, S as t } from "./chunk-AQP2D5EJ-B4yIZLgM.js";
2
+ import { _ as l } from "./mermaid-GHXKKRXX-BEhqkLaB.js";
3
3
  globalThis.process = globalThis.process || { env: {} };
4
4
  globalThis.global = globalThis.global || globalThis;
5
5
  var b = {
@@ -16,4 +16,4 @@ var b = {
16
16
  export {
17
17
  b as diagram
18
18
  };
19
- //# sourceMappingURL=stateDiagram-v2-BHNVJYJU-6Lq1LlSV.js.map
19
+ //# sourceMappingURL=stateDiagram-v2-BHNVJYJU-CztCn1yf.js.map
@@ -1,5 +1,5 @@
1
- import { _ as o, G as gt, af as Rt, ag as Ct, ah as Wt, c as pt, l as E, N as Pt, a7 as Bt, ai as ft, d as U, F as Vt, aj as Ft, B as zt } from "./mermaid-GHXKKRXX-DiPCfS1n.js";
2
- import { d as ot } from "./arc-ByLm_58u.js";
1
+ import { _ as o, G as gt, af as Rt, ag as Ct, ah as Wt, c as pt, l as E, N as Pt, a7 as Bt, ai as ft, d as U, F as Vt, aj as Ft, B as zt } from "./mermaid-GHXKKRXX-BEhqkLaB.js";
2
+ import { d as ot } from "./arc-DpA4gw3l.js";
3
3
  globalThis.process = globalThis.process || { env: {} };
4
4
  globalThis.global = globalThis.global || globalThis;
5
5
  var tt = (function() {
@@ -1055,4 +1055,4 @@ var Qt = /* @__PURE__ */ o(function(e, t, n, i, r, h = !1) {
1055
1055
  export {
1056
1056
  me as diagram
1057
1057
  };
1058
- //# sourceMappingURL=timeline-definition-PNZ67QCA-CIx8lwoQ.js.map
1058
+ //# sourceMappingURL=timeline-definition-PNZ67QCA-D_9a8hKa.js.map
@@ -1,4 +1,4 @@
1
- import { aX as Gt, s as Wt, g as Kt, t as Ht, q as Xt, a as Yt, b as Zt, _ as w, G as wt, N as Jt, d as ot, ao as Qt, af as $t, ag as te, ah as ee, e as ne, B as se, I as ie, K as oe } from "./mermaid-GHXKKRXX-DiPCfS1n.js";
1
+ import { aX as Gt, s as Wt, g as Kt, t as Ht, q as Xt, a as Yt, b as Zt, _ as w, G as wt, N as Jt, d as ot, ao as Qt, af as $t, ag as te, ah as ee, e as ne, B as se, I as ie, K as oe } from "./mermaid-GHXKKRXX-BEhqkLaB.js";
2
2
  globalThis.process = globalThis.process || { env: {} };
3
3
  globalThis.global = globalThis.global || globalThis;
4
4
  const kt = (t, n) => Gt(t, "a", -n), _t = 1e-10;
@@ -1557,4 +1557,4 @@ var qe = { draw: Ve }, Ge = {
1557
1557
  export {
1558
1558
  Ge as diagram
1559
1559
  };
1560
- //# sourceMappingURL=vennDiagram-CIIHVFJN-B27Ya-3D.js.map
1560
+ //# sourceMappingURL=vennDiagram-CIIHVFJN-HuWQgr4e.js.map
@@ -1,5 +1,5 @@
1
- import { s as St, g as Mt, t as Nt, q as Tt, a as zt, b as Lt, _ as u, a4 as At, G as Xt, I as U, l as K, N as Et, e as Yt, B as It, c as j } from "./mermaid-GHXKKRXX-DiPCfS1n.js";
2
- import { p as Bt } from "./chunk-4BX2VUAB-BKmdmdRY.js";
1
+ import { s as St, g as Mt, t as Nt, q as Tt, a as zt, b as Lt, _ as u, a4 as At, G as Xt, I as U, l as K, N as Et, e as Yt, B as It, c as j } from "./mermaid-GHXKKRXX-BEhqkLaB.js";
2
+ import { p as Bt } from "./chunk-4BX2VUAB-4MjzMD47.js";
3
3
  import { p as Ft } from "./wardley-L42UT6IY-HA1eSIS_.js";
4
4
  globalThis.process = globalThis.process || { env: {} };
5
5
  globalThis.global = globalThis.global || globalThis;
@@ -678,4 +678,4 @@ var Dt = {
678
678
  export {
679
679
  Qt as diagram
680
680
  };
681
- //# sourceMappingURL=wardleyDiagram-YWT4CUSO-efmvFwPj.js.map
681
+ //# sourceMappingURL=wardleyDiagram-YWT4CUSO-CeUvdi76.js.map
@@ -1,7 +1,7 @@
1
- import { s as ei, g as si, t as Lt, q as ni, a as ai, b as oi, _ as a, l as Et, N as ri, e as hi, B as li, G as dt, i as ci, I as It, K as ui, a4 as gi, ap as xi, ac as Rt } from "./mermaid-GHXKKRXX-DiPCfS1n.js";
1
+ import { s as ei, g as si, t as Lt, q as ni, a as ai, b as oi, _ as a, l as Et, N as ri, e as hi, B as li, G as dt, i as ci, I as It, K as ui, a4 as gi, ap as xi, ac as Rt } from "./mermaid-GHXKKRXX-BEhqkLaB.js";
2
2
  import { i as di } from "./init-BOu0eQYQ.js";
3
3
  import { o as fi } from "./ordinal-D0x7izaa.js";
4
- import { l as Dt } from "./linear-BcyQd0z0.js";
4
+ import { l as Dt } from "./linear-BVVr39mA.js";
5
5
  globalThis.process = globalThis.process || { env: {} };
6
6
  globalThis.global = globalThis.global || globalThis;
7
7
  function pi(t, i, e) {
@@ -1372,4 +1372,4 @@ var Ti = /* @__PURE__ */ a(function() {
1372
1372
  export {
1373
1373
  Mi as diagram
1374
1374
  };
1375
- //# sourceMappingURL=xychartDiagram-2RQKCTM6-DNJmorKa.js.map
1375
+ //# sourceMappingURL=xychartDiagram-2RQKCTM6-DNmBGn_r.js.map
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from "react";
3
3
  declare const badgeVariants: (props?: ({
4
- variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | "notice" | null | undefined;
4
+ variant?: "default" | "link" | "destructive" | "notice" | "outline" | "secondary" | "ghost" | null | undefined;
5
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
6
  declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
7
7
  asChild?: boolean;
@@ -9,6 +9,11 @@ export type ApprovalCardDecision = "approved" | "rejected" | "amend_requested";
9
9
  export type PendingApproval = {
10
10
  readonly approvalId: string;
11
11
  readonly resolve: (decision: ApprovalCardDecision) => void;
12
+ /** Why the agent needs this approval, straight off the wire part's own
13
+ * `reason` field (see `ApprovalRequestData` in belong-data-parts.ts) — a
14
+ * live call reads this so the operator can tell the user WHAT it is
15
+ * approving instead of just THAT approval is needed. */
16
+ readonly reason: string;
12
17
  };
13
18
  export declare const registerPendingApproval: (entry: PendingApproval) => (() => void);
14
19
  export declare const peekPendingApproval: () => PendingApproval | null;
@@ -1,12 +1,18 @@
1
1
  import { CommandSummary, SkillSummary } from '../api/skills.ts';
2
- /** The group label workspace-tree commands render under in the slash menu. */
2
+ /** Fallback group label for a workspace command the backend could not
3
+ * attribute to a plugin (flat project commands). Plugin-attributed commands
4
+ * render under their own section instead — see `cmd.group` below. */
3
5
  export declare const COMMAND_GROUP = "Commands";
4
6
  /**
5
7
  * Map a workspace-tree command onto the `SkillSummary` shape the picker
6
- * renders — display only. At submit time a command token is deliberately NOT
7
- * matched by {@link parseSlashSubmission} (commands aren't in the skills
8
- * list), so the draft falls through and posts as RAW text: the worker-side
9
- * Agent SDK parses the leading-slash message against its command registry.
8
+ * renders — display only. A command the backend attributed to a discovered
9
+ * plugin (`cmd.group` set e.g. "sk-data-lab", "implementation-playbook")
10
+ * renders under that plugin's own section; a flat command with no plugin
11
+ * falls back to the generic {@link COMMAND_GROUP}. At submit time a command
12
+ * token is deliberately NOT matched by {@link parseSlashSubmission} (commands
13
+ * aren't in the skills list), so the draft falls through and posts as RAW
14
+ * text: the worker-side Agent SDK parses the leading-slash message against
15
+ * its command registry.
10
16
  */
11
17
  export declare const commandOptions: (commands: readonly CommandSummary[]) => readonly SkillSummary[];
12
18
  /**
@@ -52,7 +58,10 @@ export declare const parseBuiltinCommand: (draft: string) => BuiltinCommand | nu
52
58
  /**
53
59
  * The slash menu's option list: built-ins merged ahead of the skills, ranked
54
60
  * by {@link filterSkills} (prefix matches first; input order — built-ins
55
- * before skills — breaks ties within each bucket).
61
+ * before skills — breaks ties within each bucket), then bucketed into
62
+ * contiguous per-group sections by {@link bucketByGroup} — see that
63
+ * function's comment for why grouping is a required SECOND pass over the
64
+ * ranked list, not something ranking alone gives you for free.
56
65
  *
57
66
  * Built-ins are offered for a token at ANY position (BEL-167). They used to be
58
67
  * withheld from a mid-message token because {@link parseBuiltinCommand} could
@@ -123,5 +132,13 @@ export declare const hoistCommandSubmission: (draft: string, commands: readonly
123
132
  * The argument-taking builtins ROTATE rather than splice — see below.
124
133
  */
125
134
  export declare const hoistBuiltinCommand: (draft: string) => string;
126
- /** Name-prefix matches first, then other name/description substring matches. */
135
+ /**
136
+ * Name-prefix matches first, then other name/description substring matches,
137
+ * then GROUP word-prefix matches (plugin-section search, ≥3 chars — see
138
+ * {@link GROUP_MATCH_MIN_QUERY_LENGTH}): typing "impl", "data", or a plugin's
139
+ * name (e.g. "sk-data-lab") surfaces every entry in that section even when
140
+ * the query hits neither the name nor the description. Ranked last so an
141
+ * entry actually named after the query still takes the top slot — a query
142
+ * that happens to also be a group name doesn't bump a direct name match down.
143
+ */
127
144
  export declare const filterSkills: (skills: readonly SkillSummary[], query: string) => readonly SkillSummary[];
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Per-line FIFO for work an operator asks an agent to do WHILE that agent is
3
+ * already busy — the structure behind "queue two things on Agent 2, then
4
+ * drop one" (Slice 3 of the voice-operator plan). File-scope-singleton
5
+ * idiom, same as `line-slots.ts` / `voice-call-lines.ts` beside it: one
6
+ * module-level `Map<number, QueuedRequest[]>`, no class, no React.
7
+ *
8
+ * WHAT THIS REPLACES: today, sending work to a busy agent POSTs it
9
+ * immediately — the message lands in Postgres and the server's own drain
10
+ * loop (SAD §5.1 / CLAUDE.md §37) gets to it whenever the agent frees up.
11
+ * That queue is invisible (no way to ask "what's waiting for Agent 2?"),
12
+ * unorderable (no way to promote the third ask over the second), and
13
+ * undroppable (no way to take one back). This module is the queue moved
14
+ * into the browser, so a caller can read it back, drop an entry, or reorder
15
+ * it before anything is sent. (Wiring `dispatchToLine`'s busy-line path
16
+ * through this queue, and adding the voice-facing `manage_queue` tool, are
17
+ * later tasks — see NOT WIRED IN YET below.)
18
+ *
19
+ * WHY CALL-SCOPED AND NOT DURABLE — the trade-off, spelled out:
20
+ *
21
+ * - A held `QueuedRequest` lives ONLY in this in-memory Map. Today's
22
+ * behavior is strictly more durable: a queued follow-up is already
23
+ * POSTed and sitting in Postgres the instant the operator says it, so it
24
+ * survives a tab crash, a network blip, anything short of the session
25
+ * itself being deleted. Moving the queue into the browser gives up that
26
+ * durability in exchange for the operator being able to see and steer
27
+ * it — that is the entire point, and the trade needs to be made with
28
+ * open eyes, not by accident.
29
+ * - `drainAllQueues()` is what keeps that loss narrow. It is the hang-up
30
+ * flush: called as part of ending a call normally, it empties every
31
+ * line's queue and hands back everything that was waiting so it can be
32
+ * POSTed to the server exactly as if this module had never sat in front
33
+ * of it. A normal end-of-call therefore loses nothing — the queue is
34
+ * just a staging area the operator got to look inside before the same
35
+ * dispatch that would have happened anyway.
36
+ * - The durability genuinely AT RISK is narrower still than it first
37
+ * sounds: a live voice call is not something a page reload survives
38
+ * regardless of this module — there is no reload-resume contract for
39
+ * the call itself (unlike the §41 guarantee for an already-dispatched
40
+ * agent turn, which is a Postgres/Redis-backed run, not the call). So
41
+ * "a reload loses the queue" is not a NEW failure this module
42
+ * introduces; the call was already gone. What is genuinely new is the
43
+ * sliver between "something got queued" and "the call ends" during
44
+ * which the tab could crash before `drainAllQueues()` ever runs — a
45
+ * real but narrow window, and the one honest cost of this design.
46
+ *
47
+ * NOT WIRED IN YET: this ships as a standalone module with its own tests
48
+ * and no production caller. A later task connects `enqueueForLine` /
49
+ * `dequeueForLine` to `dispatchToLine`'s busy-line path and `drainAllQueues`
50
+ * to the hang-up handler; another adds the voice-facing `manage_queue` tool
51
+ * on top of `peekQueue` / `dropQueuedAt` / `moveQueued`.
52
+ */
53
+ export type QueuedRequest = {
54
+ readonly id: string;
55
+ readonly request: string;
56
+ };
57
+ /** Append `request` to the back of `line`'s queue, minting a fresh id
58
+ * (`nanoid()`, the same generator `line-dispatch.ts` uses for
59
+ * `clientMessageId`). Always succeeds — there is no bound on queue depth. */
60
+ export declare const enqueueForLine: (line: number, request: string) => QueuedRequest;
61
+ /** Pop and return the FRONT of `line`'s queue, or `null` when it's empty. */
62
+ export declare const dequeueForLine: (line: number) => QueuedRequest | null;
63
+ /** A read-only snapshot of `line`'s queue, front to back. Never mutates. */
64
+ export declare const peekQueue: (line: number) => readonly QueuedRequest[];
65
+ /** How many requests are waiting on `line`. */
66
+ export declare const queueDepth: (line: number) => number;
67
+ /** Remove and return the item at `index` in `line`'s queue, or `null` when
68
+ * `index` is out of range — an explicit `< 0 || >= length` bound (§10: never
69
+ * truthiness on a length or index), so a bad index is an honest miss rather
70
+ * than a silent no-op that could be mistaken for success. */
71
+ export declare const dropQueuedAt: (line: number, index: number) => QueuedRequest | null;
72
+ /** Move the item at `from` to position `to` in `line`'s queue (both bounds
73
+ * explicit, same discipline as `dropQueuedAt`). Returns `false` — leaving
74
+ * the queue completely untouched — when either index is out of range;
75
+ * `true` on success, including the no-op case `from === to` (a valid index
76
+ * moved to itself: nothing changes, but the request was satisfied, not
77
+ * refused). `to` is a position in the queue AFTER `from` is removed — the
78
+ * standard "move to position N" reading: moving the last item to `to: 0`
79
+ * makes it the new front. */
80
+ export declare const moveQueued: (line: number, from: number, to: number) => boolean;
81
+ /** The hang-up flush: empty EVERY line's queue and return everything that
82
+ * was waiting, in line-then-position order (line ascending, FIFO within a
83
+ * line) — the order a normal end-of-call should hand work to the server in.
84
+ * Exhaustive by construction: every line the map holds is visited and
85
+ * cleared, so nothing can be left behind. See the module doc for why this
86
+ * is what makes the queue's in-memory-only durability trade-off safe for a
87
+ * normal call end. */
88
+ export declare const drainAllQueues: () => readonly {
89
+ readonly line: number;
90
+ readonly request: string;
91
+ }[];
92
+ /** The call-teardown clear: drop every line's queue without returning
93
+ * anything. Unlike `drainAllQueues`, this is for the paths that must not
94
+ * re-POST stale work — e.g. resetting state at the START of a fresh call. */
95
+ export declare const resetQueues: () => void;
96
+ /** Drop `line`'s held queue and report how many items were discarded — the
97
+ * ONE-line counterpart to `resetQueues()` (every line). For the paths that
98
+ * must not re-POST or re-dispatch one line's stale work without touching any
99
+ * other line's: `stop_agent` (voice-call.ts) clearing exactly the queue it
100
+ * just told the user was dropped, and `closeAgentLine` (voice-call-lines.ts)
101
+ * releasing a line whose held work must not resurrect onto the next
102
+ * occupant of the same number. An explicit `=== 0` check rather than
103
+ * truthiness (§10), same discipline as `dropQueuedAt`/`moveQueued`: a
104
+ * nothing-to-drop line reports `0` honestly instead of writing an empty
105
+ * array through `setQueue` for no reason. */
106
+ export declare const clearQueueForLine: (line: number) => number;
@@ -0,0 +1,110 @@
1
+ /**
2
+ * The voice call's agent ROSTER — the browser-side twin of the tenant
3
+ * roster minted server-side (`buildCallRoster` in
4
+ * apps/belong-cloud/src/features/voice/call-roster.ts) and threaded through
5
+ * `POST /v1/voice/call-token`'s `agents` field (`callAgentSpecSchema`,
6
+ * voice.schemas.ts). This is what lets the dock's rail, the call screen's
7
+ * agent board, and every spoken announcement address an agent by ROLE
8
+ * ("cli", "consulting") instead of a bare line number — and do so from the
9
+ * moment the dock boots, before any call has ever been started: the rail
10
+ * renders dock-wide with no call active, so it needs the LAST-KNOWN roster,
11
+ * not only one handed to it live off a fresh mint.
12
+ *
13
+ * Persisted per workspace, exactly like `line-slots.ts` beside it
14
+ * (`belong:voice-call-roster`, suffixed `:ws:<id>` when a workspace is in
15
+ * effect via `peekWorkspaceId()`) — a host workspace switch must not hand
16
+ * tenant A's roster (its titles, its CLI agent) to a rail rendering for
17
+ * tenant B.
18
+ *
19
+ * localStorage is a perimeter: the persisted roster is zod-validated on read
20
+ * and any junk (corrupted JSON, wrong shape, storage disabled) degrades to
21
+ * an EMPTY roster — same as "no call minted yet". The schema below is a
22
+ * deliberately independent, by-hand copy of the server's
23
+ * `callAgentSpecSchema`: the two packages ship separately and share no type
24
+ * module, so this is what keeps them honest (mirrors the existing
25
+ * `CallAgentSpec`/`callAgentSpecSchema` split already living server-side in
26
+ * `call-roster.ts` / `voice.schemas.ts`).
27
+ *
28
+ * Two fallback rules, and they are NOT the same rule:
29
+ *
30
+ * - `lineForRole` / `roleForLine` on an EMPTY roster (nothing ever minted,
31
+ * or a mint whose body failed to parse) fall back to the POSITIONAL
32
+ * default that's been true since roles didn't exist: main=1, cli=2,
33
+ * consulting=3. This is what stops a parse failure from bricking role
34
+ * addressing mid-call — the switchboard still answers to
35
+ * main/cli/consulting by position.
36
+ * - On a NON-empty roster that simply doesn't have that role/line (a
37
+ * tenant with no CLI), the same lookups return `null` instead — the
38
+ * honest signal that THIS workspace has no such agent, which is what
39
+ * later produces an `unknown_role` tool response rather than silently
40
+ * addressing the wrong agent.
41
+ *
42
+ * `titleForRole` / `titleForLine` never return `null` — a title is always
43
+ * needed for display/announcement, so THEIR fallback is a string, applied
44
+ * uniformly regardless of whether the roster is empty or merely missing
45
+ * that entry. The two fallbacks are deliberately DIFFERENT shapes, not the
46
+ * same rule twice:
47
+ *
48
+ * - `titleForRole` falls back to a ROLE-derived phrase ("the main agent" /
49
+ * "the CLI agent" / "the analyst") — never a switchboard
50
+ * number. Every voice tool call carries a role (it is the operator's
51
+ * entire addressing vocabulary — see `voice-call.ts`'s
52
+ * `resolveRoleLine`), so this fallback is always reachable from a role
53
+ * the model already said out loud, and it feeds prose the model
54
+ * SPEAKS: an empty roster (nothing minted yet, or a pre-roster backend
55
+ * mid rolling deploy — `callTokenResponseSchema`'s `agents` field
56
+ * legitimately defaults to `[]`) must not leak a bare "Agent 2" into
57
+ * that prose.
58
+ * - `titleForLine` falls back to `"the main agent"` for line 1 and
59
+ * `` `Agent ${line}` `` otherwise — the "Agent N" convention the
60
+ * switchboard used before roles existed. This one serves the UI's
61
+ * numbered rail, which genuinely displays a switchboard slot number, so
62
+ * a line-derived fallback is correct there and stays as-is.
63
+ */
64
+ export type CallAgentRole = "main" | "cli" | "consulting";
65
+ export type CallAgentSpec = {
66
+ readonly role: CallAgentRole;
67
+ /** The durable switchboard line underneath (`line-slots.ts`). */
68
+ readonly line: number;
69
+ /** What the voice calls this agent out loud. */
70
+ readonly title: string;
71
+ /** One sentence describing what this agent is for. */
72
+ readonly purpose: string;
73
+ };
74
+ /** Persist the roster minted for the current call. A whole-roster replace —
75
+ * never a per-entry patch — of whatever this workspace held before. */
76
+ export declare const setCallRoster: (roster: readonly CallAgentSpec[]) => void;
77
+ /** The current workspace's roster, or an empty array when nothing has been
78
+ * minted yet (or storage held junk). */
79
+ export declare const peekCallRoster: () => readonly CallAgentSpec[];
80
+ /** Persist the tenant's product name minted alongside the roster (U2) — a
81
+ * whole-value replace, same discipline as `setCallRoster`. */
82
+ export declare const setProductName: (productName: string | null) => void;
83
+ /** The current workspace's product name, or `null` when nothing has been
84
+ * minted yet, the tenant has none, or storage held junk. Used ONLY to
85
+ * localize the SDK's own UI copy (CallScreen's agent board, U2) — never fed
86
+ * into any string the model speaks or receives. */
87
+ export declare const peekProductName: () => string | null;
88
+ /** Resolve a role to its switchboard line. See the module doc: `null` only
89
+ * ever means "this NON-empty roster doesn't have that role" — an EMPTY
90
+ * roster falls back to the positional default instead. */
91
+ export declare const lineForRole: (role: CallAgentRole) => number | null;
92
+ /** Resolve a switchboard line to its role — the inverse of `lineForRole`,
93
+ * with the same two-rule fallback (EMPTY roster → positional; non-empty and
94
+ * missing → `null`). */
95
+ export declare const roleForLine: (line: number) => CallAgentRole | null;
96
+ /** What the voice calls this role out loud. Always a string — falls back to
97
+ * a ROLE-derived title (never a switchboard number, never `null`) when the
98
+ * roster has no entry for this role, whether the roster is empty or just
99
+ * missing it. */
100
+ export declare const titleForRole: (role: CallAgentRole) => string;
101
+ /** What the voice calls this line out loud. Always a string — falls back to
102
+ * `"the main agent"` (line 1) or `` `Agent ${line}` `` otherwise when the
103
+ * roster has no entry for this line, whether the roster is empty or just
104
+ * missing it. */
105
+ export declare const titleForLine: (line: number) => string;
106
+ /** Test-only: drop the persisted roster AND product name for the current
107
+ * workspace scope — they are minted together (the same call-token mint), so
108
+ * a test resetting one without the other would leak a stale product name
109
+ * (or roster) into the next case. */
110
+ export declare const __clearCallRosterForTest: () => void;
@@ -16,8 +16,12 @@
16
16
  * Workspace isolation (§28): a background line opened while the host is inside
17
17
  * a workspace must land in THAT workspace, not the shared legacy root — so the
18
18
  * create body carries the effective `workspaceExternalId` (absent when the host
19
- * runs unscoped). The line's registry label seeds the session title, so the
20
- * sessions list names the background conversation.
19
+ * runs unscoped). The line's registry label seeds the session title when one
20
+ * exists; otherwise (U4 the common case for a freshly materialized line,
21
+ * since `dispatchToBackgroundLine` no longer seeds the registry label with the
22
+ * agent's own name) the REQUEST itself does, so the sessions list still names
23
+ * the background conversation by what it's actually about ("Reconcile the
24
+ * July invoices"), not the agent that happened to run it.
21
25
  *
22
26
  * BOOT RE-ATTACH (F3/R4): `attachLineReader` below is the ONE seam that wires
23
27
  * a VOICE-dispatched line-run reader onto a line, shared by a fresh dispatch
@@ -2,7 +2,9 @@ import { RunStatusKind } from '../../stream/belong-data-parts.ts';
2
2
  export type WatchLineRunInput = {
3
3
  readonly runId: string;
4
4
  readonly onPhase: (toolName: string) => void;
5
- readonly onApprovalNeeded: () => void;
5
+ /** `reason` is the wire part's own `data.reason` — "" when the part omitted
6
+ * it (never `undefined`; the caller decides the fallback wording). */
7
+ readonly onApprovalNeeded: (reason: string) => void;
6
8
  readonly onNavigate: (data: {
7
9
  readonly routeName: string;
8
10
  readonly params: Readonly<Record<string, string>>;
@@ -158,6 +158,26 @@ export declare const isBoundToAnotherLine: (sessionId: string) => boolean;
158
158
  */
159
159
  export declare const foregroundLineNumber: (sessionId: string | null) => number;
160
160
  export declare const openAgentLine: (label: string) => AgentLine | null;
161
+ /**
162
+ * Materialize a line AT A GIVEN NUMBER, unlike `openAgentLine`'s lowest-FREE
163
+ * allocation. F1: role→line is fixed and positional (main=1, cli=2,
164
+ * consulting=3 — `call-roster-store.ts`), so a background dispatch to a role
165
+ * whose line has never been touched must land EXACTLY on that role's number,
166
+ * never wherever happens to be free. `dispatchToBackgroundLine`
167
+ * (voice-call.ts) is the one production caller: "asking the CLI agent for
168
+ * something IS bringing it on" (design doc) means the line materializes on
169
+ * first use instead of reporting `unknown_line` for a line that simply
170
+ * hasn't been dispatched to yet.
171
+ *
172
+ * Returns `null` when `line` is outside the switchboard's
173
+ * 1..MAX_AGENT_LINES range, or when it is already occupied — the caller's
174
+ * own `getLine(line) === undefined` check is expected to make the second
175
+ * case unreachable in practice (this function is only ever called after
176
+ * that check fails), but the guard keeps the contract sound on its own
177
+ * terms rather than trusting every future caller to get the check right
178
+ * (§28).
179
+ */
180
+ export declare const openAgentLineAt: (line: number, label: string) => AgentLine | null;
161
181
  /**
162
182
  * RELEASE a line — the mirror of `persistSlotBinding`'s adoption: clears the
163
183
  * in-memory entry AND its durable slot together, so the freed number is
@@ -8,9 +8,10 @@
8
8
  *
9
9
  * Agent-initiated utterances (function acks, result relays, progress nudges,
10
10
  * the greeting) are paced from AUDIO PLAYOUT END, not generation end: the next
11
- * one may only dispatch once both generation (`responseActive`) and playback
12
- * (`audioPlaying`) are idle, plus a breath (`UTTERANCE_GAP_MS`). User turns go
13
- * through server VAD directly and never touch this logic.
11
+ * one may only dispatch once generation (`responseActive`), playback
12
+ * (`audioPlaying`), and the USER FLOOR (`userFloor` the user is speaking, or
13
+ * only just stopped) are all idle, plus a breath (`UTTERANCE_GAP_MS`). User
14
+ * turns go through server VAD directly and never touch this logic.
14
15
  */
15
16
  /**
16
17
  * Breath between agent-initiated utterances, measured from AUDIO PLAYOUT END
@@ -29,13 +30,45 @@ export declare const UTTERANCE_GAP_MS = 700;
29
30
  */
30
31
  export declare const AUDIO_IDLE_SAFETY_MS = 30000;
31
32
  /**
32
- * Hold a follow-up `response.create` while a response is still generating OR
33
- * its audio is still playing out. Both must be idle before the pause timer may
34
- * run and the create may be sent.
33
+ * How long the user keeps the floor after `input_audio_buffer.speech_stopped`
34
+ * before an agent-initiated utterance may be released. Covers the case
35
+ * semantic VAD is deliberately patient about: a breath drawn mid-sentence,
36
+ * where the user has not actually finished. At 600ms (plus
37
+ * {@link UTTERANCE_GAP_MS}'s 700ms breath), an agent-initiated relay could
38
+ * start barely 1.3s after the user stopped — while semantic VAD is still
39
+ * deciding whether they are actually done. 1200ms buys the classifier more
40
+ * room before an agent-initiated utterance is allowed to land. This ONLY
41
+ * delays agent-*initiated* speech (progress nudges, result relays); the
42
+ * model's own response to the user's turn is untouched — that path never
43
+ * goes through this floor.
44
+ */
45
+ export declare const USER_FLOOR_GRACE_MS = 1200;
46
+ /**
47
+ * Ceiling on how long the user floor may hold an utterance, measured from the
48
+ * moment the floor was TAKEN (`speech_started`). This is an ANTI-WEDGE
49
+ * fallback, not a tuning knob: {@link USER_FLOOR_GRACE_MS}'s grace timer
50
+ * already releases the floor shortly after every `speech_stopped`, so in
51
+ * ordinary speech the floor never survives to see this ceiling at all. Its
52
+ * only job is the case grace can't cover — a `speech_stopped` that never
53
+ * arrives (a genuinely stuck VAD) — which is why it must stay far above any
54
+ * real utterance: a tight ceiling here doesn't add safety, it just yanks the
55
+ * floor out from under a user who is still mid-sentence and dispatches a
56
+ * held relay over their voice, which is the exact bug this feature exists to
57
+ * prevent. Set at 45s — well above semantic VAD's own ceiling (8s at `low`
58
+ * eagerness, 4s at `medium`) — so it is reachable only when something has
59
+ * actually gone wrong, never in the course of normal speech. Same discipline
60
+ * as {@link AUDIO_IDLE_SAFETY_MS} — the pacer must never wedge.
61
+ */
62
+ export declare const USER_FLOOR_MAX_HOLD_MS = 45000;
63
+ /**
64
+ * Hold a follow-up `response.create` while a response is still generating, its
65
+ * audio is still playing out, OR the user holds the floor. All three must be
66
+ * clear before the pause timer may run and the create may be sent.
35
67
  */
36
68
  export declare const shouldHoldDispatch: (input: {
37
69
  readonly responseActive: boolean;
38
70
  readonly audioPlaying: boolean;
71
+ readonly userFloor: boolean;
39
72
  }) => boolean;
40
73
  /**
41
74
  * On `response.done`, decide whether to release a queued follow-up immediately.
@@ -63,10 +96,15 @@ export type UtterancePacer = {
63
96
  /** Audio playout ended (`output_audio_buffer.stopped`) — the anchor the next
64
97
  * agent-initiated breath is measured from. */
65
98
  readonly onAudioStopped: () => void;
66
- /** The user took the floor (`input_audio_buffer.speech_started`). Clears the
67
- * playout gate and timers; a follow-up already counting down its breath is
68
- * DEFERRED behind the user's turn (re-queued as pending), never dropped. */
99
+ /** The user took the floor (`input_audio_buffer.speech_started`). TAKES the
100
+ * user floor (arming the max-hold ceiling) and clears the playout gate and
101
+ * timers; a follow-up already counting down its breath is DEFERRED behind
102
+ * the user's turn (re-queued as pending), never dropped. */
69
103
  readonly onBargeIn: () => void;
104
+ /** The user stopped talking (`input_audio_buffer.speech_stopped`). Starts
105
+ * the grace countdown; the floor is not released until it expires (or the
106
+ * model takes the turn, or the max-hold ceiling trips). */
107
+ readonly onUserSpeechStopped: () => void;
70
108
  /** Call teardown: clear all flags and timers so nothing leaks forward. */
71
109
  readonly reset: () => void;
72
110
  };