@belonguniverseai/react-sdk 0.6.18 → 0.6.19

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 (95) hide show
  1. package/README.md +30 -0
  2. package/dist/api/account-connectors.d.ts +3 -3
  3. package/dist/api/client.d.ts +525 -19
  4. package/dist/api/queries.d.ts +1 -0
  5. package/dist/api/task-schedules.d.ts +8 -8
  6. package/dist/app/BelongDock.d.ts +2 -2
  7. package/dist/component/BelongWidget.d.ts +22 -1
  8. package/dist/component/{abnfDiagram-N423BO3Z-D-QlcOhi.js → abnfDiagram-N423BO3Z-p8pf1oUu.js} +4 -4
  9. package/dist/component/{arc-Cr7brctQ.js → arc-CDN3jDNB.js} +2 -2
  10. package/dist/component/{architectureDiagram-T3A2C74G-Dy0iEVu6.js → architectureDiagram-T3A2C74G-Dd8FlfDW.js} +3 -3
  11. package/dist/component/{blockDiagram-VBNYF7ZC-DILLxOep.js → blockDiagram-VBNYF7ZC-CUgNh_GL.js} +4 -4
  12. package/dist/component/{c4Diagram-5PPSVZJV-BX6tDsxk.js → c4Diagram-5PPSVZJV-CSjftNi_.js} +3 -3
  13. package/dist/component/{channel-BGFUKe6a.js → channel-RXp4rUai.js} +2 -2
  14. package/dist/component/{chunk-2GRJ4B5K-BTagC02U.js → chunk-2GRJ4B5K-Conm-Udw.js} +2 -2
  15. package/dist/component/{chunk-2Q5K7J3B-CSsLOQM_.js → chunk-2Q5K7J3B-BJVcNqca.js} +2 -2
  16. package/dist/component/{chunk-5RXB4S5H-CnKLpufI.js → chunk-5RXB4S5H-ClnvuSUP.js} +5 -5
  17. package/dist/component/{chunk-5VM5RSS4-DIqLm-ng.js → chunk-5VM5RSS4-CZSg676A.js} +2 -2
  18. package/dist/component/{chunk-6Q2QTUOP-DxaHOD10.js → chunk-6Q2QTUOP-d6e2hDQ3.js} +2 -2
  19. package/dist/component/{chunk-GF5L2VYU-pHAFn-83.js → chunk-GF5L2VYU-DMNXiX_5.js} +6 -6
  20. package/dist/component/{chunk-JWPE2WC7-BX-bA5Hi.js → chunk-JWPE2WC7-Be-HKBKg.js} +2 -2
  21. package/dist/component/{chunk-KBJHAD2P-BnQgMdlj.js → chunk-KBJHAD2P-CSs5ejAq.js} +2 -2
  22. package/dist/component/{chunk-RYQCIY6F-BhueWm50.js → chunk-RYQCIY6F-BM0CmhLz.js} +2 -2
  23. package/dist/component/{chunk-XXDRQBXY-BJzLpKlJ.js → chunk-XXDRQBXY-Xj8K5wzT.js} +2 -2
  24. package/dist/component/{classDiagram-JCYQIIEL-DAcauTm8.js → classDiagram-JCYQIIEL-DTZI6cPh.js} +3 -3
  25. package/dist/component/{classDiagram-v2-OCEON4UE-DAcauTm8.js → classDiagram-v2-OCEON4UE-DTZI6cPh.js} +3 -3
  26. package/dist/component/{cose-bilkent-JH36ORCC-LKxaT1DG.js → cose-bilkent-JH36ORCC-DaY5o18F.js} +2 -2
  27. package/dist/component/{cynefinDiagram-MW4NZA55-oVDASRC2.js → cynefinDiagram-MW4NZA55-DoTeA4Ye.js} +3 -3
  28. package/dist/component/{dagre-VZM6K2ZE-CmV7-9zD.js → dagre-VZM6K2ZE-CF3eWDN_.js} +3 -3
  29. package/dist/component/{diagram-7IWD3JNH-BvjSvBK3.js → diagram-7IWD3JNH-D4CVwoPP.js} +4 -4
  30. package/dist/component/{diagram-B4RE2ZJO-B_cxXRTv.js → diagram-B4RE2ZJO-DTk-yH1g.js} +3 -3
  31. package/dist/component/{diagram-LBJQPF4R-DWVXEkld.js → diagram-LBJQPF4R-C82NaEDn.js} +3 -3
  32. package/dist/component/{diagram-Q27KOJAE-CnBW6OeT.js → diagram-Q27KOJAE-DVbW2GPm.js} +4 -4
  33. package/dist/component/{diagram-UB23O5K3-CXqI5_Q2.js → diagram-UB23O5K3-fLwqL8Hl.js} +3 -3
  34. package/dist/component/{ebnfDiagram-BXEA7PRR-CgD4I3Yv.js → ebnfDiagram-BXEA7PRR-BLEKzcRB.js} +4 -4
  35. package/dist/component/{erDiagram-JOGREHBK-D5Mg98e7.js → erDiagram-JOGREHBK-D9srj1qV.js} +5 -5
  36. package/dist/component/{flowDiagram-UKHOOZJN-BfeqDLOI.js → flowDiagram-UKHOOZJN-CeyLyzYo.js} +7 -7
  37. package/dist/component/{ganttDiagram-PKOTCBZU-Dyur2c7k.js → ganttDiagram-PKOTCBZU-D_wnN-8z.js} +3 -3
  38. package/dist/component/{gitGraphDiagram-DS77QQ5N-Lv0LL5O8.js → gitGraphDiagram-DS77QQ5N-PeHi2KIR.js} +4 -4
  39. package/dist/component/{highlighted-body-OFNGDK62-B6dOwDKQ.js → highlighted-body-OFNGDK62-CuSKYiPW.js} +2 -2
  40. package/dist/component/index.js +2 -2
  41. package/dist/component/{infoDiagram-6WML65LV-CzRKYrpD.js → infoDiagram-6WML65LV-CGnUeTPG.js} +2 -2
  42. package/dist/component/{ishikawaDiagram-WSZJBQD7-Zay9aRLR.js → ishikawaDiagram-WSZJBQD7-DhbZTdB_.js} +2 -2
  43. package/dist/component/{journeyDiagram-NVQOT4AX-t8hX-zE_.js → journeyDiagram-NVQOT4AX-DbAZyk3F.js} +5 -5
  44. package/dist/component/{kanban-definition-27J2QSJJ-C5Z-o_W7.js → kanban-definition-27J2QSJJ-CPIUg4vz.js} +3 -3
  45. package/dist/component/{linear-BJGedx0o.js → linear-CpcRfWUV.js} +2 -2
  46. package/dist/component/{mermaid-GHXKKRXX-D8oOFc9R.js → mermaid-GHXKKRXX-CnsSyJhK.js} +30747 -30046
  47. package/dist/component/{mindmap-definition-FAOFIHXS-DtEeqND2.js → mindmap-definition-FAOFIHXS-RIm66-oB.js} +4 -4
  48. package/dist/component/{pegDiagram-VL7TDLO6-4lhU_z4v.js → pegDiagram-VL7TDLO6-C6uB8Ash.js} +4 -4
  49. package/dist/component/{pieDiagram-7S7Q4E2Y-D8cHUkzW.js → pieDiagram-7S7Q4E2Y-6m7QqfK3.js} +4 -4
  50. package/dist/component/{quadrantDiagram-CIZ2JOQS-BNeqfDf4.js → quadrantDiagram-CIZ2JOQS-Dge2oJ5y.js} +3 -3
  51. package/dist/component/{railroadDiagram-AXF67PYL-BnMzmkOY.js → railroadDiagram-AXF67PYL-DWfg1byS.js} +4 -4
  52. package/dist/component/{requirementDiagram-LRYGKXZP-BRH5fHva.js → requirementDiagram-LRYGKXZP-C_mrqai9.js} +4 -4
  53. package/dist/component/{sankeyDiagram-W5VNT64P-Cq0gDRP2.js → sankeyDiagram-W5VNT64P-D1MhEv2a.js} +2 -2
  54. package/dist/component/{sequenceDiagram-SI44F4Z6-BVaNAKx0.js → sequenceDiagram-SI44F4Z6-mn9it5es.js} +4 -4
  55. package/dist/component/{sizeCapture-X5ZJPWSS-TjSqgMqH.js → sizeCapture-X5ZJPWSS-Do_vnkJp.js} +2 -2
  56. package/dist/component/{stateDiagram-OKZ733FA-h8M4ZCJD.js → stateDiagram-OKZ733FA-Pru5Vhsh.js} +3 -3
  57. package/dist/component/{stateDiagram-v2-UEYNNEHI-Bt7eFNHB.js → stateDiagram-v2-UEYNNEHI-BvRl8AHY.js} +3 -3
  58. package/dist/component/{swimlanes-SLNWSIFB-sfBKGyKm.js → swimlanes-SLNWSIFB-CfaY_lmO.js} +4 -4
  59. package/dist/component/{swimlanesDiagram-ULZ7WXOC-CxFraoVG.js → swimlanesDiagram-ULZ7WXOC-BFIfCk31.js} +3 -3
  60. package/dist/component/{timeline-definition-Z64GVDOM-DAWBGXFV.js → timeline-definition-Z64GVDOM-BFU8eZDJ.js} +3 -3
  61. package/dist/component/{vennDiagram-T6HMQDX7-CmFvuTy7.js → vennDiagram-T6HMQDX7-C475K8TJ.js} +2 -2
  62. package/dist/component/{wardleyDiagram-T6FBY63Y-gn696H4v.js → wardleyDiagram-T6FBY63Y-DZEN3DyJ.js} +3 -3
  63. package/dist/component/{xychartDiagram-ELKLHX3M-B8yDTGsJ.js → xychartDiagram-ELKLHX3M-B6MDNNoT.js} +3 -3
  64. package/dist/components/embed/EmbedConversation.d.ts +3 -3
  65. package/dist/components/embed/EmbedRail.d.ts +4 -2
  66. package/dist/components/embed/SlackConnection.d.ts +6 -0
  67. package/dist/components/embed/WelcomeHero.d.ts +16 -0
  68. package/dist/components/embed/WelcomeIntro.d.ts +18 -7
  69. package/dist/components/embed/WelcomeSkills.d.ts +7 -1
  70. package/dist/components/embed/WorkspacePane.d.ts +16 -0
  71. package/dist/components/embed/onboarding-story-dock.d.ts +3 -2
  72. package/dist/components/embed/use-preview-content-props.d.ts +7 -0
  73. package/dist/components/embed/use-prompt-invocations.d.ts +1 -0
  74. package/dist/embed/copy.d.ts +13 -18
  75. package/dist/embed/dock-layout.d.ts +14 -16
  76. package/dist/embed/dock-size-store.d.ts +7 -0
  77. package/dist/embed/dock-state.d.ts +2 -2
  78. package/dist/embed/hover-capability.d.ts +14 -0
  79. package/dist/embed/page-context.d.ts +11 -0
  80. package/dist/embed/show-target.d.ts +6 -0
  81. package/dist/embed/slash-commands.d.ts +7 -0
  82. package/dist/embed/user-context.d.ts +14 -0
  83. package/dist/embed/voice-call.d.ts +7 -6
  84. package/dist/i18n/messages/en.d.ts +11 -3
  85. package/dist/i18n/messages/surfaces/embedMisc.d.ts +0 -6
  86. package/dist/i18n/messages/surfaces/header.d.ts +6 -0
  87. package/dist/i18n/messages/surfaces/stream.d.ts +3 -0
  88. package/dist/i18n/messages/surfaces/workspace.d.ts +32 -0
  89. package/dist/stream/belong-chat-transport.d.ts +7 -7
  90. package/dist/stream/use-agent-workspace-focus.d.ts +5 -0
  91. package/dist/stream/workspace-focus-observer.d.ts +7 -0
  92. package/dist/stream/workspace-focus-store.d.ts +26 -0
  93. package/dist/types/public.d.ts +39 -0
  94. package/package.json +1 -1
  95. package/dist/components/embed/CapabilityHints.d.ts +0 -4
