@belonguniverseai/react-sdk 0.6.28 → 0.6.29

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 (101) hide show
  1. package/README.md +14 -4
  2. package/dist/api/artifact-actions.d.ts +0 -1
  3. package/dist/api/auth-errors.d.ts +21 -0
  4. package/dist/api/client.d.ts +800 -64
  5. package/dist/api/goals.d.ts +19 -2
  6. package/dist/api/task-schedule-sharing.d.ts +18 -3
  7. package/dist/api/task-schedules.d.ts +74 -10
  8. package/dist/app/VoiceOverlay.d.ts +4 -3
  9. package/dist/app/dock-story-data.d.ts +15 -0
  10. package/dist/browser/control-channel.d.ts +9 -0
  11. package/dist/browser/dom-bridge.d.ts +2 -0
  12. package/dist/component/BelongWidget.d.ts +13 -3
  13. package/dist/component/{abnfDiagram-N423BO3Z-BGC_KU0K.js → abnfDiagram-N423BO3Z-BvL7baZ-.js} +4 -4
  14. package/dist/component/{arc-BpIEtZvJ.js → arc-DVUroP2Z.js} +2 -2
  15. package/dist/component/{architectureDiagram-T3A2C74G-DYlEVfnh.js → architectureDiagram-T3A2C74G-CYt93mxs.js} +3 -3
  16. package/dist/component/{blockDiagram-VBNYF7ZC-BWDnhAW1.js → blockDiagram-VBNYF7ZC-yST7U8Pb.js} +4 -4
  17. package/dist/component/{c4Diagram-5PPSVZJV-VKL0Shn2.js → c4Diagram-5PPSVZJV-BHz6Efx3.js} +3 -3
  18. package/dist/component/{channel-gGd0pNDR.js → channel-CKTqNdN4.js} +2 -2
  19. package/dist/component/{chunk-2GRJ4B5K-CEt4y1jX.js → chunk-2GRJ4B5K-Bw2zHHAm.js} +2 -2
  20. package/dist/component/{chunk-2Q5K7J3B-Dj2wrNzr.js → chunk-2Q5K7J3B-DpBuF73m.js} +2 -2
  21. package/dist/component/{chunk-5RXB4S5H-oJQEn1bH.js → chunk-5RXB4S5H-dxBtwi1p.js} +5 -5
  22. package/dist/component/{chunk-5VM5RSS4-DddP8MPP.js → chunk-5VM5RSS4-BOTqM1Rc.js} +2 -2
  23. package/dist/component/{chunk-6Q2QTUOP-CppUJwrF.js → chunk-6Q2QTUOP-DjMXJhRD.js} +2 -2
  24. package/dist/component/{chunk-GF5L2VYU--hyUlO9v.js → chunk-GF5L2VYU-CGpnSfXM.js} +6 -6
  25. package/dist/component/{chunk-JWPE2WC7-CN0Ieqel.js → chunk-JWPE2WC7-L5aYKPho.js} +2 -2
  26. package/dist/component/{chunk-KBJHAD2P-BWhCQoHz.js → chunk-KBJHAD2P-DH2RFBaF.js} +2 -2
  27. package/dist/component/{chunk-RYQCIY6F-BgNewpQe.js → chunk-RYQCIY6F-QPgRO0s7.js} +2 -2
  28. package/dist/component/{chunk-XXDRQBXY-mNH171OF.js → chunk-XXDRQBXY-C1ezaFpA.js} +2 -2
  29. package/dist/component/{classDiagram-JCYQIIEL-UjZbWotD.js → classDiagram-JCYQIIEL-Dx7Qx836.js} +3 -3
  30. package/dist/component/{classDiagram-v2-OCEON4UE-UjZbWotD.js → classDiagram-v2-OCEON4UE-Dx7Qx836.js} +3 -3
  31. package/dist/component/{cose-bilkent-JH36ORCC-lsVWGlMj.js → cose-bilkent-JH36ORCC-Bem1eaLJ.js} +2 -2
  32. package/dist/component/{cynefinDiagram-MW4NZA55-B5Ss0zoy.js → cynefinDiagram-MW4NZA55-DF15EWOu.js} +3 -3
  33. package/dist/component/{dagre-VZM6K2ZE-DisWRVfU.js → dagre-VZM6K2ZE-BVzwev7l.js} +3 -3
  34. package/dist/component/{diagram-7IWD3JNH-B2QrdsOh.js → diagram-7IWD3JNH-DzQhKX_v.js} +4 -4
  35. package/dist/component/{diagram-B4RE2ZJO-Bs8l4THz.js → diagram-B4RE2ZJO-DnHINfhE.js} +3 -3
  36. package/dist/component/{diagram-LBJQPF4R-JTadtYMW.js → diagram-LBJQPF4R-CPqE_GwY.js} +3 -3
  37. package/dist/component/{diagram-Q27KOJAE-BQC33flc.js → diagram-Q27KOJAE-BjpvfqhL.js} +4 -4
  38. package/dist/component/{diagram-UB23O5K3-ujC22dQx.js → diagram-UB23O5K3-BcYqFjqI.js} +3 -3
  39. package/dist/component/{ebnfDiagram-BXEA7PRR-0WnF2wzt.js → ebnfDiagram-BXEA7PRR-DoqGcWGx.js} +4 -4
  40. package/dist/component/{erDiagram-JOGREHBK-CqgMsd5R.js → erDiagram-JOGREHBK-DGrj5tIK.js} +5 -5
  41. package/dist/component/{flowDiagram-UKHOOZJN-BOM0P8Mk.js → flowDiagram-UKHOOZJN-B8OuOrVY.js} +7 -7
  42. package/dist/component/{ganttDiagram-PKOTCBZU-WeRFC1th.js → ganttDiagram-PKOTCBZU-BaxSqTVY.js} +3 -3
  43. package/dist/component/{gitGraphDiagram-DS77QQ5N-CS8L-BA8.js → gitGraphDiagram-DS77QQ5N-W1Sqa3Hc.js} +4 -4
  44. package/dist/component/{highlighted-body-OFNGDK62-CGejnMyq.js → highlighted-body-OFNGDK62-Cf1UqcGe.js} +2 -2
  45. package/dist/component/index.d.ts +1 -0
  46. package/dist/component/index.js +2 -2
  47. package/dist/component/{infoDiagram-6WML65LV-CQQhytkd.js → infoDiagram-6WML65LV-BS0JlYPr.js} +2 -2
  48. package/dist/component/{ishikawaDiagram-WSZJBQD7-CjDo3-zt.js → ishikawaDiagram-WSZJBQD7-Df_NzOQV.js} +2 -2
  49. package/dist/component/{journeyDiagram-NVQOT4AX-BCCoblta.js → journeyDiagram-NVQOT4AX-JWKvZ6rc.js} +5 -5
  50. package/dist/component/{kanban-definition-27J2QSJJ-DgTIrgvB.js → kanban-definition-27J2QSJJ-DMvICKAB.js} +3 -3
  51. package/dist/component/{linear-BOaza_dp.js → linear-D02U2fTS.js} +2 -2
  52. package/dist/component/{mermaid-GHXKKRXX-BAq5-Vj8.js → mermaid-GHXKKRXX-B7CJJdoE.js} +37650 -36676
  53. package/dist/component/{mindmap-definition-FAOFIHXS-D1oolR3A.js → mindmap-definition-FAOFIHXS-AzTh8oju.js} +4 -4
  54. package/dist/component/{pegDiagram-VL7TDLO6-C9UxqvBP.js → pegDiagram-VL7TDLO6-DSCzZs_w.js} +4 -4
  55. package/dist/component/{pieDiagram-7S7Q4E2Y-I5IXzOZM.js → pieDiagram-7S7Q4E2Y-CEByr6BB.js} +4 -4
  56. package/dist/component/{quadrantDiagram-CIZ2JOQS-DPDFBhEd.js → quadrantDiagram-CIZ2JOQS-BrWOf-GT.js} +3 -3
  57. package/dist/component/{railroadDiagram-AXF67PYL-DIAkhVTf.js → railroadDiagram-AXF67PYL-DRtsV2gM.js} +4 -4
  58. package/dist/component/{requirementDiagram-LRYGKXZP-DBEmV-Qy.js → requirementDiagram-LRYGKXZP-_WwAo7AE.js} +4 -4
  59. package/dist/component/{sankeyDiagram-W5VNT64P-BEeDyDj7.js → sankeyDiagram-W5VNT64P-DBxP3yyK.js} +2 -2
  60. package/dist/component/{sequenceDiagram-SI44F4Z6-WYcXWUHF.js → sequenceDiagram-SI44F4Z6-B3SNXrpC.js} +4 -4
  61. package/dist/component/{sizeCapture-X5ZJPWSS-BqDBRpiS.js → sizeCapture-X5ZJPWSS-D5G8pyPC.js} +2 -2
  62. package/dist/component/{stateDiagram-OKZ733FA-CfYfR0OH.js → stateDiagram-OKZ733FA-C4UZwsoc.js} +3 -3
  63. package/dist/component/{stateDiagram-v2-UEYNNEHI-BSa2VwcQ.js → stateDiagram-v2-UEYNNEHI-DIYB5q15.js} +3 -3
  64. package/dist/component/{swimlanes-SLNWSIFB-C-7mrC4X.js → swimlanes-SLNWSIFB-Cc9yJXTh.js} +4 -4
  65. package/dist/component/{swimlanesDiagram-ULZ7WXOC-DXcMd7U4.js → swimlanesDiagram-ULZ7WXOC-DsGPiJ-s.js} +3 -3
  66. package/dist/component/{timeline-definition-Z64GVDOM-Dp65E80E.js → timeline-definition-Z64GVDOM-Dr4-iAeD.js} +3 -3
  67. package/dist/component/{vennDiagram-T6HMQDX7-CRpZ12TH.js → vennDiagram-T6HMQDX7-ZiaZ9jYw.js} +2 -2
  68. package/dist/component/{wardleyDiagram-T6FBY63Y-BupsM8K3.js → wardleyDiagram-T6FBY63Y-KdF37MT-.js} +3 -3
  69. package/dist/component/{xychartDiagram-ELKLHX3M-CUnr8Qbu.js → xychartDiagram-ELKLHX3M-NH_bOKPL.js} +3 -3
  70. package/dist/components/embed/ComposerContext.d.ts +11 -7
  71. package/dist/components/embed/EmbedComposer.d.ts +3 -1
  72. package/dist/components/embed/GoalRefusalCard.d.ts +5 -1
  73. package/dist/components/scheduled/ConfirmRunPausedScheduleDialog.d.ts +18 -0
  74. package/dist/components/scheduled/EmailCopiesFields.d.ts +19 -0
  75. package/dist/components/scheduled/ScheduledDetailSurface.d.ts +2 -1
  76. package/dist/components/scheduled/use-run-now-with-confirmation.d.ts +17 -0
  77. package/dist/embed/artifact-action-bridge.d.ts +11 -3
  78. package/dist/embed/artifact-remint-budget.d.ts +5 -0
  79. package/dist/embed/copy.d.ts +13 -18
  80. package/dist/embed/goal-edit-command.d.ts +6 -5
  81. package/dist/embed/plan-decision-text.d.ts +1 -0
  82. package/dist/embed/voice-config.d.ts +22 -31
  83. package/dist/embed/voice-prefs.d.ts +18 -34
  84. package/dist/i18n/messages/en.d.ts +28 -2
  85. package/dist/i18n/messages/surfaces/feedback.d.ts +12 -0
  86. package/dist/i18n/messages/surfaces/plan.d.ts +4 -0
  87. package/dist/i18n/messages/surfaces/scheduled.d.ts +53 -1
  88. package/dist/i18n/messages/surfaces/usage.d.ts +1 -1
  89. package/dist/lib/tab-control-store.d.ts +14 -0
  90. package/dist/lib/tab-leadership.d.ts +9 -24
  91. package/dist/lib/use-tab-leadership.d.ts +5 -7
  92. package/dist/routes/chat/history-merge.d.ts +53 -0
  93. package/dist/routes/chat/history-paging.d.ts +25 -6
  94. package/dist/routes/chat/use-catch-up-on-return.d.ts +70 -0
  95. package/dist/routes/chat/use-return-to-page.d.ts +7 -0
  96. package/dist/stream/belong-chat-transport.d.ts +8 -6
  97. package/dist/stream/dispatch-once.d.ts +1 -1
  98. package/dist/stream/queued-message-outbox.d.ts +1 -0
  99. package/dist/stream/session-control-context.d.ts +7 -0
  100. package/dist/types/public.d.ts +12 -5
  101. package/package.json +1 -1
