@belonguniverseai/react-sdk 0.6.36 → 0.6.37

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 (75) hide show
  1. package/dist/api/client.d.ts +50 -31
  2. package/dist/api/task-schedules.d.ts +9 -9
  3. package/dist/app/dock-story-data.d.ts +2 -2
  4. package/dist/component/BelongWidget.d.ts +2 -2
  5. package/dist/component/{abnfDiagram-N423BO3Z-MW1sjWF3.js → abnfDiagram-N423BO3Z-rK11gCuw.js} +4 -4
  6. package/dist/component/{architectureDiagram-T3A2C74G-D4zEznoY.js → architectureDiagram-T3A2C74G-C1fDFU4x.js} +6 -6
  7. package/dist/component/{blockDiagram-VBNYF7ZC-D2DFmlFt.js → blockDiagram-VBNYF7ZC-CIIYxs7W.js} +8 -8
  8. package/dist/component/{c4Diagram-5PPSVZJV-DoWWto3C.js → c4Diagram-5PPSVZJV-D0xe0LhD.js} +4 -4
  9. package/dist/component/{channel-CIsNkq5U.js → channel-DHf95WkB.js} +2 -2
  10. package/dist/component/{chunk-2GRJ4B5K-CnMQg92_.js → chunk-2GRJ4B5K-DJk-FbzK.js} +2 -2
  11. package/dist/component/{chunk-3NCLNEKW-XZE2nq5d.js → chunk-3NCLNEKW-_C9hD1ul.js} +2 -2
  12. package/dist/component/{chunk-4I5QYGJK-C29IIa92.js → chunk-4I5QYGJK-B_3nmgHd.js} +2 -2
  13. package/dist/component/{chunk-5RXB4S5H-D8CsdioM.js → chunk-5RXB4S5H-DziHhBp7.js} +6 -6
  14. package/dist/component/{chunk-6Q2QTUOP-DC00GcIz.js → chunk-6Q2QTUOP-CyeRnoqL.js} +3 -3
  15. package/dist/component/{chunk-7Z6QIM7H-CZdOhSC_.js → chunk-7Z6QIM7H-BvEk7IjN.js} +8 -8
  16. package/dist/component/{chunk-GF5L2VYU-C0kC9EFc.js → chunk-GF5L2VYU-DFdrfj8S.js} +6 -6
  17. package/dist/component/{chunk-I66GZJ75-CSlLT2qZ.js → chunk-I66GZJ75-BVlp1JJ3.js} +2 -2
  18. package/dist/component/{chunk-J7OUQ5F2-CvsOm6iD.js → chunk-J7OUQ5F2-R59lQHxP.js} +7 -7
  19. package/dist/component/{chunk-JQJVKLGR-BQqtcBTx.js → chunk-JQJVKLGR-BjFxgfuL.js} +8 -8
  20. package/dist/component/{chunk-KBJHAD2P-BhdypO-1.js → chunk-KBJHAD2P-D1ocoB1a.js} +2 -2
  21. package/dist/component/{chunk-NSK5VX7P-B-NXFyTF.js → chunk-NSK5VX7P-CmvUkGFa.js} +2 -2
  22. package/dist/component/{chunk-QR6OTTB3-CdOd5La0.js → chunk-QR6OTTB3-6ofCyHE2.js} +7 -7
  23. package/dist/component/{chunk-UBXNYLIW-C93te6n-.js → chunk-UBXNYLIW-DgQyKHNe.js} +3 -3
  24. package/dist/component/{chunk-W5SLKNZC-CeanpCwB.js → chunk-W5SLKNZC-DSgs5pb1.js} +2 -2
  25. package/dist/component/{chunk-WRU74C26-KDh3Ch4s.js → chunk-WRU74C26-DzxU7J7M.js} +4 -4
  26. package/dist/component/{classDiagram-JCYQIIEL-CW1C-vZp.js → classDiagram-JCYQIIEL-BknOsFu3.js} +13 -13
  27. package/dist/component/{classDiagram-v2-OCEON4UE-BsHRjtZz.js → classDiagram-v2-OCEON4UE-CDIs8Rvl.js} +13 -13
  28. package/dist/component/{component-kD4tjup5.js → component-DHNI8DmD.js} +16170 -16090
  29. package/dist/component/{cynefinDiagram-MW4NZA55-CKE4kPxj.js → cynefinDiagram-MW4NZA55-DRk2rLVG.js} +4 -4
  30. package/dist/component/{dagre-VZM6K2ZE-CxrlpA3T.js → dagre-VZM6K2ZE-6dDo8vcv.js} +9 -9
  31. package/dist/component/{diagram-7IWD3JNH-BdXx0oAi.js → diagram-7IWD3JNH-CZkXMjIH.js} +5 -5
  32. package/dist/component/{diagram-B4RE2ZJO-N1vzbmbv.js → diagram-B4RE2ZJO-DIoO4x6J.js} +3 -3
  33. package/dist/component/{diagram-LBJQPF4R-BdNgG1dp.js → diagram-LBJQPF4R-o7HLLGFz.js} +4 -4
  34. package/dist/component/{diagram-Q27KOJAE-fEVWom6c.js → diagram-Q27KOJAE-BY-hokjN.js} +6 -6
  35. package/dist/component/{diagram-UB23O5K3-D3ddRmV-.js → diagram-UB23O5K3-D9_7IpwX.js} +4 -4
  36. package/dist/component/{ebnfDiagram-BXEA7PRR-BIkX9XAm.js → ebnfDiagram-BXEA7PRR-CA6DgX-J.js} +4 -4
  37. package/dist/component/{erDiagram-JOGREHBK-G5VfRzQe.js → erDiagram-JOGREHBK-B2e6ieJI.js} +12 -12
  38. package/dist/component/flowDiagram-UKHOOZJN-KAoNtclS.js +19 -0
  39. package/dist/component/{ganttDiagram-PKOTCBZU-DFVPgVsX.js → ganttDiagram-PKOTCBZU-CXWlDKZD.js} +3 -3
  40. package/dist/component/{gitGraphDiagram-DS77QQ5N-GPr8zrQa.js → gitGraphDiagram-DS77QQ5N-ChosGXFO.js} +3 -3
  41. package/dist/component/index.d.ts +1 -1
  42. package/dist/component/index.js +2 -2
  43. package/dist/component/{infoDiagram-6WML65LV-C7cW9Pmn.js → infoDiagram-6WML65LV-CWzYdOA_.js} +3 -3
  44. package/dist/component/{ishikawaDiagram-WSZJBQD7-C97lV7eR.js → ishikawaDiagram-WSZJBQD7-DCePzZHH.js} +4 -4
  45. package/dist/component/{journeyDiagram-NVQOT4AX-DXvUjmFx.js → journeyDiagram-NVQOT4AX-izcwbeeP.js} +3 -3
  46. package/dist/component/{kanban-definition-27J2QSJJ-BilK0rhq.js → kanban-definition-27J2QSJJ-DR73dp4V.js} +9 -9
  47. package/dist/component/{line-DEbULRtQ.js → line-BZtHRQ5-.js} +2 -2
  48. package/dist/component/{mindmap-definition-FAOFIHXS-DNrFtLr_.js → mindmap-definition-FAOFIHXS-DLE_Fj51.js} +11 -11
  49. package/dist/component/{pegDiagram-VL7TDLO6-jB_WWZvp.js → pegDiagram-VL7TDLO6-DO3t9HIS.js} +4 -4
  50. package/dist/component/{pieDiagram-7S7Q4E2Y-DmztszhT.js → pieDiagram-7S7Q4E2Y-BbwvXWvD.js} +4 -4
  51. package/dist/component/{quadrantDiagram-CIZ2JOQS-DHHhsaLJ.js → quadrantDiagram-CIZ2JOQS-UFgMo21N.js} +2 -2
  52. package/dist/component/{railroadDiagram-AXF67PYL-BiovbKaT.js → railroadDiagram-AXF67PYL-BDh1A2ex.js} +4 -4
  53. package/dist/component/{requirementDiagram-LRYGKXZP-6xc4arWd.js → requirementDiagram-LRYGKXZP-MZZT3yVT.js} +11 -11
  54. package/dist/component/{sankeyDiagram-W5VNT64P-BEybtkf5.js → sankeyDiagram-W5VNT64P-C0b2-i0q.js} +2 -2
  55. package/dist/component/{sequenceDiagram-SI44F4Z6-DqDJ9hHB.js → sequenceDiagram-SI44F4Z6-BwL_YUO5.js} +4 -4
  56. package/dist/component/{stateDiagram-OKZ733FA-BA3wN58t.js → stateDiagram-OKZ733FA-DEZXsS8t.js} +14 -14
  57. package/dist/component/{stateDiagram-v2-UEYNNEHI-B83V6gam.js → stateDiagram-v2-UEYNNEHI-2MgNefm0.js} +13 -13
  58. package/dist/component/{swimlanes-SLNWSIFB-BbF2sVb0.js → swimlanes-SLNWSIFB-X67Rhw2Q.js} +9 -9
  59. package/dist/component/{swimlanesDiagram-ULZ7WXOC-C00S5fih.js → swimlanesDiagram-ULZ7WXOC-DZOs4i8X.js} +13 -13
  60. package/dist/component/{timeline-definition-Z64GVDOM-GRQm4yUr.js → timeline-definition-Z64GVDOM-7nBVxaU9.js} +4 -4
  61. package/dist/component/{vennDiagram-T6HMQDX7-D824lwM6.js → vennDiagram-T6HMQDX7-DiCHf_z0.js} +4 -4
  62. package/dist/component/{wardleyDiagram-T6FBY63Y-CXnuXYy5.js → wardleyDiagram-T6FBY63Y-ChtSGywV.js} +4 -4
  63. package/dist/component/{xychartDiagram-ELKLHX3M-B_Y0TM5t.js → xychartDiagram-ELKLHX3M-E-EkjY4L.js} +7 -7
  64. package/dist/components/embed/WorkspaceChip.d.ts +1 -0
  65. package/dist/embed/presets.d.ts +2 -2
  66. package/dist/embed/voice/session-create.d.ts +0 -18
  67. package/dist/embed/workspace-path-availability.d.ts +12 -0
  68. package/dist/embed/workspace-scope.d.ts +7 -1
  69. package/dist/i18n/messages/en.d.ts +1 -0
  70. package/dist/i18n/messages/surfaces/header.d.ts +4 -0
  71. package/dist/public-api.d.ts +1 -1
  72. package/dist/stream/belong-chat-transport.d.ts +7 -7
  73. package/dist/types/public.d.ts +14 -1
  74. package/package.json +1 -1
  75. package/dist/component/flowDiagram-UKHOOZJN-Dg8Abi8D.js +0 -19
