@belonguniverseai/react-sdk 0.6.18 → 0.6.20
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.
- package/README.md +30 -0
- package/dist/api/account-connectors.d.ts +3 -3
- package/dist/api/client.d.ts +525 -19
- package/dist/api/queries.d.ts +1 -0
- package/dist/api/task-schedules.d.ts +8 -8
- package/dist/app/BelongDock.d.ts +2 -2
- package/dist/component/BelongWidget.d.ts +22 -1
- package/dist/component/{abnfDiagram-N423BO3Z-D-QlcOhi.js → abnfDiagram-N423BO3Z-BhpvofGI.js} +4 -4
- package/dist/component/{arc-Cr7brctQ.js → arc-BDj2q5CZ.js} +2 -2
- package/dist/component/{architectureDiagram-T3A2C74G-Dy0iEVu6.js → architectureDiagram-T3A2C74G-CWQqfm2n.js} +3 -3
- package/dist/component/{blockDiagram-VBNYF7ZC-DILLxOep.js → blockDiagram-VBNYF7ZC-DegT976u.js} +4 -4
- package/dist/component/{c4Diagram-5PPSVZJV-BX6tDsxk.js → c4Diagram-5PPSVZJV-CSnfnID_.js} +3 -3
- package/dist/component/{channel-BGFUKe6a.js → channel-CUQQeqtV.js} +2 -2
- package/dist/component/{chunk-2GRJ4B5K-BTagC02U.js → chunk-2GRJ4B5K-BmCkMXuE.js} +2 -2
- package/dist/component/{chunk-2Q5K7J3B-CSsLOQM_.js → chunk-2Q5K7J3B-ACFPsFU_.js} +2 -2
- package/dist/component/{chunk-5RXB4S5H-CnKLpufI.js → chunk-5RXB4S5H-Bu-wqNe4.js} +5 -5
- package/dist/component/{chunk-5VM5RSS4-DIqLm-ng.js → chunk-5VM5RSS4-DDzdObQ5.js} +2 -2
- package/dist/component/{chunk-6Q2QTUOP-DxaHOD10.js → chunk-6Q2QTUOP-35aGDtbe.js} +2 -2
- package/dist/component/{chunk-GF5L2VYU-pHAFn-83.js → chunk-GF5L2VYU-CBooNwOJ.js} +6 -6
- package/dist/component/{chunk-JWPE2WC7-BX-bA5Hi.js → chunk-JWPE2WC7-CZN_bZMl.js} +2 -2
- package/dist/component/{chunk-KBJHAD2P-BnQgMdlj.js → chunk-KBJHAD2P-Cj08hUgE.js} +2 -2
- package/dist/component/{chunk-RYQCIY6F-BhueWm50.js → chunk-RYQCIY6F-CC4FyEwj.js} +2 -2
- package/dist/component/{chunk-XXDRQBXY-BJzLpKlJ.js → chunk-XXDRQBXY-CJW3AYPF.js} +2 -2
- package/dist/component/{classDiagram-JCYQIIEL-DAcauTm8.js → classDiagram-JCYQIIEL-LpH5TtI1.js} +3 -3
- package/dist/component/{classDiagram-v2-OCEON4UE-DAcauTm8.js → classDiagram-v2-OCEON4UE-LpH5TtI1.js} +3 -3
- package/dist/component/{cose-bilkent-JH36ORCC-LKxaT1DG.js → cose-bilkent-JH36ORCC-h8wo2OH9.js} +2 -2
- package/dist/component/{cynefinDiagram-MW4NZA55-oVDASRC2.js → cynefinDiagram-MW4NZA55-DuieCsNY.js} +3 -3
- package/dist/component/{dagre-VZM6K2ZE-CmV7-9zD.js → dagre-VZM6K2ZE-DqMvwkom.js} +3 -3
- package/dist/component/{diagram-7IWD3JNH-BvjSvBK3.js → diagram-7IWD3JNH-BThr9-R3.js} +4 -4
- package/dist/component/{diagram-B4RE2ZJO-B_cxXRTv.js → diagram-B4RE2ZJO-rjoRYPDB.js} +3 -3
- package/dist/component/{diagram-LBJQPF4R-DWVXEkld.js → diagram-LBJQPF4R-C41ccwxG.js} +3 -3
- package/dist/component/{diagram-Q27KOJAE-CnBW6OeT.js → diagram-Q27KOJAE-DPN9msRq.js} +4 -4
- package/dist/component/{diagram-UB23O5K3-CXqI5_Q2.js → diagram-UB23O5K3-DSjf5_Nk.js} +3 -3
- package/dist/component/{ebnfDiagram-BXEA7PRR-CgD4I3Yv.js → ebnfDiagram-BXEA7PRR-vPL9oktk.js} +4 -4
- package/dist/component/{erDiagram-JOGREHBK-D5Mg98e7.js → erDiagram-JOGREHBK-Kc3mZe4M.js} +5 -5
- package/dist/component/{flowDiagram-UKHOOZJN-BfeqDLOI.js → flowDiagram-UKHOOZJN-2aUAXRZU.js} +7 -7
- package/dist/component/{ganttDiagram-PKOTCBZU-Dyur2c7k.js → ganttDiagram-PKOTCBZU-DMZtqJSP.js} +3 -3
- package/dist/component/{gitGraphDiagram-DS77QQ5N-Lv0LL5O8.js → gitGraphDiagram-DS77QQ5N-E77l0Z1u.js} +4 -4
- package/dist/component/{highlighted-body-OFNGDK62-B6dOwDKQ.js → highlighted-body-OFNGDK62-C1DkgW7U.js} +2 -2
- package/dist/component/index.js +2 -2
- package/dist/component/{infoDiagram-6WML65LV-CzRKYrpD.js → infoDiagram-6WML65LV-CpvnNYd0.js} +2 -2
- package/dist/component/{ishikawaDiagram-WSZJBQD7-Zay9aRLR.js → ishikawaDiagram-WSZJBQD7-B1q_lFLX.js} +2 -2
- package/dist/component/{journeyDiagram-NVQOT4AX-t8hX-zE_.js → journeyDiagram-NVQOT4AX-6uEmqBOC.js} +5 -5
- package/dist/component/{kanban-definition-27J2QSJJ-C5Z-o_W7.js → kanban-definition-27J2QSJJ-C2QioWX9.js} +3 -3
- package/dist/component/{linear-BJGedx0o.js → linear-BT5VqKju.js} +2 -2
- package/dist/component/{mermaid-GHXKKRXX-D8oOFc9R.js → mermaid-GHXKKRXX-C8vyJd7j.js} +30941 -30222
- package/dist/component/{mindmap-definition-FAOFIHXS-DtEeqND2.js → mindmap-definition-FAOFIHXS-D9m5nI-X.js} +4 -4
- package/dist/component/{pegDiagram-VL7TDLO6-4lhU_z4v.js → pegDiagram-VL7TDLO6-C6Voiy3J.js} +4 -4
- package/dist/component/{pieDiagram-7S7Q4E2Y-D8cHUkzW.js → pieDiagram-7S7Q4E2Y-sqStHf6X.js} +4 -4
- package/dist/component/{quadrantDiagram-CIZ2JOQS-BNeqfDf4.js → quadrantDiagram-CIZ2JOQS-J4smKtsQ.js} +3 -3
- package/dist/component/{railroadDiagram-AXF67PYL-BnMzmkOY.js → railroadDiagram-AXF67PYL-DWSgdnlw.js} +4 -4
- package/dist/component/{requirementDiagram-LRYGKXZP-BRH5fHva.js → requirementDiagram-LRYGKXZP-CD2psvke.js} +4 -4
- package/dist/component/{sankeyDiagram-W5VNT64P-Cq0gDRP2.js → sankeyDiagram-W5VNT64P-BTctWXxs.js} +2 -2
- package/dist/component/{sequenceDiagram-SI44F4Z6-BVaNAKx0.js → sequenceDiagram-SI44F4Z6-BSr4jTRw.js} +4 -4
- package/dist/component/{sizeCapture-X5ZJPWSS-TjSqgMqH.js → sizeCapture-X5ZJPWSS-DDKZl6MR.js} +2 -2
- package/dist/component/{stateDiagram-OKZ733FA-h8M4ZCJD.js → stateDiagram-OKZ733FA-DpICd9vK.js} +3 -3
- package/dist/component/{stateDiagram-v2-UEYNNEHI-Bt7eFNHB.js → stateDiagram-v2-UEYNNEHI-CDWkukZc.js} +3 -3
- package/dist/component/{swimlanes-SLNWSIFB-sfBKGyKm.js → swimlanes-SLNWSIFB-C2qUEfbN.js} +4 -4
- package/dist/component/{swimlanesDiagram-ULZ7WXOC-CxFraoVG.js → swimlanesDiagram-ULZ7WXOC-BATYiMa7.js} +3 -3
- package/dist/component/{timeline-definition-Z64GVDOM-DAWBGXFV.js → timeline-definition-Z64GVDOM-BANf8HvQ.js} +3 -3
- package/dist/component/{vennDiagram-T6HMQDX7-CmFvuTy7.js → vennDiagram-T6HMQDX7-ByIwO7x1.js} +2 -2
- package/dist/component/{wardleyDiagram-T6FBY63Y-gn696H4v.js → wardleyDiagram-T6FBY63Y-5_6KGTWP.js} +3 -3
- package/dist/component/{xychartDiagram-ELKLHX3M-B8yDTGsJ.js → xychartDiagram-ELKLHX3M-KS7oMXi0.js} +3 -3
- package/dist/components/embed/EmbedConversation.d.ts +3 -3
- package/dist/components/embed/EmbedRail.d.ts +4 -2
- package/dist/components/embed/SlackConnection.d.ts +6 -0
- package/dist/components/embed/WelcomeHero.d.ts +16 -0
- package/dist/components/embed/WelcomeIntro.d.ts +18 -7
- package/dist/components/embed/WelcomeSkills.d.ts +7 -1
- package/dist/components/embed/WorkspacePane.d.ts +16 -0
- package/dist/components/embed/onboarding-story-dock.d.ts +3 -2
- package/dist/components/embed/use-preview-content-props.d.ts +7 -0
- package/dist/components/embed/use-prompt-invocations.d.ts +1 -0
- package/dist/embed/copy.d.ts +13 -18
- package/dist/embed/dock-layout.d.ts +14 -16
- package/dist/embed/dock-size-store.d.ts +7 -0
- package/dist/embed/dock-state.d.ts +2 -2
- package/dist/embed/hover-capability.d.ts +14 -0
- package/dist/embed/page-context.d.ts +11 -0
- package/dist/embed/show-target.d.ts +6 -0
- package/dist/embed/slash-commands.d.ts +7 -0
- package/dist/embed/user-context.d.ts +14 -0
- package/dist/embed/voice-call.d.ts +7 -6
- package/dist/i18n/messages/en.d.ts +11 -3
- package/dist/i18n/messages/surfaces/embedMisc.d.ts +0 -6
- package/dist/i18n/messages/surfaces/header.d.ts +6 -0
- package/dist/i18n/messages/surfaces/stream.d.ts +3 -0
- package/dist/i18n/messages/surfaces/workspace.d.ts +32 -0
- package/dist/stream/belong-chat-transport.d.ts +7 -7
- package/dist/stream/use-agent-workspace-focus.d.ts +5 -0
- package/dist/stream/workspace-focus-observer.d.ts +7 -0
- package/dist/stream/workspace-focus-store.d.ts +26 -0
- package/dist/types/public.d.ts +39 -0
- package/package.json +1 -1
- 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;
|
|
@@ -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
|
|
282
|
-
* chat.tsx's foreground auto-open effect exactly —
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
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,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;
|
package/dist/types/public.d.ts
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "0.6.20",
|
|
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",
|