@belonguniverseai/react-sdk 0.4.2 → 0.4.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 (79) hide show
  1. package/dist/api/agent-grants.d.ts +33 -0
  2. package/dist/api/client.d.ts +97 -10
  3. package/dist/api/retry-fetch.d.ts +3 -1
  4. package/dist/api/task-schedules.d.ts +14 -0
  5. package/dist/browser/agent-link.d.ts +18 -0
  6. package/dist/browser/agent-touch.d.ts +105 -0
  7. package/dist/browser/spa-navigate.d.ts +24 -1
  8. package/dist/component/{arc-COH48Rtu.js → arc-ByLm_58u.js} +2 -2
  9. package/dist/component/{architectureDiagram-3BPJPVTR-B5qmE5k5.js → architectureDiagram-3BPJPVTR-DcYT4v9Q.js} +3 -3
  10. package/dist/component/{blockDiagram-GPEHLZMM-lkovkWkX.js → blockDiagram-GPEHLZMM-CHk-YSun.js} +4 -4
  11. package/dist/component/{c4Diagram-AAUBKEIU-CaWDjxTr.js → c4Diagram-AAUBKEIU-CEV2fwh-.js} +3 -3
  12. package/dist/component/{channel-DNnfyuhY.js → channel-D67v09ii.js} +2 -2
  13. package/dist/component/{chunk-2J33WTMH-I7HgfCPn.js → chunk-2J33WTMH-Bsl2GBCp.js} +2 -2
  14. package/dist/component/{chunk-4BX2VUAB-CZBTp8pg.js → chunk-4BX2VUAB-BKmdmdRY.js} +2 -2
  15. package/dist/component/{chunk-55IACEB6-C-RnqcTj.js → chunk-55IACEB6-DnliqOsL.js} +2 -2
  16. package/dist/component/{chunk-727SXJPM-BFV7YyWV.js → chunk-727SXJPM-O0BgSnK_.js} +6 -6
  17. package/dist/component/{chunk-AQP2D5EJ-BDVikNJT.js → chunk-AQP2D5EJ-CwBA3VVY.js} +4 -4
  18. package/dist/component/{chunk-FMBD7UC4-C864-npb.js → chunk-FMBD7UC4-CG5DaKp9.js} +2 -2
  19. package/dist/component/{chunk-ND2GUHAM-DuitYR9A.js → chunk-ND2GUHAM-COsoTCa0.js} +2 -2
  20. package/dist/component/{chunk-QZHKN3VN-B9uI1TYV.js → chunk-QZHKN3VN-9FjIin4_.js} +2 -2
  21. package/dist/component/{classDiagram-4FO5ZUOK-BUdCEjaj.js → classDiagram-4FO5ZUOK-DyQO35S9.js} +3 -3
  22. package/dist/component/{classDiagram-v2-Q7XG4LA2-BUdCEjaj.js → classDiagram-v2-Q7XG4LA2-DyQO35S9.js} +3 -3
  23. package/dist/component/{cose-bilkent-S5V4N54A-Dgk__ohs.js → cose-bilkent-S5V4N54A-BTN6Bz9E.js} +2 -2
  24. package/dist/component/{dagre-BM42HDAG-DGHFHFPf.js → dagre-BM42HDAG-COU3yvtF.js} +2 -2
  25. package/dist/component/{diagram-2AECGRRQ-DvGSzrwW.js → diagram-2AECGRRQ-r4LO_uyu.js} +3 -3
  26. package/dist/component/{diagram-5GNKFQAL-XebuIyjn.js → diagram-5GNKFQAL-CraSe8h_.js} +4 -4
  27. package/dist/component/{diagram-KO2AKTUF-slUL6XEO.js → diagram-KO2AKTUF-Dh-L6_aX.js} +3 -3
  28. package/dist/component/{diagram-LMA3HP47-BEPY8GOZ.js → diagram-LMA3HP47-Bv8QREaH.js} +3 -3
  29. package/dist/component/{diagram-OG6HWLK6-DHI_0aIk.js → diagram-OG6HWLK6-Jf-6CDV4.js} +4 -4
  30. package/dist/component/{erDiagram-TEJ5UH35-D-6DbJr-.js → erDiagram-TEJ5UH35-CN8X2drH.js} +5 -5
  31. package/dist/component/{flowDiagram-I6XJVG4X-Cw87OG_x.js → flowDiagram-I6XJVG4X-CloAsK8k.js} +7 -7
  32. package/dist/component/{ganttDiagram-6RSMTGT7-B47s5HUB.js → ganttDiagram-6RSMTGT7-DAlRM4jt.js} +3 -3
  33. package/dist/component/{gitGraphDiagram-PVQCEYII-DqFW3uiq.js → gitGraphDiagram-PVQCEYII-BPVdEwuf.js} +4 -4
  34. package/dist/component/{highlighted-body-OFNGDK62-CBU3EdTE.js → highlighted-body-OFNGDK62-BEd7ynwt.js} +2 -2
  35. package/dist/component/index.js +2 -2
  36. package/dist/component/{infoDiagram-5YYISTIA-_0W78xb_.js → infoDiagram-5YYISTIA-CyJi6c7l.js} +2 -2
  37. package/dist/component/{ishikawaDiagram-YF4QCWOH-CvybNkGE.js → ishikawaDiagram-YF4QCWOH-CNKCQHOP.js} +2 -2
  38. package/dist/component/{journeyDiagram-JHISSGLW-DgLrQs9G.js → journeyDiagram-JHISSGLW-DFN0WY5F.js} +5 -5
  39. package/dist/component/{kanban-definition-UN3LZRKU-ReYnw5Xl.js → kanban-definition-UN3LZRKU-BT6YDPZA.js} +3 -3
  40. package/dist/component/{linear-Cih5KQ00.js → linear-BcyQd0z0.js} +2 -2
  41. package/dist/component/{mermaid-GHXKKRXX-B6ix-Z04.js → mermaid-GHXKKRXX-DiPCfS1n.js} +28006 -27373
  42. package/dist/component/{mindmap-definition-RKZ34NQL-hRhkTdF6.js → mindmap-definition-RKZ34NQL-BND7KvId.js} +4 -4
  43. package/dist/component/{pieDiagram-4H26LBE5-DAAEUZCY.js → pieDiagram-4H26LBE5-CvDdRFnN.js} +4 -4
  44. package/dist/component/{quadrantDiagram-W4KKPZXB-Benxdf_G.js → quadrantDiagram-W4KKPZXB-DMHCLEev.js} +3 -3
  45. package/dist/component/{requirementDiagram-4Y6WPE33-BxvkbDYP.js → requirementDiagram-4Y6WPE33-BomcVKb4.js} +4 -4
  46. package/dist/component/{sankeyDiagram-5OEKKPKP-RPwwVwu3.js → sankeyDiagram-5OEKKPKP-D4rmtFCn.js} +2 -2
  47. package/dist/component/{sequenceDiagram-3UESZ5HK-C-prnAtS.js → sequenceDiagram-3UESZ5HK-C0iEDbuE.js} +4 -4
  48. package/dist/component/{stateDiagram-AJRCARHV-BEIQAx9e.js → stateDiagram-AJRCARHV-x0PonbWT.js} +3 -3
  49. package/dist/component/{stateDiagram-v2-BHNVJYJU-BD5dkY8l.js → stateDiagram-v2-BHNVJYJU-6Lq1LlSV.js} +3 -3
  50. package/dist/component/{timeline-definition-PNZ67QCA-DQJPMkfL.js → timeline-definition-PNZ67QCA-CIx8lwoQ.js} +3 -3
  51. package/dist/component/{vennDiagram-CIIHVFJN-CreOqXMc.js → vennDiagram-CIIHVFJN-B27Ya-3D.js} +2 -2
  52. package/dist/component/{wardleyDiagram-YWT4CUSO--dbQqySn.js → wardleyDiagram-YWT4CUSO-efmvFwPj.js} +3 -3
  53. package/dist/component/{xychartDiagram-2RQKCTM6-BOSkmQiX.js → xychartDiagram-2RQKCTM6-DNJmorKa.js} +3 -3
  54. package/dist/components/ai-elements/dock-link.d.ts +27 -0
  55. package/dist/components/ai-elements/link-safety-modal.d.ts +46 -1
  56. package/dist/components/ai-elements/message.d.ts +29 -2
  57. package/dist/components/ai-elements/prompt-input.d.ts +1 -1
  58. package/dist/components/embed/file-preview-kind.d.ts +6 -1
  59. package/dist/components/embed/parse-csv.d.ts +22 -5
  60. package/dist/components/embed/use-preview-bytes.d.ts +12 -0
  61. package/dist/components/embed/use-workspace-preview-file.d.ts +34 -0
  62. package/dist/components/scheduled/ScheduledDetailSurface.d.ts +2 -2
  63. package/dist/components/ui/input-group.d.ts +7 -4
  64. package/dist/embed/slash-commands.d.ts +41 -12
  65. package/dist/embed/voice/line-dispatch.d.ts +51 -16
  66. package/dist/embed/voice/line-run-reader.d.ts +32 -54
  67. package/dist/embed/voice/line-slots.d.ts +6 -2
  68. package/dist/embed/voice-call-lines.d.ts +38 -11
  69. package/dist/i18n/messages/en.d.ts +16 -5
  70. package/dist/i18n/messages/surfaces/aiElements.d.ts +3 -0
  71. package/dist/i18n/messages/surfaces/scheduled.d.ts +9 -0
  72. package/dist/i18n/messages/surfaces/stream.d.ts +31 -16
  73. package/dist/stream/chat-upload.d.ts +29 -3
  74. package/dist/stream/run-line-progress.d.ts +62 -0
  75. package/dist/stream/sandbox-output.d.ts +31 -3
  76. package/dist/stream/stream-state-store.d.ts +56 -0
  77. package/dist/stream/tool-error-copy.d.ts +4 -0
  78. package/dist/test/fetch-stubs.d.ts +16 -0
  79. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- import { g as oe } from "./chunk-55IACEB6-C-RnqcTj.js";
