@belonguniverseai/react-sdk 0.2.0 → 0.3.1

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 (73) hide show
  1. package/README.md +5 -4
  2. package/dist/api/client.d.ts +192 -12
  3. package/dist/api/retry-fetch.d.ts +58 -0
  4. package/dist/api/task-schedules.d.ts +198 -23
  5. package/dist/component/{arc-RUGz6lZa.js → arc-B7qwdj5Y.js} +2 -2
  6. package/dist/component/{architectureDiagram-3BPJPVTR-BX7ivAYH.js → architectureDiagram-3BPJPVTR-DHEfxvGE.js} +3 -3
  7. package/dist/component/{blockDiagram-GPEHLZMM-DkloXJvD.js → blockDiagram-GPEHLZMM-DO4_lzz8.js} +4 -4
  8. package/dist/component/{c4Diagram-AAUBKEIU-DpMkd-hu.js → c4Diagram-AAUBKEIU-BFvKjeX3.js} +3 -3
  9. package/dist/component/{channel-CMrJ5FvL.js → channel-Be_mlBXd.js} +2 -2
  10. package/dist/component/{chunk-2J33WTMH-BQFG3l5m.js → chunk-2J33WTMH-CJ_JyxkR.js} +2 -2
  11. package/dist/component/{chunk-4BX2VUAB-DIgdkfba.js → chunk-4BX2VUAB-BRkYFXFB.js} +2 -2
  12. package/dist/component/{chunk-55IACEB6-kiI_RN43.js → chunk-55IACEB6-D42tDKAF.js} +2 -2
  13. package/dist/component/{chunk-727SXJPM-B_3F8LLK.js → chunk-727SXJPM-BYOAmsWs.js} +6 -6
  14. package/dist/component/{chunk-AQP2D5EJ-nUpTDfR9.js → chunk-AQP2D5EJ-CUNDVk4Z.js} +4 -4
  15. package/dist/component/{chunk-FMBD7UC4-C666L1vx.js → chunk-FMBD7UC4-BQy-2qFB.js} +2 -2
  16. package/dist/component/{chunk-ND2GUHAM-BG3KaNNT.js → chunk-ND2GUHAM-ktW5vI-y.js} +2 -2
  17. package/dist/component/{chunk-QZHKN3VN-BekfxLxF.js → chunk-QZHKN3VN-CpSIn4cF.js} +2 -2
  18. package/dist/component/{classDiagram-4FO5ZUOK-BvcPz5Jy.js → classDiagram-4FO5ZUOK-Cm-1lpI4.js} +3 -3
  19. package/dist/component/{classDiagram-v2-Q7XG4LA2-BvcPz5Jy.js → classDiagram-v2-Q7XG4LA2-Cm-1lpI4.js} +3 -3
  20. package/dist/component/{cose-bilkent-S5V4N54A-CWpudsgn.js → cose-bilkent-S5V4N54A-DqixgjwQ.js} +2 -2
  21. package/dist/component/{dagre-BM42HDAG-COUBqMeu.js → dagre-BM42HDAG-Dv-P7Krm.js} +2 -2
  22. package/dist/component/{diagram-2AECGRRQ-Bj90e4r1.js → diagram-2AECGRRQ-kQGiD7lD.js} +3 -3
  23. package/dist/component/{diagram-5GNKFQAL-D50SBQ3H.js → diagram-5GNKFQAL-DoQlkZPU.js} +4 -4
  24. package/dist/component/{diagram-KO2AKTUF-rdkH6sIq.js → diagram-KO2AKTUF-CHX5UoXH.js} +3 -3
  25. package/dist/component/{diagram-LMA3HP47-BM-uSIwY.js → diagram-LMA3HP47-D5zUvZVG.js} +3 -3
  26. package/dist/component/{diagram-OG6HWLK6-BYeMl-HB.js → diagram-OG6HWLK6-B4npobs8.js} +4 -4
  27. package/dist/component/{erDiagram-TEJ5UH35-DFEfLVvR.js → erDiagram-TEJ5UH35-6z0JmU6m.js} +5 -5
  28. package/dist/component/{flowDiagram-I6XJVG4X-C785atDH.js → flowDiagram-I6XJVG4X-8Z4MRGGY.js} +7 -7
  29. package/dist/component/{ganttDiagram-6RSMTGT7-C5H-60U2.js → ganttDiagram-6RSMTGT7-Dx9QEDPc.js} +3 -3
  30. package/dist/component/{gitGraphDiagram-PVQCEYII-ceA5NW8c.js → gitGraphDiagram-PVQCEYII-BUHDP_7X.js} +4 -4
  31. package/dist/component/{highlighted-body-OFNGDK62-CshfJCgW.js → highlighted-body-OFNGDK62-DBPWZwq8.js} +2 -2
  32. package/dist/component/index.js +2 -2
  33. package/dist/component/{infoDiagram-5YYISTIA-C3KMuwje.js → infoDiagram-5YYISTIA-aiJg6_Qm.js} +2 -2
  34. package/dist/component/{ishikawaDiagram-YF4QCWOH-BZFrHmHT.js → ishikawaDiagram-YF4QCWOH-DL-CzUme.js} +2 -2
  35. package/dist/component/{journeyDiagram-JHISSGLW-BJOlgfUi.js → journeyDiagram-JHISSGLW-CYDK3R_C.js} +5 -5
  36. package/dist/component/{kanban-definition-UN3LZRKU-CfMReYx4.js → kanban-definition-UN3LZRKU-9ZNt06Tr.js} +3 -3
  37. package/dist/component/{linear-DUkCqmPt.js → linear-CtEJWK1N.js} +2 -2
  38. package/dist/component/{mermaid-GHXKKRXX-BOTLFr14.js → mermaid-GHXKKRXX-B00yz-X8.js} +30001 -29517
  39. package/dist/component/{mindmap-definition-RKZ34NQL-Bal8oXYU.js → mindmap-definition-RKZ34NQL-CHx9Cg9G.js} +4 -4
  40. package/dist/component/{pieDiagram-4H26LBE5-CCy9iJeT.js → pieDiagram-4H26LBE5-B_dLoXY_.js} +4 -4
  41. package/dist/component/{quadrantDiagram-W4KKPZXB-CZi1MEAc.js → quadrantDiagram-W4KKPZXB-DUL3njPs.js} +3 -3
  42. package/dist/component/{requirementDiagram-4Y6WPE33-irn_x5lf.js → requirementDiagram-4Y6WPE33-DJodprsF.js} +4 -4
  43. package/dist/component/{sankeyDiagram-5OEKKPKP-CX2rM6Rj.js → sankeyDiagram-5OEKKPKP-2Nn_RQ9h.js} +2 -2
  44. package/dist/component/{sequenceDiagram-3UESZ5HK-DmHw71eT.js → sequenceDiagram-3UESZ5HK-xJk0kY4S.js} +4 -4
  45. package/dist/component/{stateDiagram-AJRCARHV-3u6GXMEg.js → stateDiagram-AJRCARHV-D4QH9oBV.js} +3 -3
  46. package/dist/component/{stateDiagram-v2-BHNVJYJU-CbUih_UR.js → stateDiagram-v2-BHNVJYJU-C6SRcIR1.js} +3 -3
  47. package/dist/component/{timeline-definition-PNZ67QCA-BAW-94RV.js → timeline-definition-PNZ67QCA-SaEQyBaf.js} +3 -3
  48. package/dist/component/{vennDiagram-CIIHVFJN-IF4AwJuP.js → vennDiagram-CIIHVFJN-Bf8QpQpr.js} +2 -2
  49. package/dist/component/{wardleyDiagram-YWT4CUSO-Bn-uAkHk.js → wardleyDiagram-YWT4CUSO-B0wVwumO.js} +3 -3
  50. package/dist/component/{xychartDiagram-2RQKCTM6-CvPY-qXp.js → xychartDiagram-2RQKCTM6-Dl5itjjz.js} +3 -3
  51. package/dist/components/embed/CallButton.d.ts +26 -0
  52. package/dist/components/embed/EmbedAvatar.d.ts +4 -1
  53. package/dist/components/embed/EmbedSessions.d.ts +10 -3
  54. package/dist/components/embed/MobileNavBar.d.ts +39 -0
  55. package/dist/components/embed/mobile-nav-bar.fixtures.d.ts +3 -0
  56. package/dist/components/scheduled/ScheduledDetailSurface.d.ts +4 -1
  57. package/dist/components/scheduled/schedule-dialog-model.d.ts +6 -1
  58. package/dist/components/scheduled/schedule-format.d.ts +5 -1
  59. package/dist/embed/copy.d.ts +6 -0
  60. package/dist/embed/dock-layout.d.ts +23 -0
  61. package/dist/embed/layout-mode.d.ts +6 -0
  62. package/dist/embed/slash-commands.d.ts +44 -9
  63. package/dist/embed/voice/realtime-call.d.ts +8 -3
  64. package/dist/i18n/messages/en.d.ts +15 -10
  65. package/dist/i18n/messages/surfaces/aiElements.d.ts +3 -0
  66. package/dist/i18n/messages/surfaces/app.d.ts +9 -0
  67. package/dist/i18n/messages/surfaces/scheduled.d.ts +30 -0
  68. package/dist/i18n/messages/surfaces/stream.d.ts +3 -30
  69. package/dist/stream/ai-sdk-part-renderers.d.ts +8 -20
  70. package/dist/stream/belong-data-parts.d.ts +1 -1
  71. package/dist/stream/sandbox-output.d.ts +8 -4
  72. package/dist/types/public.d.ts +6 -1
  73. package/package.json +1 -1