@@ -0,0 +1,11 @@
1
+ /** Resolve the label LIVE (fresh title read). See the header for precedence. */
2
+ export declare const peekPageContextLabel: () => string | null;
3
+ export declare const subscribePageContext: (listener: () => void) => (() => void);
4
+ /** `useSyncExternalStore` hook — the effective label, re-rendering on change. */
5
+ export declare const usePageContextLabel: () => string | null;
6
+ /** Seed from the embed config (`applyInitConfig`); replaces the whole config. */
7
+ export declare const configurePageContext: (input: unknown) => void;
8
+ /** Imperative host switch (`belong.setPageContext`); `null` drops the override. */
9
+ export declare const setHostPageContext: (label: unknown) => void;
10
+ /** Test-only: reset config + override, disconnect the observer, re-seed. */
11
+ export declare const __resetPageContextForTest: () => void;
@@ -0,0 +1,6 @@
1
+ import { WorkspaceFocusTarget } from '../stream/workspace-focus-store.ts';
2
+ type ShowTargetSource = "user" | "agent-auto";
3
+ export declare const showTarget: (target: WorkspaceFocusTarget, options?: {
4
+ readonly source?: ShowTargetSource;
5
+ }) => void;
6
+ export {};
@@ -78,6 +78,13 @@ export type SlashTokenMatch = {
78
78
  readonly start: number;
79
79
  readonly end: number;
80
80
  };