2
- import { s as ae } from "./chunk-2J33WTMH-I7HgfCPn.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-B6ix-Z04.js";
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";
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-hRhkTdF6.js.map
833
+ //# sourceMappingURL=mindmap-definition-RKZ34NQL-BND7KvId.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-B6ix-Z04.js";
2
- import { p as gt } from "./chunk-4BX2VUAB-CZBTp8pg.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-DiPCfS1n.js";
2
+ import { p as gt } from "./chunk-4BX2VUAB-BKmdmdRY.js";
3
3
  import { p as dt } from "./wardley-L42UT6IY-HA1eSIS_.js";
4
- import { d as P } from "./arc-COH48Rtu.js";
4
+ import { d as P } from "./arc-ByLm_58u.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-DAAEUZCY.js.map
166
+ //# sourceMappingURL=pieDiagram-4H26LBE5-CvDdRFnN.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-B6ix-Z04.js";
2
- import { l as te } from "./linear-Cih5KQ00.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-DiPCfS1n.js";
2
+ import { l as te } from "./linear-BcyQd0z0.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-Benxdf_G.js.map
1033
+ //# sourceMappingURL=quadrantDiagram-W4KKPZXB-DMHCLEev.js.map
@@ -1,6 +1,6 @@
1
- import { g as Ge } from "./chunk-55IACEB6-C-RnqcTj.js";
2
- import { s as ze } from "./chunk-2J33WTMH-I7HgfCPn.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-B6ix-Z04.js";
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";
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-BxvkbDYP.js.map
888
+ //# sourceMappingURL=requirementDiagram-4Y6WPE33-BomcVKb4.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-B6ix-Z04.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-DiPCfS1n.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-RPwwVwu3.js.map
862
+ //# sourceMappingURL=sankeyDiagram-5OEKKPKP-D4rmtFCn.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-B6ix-Z04.js";
2
- import { a as pr, b as ee, g as dt, d as Er, e as re, f as ae } from "./chunk-ND2GUHAM-DuitYR9A.js";
3
- import { I as ur } from "./chunk-QZHKN3VN-B9uI1TYV.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-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";
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-C-prnAtS.js.map
2897
+ //# sourceMappingURL=sequenceDiagram-3UESZ5HK-C0iEDbuE.js.map
@@ -1,5 +1,5 @@
1
- import { s as R, a as W, S as N } from "./chunk-AQP2D5EJ-BDVikNJT.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-B6ix-Z04.js";
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";
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-BEIQAx9e.js.map
266
+ //# sourceMappingURL=stateDiagram-AJRCARHV-x0PonbWT.js.map
@@ -1,5 +1,5 @@
1
- import { s as e, b as r, a as s, S as t } from "./chunk-AQP2D5EJ-BDVikNJT.js";
2
- import { _ as l } from "./mermaid-GHXKKRXX-B6ix-Z04.js";
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";
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-BD5dkY8l.js.map
19
+ //# sourceMappingURL=stateDiagram-v2-BHNVJYJU-6Lq1LlSV.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-B6ix-Z04.js";
2
- import { d as ot } from "./arc-COH48Rtu.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-DiPCfS1n.js";
2
+ import { d as ot } from "./arc-ByLm_58u.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-DQJPMkfL.js.map
1058
+ //# sourceMappingURL=timeline-definition-PNZ67QCA-CIx8lwoQ.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-B6ix-Z04.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-DiPCfS1n.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-CreOqXMc.js.map
1560
+ //# sourceMappingURL=vennDiagram-CIIHVFJN-B27Ya-3D.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-B6ix-Z04.js";
2
- import { p as Bt } from "./chunk-4BX2VUAB-CZBTp8pg.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-DiPCfS1n.js";
2
+ import { p as Bt } from "./chunk-4BX2VUAB-BKmdmdRY.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--dbQqySn.js.map
681
+ //# sourceMappingURL=wardleyDiagram-YWT4CUSO-efmvFwPj.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-B6ix-Z04.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-DiPCfS1n.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-Cih5KQ00.js";
4
+ import { l as Dt } from "./linear-BcyQd0z0.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-BOSkmQiX.js.map
1375
+ //# sourceMappingURL=xychartDiagram-2RQKCTM6-DNJmorKa.js.map
@@ -0,0 +1,27 @@
1
+ import { ReactNode, ComponentProps } from 'react';
2
+ import { Streamdown } from 'streamdown';
3
+ type DockLinkProps = {
4
+ readonly href?: string | undefined;
5
+ readonly className?: string | undefined;
6
+ readonly children?: ReactNode;
7
+ /**
8
+ * react-markdown's hast node. Declared so this component satisfies
9
+ * Streamdown's `components.a` slot, and deliberately never read — nothing is
10
+ * spread onto the DOM, so it cannot leak into the rendered attributes.
11
+ */
12
+ readonly node?: unknown;
13
+ };
14
+ export declare const DockLink: {
15
+ ({ href, className, children }: DockLinkProps): import("react").JSX.Element;
16
+ displayName: string;
17
+ };
18
+ type StreamdownComponents = NonNullable<ComponentProps<typeof Streamdown>["components"]>;
19
+ /**
20
+ * Module-level so the object identity is stable: Streamdown memoises its merged
21
+ * component map on the `components` prop, and a fresh object every render would
22
+ * bust that memo on every streamed token.
23
+ */
24
+ export declare const dockMarkdownComponents: StreamdownComponents;
25
+ /** The empty override map for surfaces that keep Streamdown's own anchor. */
26
+ export declare const noMarkdownComponents: StreamdownComponents;
27
+ export {};
@@ -1,8 +1,53 @@
1
- import { LinkSafetyConfig } from 'streamdown';
1
+ import { LinkSafetyConfig, LinkSafetyModalProps } from 'streamdown';
2
+ import { AgentLinkTarget } from '../../browser/agent-link.ts';
3
+ type DockLinkSafetyModalProps = LinkSafetyModalProps & {
4
+ /**
5
+ * How {@link classifyAgentLink} judged `url`, so the title can say what this
6
+ * actually is. Omitted — hence `"external"` — when Streamdown renders this
7
+ * modal for an anchor the dock does not own, keeping that copy byte-for-byte
8
+ * unchanged. `"in_app"` reaches here only via DockLink's degradation path: a
9
+ * link proven to be on the app's OWN origin whose in-place navigation could
10
+ * not happen. Titling that one "external link" is plainly false; the body copy
11
+ * is accurate either way, since confirming opens a new tab in both cases.
12
+ */
13
+ readonly destinationKind?: AgentLinkTarget["kind"] | undefined;
14
+ };
15
+ /**
16
+ * Replacement for Streamdown's built-in link-safety modal (BEL-47).
17
+ *
18
+ * Streamdown's default modal `createPortal`s to `document.body` — which, in the
19
+ * production embed, lives OUTSIDE the dock's shadow root, so it renders with
20
+ * none of the dock's (shadow-scoped) CSS: the "unstyled, ugly popup". This
21
+ * version is built from the dock's own `Dialog`, whose `DialogPortal` mounts
22
+ * INTO the shadow root via `usePortalContainer`, so the confirmation inherits
23
+ * the panel's design system, theme, and animations.
24
+ *
25
+ * The confirmation itself is kept on purpose: links in agent output are
26
+ * untrusted, so a deliberate "open this URL?" step is a security affordance.
27
+ * The redesign just makes the destination obvious and gives it a single, clear
28
+ * primary action.
29
+ *
30
+ * BEL-109 added a second layer ABOVE this one: `DockLink` (the dock's own
31
+ * `components.a`) classifies each link first, and a link proven to be a path on
32
+ * the live page's OWN origin routes the host SPA in place with no confirmation.
33
+ * That layer is deliberately narrow — every other link, and every same-origin
34
+ * link whose in-place navigation could not happen, is handed straight back to
35
+ * this modal, so the untrusted-agent-output guarantee above is unchanged for
36
+ * anything cross-origin.
37
+ */
38
+ export declare const LinkSafetyModal: ({ isOpen, onClose, onConfirm, url, destinationKind, }: DockLinkSafetyModalProps) => import("react").JSX.Element;
2
39
  /**
3
40
  * Streamdown `linkSafety` config shared by the dock's markdown renderers
4
41
  * (`MessageResponse`, `ReasoningContent`). Keeps the safety confirmation
5
42
  * enabled but swaps Streamdown's body-portaled default for the dock-styled
6
43
  * {@link LinkSafetyModal}.
44
+ *
45
+ * Since BEL-109 this config governs Streamdown's OWN anchor, which the dock's
46
+ * markdown surfaces reach only when they do not install {@link DockLink} — the
47
+ * workspace-file previews (`MessageResponse` without `linkSurface`), and any
48
+ * future caller that overrides `components` without an `a` key. It is not an
49
+ * active second guard on the agent-reply surface; DockLink renders this same
50
+ * modal itself there.
7
51
  */