@@ -1,12 +1,17 @@
1
+ import { BelongWorkspace } from '../types/public.ts';
1
2
  export declare const isWorkspaceExternalId: (value: string) => boolean;
2
3
  export type WorkspaceScope = {
3
4
  readonly kind: "unconfigured";
4
5
  } | {
5
6
  readonly kind: "scoped";
6
7
  readonly id: string;
8
+ readonly path: string;
9
+ readonly name: string | null;
7
10
  } | {
8
11
  readonly kind: "missing";
9
12
  };
13
+ /** Same independent attribution-path grammar as the cell; ids still stay flat. */
14
+ export declare const isWorkspacePath: (value: string) => boolean;
10
15
  /** Poll cadence for URL-param tracking (the grant card's historical 2s). */
11
16
  export declare const WORKSPACE_SCOPE_POLL_MS = 2000;
12
17
  /** Resolve the scope LIVE (fresh URL read). See the header for precedence. */
@@ -32,6 +37,7 @@ export declare const useWorkspaceScope: () => WorkspaceScope;
32
37
  export declare const configureWorkspaceScope: (input: {
33
38
  readonly urlParam?: string | null;
34
39
  readonly staticId?: string | null;
40
+ readonly workspace?: BelongWorkspace | null;
35
41
  }) => void;