package/README.md CHANGED
@@ -82,10 +82,10 @@ tenant bucket and backend read permissions.
82
82
  The script-tag embed's `init` takes two optional host-context props that
83
83
  personalise what the dock shows before the first message:
84
84
 
85
- | Prop | Type | Required | Description |
86
- | ------------- | ------------------------------------------------- | -------- | ------------------------------------------------------------------- |
87
- | `user` | `{ displayName?: string }` | no | Signed-in user; personalises the first message and the avatar menu. |
88
- | `pageContext` | `{ label?: string; fromDocumentTitle?: boolean }` | no | Page label for the first message; defaults to the tab title. |
85
+ | Prop | Type | Required | Description |
86
+ | ------------- | ------------------------------------------------- | -------- | ----------------------------------------------------------------------------------- |
87
+ | `user` | `{ displayName?: string }` | no | Signed-in user; personalises the first message and the avatar menu. |
88
+ | `pageContext` | `{ label?: string; fromDocumentTitle?: boolean }` | no | Page label shown in the dock and sent with each message; defaults to the tab title. |
89
89
 
90
90
  Both have runtime setters on `window.belong`, alongside `setLocale` and
91
91
  `setWorkspace`:
@@ -98,6 +98,16 @@ Both have runtime setters on `window.belong`, alongside `setLocale` and
98
98
  dock reads `document.title` live (SPA navigation updates it), unless the host