8
52
  export declare const dockLinkSafety: LinkSafetyConfig;
53
+ export {};
@@ -31,8 +31,35 @@ export type MessageBranchNextProps = ComponentProps<typeof Button>;
31
31
  export declare const MessageBranchNext: ({ children, ...props }: MessageBranchNextProps) => import("react").JSX.Element;
32
32
  export type MessageBranchPageProps = HTMLAttributes<HTMLSpanElement>;
33
33
  export declare const MessageBranchPage: ({ className, ...props }: MessageBranchPageProps) => import("react").JSX.Element;
34
- export type MessageResponseProps = ComponentProps<typeof Streamdown>;
34
+ /**
35
+ * WHOSE markdown this is — it decides what a link inside it may do (BEL-109).
36
+ *
37
+ * `agent-reply` is the assistant's own answer: a link it emits points at the app
38
+ * the user has open, so a same-origin one routes that app IN PLACE via
39
+ * {@link DockLink}. `workspace-file` (the default, so a new call site fails
40
+ * closed) is a workspace markdown FILE rendered in a preview: its links are
41
+ * relative to the FILE TREE, and by the time they reach the renderer Streamdown
42
+ * has already pre-resolved `./other.md` into `/other.md` — indistinguishable
43
+ * from an app path. There is no href shape that separates the two, so the
44
+ * SURFACE does, and a file's links keep the confirm-then-new-tab guard.
45
+ */
46
+ type MarkdownLinkSurface = "agent-reply" | "workspace-file";
47
+ /**
48
+ * `components` is deliberately OMITTED from what a caller may pass. It is the
49
+ * seam {@link DockLink} is installed through, so leaving it public would let a
50
+ * new call site opt INTO in-place navigation by passing
51
+ * `components={dockMarkdownComponents}` with no `linkSurface` at all — a second
52
+ * door into the exact thing `linkSurface` exists to gate. Omitting it makes that
53
+ * a COMPILE error at the call site (a clear "not assignable" on the offending
54
+ * prop), rather than the silent runtime no-op that reordering the JSX spread
55
+ * alone would produce. Every other Streamdown prop stays overridable, so
56
+ * per-call knobs like `controls` and `plugins` behave exactly as before.
57
+ */
58
+ export type MessageResponseProps = Omit<ComponentProps<typeof Streamdown>, "components"> & {
59
+ readonly linkSurface?: MarkdownLinkSurface | undefined;
60
+ };
35
61
  export declare const responseControls: ControlsConfig;