81
+ /**
82
+ * Can a `/` at this position open the menu? Only at the start of the draft or
83
+ * after whitespace — the rule {@link slashTokenMatch} enforces. Exported so the
84
+ * composer's `/` button can splice a slash in that the matcher will actually
85
+ * recognise, instead of re-deriving the same predicate and drifting from it.
86
+ */
87
+ export declare const isSlashBoundary: (ch: string | undefined) => boolean;
81
88
  /**
82
89
  * Detect a `/command` being typed at `caret` within `text` — ANYWHERE in the
83
90
  * draft, not just at the start (mirrors {@link atMentionMatch}). The `/` must
@@ -0,0 +1,14 @@
1
+ export type UserContext = {
2
+ readonly displayName: string | null;
3
+ };
4
+ /** Seed from the embed config (`applyInitConfig`); re-`init` replaces it. */
5
+ export declare const configureUserContext: (input: unknown) => void;
6
+ /** Imperative host switch (`belong.setUser`) — see the header for the two clears. */
7
+ export declare const setHostUser: (user: unknown) => void;
8
+ /** The effective user context (stable reference until it changes). */
9
+ export declare const peekUserContext: () => UserContext;
10
+ export declare const subscribeUserContext: (listener: () => void) => (() => void);
11
+ /** `useSyncExternalStore` hook — re-renders on a host name change. */
12
+ export declare const useUserContext: () => UserContext;
13
+ /** Test-only: drop the init value, the override, and every listener. */
14
+ export declare const __resetUserContextForTest: () => void;
@@ -278,12 +278,13 @@ export declare const deliverAgentFailure: (message: string) => void;
278
278
  * this section's header. */
