@belonguniverseai/react-sdk 0.6.0 → 0.6.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.
- package/dist/api/client.d.ts +0 -6
- package/dist/component/{arc-DpA4gw3l.js → arc-BziuP1aB.js} +2 -2
- package/dist/component/{architectureDiagram-3BPJPVTR-C8WjH-Q1.js → architectureDiagram-3BPJPVTR-BVwa4QrX.js} +3 -3
- package/dist/component/{blockDiagram-GPEHLZMM-O9IURu7q.js → blockDiagram-GPEHLZMM-CKNImKL2.js} +4 -4
- package/dist/component/{c4Diagram-AAUBKEIU-B4cFy6te.js → c4Diagram-AAUBKEIU-BcbjcMPA.js} +3 -3
- package/dist/component/{channel-7qPdE580.js → channel-vtwXLQ1f.js} +2 -2
- package/dist/component/{chunk-2J33WTMH-CUyqMMUN.js → chunk-2J33WTMH-C6wmoOIl.js} +2 -2
- package/dist/component/{chunk-4BX2VUAB-4MjzMD47.js → chunk-4BX2VUAB-DySNI9mv.js} +2 -2
- package/dist/component/{chunk-55IACEB6-BOiOLlJY.js → chunk-55IACEB6-C4M2cG_c.js} +2 -2
- package/dist/component/{chunk-727SXJPM-D7rQvYjL.js → chunk-727SXJPM-BTqmmKKN.js} +6 -6
- package/dist/component/{chunk-AQP2D5EJ-B4yIZLgM.js → chunk-AQP2D5EJ-DiS4043D.js} +4 -4
- package/dist/component/{chunk-FMBD7UC4-CHC657o0.js → chunk-FMBD7UC4-Bu05DXe4.js} +2 -2
- package/dist/component/{chunk-ND2GUHAM-BAq6BoPv.js → chunk-ND2GUHAM-DfbE4oOG.js} +2 -2
- package/dist/component/{chunk-QZHKN3VN-DSE2KpkL.js → chunk-QZHKN3VN-Y8mfHGtB.js} +2 -2
- package/dist/component/{classDiagram-4FO5ZUOK-Dp6GpqVA.js → classDiagram-4FO5ZUOK-ChO_m1Vd.js} +3 -3
- package/dist/component/{classDiagram-v2-Q7XG4LA2-Dp6GpqVA.js → classDiagram-v2-Q7XG4LA2-ChO_m1Vd.js} +3 -3
- package/dist/component/{cose-bilkent-S5V4N54A-D7qy0jl5.js → cose-bilkent-S5V4N54A-B1DDE26M.js} +2 -2
- package/dist/component/{dagre-BM42HDAG-Bp1xKCuc.js → dagre-BM42HDAG-BmujNepD.js} +2 -2
- package/dist/component/{diagram-2AECGRRQ-BgnTJHhy.js → diagram-2AECGRRQ-Cbck9DRQ.js} +3 -3
- package/dist/component/{diagram-5GNKFQAL-D2Sf6fvv.js → diagram-5GNKFQAL-csRK5clZ.js} +4 -4
- package/dist/component/{diagram-KO2AKTUF-B6q2Givz.js → diagram-KO2AKTUF-DD3KqnFb.js} +3 -3
- package/dist/component/{diagram-LMA3HP47-Dd-PZ9QO.js → diagram-LMA3HP47-D6-oakzD.js} +3 -3
- package/dist/component/{diagram-OG6HWLK6-v65-inn8.js → diagram-OG6HWLK6-DfxY1IE7.js} +4 -4
- package/dist/component/{erDiagram-TEJ5UH35-s5ngcfah.js → erDiagram-TEJ5UH35-BDV1C23R.js} +5 -5
- package/dist/component/{flowDiagram-I6XJVG4X-C-3l7ZN2.js → flowDiagram-I6XJVG4X-mEwMtE2U.js} +7 -7
- package/dist/component/{ganttDiagram-6RSMTGT7-AFajly3C.js → ganttDiagram-6RSMTGT7-C_dcTMQX.js} +3 -3
- package/dist/component/{gitGraphDiagram-PVQCEYII-DLcn7CA-.js → gitGraphDiagram-PVQCEYII-CIKPPQiC.js} +4 -4
- package/dist/component/{highlighted-body-OFNGDK62-C7pDeGQU.js → highlighted-body-OFNGDK62-DpP1DD9S.js} +2 -2
- package/dist/component/index.js +2 -2
- package/dist/component/{infoDiagram-5YYISTIA-BuR4-KVY.js → infoDiagram-5YYISTIA-DKTrvjCm.js} +2 -2
- package/dist/component/{ishikawaDiagram-YF4QCWOH-DlsfzgFK.js → ishikawaDiagram-YF4QCWOH-BcuncMnU.js} +2 -2
- package/dist/component/{journeyDiagram-JHISSGLW-D0rpdvR5.js → journeyDiagram-JHISSGLW-BTTgY3Of.js} +5 -5
- package/dist/component/{kanban-definition-UN3LZRKU-Cz0Dixqc.js → kanban-definition-UN3LZRKU-D9K5810E.js} +3 -3
- package/dist/component/{linear-BVVr39mA.js → linear-DondfmT2.js} +2 -2
- package/dist/component/{mermaid-GHXKKRXX-BEhqkLaB.js → mermaid-GHXKKRXX-j_0KsvYs.js} +27289 -27871
- package/dist/component/{mindmap-definition-RKZ34NQL-wo3l0Jy7.js → mindmap-definition-RKZ34NQL-DMC3vCUq.js} +4 -4
- package/dist/component/{pieDiagram-4H26LBE5-TtxT_WMN.js → pieDiagram-4H26LBE5-DmYi_D3l.js} +4 -4
- package/dist/component/{quadrantDiagram-W4KKPZXB-DK6ShvdY.js → quadrantDiagram-W4KKPZXB-DMos-d69.js} +3 -3
- package/dist/component/{requirementDiagram-4Y6WPE33-Z0IavHMQ.js → requirementDiagram-4Y6WPE33-BpgIfnhZ.js} +4 -4
- package/dist/component/{sankeyDiagram-5OEKKPKP-C408nFHk.js → sankeyDiagram-5OEKKPKP-xbJGp8Ms.js} +2 -2
- package/dist/component/{sequenceDiagram-3UESZ5HK-CMFVhmkn.js → sequenceDiagram-3UESZ5HK-Bnlm4mVO.js} +4 -4
- package/dist/component/{stateDiagram-AJRCARHV-C6Z5V-Yt.js → stateDiagram-AJRCARHV-BIooqMYf.js} +3 -3
- package/dist/component/{stateDiagram-v2-BHNVJYJU-CztCn1yf.js → stateDiagram-v2-BHNVJYJU-C6WAOCCe.js} +3 -3
- package/dist/component/{timeline-definition-PNZ67QCA-D_9a8hKa.js → timeline-definition-PNZ67QCA-lTe5jbcD.js} +3 -3
- package/dist/component/{vennDiagram-CIIHVFJN-HuWQgr4e.js → vennDiagram-CIIHVFJN-5RYbksB1.js} +2 -2
- package/dist/component/{wardleyDiagram-YWT4CUSO-CeUvdi76.js → wardleyDiagram-YWT4CUSO-BSz_UDND.js} +3 -3
- package/dist/component/{xychartDiagram-2RQKCTM6-DNmBGn_r.js → xychartDiagram-2RQKCTM6-BmzhiB0a.js} +3 -3
- package/dist/components/embed/EmbedHeader.d.ts +11 -4
- package/dist/components/embed/rail-flags.d.ts +10 -0
- package/dist/embed/voice/call-active-marker.d.ts +75 -19
- package/dist/embed/voice/line-dispatch.d.ts +22 -20
- package/dist/embed/voice/realtime-call.d.ts +12 -0
- package/dist/embed/voice/reconnect-offer.d.ts +14 -5
- package/dist/embed/voice-call-lines.d.ts +4 -25
- package/dist/embed/voice-call.d.ts +112 -73
- package/dist/i18n/messages/en.d.ts +12 -6
- package/dist/i18n/messages/surfaces/embedMisc.d.ts +0 -3
- package/dist/i18n/messages/surfaces/stream.d.ts +28 -0
- package/dist/stream/run-line-progress.d.ts +6 -5
- package/dist/stream/tool-action-label.d.ts +16 -0
- package/package.json +1 -1
- package/dist/components/embed/PoweredByBelong.d.ts +0 -7
- package/dist/embed/voice/agent-queue.d.ts +0 -106
- package/dist/embed/voice/call-roster-store.d.ts +0 -110
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The voice call's agent ROSTER — the browser-side twin of the tenant
|
|
3
|
-
* roster minted server-side (`buildCallRoster` in
|
|
4
|
-
* apps/belong-cloud/src/features/voice/call-roster.ts) and threaded through
|
|
5
|
-
* `POST /v1/voice/call-token`'s `agents` field (`callAgentSpecSchema`,
|
|
6
|
-
* voice.schemas.ts). This is what lets the dock's rail, the call screen's
|
|
7
|
-
* agent board, and every spoken announcement address an agent by ROLE
|
|
8
|
-
* ("cli", "consulting") instead of a bare line number — and do so from the
|
|
9
|
-
* moment the dock boots, before any call has ever been started: the rail
|
|
10
|
-
* renders dock-wide with no call active, so it needs the LAST-KNOWN roster,
|
|
11
|
-
* not only one handed to it live off a fresh mint.
|
|
12
|
-
*
|
|
13
|
-
* Persisted per workspace, exactly like `line-slots.ts` beside it
|
|
14
|
-
* (`belong:voice-call-roster`, suffixed `:ws:<id>` when a workspace is in
|
|
15
|
-
* effect via `peekWorkspaceId()`) — a host workspace switch must not hand
|
|
16
|
-
* tenant A's roster (its titles, its CLI agent) to a rail rendering for
|
|
17
|
-
* tenant B.
|
|
18
|
-
*
|
|
19
|
-
* localStorage is a perimeter: the persisted roster is zod-validated on read
|
|
20
|
-
* and any junk (corrupted JSON, wrong shape, storage disabled) degrades to
|
|
21
|
-
* an EMPTY roster — same as "no call minted yet". The schema below is a
|
|
22
|
-
* deliberately independent, by-hand copy of the server's
|
|
23
|
-
* `callAgentSpecSchema`: the two packages ship separately and share no type
|
|
24
|
-
* module, so this is what keeps them honest (mirrors the existing
|
|
25
|
-
* `CallAgentSpec`/`callAgentSpecSchema` split already living server-side in
|
|
26
|
-
* `call-roster.ts` / `voice.schemas.ts`).
|
|
27
|
-
*
|
|
28
|
-
* Two fallback rules, and they are NOT the same rule:
|
|
29
|
-
*
|
|
30
|
-
* - `lineForRole` / `roleForLine` on an EMPTY roster (nothing ever minted,
|
|
31
|
-
* or a mint whose body failed to parse) fall back to the POSITIONAL
|
|
32
|
-
* default that's been true since roles didn't exist: main=1, cli=2,
|
|
33
|
-
* consulting=3. This is what stops a parse failure from bricking role
|
|
34
|
-
* addressing mid-call — the switchboard still answers to
|
|
35
|
-
* main/cli/consulting by position.
|
|
36
|
-
* - On a NON-empty roster that simply doesn't have that role/line (a
|
|
37
|
-
* tenant with no CLI), the same lookups return `null` instead — the
|
|
38
|
-
* honest signal that THIS workspace has no such agent, which is what
|
|
39
|
-
* later produces an `unknown_role` tool response rather than silently
|
|
40
|
-
* addressing the wrong agent.
|
|
41
|
-
*
|
|
42
|
-
* `titleForRole` / `titleForLine` never return `null` — a title is always
|
|
43
|
-
* needed for display/announcement, so THEIR fallback is a string, applied
|
|
44
|
-
* uniformly regardless of whether the roster is empty or merely missing
|
|
45
|
-
* that entry. The two fallbacks are deliberately DIFFERENT shapes, not the
|
|
46
|
-
* same rule twice:
|
|
47
|
-
*
|
|
48
|
-
* - `titleForRole` falls back to a ROLE-derived phrase ("the main agent" /
|
|
49
|
-
* "the CLI agent" / "the analyst") — never a switchboard
|
|
50
|
-
* number. Every voice tool call carries a role (it is the operator's
|
|
51
|
-
* entire addressing vocabulary — see `voice-call.ts`'s
|
|
52
|
-
* `resolveRoleLine`), so this fallback is always reachable from a role
|
|
53
|
-
* the model already said out loud, and it feeds prose the model
|
|
54
|
-
* SPEAKS: an empty roster (nothing minted yet, or a pre-roster backend
|
|
55
|
-
* mid rolling deploy — `callTokenResponseSchema`'s `agents` field
|
|
56
|
-
* legitimately defaults to `[]`) must not leak a bare "Agent 2" into
|
|
57
|
-
* that prose.
|
|
58
|
-
* - `titleForLine` falls back to `"the main agent"` for line 1 and
|
|
59
|
-
* `` `Agent ${line}` `` otherwise — the "Agent N" convention the
|
|
60
|
-
* switchboard used before roles existed. This one serves the UI's
|
|
61
|
-
* numbered rail, which genuinely displays a switchboard slot number, so
|
|
62
|
-
* a line-derived fallback is correct there and stays as-is.
|
|
63
|
-
*/
|
|
64
|
-
export type CallAgentRole = "main" | "cli" | "consulting";
|
|
65
|
-
export type CallAgentSpec = {
|
|
66
|
-
readonly role: CallAgentRole;
|
|
67
|
-
/** The durable switchboard line underneath (`line-slots.ts`). */
|
|
68
|
-
readonly line: number;
|
|
69
|
-
/** What the voice calls this agent out loud. */
|
|
70
|
-
readonly title: string;
|
|
71
|
-
/** One sentence describing what this agent is for. */
|
|
72
|
-
readonly purpose: string;
|
|
73
|
-
};
|
|
74
|
-
/** Persist the roster minted for the current call. A whole-roster replace —
|
|
75
|
-
* never a per-entry patch — of whatever this workspace held before. */
|
|
76
|
-
export declare const setCallRoster: (roster: readonly CallAgentSpec[]) => void;
|
|
77
|
-
/** The current workspace's roster, or an empty array when nothing has been
|
|
78
|
-
* minted yet (or storage held junk). */
|
|
79
|
-
export declare const peekCallRoster: () => readonly CallAgentSpec[];
|
|
80
|
-
/** Persist the tenant's product name minted alongside the roster (U2) — a
|
|
81
|
-
* whole-value replace, same discipline as `setCallRoster`. */
|
|
82
|
-
export declare const setProductName: (productName: string | null) => void;
|
|
83
|
-
/** The current workspace's product name, or `null` when nothing has been
|
|
84
|
-
* minted yet, the tenant has none, or storage held junk. Used ONLY to
|
|
85
|
-
* localize the SDK's own UI copy (CallScreen's agent board, U2) — never fed
|
|
86
|
-
* into any string the model speaks or receives. */
|
|
87
|
-
export declare const peekProductName: () => string | null;
|
|
88
|
-
/** Resolve a role to its switchboard line. See the module doc: `null` only
|
|
89
|
-
* ever means "this NON-empty roster doesn't have that role" — an EMPTY
|
|
90
|
-
* roster falls back to the positional default instead. */
|
|
91
|
-
export declare const lineForRole: (role: CallAgentRole) => number | null;
|
|
92
|
-
/** Resolve a switchboard line to its role — the inverse of `lineForRole`,
|
|
93
|
-
* with the same two-rule fallback (EMPTY roster → positional; non-empty and
|
|
94
|
-
* missing → `null`). */
|
|
95
|
-
export declare const roleForLine: (line: number) => CallAgentRole | null;
|
|
96
|
-
/** What the voice calls this role out loud. Always a string — falls back to
|
|
97
|
-
* a ROLE-derived title (never a switchboard number, never `null`) when the
|
|
98
|
-
* roster has no entry for this role, whether the roster is empty or just
|
|
99
|
-
* missing it. */
|
|
100
|
-
export declare const titleForRole: (role: CallAgentRole) => string;
|
|
101
|
-
/** What the voice calls this line out loud. Always a string — falls back to
|
|
102
|
-
* `"the main agent"` (line 1) or `` `Agent ${line}` `` otherwise when the
|
|
103
|
-
* roster has no entry for this line, whether the roster is empty or just
|
|
104
|
-
* missing it. */
|
|
105
|
-
export declare const titleForLine: (line: number) => string;
|
|
106
|
-
/** Test-only: drop the persisted roster AND product name for the current
|
|
107
|
-
* workspace scope — they are minted together (the same call-token mint), so
|
|
108
|
-
* a test resetting one without the other would leak a stale product name
|
|
109
|
-
* (or roster) into the next case. */
|
|
110
|
-
export declare const __clearCallRosterForTest: () => void;
|