36
42
  /**
37
43
  * Imperative host switch (`belong.setWorkspace` / the widget's `workspace`
@@ -43,7 +49,7 @@ export declare const configureWorkspaceScope: (input: {
43
49
  * never silently break the dock. Use {@link clearHostWorkspace} to fully
44
50
  * disengage (component unmount).
45
51
  */
46
- export declare const setHostWorkspace: (id: string | null) => void;
52
+ export declare const setHostWorkspace: (input: string | BelongWorkspace | null) => void;
47
53
  /**
48
54
  * Fully disengage imperative workspace control (component unmount, or a host
49
55
  * that stopped passing the `workspace` prop): drop the override AND stop
@@ -1023,6 +1023,7 @@ export declare const en: {
1023
1023
  };
1024
1024
  readonly header: {
1025
1025
  readonly byBelong: "by Belong";
1026
+ readonly workspaceChip: "Workspace: {{workspace}}";
1026
1027
  readonly navChat: "Chat";
1027
1028
  readonly navGoal: "Goal";
1028
1029
  readonly navGoalNeedsYou: "Goal — it needs you";
@@ -2,6 +2,7 @@
2
2
  export declare const headerEn: {
3
3
  readonly header: {
4
4
  readonly byBelong: "by Belong";
5
+ readonly workspaceChip: "Workspace: {{workspace}}";
5
6
  readonly navChat: "Chat";
6
7
  readonly navGoal: "Goal";
7
8
  readonly navGoalNeedsYou: "Goal — it needs you";
@@ -36,6 +37,7 @@ export declare const headerEn: {
36
37
  export declare const headerEs: {
37
38
  header: {
38
39
  byBelong: string;
40
+ workspaceChip: string;
39
41
  navChat: string;
40
42
  navGoal: string;
41
43
  navGoalNeedsYou: string;
@@ -70,6 +72,7 @@ export declare const headerEs: {
70
72
  export declare const headerPt: {
71
73
  header: {
72
74
  byBelong: string;
75
+ workspaceChip: string;
73
76
  navChat: string;
74
77
  navGoal: string;
75
78
  navGoalNeedsYou: string;
@@ -104,6 +107,7 @@ export declare const headerPt: {
104
107
  export declare const headerIt: {
105
108
  header: {
106
109
  byBelong: string;
110
+ workspaceChip: string;
107
111
  navChat: string;
108
112
  navGoal: string;
109
113
  navGoalNeedsYou: string;
@@ -1,3 +1,3 @@
1
- export type { BelongBrowserControlConfig, BelongBrowserOpName, BelongGlobal, BelongHostMcpConfig, BelongInitInput, BelongOpenOptions, BelongTheme, BelongThemeBrand, BelongThemeDensity, BelongThemeMode, BelongThemePalette, BelongThemeSide, PartialBelongTheme, RouteHandler, RouteHandlerResult, UiActionHandler, UiActionResult, } from './types/public.ts';
1
+ export type { BelongBrowserControlConfig, BelongBrowserOpName, BelongGlobal, BelongHostMcpConfig, BelongInitInput, BelongOpenOptions, BelongWorkspace, BelongTheme, BelongThemeBrand, BelongThemeDensity, BelongThemeMode, BelongThemePalette, BelongThemeSide, PartialBelongTheme, RouteHandler, RouteHandlerResult, UiActionHandler, UiActionResult, } from './types/public.ts';
2
2
  export { SdkProviders } from './app/providers.tsx';
3
3
  export { createApiClient, setBelongToken } from './api/client.ts';
@@ -65,9 +65,9 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
65
65
  title: z.ZodString;
66
66
  kind: z.ZodString;
67
67
  status: z.ZodOptional<z.ZodEnum<{
68
+ failed: "failed";
68
69
  pending: "pending";
69
70
  completed: "completed";
70
- failed: "failed";
71
71
  in_progress: "in_progress";
72
72
  }>>;
73
73
  }, z.core.$strip>>;
@@ -110,8 +110,8 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
110
110
  data: z.ZodObject<{
111
111
  toolName: z.ZodString;
112
112
  state: z.ZodEnum<{
113
- completed: "completed";
114
113
  failed: "failed";
114
+ completed: "completed";
115
115
  started: "started";
116
116
  }>;
117
117
  input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -134,8 +134,8 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
134
134
  name: z.ZodString;
135
135
  description: z.ZodString;
136
136
  state: z.ZodEnum<{
137
- running: "running";
138
137
  failed: "failed";
138
+ running: "running";
139
139
  finished: "finished";
140
140
  }>;
141
141
  stepsUsed: z.ZodOptional<z.ZodNumber>;
@@ -163,9 +163,9 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
163
163
  id: z.ZodString;
164
164
  data: z.ZodObject<{
165
165
  state: z.ZodEnum<{
166
+ failed: "failed";
166
167
  output: "output";
167
168
  completed: "completed";
168
- failed: "failed";
169
169
  started: "started";
170
170
  }>;
171
171
  stream: z.ZodOptional<z.ZodEnum<{
@@ -185,8 +185,8 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
185
185
  uiActionRequestId: z.ZodString;
186
186
  actionName: z.ZodString;
187
187
  state: z.ZodEnum<{
188
- completed: "completed";
189
188
  failed: "failed";
189
+ completed: "completed";
190
190
  requested: "requested";
191
191
  }>;
192
192
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -219,8 +219,8 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
219
219
  id: z.ZodString;
220
220
  data: z.ZodObject<{
221
221
  state: z.ZodEnum<{
222
- waiting: "waiting";
223
222
  idle: "idle";
223
+ waiting: "waiting";
224
224
  }>;
225
225
  stepIndex: z.ZodNumber;
226
226
  elapsedMs: z.ZodNumber;
@@ -230,8 +230,8 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
230
230
  id: z.ZodString;
231
231
  data: z.ZodObject<{
232
232
  status: z.ZodEnum<{
233
- completed: "completed";
234
233
  failed: "failed";
234
+ completed: "completed";
235
235
  cancelled: "cancelled";
236
236
  continuing: "continuing";
237
237
  throttled: "throttled";
@@ -9,6 +9,15 @@ export type BelongTokenRequest = {
9
9
  readonly forceRefresh?: boolean;
10
10
  };
11
11
  export type BelongTokenGetter = (request?: BelongTokenRequest) => Promise<string>;
12
+ /** Host workspace identity and the label/path recorded for a new conversation. */
13
+ export type BelongWorkspace = {
14
+ /** Flat provider id; defaults to the path only for a single segment. */
15
+ readonly id?: string;
16
+ /** Up to eight slash-separated segments, at most 256 characters. */
17
+ readonly path: string;
18
+ /** Host-provided display name; shown in the header. */
19
+ readonly name?: string;
20
+ };
12
21
  /**
13
22
  * Public types the host embedding the SDK reads — keep this surface
14
23
  * small and stable.
@@ -132,6 +141,8 @@ export type BelongLocale = "en" | "es" | "pt" | "it";
132
141
  export type BelongInitInput = {
133
142
  /** Belong cloud base URL, e.g. `https://api.belong.host` or `http://localhost:8787`. */