279
279
  export declare const deliverLineReply: (line: number) => void;
280
280
  /**
281
- * A background line published an artifact: OPEN it on screen, mirroring
282
- * chat.tsx's foreground auto-open effect exactly — ALWAYS docked (a persisted
283
- * fullscreen pref would swallow the whole app), the same closable/resizable
284
- * panel a click on the artifact card gives. Deduped per artifactId (replays /
285
- * reconnects re-emit the part). NO spoken response: the line's finish reply
286
- * already narrates the result; a second voice line would double-speak.
281
+ * A background line published an artifact: OPEN it on screen via `showTarget`
282
+ * (agent-auto), mirroring chat.tsx's foreground auto-open effect exactly —
283
+ * docked (never the swallow-the-whole-app fullscreen preview) outside the
284
+ * fullscreen workspace pane, a no-op inside it (the focus observer owns agent
285
+ * focus there). Deduped per artifactId (replays / reconnects re-emit the
286
+ * part). NO spoken response: the line's finish reply already narrates the
287
+ * result; a second voice line would double-speak.
287
288
  */
288
289
  export declare const deliverLineArtifact: (line: number, artifact: {
289
290
  readonly artifactId: string;
@@ -1,4 +1,12 @@
1
1
  export declare const en: {
2
+ readonly workspace: {
3
+ readonly newItem: "New: {{title}}";
4
+ readonly close: "Close";
5
+ readonly download: "Download";
6
+ readonly shownByBelong: "Shown by Belong";
7
+ readonly openedByYou: "You opened this";
8
+ readonly planTitle: "Plan";
9
+ };
2
10
  readonly usage: {
3
11
  readonly tooltip: "Auto-compacts at {{chars}} chars; {{tokens}} tokens used this session";
4
12
  readonly windowTooltip: "Context window: {{used}} of {{window}} tokens used ({{pct}}%)";
@@ -24,6 +32,7 @@ export declare const en: {
24
32
  };
25
33
  };
26
34
  readonly stream: {
35
+ readonly toolExecutionError: "The tool could not complete. Please try again.";
27
36
  readonly copyOutput: "Copy output";
28
37
  readonly terminalOutput: "terminal output";
29
38
  readonly skillChip: "Skill: {{name}}";
@@ -350,6 +359,8 @@ export declare const en: {
350
359
  readonly hotkeyHint: "Hold {{key}} to talk — chat can stay closed";
351
360
  readonly expand: "Expand";
352
361
  readonly collapse: "Collapse";
362
+ readonly fullscreen: "Fullscreen";
363
+ readonly exitFullscreen: "Exit fullscreen";
353
364
  readonly spawnAgent: "New agent";
354
365
  readonly closeChat: "Close this chat";
355
366
  readonly closeAgent: "Close {{label}}";
@@ -440,8 +451,6 @@ export declare const en: {
440
451
  readonly deployedAt: "deployed {{label}}";
441
452
  readonly devOverrideActive: "Dev override active — click to change";
442
453
  readonly callLightModelActive: "Calls are stepped down to the light voice model — click for the best voice";
443
- readonly micUnmuted: "Mic unmuted";
444
- readonly micMuted: "Mic muted";
445
454
  readonly agentWorking: "{{name}} is working…";
446
455
  };
447
456
  readonly connectors: {
@@ -748,7 +757,6 @@ export declare const en: {
748
757
  readonly retry: "Retry";
749
758
  };
750
759
  readonly composer: {
751
- readonly placeholder: "Ask anything — or type / for commands…";
752
760
  readonly attachFiles: "Attach files";
753
761
  readonly dismissVoiceHint: "Dismiss voice hint";
754
762
  readonly executionMode: "Execution mode: {{mode}}";
@@ -42,8 +42,6 @@ export declare const embedMiscEn: {
42
42
  readonly deployedAt: "deployed {{label}}";
43
43
  readonly devOverrideActive: "Dev override active — click to change";
44
44
  readonly callLightModelActive: "Calls are stepped down to the light voice model — click for the best voice";
45
- readonly micUnmuted: "Mic unmuted";
46
- readonly micMuted: "Mic muted";
47
45
  readonly agentWorking: "{{name}} is working…";
48
46
  };
49
47
  };
@@ -89,8 +87,6 @@ export declare const embedMiscEs: {
89
87
  deployedAt: string;
90
88
  devOverrideActive: string;
91
89
  callLightModelActive: string;
92
- micUnmuted: string;
93
- micMuted: string;
94
90
  agentWorking: string;
95
91
  };
96
92
  };
@@ -136,8 +132,6 @@ export declare const embedMiscPt: {
136
132
  deployedAt: string;
137
133
  devOverrideActive: string;
138
134
  callLightModelActive: string;
139
- micUnmuted: string;
140
- micMuted: string;
141
135
  agentWorking: string;
142
136
  };
143
137
  };
@@ -17,6 +17,8 @@ export declare const headerEn: {
17
17
  readonly hotkeyHint: "Hold {{key}} to talk — chat can stay closed";
18
18
  readonly expand: "Expand";
19
19
  readonly collapse: "Collapse";
20
+ readonly fullscreen: "Fullscreen";
21
+ readonly exitFullscreen: "Exit fullscreen";
20
22
  readonly spawnAgent: "New agent";
21
23
  readonly closeChat: "Close this chat";
22
24
  readonly closeAgent: "Close {{label}}";
@@ -43,6 +45,8 @@ export declare const headerEs: {
43
45
  hotkeyHint: string;
44
46
  expand: string;
45
47
  collapse: string;
48
+ fullscreen: string;
49
+ exitFullscreen: string;
46
50
  spawnAgent: string;
47
51
  closeChat: string;
48
52
  closeAgent: string;
@@ -69,6 +73,8 @@ export declare const headerPt: {
69
73
  hotkeyHint: string;
70
74
  expand: string;
71
75
  collapse: string;
76
+ fullscreen: string;
77
+ exitFullscreen: string;
72
78
  spawnAgent: string;
73
79
  closeChat: string;
74
80
  closeAgent: string;
@@ -8,6 +8,7 @@
8
8
  */
9
9
  export declare const streamEn: {
10
10
  readonly stream: {
11
+ readonly toolExecutionError: "The tool could not complete. Please try again.";
11
12
  readonly copyOutput: "Copy output";
12
13
  readonly terminalOutput: "terminal output";
13
14
  readonly skillChip: "Skill: {{name}}";
@@ -118,6 +119,7 @@ export declare const streamEn: {
118
119
  };
119
120
  export declare const streamEs: {
120
121
  stream: {
122
+ toolExecutionError: string;
121
123
  copyOutput: string;
122
124
  terminalOutput: string;
123
125
  skillChip: string;
@@ -225,6 +227,7 @@ export declare const streamEs: {
225
227
  };
226
228
  export declare const streamPt: {
227
229
  stream: {
230
+ toolExecutionError: string;
228
231
  copyOutput: string;
229
232
  terminalOutput: string;
230
233
  skillChip: string;
@@ -0,0 +1,32 @@
1
+ /** Fullscreen workspace pane strings (spec 2026-09-02). §42: the copy names the
2
+ * product only — "Belong" — never the pane, the agent, or the dock. */
3
+ export declare const workspaceEn: {
4
+ readonly workspace: {
5
+ readonly newItem: "New: {{title}}";
6
+ readonly close: "Close";
7
+ readonly download: "Download";
8
+ readonly shownByBelong: "Shown by Belong";
9
+ readonly openedByYou: "You opened this";
10
+ readonly planTitle: "Plan";
11
+ };
12
+ };
13
+ export declare const workspaceEs: {
14
+ workspace: {
15
+ newItem: string;
16
+ close: string;
17
+ download: string;
18
+ shownByBelong: string;
19
+ openedByYou: string;
20
+ planTitle: string;
21
+ };
22
+ };
23
+ export declare const workspacePt: {
24
+ workspace: {
25
+ newItem: string;
26
+ close: string;
27
+ download: string;
28
+ shownByBelong: string;
29
+ openedByYou: string;
30
+ planTitle: string;
31
+ };
32
+ };
@@ -20,11 +20,11 @@ export declare const choiceAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
20
20
  kind: z.ZodLiteral<"skipped">;
21
21
  }, z.core.$strip>], "kind">;
22
22
  export declare const choiceStateSchema: z.ZodEnum<{
23
- pending: "pending";
24
23
  detached: "detached";
25
- cancelled: "cancelled";
26
- answered: "answered";
24
+ pending: "pending";
27
25
  dismissed: "dismissed";
26
+ answered: "answered";
27
+ cancelled: "cancelled";
28
28
  }>;
29
29
  /**
30
30
  * The wire/stored part union. Exported so the history loader (chat.tsx) can
@@ -189,8 +189,8 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
189
189
  data: z.ZodObject<{
190
190
  status: z.ZodEnum<{
191
191
  failed: "failed";
192
- cancelled: "cancelled";
193
192
  completed: "completed";
193
+ cancelled: "cancelled";
194
194
  continuing: "continuing";
195
195
  throttled: "throttled";
196
196
  }>;
@@ -224,11 +224,11 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
224
224
  data: z.ZodObject<{
225
225
  questionRequestId: z.ZodString;
226
226
  state: z.ZodEnum<{
227
- pending: "pending";
228
227
  detached: "detached";
229
- cancelled: "cancelled";
230
- answered: "answered";
228
+ pending: "pending";
231
229
  dismissed: "dismissed";
230
+ answered: "answered";
231
+ cancelled: "cancelled";
232
232
  }>;
233
233
  questions: z.ZodArray<z.ZodObject<{
234
234
  id: z.ZodString;
@@ -0,0 +1,5 @@
1
+ import { BelongUIMessage } from './belong-data-parts.ts';
2
+ export declare const useAgentWorkspaceFocus: (input: {
3
+ readonly messages: readonly BelongUIMessage[];
4
+ readonly historyLoading: boolean;
5
+ }) => void;
@@ -0,0 +1,7 @@
1
+ import { BelongUIMessage } from './belong-data-parts.ts';
2
+ import { WorkspaceFocusTarget } from './workspace-focus-store.ts';
3
+ export type WorkspaceFocusEvent = {
4
+ readonly key: string;
5
+ readonly target: WorkspaceFocusTarget;
6
+ };
7
+ export declare const collectWorkspaceFocusEvents: (messages: readonly BelongUIMessage[], workspaceExternalId: string | null) => readonly WorkspaceFocusEvent[];
@@ -0,0 +1,26 @@
1
+ import { PreviewTarget } from './preview-panel-store.ts';
2
+ export type WorkspaceFocusTarget = PreviewTarget | {
3
+ readonly kind: "plan";
4
+ };
5
+ export type WorkspaceFocusState = {
6
+ readonly target: WorkspaceFocusTarget | null;
7
+ /** Who put `target` there; null iff `target` is null. */
8
+ readonly setBy: "agent" | "user" | null;
9
+ /** The agent wants this shown, but the user holds the pane. */
10
+ readonly pending: WorkspaceFocusTarget | null;
11
+ };
12
+ /** Same thing on screen? Artifacts by id, workspace files by pinned scope + path, plans by kind. */
13
+ export declare const isSameFocusTarget: (a: WorkspaceFocusTarget, b: WorkspaceFocusTarget) => boolean;
14
+ export declare const peekWorkspaceFocus: () => WorkspaceFocusState;
15
+ export declare const subscribeWorkspaceFocus: (listener: () => void) => (() => void);
16
+ export declare const useWorkspaceFocus: () => WorkspaceFocusState;
17
+ /** The agent produced something: show it, unless the user holds the pane. */
18
+ export declare const focusFromAgent: (target: WorkspaceFocusTarget) => void;
19
+ /** The user opened something: show it and take the pane. */
20
+ export declare const focusFromUser: (target: WorkspaceFocusTarget) => void;
21
+ /** The user clicked the "New: …" chip: show the agent's item and hand back the pane. */
22
+ export declare const followAgent: () => void;
23
+ /** The user closed the pane: empty it, or show what the agent was waiting to show. */
24
+ export declare const clearFocus: () => void;
25
+ /** Session switch / new session / leaving fullscreen: forget everything. */
26
+ export declare const resetWorkspaceFocus: () => void;
@@ -142,6 +142,31 @@ export type BelongInitInput = {
142
142
  * new value to flip it. (BEL-77)
143
143
  */
144
144
  readonly panelEnabled?: boolean;
145
+ /**
146
+ * Who is signed in, for the greeting ("Hi Ana — …") and the avatar menu.
147
+ * Optional; re-`init` or `belong.setUser` to change it. A re-`init` states
148
+ * the host's intent in FULL: omitting `user` clears the previously seeded
149
+ * name. A live `belong.setUser` override outranks this value and SURVIVES a
150
+ * later `init` until the host clears it with `setUser(null)`. Nothing is
151
+ * stored — a reload re-derives it from the host's next `init`.
152
+ */
153
+ readonly user?: {
154
+ readonly displayName?: string;
155
+ };
156
+ /**
157
+ * What page the user is on, shown as "Looking at ‹label›" before the first
158
+ * message. Omit `label` to use the browser tab title (`document.title`,
159
+ * tracked live so SPA navigation updates the line); pass
160
+ * `fromDocumentTitle: false` to show nothing unless a label is given.
161
+ * A re-`init` replaces this config wholesale: omitting `pageContext` clears
162
+ * a previously seeded `label` and restores the tab-title fallback.
163
+ * `belong.setPageContext` overrides both at runtime and SURVIVES a later
164
+ * `init` until the host clears it with `setPageContext(null)`.
165
+ */
166
+ readonly pageContext?: {
167
+ readonly label?: string;
168
+ readonly fromDocumentTitle?: boolean;
169
+ };
145
170
  /** Optional theme overrides applied at startup (before first render). */
146
171
  readonly theme?: PartialBelongTheme;
147
172
  /** Optional voice config (push-to-talk + read-aloud). */
@@ -231,6 +256,20 @@ export type BelongGlobal = {
231
256
  * alongside URL tracking for instant switches.
232
257
  */
233
258
  readonly setWorkspace: (id: string | null) => void;
259
+ /**
260
+ * Set the signed-in user at runtime (wins over `init({ user })`).
261
+ * `setUser(null)` drops the override back to the init value;
262
+ * `setUser({ displayName: null })` says "no name for this user" and shows
263
+ * none even when `init` seeded one.
264
+ */
265
+ readonly setUser: (user: {
266
+ readonly displayName?: string | null;
267
+ } | null) => void;
268
+ /**
269
+ * Set the page label shown before the first message (wins over
270
+ * `init({ pageContext })` and the tab title). `null` drops the override.
271
+ */
272
+ readonly setPageContext: (label: string | null) => void;
234
273
  readonly setTheme: (theme: PartialBelongTheme) => void;
235
274
  readonly applyPreset: (name: PresetName) => void;
236
275
  readonly open: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@belonguniverseai/react-sdk",
3
- "version": "0.6.18",
3
+ "version": "0.6.19",
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,4 +0,0 @@
1
- import { DockCopyVariant } from '../../embed/copy.ts';
2
- export declare function CapabilityHints({ variant }: {
3
- variant: DockCopyVariant;
4
- }): import("react").JSX.Element;