@belonguniverseai/react-sdk 0.1.4 → 0.1.6
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/dist/api/client.d.ts +122 -1
- package/dist/browser/control-channel.d.ts +9 -0
- package/dist/component/BelongWidget.d.ts +31 -1
- package/dist/component/{arc-BEnKmFiH.js → arc-CTDwT0LX.js} +2 -2
- package/dist/component/{architectureDiagram-3BPJPVTR-qrW4PiqE.js → architectureDiagram-3BPJPVTR-osyB2zKw.js} +3 -3
- package/dist/component/{blockDiagram-GPEHLZMM-Cy83RTvZ.js → blockDiagram-GPEHLZMM-ChWpzkC_.js} +4 -4
- package/dist/component/{c4Diagram-AAUBKEIU-DA1KAAqR.js → c4Diagram-AAUBKEIU-TBt2Sr1T.js} +3 -3
- package/dist/component/{channel-S3CulQua.js → channel-DKYVGzgk.js} +2 -2
- package/dist/component/{chunk-2J33WTMH-B3IpUX0y.js → chunk-2J33WTMH-D-qMyfG9.js} +2 -2
- package/dist/component/{chunk-4BX2VUAB-TXwXVoCn.js → chunk-4BX2VUAB-BYTeOCro.js} +2 -2
- package/dist/component/{chunk-55IACEB6-TgAuWAzl.js → chunk-55IACEB6-CkLaQSjG.js} +2 -2
- package/dist/component/{chunk-727SXJPM-CRzAhEpU.js → chunk-727SXJPM-CzkWgEIS.js} +6 -6
- package/dist/component/{chunk-AQP2D5EJ-BGyYD9fu.js → chunk-AQP2D5EJ-d-zIc-67.js} +4 -4
- package/dist/component/{chunk-FMBD7UC4-DMPGLPzn.js → chunk-FMBD7UC4-amGyEMTp.js} +2 -2
- package/dist/component/{chunk-ND2GUHAM-D4Pq2Sbn.js → chunk-ND2GUHAM-DjPCor9N.js} +2 -2
- package/dist/component/{chunk-QZHKN3VN-pAuUtuaS.js → chunk-QZHKN3VN-B0LrqJFz.js} +2 -2
- package/dist/component/{classDiagram-4FO5ZUOK-Cfk5JVma.js → classDiagram-4FO5ZUOK-BLW37dmc.js} +3 -3
- package/dist/component/{classDiagram-v2-Q7XG4LA2-Cfk5JVma.js → classDiagram-v2-Q7XG4LA2-BLW37dmc.js} +3 -3
- package/dist/component/{cose-bilkent-S5V4N54A-DDqAk-Nd.js → cose-bilkent-S5V4N54A-BrAZZB3S.js} +2 -2
- package/dist/component/{dagre-BM42HDAG-CRWiZgwY.js → dagre-BM42HDAG-lt_pmFeQ.js} +2 -2
- package/dist/component/{diagram-2AECGRRQ-vfIORQjw.js → diagram-2AECGRRQ-DfMdC1rS.js} +3 -3
- package/dist/component/{diagram-5GNKFQAL-BrdNWhYp.js → diagram-5GNKFQAL-CORXCu1y.js} +4 -4
- package/dist/component/{diagram-KO2AKTUF-BzvQZ4om.js → diagram-KO2AKTUF-Dt8oiVky.js} +3 -3
- package/dist/component/{diagram-LMA3HP47-ByWVR7eR.js → diagram-LMA3HP47-Bu-XSRd6.js} +3 -3
- package/dist/component/{diagram-OG6HWLK6-DFJUF0-3.js → diagram-OG6HWLK6-DiOgJz8h.js} +4 -4
- package/dist/component/{erDiagram-TEJ5UH35-h-b8M9my.js → erDiagram-TEJ5UH35-DSrXX--n.js} +5 -5
- package/dist/component/{flowDiagram-I6XJVG4X-Bs5-0VOV.js → flowDiagram-I6XJVG4X-D1E_ZfMU.js} +7 -7
- package/dist/component/{ganttDiagram-6RSMTGT7-BFOggcmT.js → ganttDiagram-6RSMTGT7-BzGCGwAi.js} +3 -3
- package/dist/component/{gitGraphDiagram-PVQCEYII-DqyxmsbF.js → gitGraphDiagram-PVQCEYII-C6qUOG7K.js} +4 -4
- package/dist/component/{highlighted-body-OFNGDK62-Bdj8cutJ.js → highlighted-body-OFNGDK62-D1SvZ8C_.js} +2 -2
- package/dist/component/index.js +1 -1
- package/dist/component/{infoDiagram-5YYISTIA-8md68U3E.js → infoDiagram-5YYISTIA-D0l96um1.js} +2 -2
- package/dist/component/{ishikawaDiagram-YF4QCWOH-C3xT9wjK.js → ishikawaDiagram-YF4QCWOH-BDHAOBaC.js} +2 -2
- package/dist/component/{journeyDiagram-JHISSGLW-BbHXf52q.js → journeyDiagram-JHISSGLW-BtN73bIc.js} +5 -5
- package/dist/component/{kanban-definition-UN3LZRKU-Xcxe9Aqi.js → kanban-definition-UN3LZRKU-Dll6IAhM.js} +3 -3
- package/dist/component/{linear-tnf14jhv.js → linear-ChreRr3h.js} +2 -2
- package/dist/component/{mermaid-GHXKKRXX-DRKI1NOg.js → mermaid-GHXKKRXX-C0Oq2bpl.js} +16134 -15530
- package/dist/component/{mindmap-definition-RKZ34NQL-DT2YOYJT.js → mindmap-definition-RKZ34NQL-DC9K87bN.js} +4 -4
- package/dist/component/{pieDiagram-4H26LBE5-DnaT-EHy.js → pieDiagram-4H26LBE5-BNGHaTmE.js} +4 -4
- package/dist/component/{quadrantDiagram-W4KKPZXB-Chj0SIr_.js → quadrantDiagram-W4KKPZXB-D23AXzE2.js} +3 -3
- package/dist/component/{requirementDiagram-4Y6WPE33-C8P86Vfk.js → requirementDiagram-4Y6WPE33-DRe6Bcy7.js} +4 -4
- package/dist/component/{sankeyDiagram-5OEKKPKP-BTV3aQxb.js → sankeyDiagram-5OEKKPKP-Ca--29t-.js} +2 -2
- package/dist/component/{sequenceDiagram-3UESZ5HK-CszXtNuQ.js → sequenceDiagram-3UESZ5HK-Cv6WVN5T.js} +4 -4
- package/dist/component/{stateDiagram-AJRCARHV-BPKVLcMj.js → stateDiagram-AJRCARHV-Ba_3WUjf.js} +3 -3
- package/dist/component/{stateDiagram-v2-BHNVJYJU-CAAXRt1C.js → stateDiagram-v2-BHNVJYJU-C8G1MQa8.js} +3 -3
- package/dist/component/{timeline-definition-PNZ67QCA-CqzXrhgH.js → timeline-definition-PNZ67QCA-Bfh6fz9g.js} +3 -3
- package/dist/component/{vennDiagram-CIIHVFJN-Cvb9lpke.js → vennDiagram-CIIHVFJN-D1U-PuFV.js} +2 -2
- package/dist/component/{wardleyDiagram-YWT4CUSO-BzPLaYx7.js → wardleyDiagram-YWT4CUSO-DTwXmrGn.js} +3 -3
- package/dist/component/{xychartDiagram-2RQKCTM6-C50_ldFc.js → xychartDiagram-2RQKCTM6-Dy8C7cbo.js} +3 -3
- package/dist/embed/copy.d.ts +1 -0
- package/dist/embed/global.d.ts +7 -4
- package/dist/embed/locale.d.ts +4 -0
- package/dist/embed/tab-id.d.ts +33 -0
- package/dist/embed/workspace-scope.d.ts +15 -4
- package/dist/i18n/messages/pt.d.ts +3 -0
- package/dist/i18n/messages/surfaces/agentGrant.d.ts +19 -0
- package/dist/i18n/messages/surfaces/aiElements.d.ts +50 -0
- package/dist/i18n/messages/surfaces/app.d.ts +15 -0
- package/dist/i18n/messages/surfaces/embedMisc.d.ts +49 -0
- package/dist/i18n/messages/surfaces/feedback.d.ts +9 -0
- package/dist/i18n/messages/surfaces/files.d.ts +37 -0
- package/dist/i18n/messages/surfaces/header.d.ts +15 -0
- package/dist/i18n/messages/surfaces/login.d.ts +8 -0
- package/dist/i18n/messages/surfaces/plan.d.ts +17 -0
- package/dist/i18n/messages/surfaces/sessions.d.ts +21 -0
- package/dist/i18n/messages/surfaces/stream.d.ts +68 -0
- package/dist/i18n/messages/surfaces/usage.d.ts +10 -0
- package/dist/stream/stream-state-store.d.ts +27 -0
- package/dist/types/public.d.ts +8 -5
- package/package.json +1 -1
|
@@ -19,3 +19,13 @@ export declare const usageEs: {
|
|
|
19
19
|
turnsThisSessionOther: string;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
+
export declare const usagePt: {
|
|
23
|
+
usage: {
|
|
24
|
+
tooltip: string;
|
|
25
|
+
context: string;
|
|
26
|
+
tokens: string;
|
|
27
|
+
lastTurn: string;
|
|
28
|
+
turnsThisSessionOne: string;
|
|
29
|
+
turnsThisSessionOther: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -30,8 +30,29 @@ declare const streamStateSchema: z.ZodObject<{
|
|
|
30
30
|
lastEventId: string | null;
|
|
31
31
|
}>;
|
|
32
32
|
export type PersistedStreamState = z.infer<typeof streamStateSchema>;
|
|
33
|
+
/**
|
|
34
|
+
* The tab's active stream state.
|
|
35
|
+
*
|
|
36
|
+
* Reads the AUTHORITATIVE per-tab record from `sessionStorage`. On a brand-new
|
|
37
|
+
* tab (no record yet AND this tab hasn't already decided), adopts the SHARED
|
|
38
|
+
* localStorage seed's `sessionId` — with a null run cursor, so the new tab opens
|
|
39
|
+
* the most-recent conversation from history rather than resuming another tab's
|
|
40
|
+
* live run. The adoption is one-time: it marks the tab "seeded" so a later
|
|
41
|
+
* read (e.g. after a New-chat clear) doesn't re-adopt.
|
|
42
|
+
*
|
|
43
|
+
* A record present at the FIRST read of this page realm is provenance-checked
|
|
44
|
+
* (see the duplicate-tab block above): a duplicated tab keeps the session but
|
|
45
|
+
* is demoted off the live run cursor.
|
|
46
|
+
*/
|
|
33
47
|
export declare const readStreamState: (workspaceId?: string | null) => PersistedStreamState | null;
|
|
34
48
|
export declare const writeStreamState: (state: Omit<PersistedStreamState, "updatedAt">, workspaceId?: string | null) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Clear THIS TAB's pointer (New chat). Removes only the per-tab sessionStorage
|
|
51
|
+
* record and marks the tab "seeded" so a reload stays blank instead of
|
|
52
|
+
* re-adopting the shared seed. The localStorage seed is deliberately left
|
|
53
|
+
* intact: another tab's most-recent conversation, and the next brand-new tab's
|
|
54
|
+
* starting point, must not be wiped by one tab starting a fresh chat.
|
|
55
|
+
*/
|
|
35
56
|
export declare const clearStreamState: (workspaceId?: string | null) => void;
|
|
36
57
|
/**
|
|
37
58
|
* Like {@link readStreamState}, but only returns state fresh enough that its
|
|
@@ -64,4 +85,10 @@ export declare const subscribeStreamState: (listener: () => void) => (() => void
|
|
|
64
85
|
* memo cache needed).
|
|
65
86
|
*/
|
|
66
87
|
export declare const peekActiveSessionId: () => string | null;
|
|
88
|
+
/** Test-only: forget the per-tab seed cache + provenance state (does NOT touch
|
|
89
|
+
* Web Storage — a test clears sessionStorage/localStorage itself). */
|
|
90
|
+
export declare const __resetStreamStateStoreForTest: () => void;
|
|
91
|
+
/** Test-only: pin the navigation type the duplicate-tab check sees (jsdom has
|
|
92
|
+
* no PerformanceNavigationTiming entry, so tests set it explicitly). */
|
|
93
|
+
export declare const __setNavigationTypeForTest: (type: "reload" | "back_forward" | "navigate") => void;
|
|
67
94
|
export {};
|
package/dist/types/public.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ export type PartialBelongTheme = {
|
|
|
83
83
|
/** Built-in theme presets selectable via `belong.applyPreset(name)`. */
|
|
84
84
|
export type PresetName = "belong" | "simetrik" | "custom";
|
|
85
85
|
/** UI languages the dock ships. `setLocale` / `init({ locale })` accept these. */
|
|
86
|
-
export type BelongLocale = "en" | "es";
|
|
86
|
+
export type BelongLocale = "en" | "es" | "pt";
|
|
87
87
|
export type BelongInitInput = {
|
|
88
88
|
/** Belong cloud base URL, e.g. `https://api.belong.host` or `http://localhost:8787`. */
|
|
89
89
|
readonly apiBaseUrl: string;
|
|
@@ -131,10 +131,13 @@ export type BelongInitInput = {
|
|
|
131
131
|
readonly ttsChunkGapMs?: number;
|
|
132
132
|
};
|
|
133
133
|
/**
|
|
134
|
-
* Agent-grant (delegated CLI session) host context.
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* the
|
|
134
|
+
* Agent-grant (delegated CLI session) host context. The grant surface follows
|
|
135
|
+
* the ACTIVE WORKSPACE: whenever one is in scope — via `scopeExternalId` /
|
|
136
|
+
* `scopeUrlParam` here, or `setWorkspace` — the dock offers the consent card
|
|
137
|
+
* ("allow the agent to act on my behalf") for it, using the default provider.
|
|
138
|
+
* This object is OPTIONAL: set it only to pick a non-default `provider` or to
|
|
139
|
+
* track the workspace from a URL param. With no workspace in scope at all, the
|
|
140
|
+
* grant surface stays hidden.
|
|
138
141
|
*/
|
|
139
142
|
readonly agentGrant?: {
|
|
140
143
|
/** Grant provider key. Defaults to `"simetrik"`. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@belonguniverseai/react-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
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",
|