134
143
  readonly apiBaseUrl: string;
144
+ /** Optional host workspace declaration; the provider id keeps its flat grammar. */
145
+ readonly workspace?: BelongWorkspace;
135
146
  /**
136
147
  * Public tenant ID or slug (multi-tenant deployments). Used for
137
148
  * boot-time, unauthenticated surfaces only — the theme fetch adds
@@ -274,6 +285,8 @@ export type BelongHostMcpConfig = {
274
285
  * segment). At most 8.
275
286
  */
276
287
  readonly allowedPaths: readonly string[];
288
+ /** Host-owned same-origin X-headers (for example a session CSRF token); never agent arguments. */
289
+ readonly headers?: Readonly<Record<string, string>>;
277
290
  };
278
291
  /** A browser-control op the dock can run on the host page. */
279
292
  export type BelongBrowserOpName = "snapshot" | "read" | "click" | "type" | "select" | "press" | "navigate" | "eval" | "mcp_call";
@@ -331,7 +344,7 @@ export type BelongGlobal = {
331
344
  * console warning. Hosts can use this standalone (no `scopeUrlParam`) or
332
345
  * alongside URL tracking for instant switches.
333
346
  */
334
- readonly setWorkspace: (id: string | null) => void;
347
+ readonly setWorkspace: (workspace: string | BelongWorkspace | null) => void;
335
348
  /**
336
349
  * Set the signed-in user at runtime (wins over `init({ user })`).
337
350
  * `setUser(null)` drops the override back to the init value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@belonguniverseai/react-sdk",
3
- "version": "0.6.36",
3
+ "version": "0.6.37",
4
4
  "description": "Belong — embeddable React AI assistant dock. Mount <BelongWidget> in your app tree with getToken dependency-injection auth.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -1,19 +0,0 @@
1
- globalThis.process = globalThis.process || { env: {} }, globalThis.global = globalThis.global || globalThis;
2
- import "./chunk-Y2CYZVJY-CiUSrfaV.js";
3
- import "./src-CKo8cHWB.js";
4
- import "./chunk-I66GZJ75-CSlLT2qZ.js";
5
- import "./chunk-NSK5VX7P-B-NXFyTF.js";
6
- import "./chunk-ZIRB5QZD-DmX0SXRC.js";
7
- import "./chunk-W5SLKNZC-CeanpCwB.js";
8
- import "./chunk-UBXNYLIW-C93te6n-.js";
9
- import "./chunk-4I5QYGJK-C29IIa92.js";
10
- import "./chunk-WRU74C26-KDh3Ch4s.js";
11
- import "./chunk-QR6OTTB3-CdOd5La0.js";
12
- import "./chunk-7BUUIJ7U-DJJ8ycYS.js";
13
- import "./chunk-7Z6QIM7H-CZdOhSC_.js";
14
- import "./chunk-J7OUQ5F2-CvsOm6iD.js";
15
- import "./chunk-5VM5RSS4-BuOiQaWo.js";
16
- import "./chunk-2GRJ4B5K-CnMQg92_.js";
17
- import "./chunk-XXDRQBXY-BP7ld7ls.js";
18
- import "./chunk-KBJHAD2P-BhdypO-1.js";
19
- export { n as diagram } from "./chunk-JQJVKLGR-BQqtcBTx.js";