@@ -23,15 +23,25 @@ export declare const scheduledEn: {
23
23
  readonly lastRun: "Last run {{time}}";
24
24
  readonly dayAtTime: "{{day}} at {{time}}";
25
25
  readonly pausedNotice: "Paused — runs won't start until you resume.";
26
+ readonly customEmailLabel: "Custom email enabled";
27
+ readonly customEmailDescription: "Each run reads the latest version of this template and sends an email only when its condition matches.";
28
+ readonly customEmailTemplate: "HTML template";
26
29
  readonly summaryOnce: "Once on {{time}}";
27
30
  readonly summaryDaily: "Daily at {{time}}";
28
31
  readonly summaryWeekdays: "Weekdays at {{time}}";
29
32
  readonly summaryWeekly: "Every {{day}} at {{time}}";
33
+ readonly summaryInterval: "Every {{minutes}} min";
34
+ readonly summaryManual: "Manual only";
30
35
  readonly timezoneSuffix: "({{timezone}})";
31
36
  readonly recurrenceNone: "Does not repeat";
32
37
  readonly recurrenceDaily: "Daily";
33
38
  readonly recurrenceWeekdays: "Weekdays (Mon–Fri)";
34
39
  readonly recurrenceWeekly: "Weekly";
40
+ readonly recurrenceInterval: "Custom interval";
41
+ readonly recurrenceManual: "Manual only";
42
+ readonly intervalLabel: "Run every (minutes)";
43
+ readonly intervalHint: "Between 1 and 1440 minutes.";
44
+ readonly manualHint: "Runs only when you trigger it — never automatically.";
35
45
  readonly dialogCreateTitle: "New scheduled task";
36
46
  readonly dialogEditTitle: "Edit scheduled task";
37
47
  readonly dialogHint: "You can change this later.";
@@ -107,15 +117,25 @@ export declare const scheduledEs: {
107
117
  lastRun: string;
108
118
  dayAtTime: string;
109
119
  pausedNotice: string;
120
+ customEmailLabel: string;
121
+ customEmailDescription: string;
122
+ customEmailTemplate: string;
110
123
  summaryOnce: string;
111
124
  summaryDaily: string;
112
125
  summaryWeekdays: string;
113
126
  summaryWeekly: string;
127
+ summaryInterval: string;
128
+ summaryManual: string;
114
129
  timezoneSuffix: string;
115
130
  recurrenceNone: string;
116
131
  recurrenceDaily: string;
117
132
  recurrenceWeekdays: string;
118
133
  recurrenceWeekly: string;
134
+ recurrenceInterval: string;
135
+ recurrenceManual: string;
136
+ intervalLabel: string;
137
+ intervalHint: string;
138
+ manualHint: string;
119
139
  dialogCreateTitle: string;
120
140
  dialogEditTitle: string;
121
141
  dialogHint: string;
@@ -191,15 +211,25 @@ export declare const scheduledPt: {
191
211
  lastRun: string;
192
212
  dayAtTime: string;
193
213
  pausedNotice: string;
214
+ customEmailLabel: string;
215
+ customEmailDescription: string;
216
+ customEmailTemplate: string;
194
217
  summaryOnce: string;
195
218
  summaryDaily: string;
196
219
  summaryWeekdays: string;
197
220
  summaryWeekly: string;
221
+ summaryInterval: string;
222
+ summaryManual: string;
198
223
  timezoneSuffix: string;
199
224
  recurrenceNone: string;
200
225
  recurrenceDaily: string;
201
226
  recurrenceWeekdays: string;
202
227
  recurrenceWeekly: string;
228
+ recurrenceInterval: string;
229
+ recurrenceManual: string;
230
+ intervalLabel: string;
231
+ intervalHint: string;
232
+ manualHint: string;
203
233
  dialogCreateTitle: string;
204
234
  dialogEditTitle: string;
205
235
  dialogHint: string;
@@ -54,18 +54,9 @@ export declare const streamEn: {
54
54
  readonly browserAwaitProcessed: "Waited for processing";
55
55
  readonly browserAssertCreated: "Checked for an existing resource";
56
56
  readonly failedBadge: "failed";
57
- readonly failedCount_one: "{{count}} failed";
58
- readonly failedCount_other: "{{count}} failed";
59
- readonly workedOnPageSteps_one: "Worked on the page · {{count}} step";
60
- readonly workedOnPageSteps_other: "Worked on the page · {{count}} steps";
57
+ readonly executingTasks: "Working on it…";
61
58
  readonly workedSteps_one: "Worked · {{count}} step";
62
59
  readonly workedSteps_other: "Worked · {{count}} steps";
63
- readonly workingSteps_one: "Working… · {{count}} step";
64
- readonly workingSteps_other: "Working… · {{count}} steps";
65
- readonly ranCommands_one: "Ran {{count}} command";
66
- readonly ranCommands_other: "Ran {{count}} commands";
67
- readonly runningCommands_one: "Running {{count}} command…";
68
- readonly runningCommands_other: "Running {{count}} commands…";
69
60
  readonly open: "Open";
70
61
  readonly reconnectNeeded: "The {{provider}} session needs reconnecting to continue.";
71
62
  readonly reconnect: "Reconnect";
@@ -122,18 +113,9 @@ export declare const streamEs: {
122
113
  browserAwaitProcessed: string;
123
114
  browserAssertCreated: string;
124
115
  failedBadge: string;
125
- failedCount_one: string;
126
- failedCount_other: string;
127
- workedOnPageSteps_one: string;
128
- workedOnPageSteps_other: string;
116
+ executingTasks: string;
129
117
  workedSteps_one: string;
130
118
  workedSteps_other: string;
131
- workingSteps_one: string;
132
- workingSteps_other: string;
133
- ranCommands_one: string;
134
- ranCommands_other: string;
135
- runningCommands_one: string;
136
- runningCommands_other: string;
137
119
  open: string;
138
120
  reconnectNeeded: string;
139
121
  reconnect: string;
@@ -190,18 +172,9 @@ export declare const streamPt: {
190
172
  browserAwaitProcessed: string;
191
173
  browserAssertCreated: string;
192
174
  failedBadge: string;
193
- failedCount_one: string;
194
- failedCount_other: string;
195
- workedOnPageSteps_one: string;
196
- workedOnPageSteps_other: string;
175
+ executingTasks: string;
197
176
  workedSteps_one: string;
198
177
  workedSteps_other: string;
199
- workingSteps_one: string;
200
- workingSteps_other: string;
201
- ranCommands_one: string;
202
- ranCommands_other: string;
203
- runningCommands_one: string;
204
- runningCommands_other: string;
205
178
  open: string;
206
179
  reconnectNeeded: string;
207
180
  reconnect: string;
@@ -1,10 +1,7 @@
1
1
  import { BelongDataParts, BelongUIMessage, SandboxCommandData, ToolCallData } from './belong-data-parts.ts';
2
- export declare const ToolActivityGroup: ({ tools }: {
3
- readonly tools: readonly ToolCallData[];
4
- }) => import("react").JSX.Element;
5
- export declare const TerminalTaskGroup: ({ commands, turnStreaming, }: {
6
- readonly commands: readonly TerminalCommand[];
7
- readonly turnStreaming?: boolean;
2
+ export declare const ActivityGroup: ({ items, live, }: {
3
+ readonly items: readonly ActivityItem[];
4
+ readonly live?: boolean | undefined;
8
5
  }) => import("react").JSX.Element;
9
6
  /** A segment of a message's text: prose to render as markdown, or a `@`-mention. */
10
7
  type TextSegment = {
@@ -47,9 +44,9 @@ export type PartRendererProps = {
47
44
  * `reasoning` parts.
48
45
  */
49
46
  export declare const PartRenderer: ({ part, onExecutePlan, historical }: PartRendererProps) => import("react").JSX.Element | null;
50
- /** One shell command paired with its (same-id) sandbox output, if any. */
51
- export type TerminalCommand = {
52
- readonly command: ToolCallData;
47
+ /** One tool call in an activity run, paired (for shell) with its same-id output. */
48
+ export type ActivityItem = {
49
+ readonly tool: ToolCallData;
53
50
  readonly output: SandboxCommandData | null;
54
51
  };
55
52
  export type RenderGroup = {
@@ -57,17 +54,8 @@ export type RenderGroup = {
57
54
  readonly part: BelongMessagePart;
58
55
  readonly key: string;
59
56
  } | {
60
- readonly kind: "tool-activity";
61
- readonly tools: readonly ToolCallData[];
62
- readonly key: string;
63
- } | {
64
- readonly kind: "terminal";
65
- readonly command: ToolCallData;
66
- readonly output: SandboxCommandData | null;
67
- readonly key: string;
68
- } | {
69
- readonly kind: "terminal-group";
70
- readonly commands: readonly TerminalCommand[];
57
+ readonly kind: "activity";
58
+ readonly items: readonly ActivityItem[];
71
59
  readonly key: string;
72
60
  };
73
61
  export declare const groupMessageParts: (parts: readonly BelongMessagePart[]) => readonly RenderGroup[];
@@ -90,7 +90,7 @@ export type ChoiceRequestData = {
90
90
  * BEL-97 — distinguishes an ordinary tool/command failure (a non-zero exit, a
91
91
  * tool that couldn't complete) from one that STOPS the agent run (a denied
92
92
  * permission, an aborting failure). Only `"stop"` warrants the red/destructive
93
- * treatment; an ordinary `"error"` gets the amber notice treatment so red is
93
+ * treatment; an ordinary `"error"` gets the orange notice treatment so red is
94
94
  * reserved for "the agent can't continue". Absent → `"error"` (the common,
95
95
  * recoverable case; back-compat with wire messages emitted before BEL-97).
96
96
  */
@@ -5,17 +5,21 @@ export declare const isShellToolName: (toolName: string) => boolean;
5
5
  /**
6
6
  * BEL-97 — how a finished shell command's outcome should be coloured.
7
7
  *
8
- * - `"none"` — still running, or completed cleanly (exit 0 / no exit code).
8
+ * - `"none"` — still running, completed cleanly (exit 0 / no exit code),
9
+ * failed with exit 0 (successful execution despite wrapper error),
10
+ * or timed out (still running in the sandbox).
9
11
  * - `"notice"` — an ORDINARY failure (non-zero exit, or a tool error with no
10
- * stop-severity). Amber, NOT red: the agent kept going.
12
+ * stop-severity). Orange, NOT red: the agent kept going.
11
13
  * - `"stop"` — an agent-execution-STOPPING failure (a denied permission, an
12
14
  * aborting error: `error.severity === "stop"`). Red.
13
15
  *
14
- * One source of truth shared by `TerminalTask` (its status badge) and the
15
- * consolidated terminal group (its aggregate failure badge).
16
+ * One source of truth shared by `TerminalTask` (its status badge) and
17
+ * `ActivityGroup` (its aggregate failure badge).
16
18
  */
17
19
  export type TerminalSeverity = "none" | "notice" | "stop";
18
20
  export declare const terminalCommandSeverity: (command: ToolCallData) => TerminalSeverity;
21
+ /** A failed part whose command actually KEEPS RUNNING past its wall-clock budget. */
22
+ export declare const isTimedOutCommand: (command: ToolCallData) => boolean;
19
23
  /** Apply-once dedupe key for a sandbox delta (folded history parts → "folded"). */
20
24
  export declare const sandboxDeltaKey: (data: SandboxCommandData) => string;
21
25
  /** Sort order for merging deltas: the folded full-text part precedes any live seq. */
@@ -175,7 +175,12 @@ export type BelongInitInput = {
175
175
  * is attempted.
176
176
  */
177
177
  readonly agentGrant?: {
178
- /** Grant provider key. Defaults to `"simetrik"`. */
178
+ /**
179
+ * Grant provider key. DEPRECATED default: omitted falls back to
180
+ * `"simetrik"` for backward compatibility (with a one-time console
181
+ * warning); a future major will require an explicit provider and treat
182
+ * omission as grants-off. Always name your provider.
183
+ */
179
184
  readonly provider?: string;
180
185
  /** Provider-side scope (e.g. the Simetrik workspace id) the session binds to. */
181
186
  readonly scopeExternalId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@belonguniverseai/react-sdk",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
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",