36
- export declare const MessageResponse: import('react').MemoExoticComponent<({ className, ...props }: MessageResponseProps) => import("react").JSX.Element>;
62
+ export declare const MessageResponse: import('react').MemoExoticComponent<({ className, linkSurface, ...props }: MessageResponseProps) => import("react").JSX.Element>;
37
63
  export type MessageToolbarProps = ComponentProps<"div">;
38
64
  export declare const MessageToolbar: ({ className, children, ...props }: MessageToolbarProps) => import("react").JSX.Element;
65
+ export {};
@@ -102,7 +102,7 @@ export type PromptInputButtonTooltip = string | {
102
102
  export type PromptInputButtonProps = ComponentProps<typeof InputGroupButton> & {
103
103
  tooltip?: PromptInputButtonTooltip;
104
104
  };
105
- export declare const PromptInputButton: ({ variant, className, size, tooltip, ...props }: PromptInputButtonProps) => import("react").JSX.Element;
105
+ export declare const PromptInputButton: import('react').ForwardRefExoticComponent<Omit<PromptInputButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
106
106
  export type PromptInputActionMenuProps = ComponentProps<typeof DropdownMenu>;
107
107
  export declare const PromptInputActionMenu: (props: PromptInputActionMenuProps) => import("react").JSX.Element;
108
108
  export type PromptInputActionMenuTriggerProps = PromptInputButtonProps;
@@ -7,5 +7,10 @@
7
7
  export type FilePreviewKind = "markdown" | "json" | "csv" | "text" | "sql" | "image" | "html" | "pdf" | "heavy" | "download";
8
8
  export declare const filePreviewKind: (mimeType: string) => FilePreviewKind;
9
9
  /** Best-effort mime for a workspace file PATH (which carries no mimeType).
10
- * Returns "" when the extension isn't in the previewable set. */
10
+ * Returns "" when the extension isn't in the previewable set.
11
+ *
12
+ * Deliberately NOT here: `.env`. Those files are secrets by convention, and
13
+ * the Files tab is a shared surface — they stay download-only, which is an
14
+ * intentional omission, not an oversight. Add nothing to this switch that a
15
+ * user would be unhappy to see rendered in a panel. */
11
16
  export declare const mimeFromPath: (path: string) => string;
@@ -1,10 +1,27 @@
1
+ /** Field separators we recognise, in tiebreak order. Comma is first, so text
2
+ * with no separator at all — or a tie — parses exactly as it did before. */
3
+ declare const DELIMITERS: readonly [",", ";", "\t", "|"];
4
+ export type CsvDelimiter = (typeof DELIMITERS)[number];
5
+ /**
6
+ * Sniff the field separator from the header line.
7
+ *
8
+ * A meaningful share of the CSVs users actually keep in their workspace are
9
+ * semicolon- or tab-separated: `;` is what Excel exports on a Spanish (and
10
+ * most European) locale, and both previously smeared into one column because
11
+ * the scanner only ever split on `,`. Counting is done OUTSIDE quoted fields
12
+ * (a quoted cell may legitimately contain any candidate) and over the header
13
+ * line only — the first UNQUOTED line break ends it.
14
+ */
15
+ export declare const sniffCsvDelimiter: (text: string) => CsvDelimiter;
1
16
  /**
2
17
  * Parse RFC 4180-ish CSV text into rows of string cells.
3
18
  *
4
- * Handles quoted fields (embedded commas, newlines, and `""` escapes), both
5
- * LF and CRLF line endings, and a leading UTF-8 BOM. A trailing newline does
6
- * not produce a phantom empty row. This is deliberately a small hand-rolled
7
- * scanner rather than a dependency (§2 simplest correct solution): the dock
8
- * only needs to *display* a CSV, not round-trip it.
19
+ * Handles quoted fields (embedded separators, newlines, and `""` escapes),
20
+ * both LF and CRLF line endings, and a leading UTF-8 BOM. A trailing newline
21
+ * does not produce a phantom empty row. The field separator is sniffed from
22
+ * the header line (see `sniffCsvDelimiter`). This is deliberately a small
23
+ * hand-rolled scanner rather than a dependency (§2 simplest correct
24
+ * solution): the dock only needs to *display* a CSV, not round-trip it.
9
25
  */
10
26
  export declare const parseCsv: (input: string) => string[][];
27
+ export {};
@@ -31,6 +31,18 @@ export type PreviewBytes = {
31
31
  readonly status: "objectUrl";
32
32
  readonly url: string;
33
33
  };
34
+ /**
35
+ * Decode preview bytes as text, tolerating legacy single-byte encodings.
36
+ *
37
+ * `Response.text()` always decodes UTF-8 and silently substitutes U+FFFD for
38
+ * bytes that aren't valid UTF-8 — so a CSV or .txt written by Excel/Notepad on
39
+ * Windows (Latin-1 / CP1252, still the default on a Spanish locale) rendered as
40
+ * mojibake: `Balance añadido` came out `Balance a�adido`. Decode UTF-8 in FATAL
41
+ * mode first, which is an exact test rather than a guess, and fall back to
42
+ * windows-1252 — a total mapping, so it never throws and never emits U+FFFD.
43
+ * Exported for the unit test; the hook below is the only production caller.
44
+ */
45
+ export declare const decodePreviewText: (bytes: ArrayBuffer) => string;
34
46
  export declare const blobToDataUrl: (blob: Blob) => Promise<string>;
35
47
  export declare const usePreviewBytes: (contentUrl: string, opts: {
36
48
  readonly enabled: boolean;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * useWorkspacePreviewFile — stage a workspace OFFICE file into belong-cloud's
3
+ * file-preview pipeline and expose the id `HeavyPreview` polls.
4
+ *
5
+ * The workspace surface has no preview endpoints of its own: its files are
6
+ * bytes in a Daytona volume, not rows, so there is nothing for the converter
7
+ * to key on. `POST /v1/terminal/workspace/file/preview` stages the bytes as a
8
+ * preview-only file and hands back its id; from there the render is the same
9
+ * `/v1/files/<fileId>/preview…` flow uploaded files and artifacts already use.
10
+ * That is why the same .xlsx no longer previews in chat and downloads-only in
11
+ * the Files tab.
12
+ *
13
+ * Staging is content-addressed server-side, so this stays one POST per opened
14
+ * file — a re-open of an unchanged file resolves to the conversion that
15
+ * already happened. The panel remounts `PreviewContent` per target (keyed on
16
+ * the content URL), so there is no refresh cycle to own here.
17
+ */
18
+ export type WorkspacePreviewTarget = {
19
+ readonly path: string;
20
+ /** The workspace the path is relative to, pinned when the preview opened. */
21
+ readonly workspaceExternalId: string | null;
22
+ };
23
+ export type WorkspacePreviewFile = {
24
+ readonly status: "loading";
25
+ }
26
+ /** Staging failed, or the format isn't one the converter handles — the
27
+ * caller falls back to its download affordance. */
28
+ | {
29
+ readonly status: "error";
30
+ } | {
31
+ readonly status: "ready";
32
+ readonly fileId: string;
33
+ };
34
+ export declare const useWorkspacePreviewFile: (target: WorkspacePreviewTarget | null) => WorkspacePreviewFile;
@@ -1,7 +1,7 @@
1
1
  import { TaskScheduleDetail, TaskScheduleRun } from '../../api/task-schedules.ts';
2
- export declare const CustomEmailIndicator: (props: {
2
+ export declare const EmailNotificationIndicator: (props: {
3
3
  readonly notification: TaskScheduleDetail["notification"];
4
- }) => import("react").JSX.Element | null;
4
+ }) => import("react").JSX.Element;
5
5
  export declare const RunCard: (props: {
6
6
  readonly run: TaskScheduleRun;
7
7
  readonly scheduleTitle: string;
@@ -1,15 +1,18 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { Button } from './button';
3
2
  import * as React from "react";
4
3
  declare function InputGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
5
4
  declare const inputGroupAddonVariants: (props?: ({
6
5
  align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
7
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
7
  declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): React.JSX.Element;
9
- declare const inputGroupButtonVariants: (props?: ({
8
+ declare const InputGroupButton: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<(props?: ({
9
+ variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
10
+ size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
11
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string> & {
12
+ asChild?: boolean;
13
+ }, "ref"> & React.RefAttributes<HTMLButtonElement>, "size"> & VariantProps<(props?: ({
10
14
  size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined;
11
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
12
- declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>): React.JSX.Element;
15
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
13
16
  declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
14
17
  declare function InputGroupInput({ className, ...props }: React.ComponentProps<"input">): React.JSX.Element;
15
18
  declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<"textarea">): React.JSX.Element;
@@ -13,8 +13,14 @@ export declare const commandOptions: (commands: readonly CommandSummary[]) => re
13
13
  * Client-side commands offered in the slash menu next to the skills. They
14
14
  * reuse the `SkillSummary` shape so the picker (filter/rank/render) treats
15
15
  * both uniformly; `group: "Built-in"` distinguishes them from skill groups.
16
- * A builtin shadows a same-named skill at submit time (builtins are checked
17
- * first), so keep these names out of the skill namespace.
16
+ *
17
+ * PRECEDENCE (BEL-167): a builtin token wins over a skill token and over a
18
+ * workspace-tree command token REGARDLESS of position — the submit path checks
19
+ * builtins first, so `/schedule` claims "run /reconciliation and /schedule
20
+ * tomorrow" even though the skill token comes earlier. This is not just
21
+ * check-order inertia: every builtin is terminal for the submission (it runs
22
+ * locally and posts NOTHING), so a skill picked in the same draft would have no
23
+ * turn to apply to. Keep these names out of the skill namespace.
18
24
  */
19
25
  export declare const BUILTIN_COMMANDS: readonly SkillSummary[];
20
26
  export type BuiltinCommand = {
@@ -37,6 +43,10 @@ export type BuiltinCommand = {
37
43
  * message handling. `/schedule` and `/unschedule` claim their complete command
38
44
  * token even when their arguments are invalid, preventing malformed commands
39
45
  * from reaching the agent runtime as raw messages.
46
+ *
47
+ * LEADING-ONLY BY DESIGN. A mid-message token is handled by feeding this a
48
+ * draft {@link hoistBuiltinCommand} has already rewritten, so the semantics
49
+ * below stay the single source of truth for what each builtin accepts.
40
50
  */
41
51
  export declare const parseBuiltinCommand: (draft: string) => BuiltinCommand | null;
42
52
  /**
@@ -44,17 +54,14 @@ export declare const parseBuiltinCommand: (draft: string) => BuiltinCommand | nu
44
54
  * by {@link filterSkills} (prefix matches first; input order — built-ins
45
55
  * before skills — breaks ties within each bucket).
46
56
  *
47
- * `includeBuiltins` (default `true`) gates the built-in group. Built-ins are
48
- * parsed by {@link parseBuiltinCommand} against the SUBMITTED draft, which
49
- * only recognizes a LEADING `/command` a mid-message token (`please
50
- * /clear`) can never match one. Offering `/clear` there is a dead end: the
51
- * picked token splices `please /clear ` into the draft, which then posts as
52
- * raw text instead of running the command. Callers pass `false` for a
53
- * mid-message token (caller determines "leading" from the token's `start`
54
- * offset); the voice `invoke_skill` resolver (chat.tsx) always dispatches a
55
- * synthesized leading `/name` and keeps the default.
57
+ * Built-ins are offered for a token at ANY position (BEL-167). They used to be
58
+ * withheld from a mid-message token because {@link parseBuiltinCommand} could
59
+ * only match a LEADING `/command`, which made picking one a dead end (the
60
+ * splice produced `please /clear`, which then posted as raw text). Submit now
61
+ * runs {@link hoistBuiltinCommand} first, so the pick is honored wherever the
62
+ * token sits and the gate is gone.
56
63
  */
57
- export declare const filterSlashOptions: (skills: readonly SkillSummary[], query: string, includeBuiltins?: boolean) => readonly SkillSummary[];
64
+ export declare const filterSlashOptions: (skills: readonly SkillSummary[], query: string) => readonly SkillSummary[];
58
65
  /** An active `/`-command token: the `/` at [start], caret at [end], `query` between. */
59
66
  export type SlashTokenMatch = {
60
67
  readonly query: string;
@@ -94,5 +101,27 @@ export declare const parseSlashSubmission: (draft: string, skills: readonly Skil
94
101
  * "/command works anywhere" holds for commands too.
95
102
  */
96
103
  export declare const hoistCommandSubmission: (draft: string, commands: readonly CommandSummary[]) => string;
104
+ /**
105
+ * BEL-167 — "/command solo funciona al principio". Built-ins are parsed by
106
+ * {@link parseBuiltinCommand} (and `/plan` by `detectPlanIntent`), both of
107
+ * which only recognize a LEADING `/command`. A known builtin token found
108
+ * mid-message is hoisted to the front so "use /schedule to send the report
109
+ * tomorrow" runs the command instead of posting as a message.
110
+ *
111
+ * Same device as {@link hoistCommandSubmission}, with two deliberate rules:
112
+ *
113
+ * - A draft that ALREADY starts with `/` is returned untouched. The leading
114
+ * position is the runtime's business and its semantics are pinned by tests
115
+ * (`/compact now` is a message, not a command); hoisting must add a path,
116
+ * never rewrite the existing one.
117
+ * - An argument-free builtin hoists to the bare token, dropping the prose.
118
+ * Leading `/compact now` falls through because it is genuinely ambiguous —
119
+ * the user may have chosen to start a sentence with a slash. A token typed
120
+ * (or spliced by the picker) INTO prose is not ambiguous: it is a command
121
+ * insertion, and keeping "please" as an argument would only make it a no-op.
122
+ *
123
+ * The argument-taking builtins ROTATE rather than splice — see below.
124
+ */
125
+ export declare const hoistBuiltinCommand: (draft: string) => string;
97
126
  /** Name-prefix matches first, then other name/description substring matches. */
98
127
  export declare const filterSkills: (skills: readonly SkillSummary[], query: string) => readonly SkillSummary[];
@@ -20,27 +20,62 @@
20
20
  * sessions list names the background conversation.
21
21
  *
22
22
  * BOOT RE-ATTACH (F3/R4): `attachLineReader` below is the ONE seam that wires
23
- * a line-run reader onto a line, shared by a fresh dispatch (this module,
24
- * right after a POST accepts a run) and `reattachPendingLineRuns` (called
25
- * once at boot, after `initAgentLines()` rehydrates the registry) resuming a
26
- * run that was still going when the page reloaded. Both paths persist the
27
- * binding (`persistSlotRun`) and wire the identical phase/approval/navigate/
28
- * artifact/finish/error callbacks — a reload must behave exactly like the
29
- * live dispatch it is standing in for, not a parallel, easier-to-drift copy.
23
+ * a VOICE-dispatched line-run reader onto a line, shared by a fresh dispatch
24
+ * (this module, right after a POST accepts a run) and `reattachPendingLineRuns`
25
+ * (called once at boot, after `initAgentLines()` rehydrates the registry)
26
+ * resuming a run that was still going when the page reloaded. Both paths
27
+ * persist the binding (`persistSlotRun`) and wire the identical phase/approval/
28
+ * navigate/artifact/finish/error callbacks — a reload must behave exactly like
29
+ * the live dispatch it is standing in for, not a parallel, easier-to-drift copy.
30
+ *
31
+ * TWO READER KINDS (BEL-90). This module now attaches two, and which callback
32
+ * set a caller gets is a correctness question, not a style one:
33
+ *
34
+ * - `attachLineReader` — the voice-NARRATION reader. Its callbacks are not
35
+ * plain setters: `deliverLineReply`/`deliverLineFailure` push
36
+ * `conversation.item.create` events into an active voice call and ask the
37
+ * model to respond, `notifyLinePhase` appends timeline rows and nudges
38
+ * spoken progress, `deliverLineArtifact` opens a preview panel. Correct
39
+ * for a run the operator dispatched BY VOICE.
40
+ * - `attachLineProgressReader` — the plain-progress reader, for a run the
41
+ * user started by TYPING that was still in flight at reload. It goes
42
+ * through `reportRunLineProgress` and touches only the registry, so a
43
+ * typed run can never make the agent start talking about background
44
+ * progress mid-call.
30
45
  */
31
46
  /** Abort every live line reader and invalidate their callbacks (call teardown).
32
47
  * Subscribed below to fire whenever a call leaves in_call/connecting. */
33
48
  export declare const abortAllLineReaders: () => void;
49
+ /** Test-only: drop every plain-progress reader (and the active-session latch)
50
+ * so a case never inherits either from the previous case. The narration
51
+ * readers have `abortAllLineReaders`; these deliberately do NOT ride on it — a
52
+ * voice call ending has nothing to do with a typed run still streaming. */
53
+ export declare const __detachLineProgressReadersForTest: () => void;
34
54
  /**
35
- * BOOT RE-ATTACH (F3/R4): call this once, right after `initAgentLines()`
36
- * rehydrates the registry from persisted slots. Every background line (2/3)
37
- * whose slot carried a non-null `runId` already shows `status: "working"`
38
- * (`rehydratedLines()` in voice-call-lines.ts) — this re-attaches its reader
39
- * so the line actually converges to ready/failed via the SAME
40
- * `attachLineReader` a live dispatch uses, instead of sitting at an
41
- * honest-looking but permanently stuck "working". Line 1 never carries a
42
- * registry `runId` (see `AgentLine.runId`'s doc) and is skipped here — its
43
- * own reload-resume path is the stream-state store's, not this one.
55
+ * BOOT RE-ATTACH: call this once, right after `initAgentLines()` rehydrates
56
+ * the registry. A line rehydrated as `status: "working"` has a run that was
57
+ * still going when the page went away (`rehydratedLines()` in
58
+ * voice-call-lines.ts) — this attaches the reader that actually converges it
59
+ * to ready/failed, instead of leaving an honest-looking but permanently stuck
60
+ * "working".
61
+ *
62
+ * TWO paths, because the two dispatch kinds have genuinely different
63
+ * contracts (BEL-90 / B1 see `attachLineProgressReader`'s doc):
64
+ *
65
+ * - F3/R4, UNCHANGED — a line whose durable SLOT carries a runId was
66
+ * dispatched by voice. It gets the narration reader, on every line that has
67
+ * one, INCLUDING when its session is the one on screen. That last part is
68
+ * load-bearing: `persistSlotRun(line, null)` in that reader's terminal
69
+ * callbacks is the durable slot's clearer, and skipping the on-screen line
70
+ * would leave a stale slot runId that rehydrates as "working" on every
71
+ * future reload (§41). The transport's terminal now clears the slot too, so
72
+ * both routes converge.
73
+ * - BEL-90 — a line with NO slot runId but a fresh parked run cursor was
74
+ * started by typing. It gets the plain-progress reader, and it is SKIPPED
75
+ * when its session is the active one: ChatRoute is about to mount for that
76
+ * session and its transport will claim the single reader. Skipping is safe
77
+ * here precisely because a typed run writes no durable slot runId — there
78
+ * is nothing that could get stuck.
44
79
  */
45
80
  export declare const reattachPendingLineRuns: (fetchFn?: typeof fetch) => void;
46
81
  export declare const dispatchToLine: (req: {