99
99
  passed `pageContext: { fromDocumentTitle: false }`.
100
100
 
101
+ The page label is also **sent with every message**, so the agent can resolve
102
+ "this page": the label the composer's page chip shows at send time (host label,
103
+ `init` label, or the tab title) rides the message, and the agent reads it as
104
+ host-reported context, never as something the user typed. Only the label is
105
+ sent, never the page's contents, and it is stored with the message like the
106
+ message text. A tab title can carry customer names, record ids or the
107
+ signed-in user's email: if yours does, give the dock a clean label with
108
+ `setPageContext(label)`, or pass `pageContext: { fromDocumentTitle: false }` so
109
+ nothing is sent unless you set one.
110
+
101
111
  A re-`init` states the host's context in full: omitting `user` or
102
112
  `pageContext` CLEARS what a previous `init` seeded (the config is replaced
103
113
  wholesale, not merged). A live `setUser` / `setPageContext` override outranks
@@ -24,6 +24,5 @@ export type ArtifactActionApi = {
24
24
  };
25
25
  /** What the report bridge may call: everything except the parent-only stop control. */
26
26
  export type ArtifactBridgeApi = Omit<ArtifactActionApi, "settle">;
27
- export declare const ARTIFACT_API_REQUEST_TIMEOUT_MS = 20000;
28
27
  /** Parent-only authenticated adapter. Generated HTML cannot select the target or auth source. */
29
28
  export declare const createArtifactActionApi: (apiBaseUrl: string, artifactId: string, workspaceExternalId: string | null) => ArtifactActionApi;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The dock's "the host session is gone" error. A leaf module so the request
3
+ * layer (client.ts), the chat transport and the chat route share one prefix
4
+ * without importing each other.
5
+ */
6
+ /**
7
+ * The prefix the dock recognizes as "the host session is gone" — the chat
8
+ * renders `chat.authExpired` with a Retry for any error that starts with it.
9
+ */
10
+ export declare const AUTH_EXPIRED_ERROR_PREFIX = "auth_expired:";
11
+ /**
12
+ * Raised INSTEAD of sending an authenticated request when the registered auth
13
+ * source yields no usable token, even after one forced refresh and a bounded
14
+ * wait. A header-less request can only 401 (`missing_authorization_header`)
15
+ * and, from a long-lived loop, it never stops — prod 2026-10-15 saw 1,246 of
16
+ * them. Failing locally keeps the backend quiet and gives the dock a
17
+ * recognizable signed-out error (the `auth_expired:` prefix).
18
+ */
19
+ export declare class BelongAuthUnavailableError extends Error {
20
+ constructor();
21
+ }