@belonguniverseai/react-sdk 0.4.3 → 0.6.0
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 +100 -2
- package/dist/api/skills.d.ts +6 -1
- package/dist/component/{arc-ByLm_58u.js → arc-DpA4gw3l.js} +2 -2
- package/dist/component/{architectureDiagram-3BPJPVTR-DcYT4v9Q.js → architectureDiagram-3BPJPVTR-C8WjH-Q1.js} +3 -3
- package/dist/component/{blockDiagram-GPEHLZMM-CHk-YSun.js → blockDiagram-GPEHLZMM-O9IURu7q.js} +4 -4
- package/dist/component/{c4Diagram-AAUBKEIU-CEV2fwh-.js → c4Diagram-AAUBKEIU-B4cFy6te.js} +3 -3
- package/dist/component/{channel-D67v09ii.js → channel-7qPdE580.js} +2 -2
- package/dist/component/{chunk-2J33WTMH-Bsl2GBCp.js → chunk-2J33WTMH-CUyqMMUN.js} +2 -2
- package/dist/component/{chunk-4BX2VUAB-BKmdmdRY.js → chunk-4BX2VUAB-4MjzMD47.js} +2 -2
- package/dist/component/{chunk-55IACEB6-DnliqOsL.js → chunk-55IACEB6-BOiOLlJY.js} +2 -2
- package/dist/component/{chunk-727SXJPM-O0BgSnK_.js → chunk-727SXJPM-D7rQvYjL.js} +6 -6
- package/dist/component/{chunk-AQP2D5EJ-CwBA3VVY.js → chunk-AQP2D5EJ-B4yIZLgM.js} +4 -4
- package/dist/component/{chunk-FMBD7UC4-CG5DaKp9.js → chunk-FMBD7UC4-CHC657o0.js} +2 -2
- package/dist/component/{chunk-ND2GUHAM-COsoTCa0.js → chunk-ND2GUHAM-BAq6BoPv.js} +2 -2
- package/dist/component/{chunk-QZHKN3VN-9FjIin4_.js → chunk-QZHKN3VN-DSE2KpkL.js} +2 -2
- package/dist/component/{classDiagram-4FO5ZUOK-DyQO35S9.js → classDiagram-4FO5ZUOK-Dp6GpqVA.js} +3 -3
- package/dist/component/{classDiagram-v2-Q7XG4LA2-DyQO35S9.js → classDiagram-v2-Q7XG4LA2-Dp6GpqVA.js} +3 -3
- package/dist/component/{cose-bilkent-S5V4N54A-BTN6Bz9E.js → cose-bilkent-S5V4N54A-D7qy0jl5.js} +2 -2
- package/dist/component/{dagre-BM42HDAG-COU3yvtF.js → dagre-BM42HDAG-Bp1xKCuc.js} +2 -2
- package/dist/component/{diagram-2AECGRRQ-r4LO_uyu.js → diagram-2AECGRRQ-BgnTJHhy.js} +3 -3
- package/dist/component/{diagram-5GNKFQAL-CraSe8h_.js → diagram-5GNKFQAL-D2Sf6fvv.js} +4 -4
- package/dist/component/{diagram-KO2AKTUF-Dh-L6_aX.js → diagram-KO2AKTUF-B6q2Givz.js} +3 -3
- package/dist/component/{diagram-LMA3HP47-Bv8QREaH.js → diagram-LMA3HP47-Dd-PZ9QO.js} +3 -3
- package/dist/component/{diagram-OG6HWLK6-Jf-6CDV4.js → diagram-OG6HWLK6-v65-inn8.js} +4 -4
- package/dist/component/{erDiagram-TEJ5UH35-CN8X2drH.js → erDiagram-TEJ5UH35-s5ngcfah.js} +5 -5
- package/dist/component/{flowDiagram-I6XJVG4X-CloAsK8k.js → flowDiagram-I6XJVG4X-C-3l7ZN2.js} +7 -7
- package/dist/component/{ganttDiagram-6RSMTGT7-DAlRM4jt.js → ganttDiagram-6RSMTGT7-AFajly3C.js} +3 -3
- package/dist/component/{gitGraphDiagram-PVQCEYII-BPVdEwuf.js → gitGraphDiagram-PVQCEYII-DLcn7CA-.js} +4 -4
- package/dist/component/{highlighted-body-OFNGDK62-BEd7ynwt.js → highlighted-body-OFNGDK62-C7pDeGQU.js} +2 -2
- package/dist/component/index.js +1 -1
- package/dist/component/{infoDiagram-5YYISTIA-CyJi6c7l.js → infoDiagram-5YYISTIA-BuR4-KVY.js} +2 -2
- package/dist/component/{ishikawaDiagram-YF4QCWOH-CNKCQHOP.js → ishikawaDiagram-YF4QCWOH-DlsfzgFK.js} +2 -2
- package/dist/component/{journeyDiagram-JHISSGLW-DFN0WY5F.js → journeyDiagram-JHISSGLW-D0rpdvR5.js} +5 -5
- package/dist/component/{kanban-definition-UN3LZRKU-BT6YDPZA.js → kanban-definition-UN3LZRKU-Cz0Dixqc.js} +3 -3
- package/dist/component/{linear-BcyQd0z0.js → linear-BVVr39mA.js} +2 -2
- package/dist/component/{mermaid-GHXKKRXX-DiPCfS1n.js → mermaid-GHXKKRXX-BEhqkLaB.js} +24629 -24036
- package/dist/component/{mindmap-definition-RKZ34NQL-BND7KvId.js → mindmap-definition-RKZ34NQL-wo3l0Jy7.js} +4 -4
- package/dist/component/{pieDiagram-4H26LBE5-CvDdRFnN.js → pieDiagram-4H26LBE5-TtxT_WMN.js} +4 -4
- package/dist/component/{quadrantDiagram-W4KKPZXB-DMHCLEev.js → quadrantDiagram-W4KKPZXB-DK6ShvdY.js} +3 -3
- package/dist/component/{requirementDiagram-4Y6WPE33-BomcVKb4.js → requirementDiagram-4Y6WPE33-Z0IavHMQ.js} +4 -4
- package/dist/component/{sankeyDiagram-5OEKKPKP-D4rmtFCn.js → sankeyDiagram-5OEKKPKP-C408nFHk.js} +2 -2
- package/dist/component/{sequenceDiagram-3UESZ5HK-C0iEDbuE.js → sequenceDiagram-3UESZ5HK-CMFVhmkn.js} +4 -4
- package/dist/component/{stateDiagram-AJRCARHV-x0PonbWT.js → stateDiagram-AJRCARHV-C6Z5V-Yt.js} +3 -3
- package/dist/component/{stateDiagram-v2-BHNVJYJU-6Lq1LlSV.js → stateDiagram-v2-BHNVJYJU-CztCn1yf.js} +3 -3
- package/dist/component/{timeline-definition-PNZ67QCA-CIx8lwoQ.js → timeline-definition-PNZ67QCA-D_9a8hKa.js} +3 -3
- package/dist/component/{vennDiagram-CIIHVFJN-B27Ya-3D.js → vennDiagram-CIIHVFJN-HuWQgr4e.js} +2 -2
- package/dist/component/{wardleyDiagram-YWT4CUSO-efmvFwPj.js → wardleyDiagram-YWT4CUSO-CeUvdi76.js} +3 -3
- package/dist/component/{xychartDiagram-2RQKCTM6-DNJmorKa.js → xychartDiagram-2RQKCTM6-DNmBGn_r.js} +3 -3
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/embed/approval-bus.d.ts +5 -0
- package/dist/embed/slash-commands.d.ts +24 -7
- package/dist/embed/voice/agent-queue.d.ts +106 -0
- package/dist/embed/voice/call-roster-store.d.ts +110 -0
- package/dist/embed/voice/line-dispatch.d.ts +6 -2
- package/dist/embed/voice/line-run-reader.d.ts +3 -1
- package/dist/embed/voice-call-lines.d.ts +20 -0
- package/dist/embed/voice-call-pacing.d.ts +47 -9
- package/dist/embed/voice-call.d.ts +70 -14
- package/dist/i18n/messages/en.d.ts +29 -15
- package/dist/i18n/messages/surfaces/stream.d.ts +46 -0
- package/dist/stream/ai-sdk-part-renderers.d.ts +23 -6
- package/dist/stream/belong-chat-transport.d.ts +57 -0
- package/dist/stream/belong-data-parts.d.ts +44 -1
- package/dist/types/public.d.ts +1 -1
- package/package.json +1 -1
|
@@ -12,8 +12,12 @@ export type CallTimelineEntry = {
|
|
|
12
12
|
readonly atMs: number;
|
|
13
13
|
readonly kind: "user" | "agent" | "step" | "success" | "error" | "skill" | "schedule";
|
|
14
14
|
readonly text: string;
|
|
15
|
-
/**
|
|
16
|
-
|
|
15
|
+
/** The switchboard line this row concerns; `null` for a foreground (line 1)
|
|
16
|
+
* row. CallScreen's `labelFor` resolves `line ?? 1` to look up the agent's
|
|
17
|
+
* short board label for `step`/`success`/`error` rows (X2b) — the label
|
|
18
|
+
* column names the agent, so `text` itself never repeats a title prefix or
|
|
19
|
+
* an "A2"-style tag. */
|
|
20
|
+
readonly line: number | null;
|
|
17
21
|
};
|
|
18
22
|
export type CallState = {
|
|
19
23
|
readonly status: CallStatus;
|
|
@@ -112,14 +116,55 @@ declare let lineDispatcher: ((req: {
|
|
|
112
116
|
readonly isNewLine: boolean;
|
|
113
117
|
}) => void) | null;
|
|
114
118
|
export declare const registerCallLineDispatcher: (dispatcher: NonNullable<typeof lineDispatcher>) => (() => void);
|
|
119
|
+
/**
|
|
120
|
+
* Last-resort delivery for `flushLineQueuesOnCallEnd` when no `lineDispatcher`
|
|
121
|
+
* is wired (the M7 gap — ChatRoute unmounted). Self-registered by
|
|
122
|
+
* line-dispatch.ts (see the bottom of that file) with the real
|
|
123
|
+
* `dispatchToLine` — deliberately NOT imported here directly. `line-dispatch.ts`
|
|
124
|
+
* already imports six functions FROM this module (buildCallContextDigest,
|
|
125
|
+
* the deliver/notify callbacks, peekCallState, subscribeCallState), so a
|
|
126
|
+
* static import the other way would close a two-way cycle between
|
|
127
|
+
* voice-call.ts and line-dispatch.ts — forbidden outright by
|
|
128
|
+
* `.dependency-cruiser.cjs`'s `no-circular` rule (severity: error, applies
|
|
129
|
+
* everywhere, not just the hexagonal backend layers). Registering FROM
|
|
130
|
+
* line-dispatch.ts, in the SAME direction its existing dependency already
|
|
131
|
+
* runs, avoids the cycle entirely; that file's own `subscribeCallState`
|
|
132
|
+
* self-subscribe (its module doc, right above `abortAllLineReaders`) is the
|
|
133
|
+
* identical idiom already established there.
|
|
134
|
+
*
|
|
135
|
+
* Investigated and confirmed SOUND as a fallback: chat.tsx's own
|
|
136
|
+
* `registerCallLineDispatcher` wrapper does nothing beyond routing line 1 to
|
|
137
|
+
* `sendCallText` and calling this exact function, unmodified, for any other
|
|
138
|
+
* line — see that effect in chat.tsx. Held/queued items only ever exist for
|
|
139
|
+
* background lines (line 1 never enqueues — see the busy-line branch above),
|
|
140
|
+
* so every item this fallback ever sees is exactly the shape ChatRoute's
|
|
141
|
+
* wrapper would have passed through unchanged. No ChatRoute-specific
|
|
142
|
+
* behavior is lost by calling it directly.
|
|
143
|
+
*
|
|
144
|
+
* Deliberately SEPARATE from `lineDispatcher` — not folded into
|
|
145
|
+
* `releaseHeldRequest` itself — so `pumpLineQueue`'s live-queue draining is
|
|
146
|
+
* UNAFFECTED: it must keep checking `lineDispatcher` and leaving an item
|
|
147
|
+
* queued (not popped) when nothing is wired, per its own doc. Only the
|
|
148
|
+
* end-of-call flush, which has nothing left to leave a drained item queued
|
|
149
|
+
* IN, reaches for this.
|
|
150
|
+
*/
|
|
151
|
+
declare let lineDispatchFallback: ((req: {
|
|
152
|
+
readonly line: number;
|
|
153
|
+
readonly request: string;
|
|
154
|
+
readonly isNewLine: boolean;
|
|
155
|
+
}) => Promise<void>) | null;
|
|
156
|
+
export declare const registerLineDispatchFallback: (dispatcher: NonNullable<typeof lineDispatchFallback>) => (() => void);
|
|
115
157
|
export declare const registerCallLineViewSwitcher: (switcher: (sessionId: string) => void) => (() => void);
|
|
116
158
|
export declare const registerCallClearNotifier: (notifier: (sessionId: string) => void) => (() => void);
|
|
117
159
|
/**
|
|
118
160
|
* ChatRoute calls this when a tool-approval card appears while a call is
|
|
119
161
|
* live: the ask lands on the timeline and the voice model asks the user to
|
|
120
|
-
* approve or reject out loud.
|
|
162
|
+
* approve or reject out loud. `reason` is the approval part's own `reason`
|
|
163
|
+
* field (via the approval bus's `PendingApproval.reason`) — on a phone call
|
|
164
|
+
* the user cannot see the card, so WHAT it wants to do has to travel in the
|
|
165
|
+
* prompt, not stay something only "open the chat view" could answer.
|
|
121
166
|
*/
|
|
122
|
-
export declare const notifyCallApprovalRequired: (timelineText: string) => void;
|
|
167
|
+
export declare const notifyCallApprovalRequired: (timelineText: string, reason: string) => void;
|
|
123
168
|
/** Live speech level, 0..1 (max of agent voice + user mic). */
|
|
124
169
|
export declare const peekCallAudioLevel: () => number;
|
|
125
170
|
/** ChatRoute reports a tool-phase change on the delegated run — the strongest
|
|
@@ -129,7 +174,7 @@ export declare const notifyCallProgress: (hint: string) => void;
|
|
|
129
174
|
* small work badge while the agent is busy. */
|
|
130
175
|
export declare const setCallWorkPhase: (phase: CallState["workPhase"]) => void;
|
|
131
176
|
/**
|
|
132
|
-
* Click-path twin of `
|
|
177
|
+
* Click-path twin of `show_agent`: the lines strip chip on CallScreen
|
|
133
178
|
* calls this directly (no tool-call round trip, no ack). No-op when the line
|
|
134
179
|
* is unknown, never bound to a session, or no view switcher is registered
|
|
135
180
|
* (e.g. ChatRoute hasn't mounted).
|
|
@@ -173,7 +218,8 @@ export declare const deliverAgentReply: (text: string) => void;
|
|
|
173
218
|
* must tell the user something went wrong and offer to retry.
|
|
174
219
|
*/
|
|
175
220
|
export declare const deliverAgentFailure: (message: string) => void;
|
|
176
|
-
/** A background line finished: relay its final text, naming the
|
|
221
|
+
/** A background line finished: relay its final text, naming the agent by
|
|
222
|
+
* role. */
|
|
177
223
|
export declare const deliverLineReply: (line: number, text: string) => void;
|
|
178
224
|
/**
|
|
179
225
|
* A background line published an artifact: OPEN it on screen, mirroring
|
|
@@ -188,16 +234,26 @@ export declare const deliverLineArtifact: (line: number, artifact: {
|
|
|
188
234
|
readonly title: string;
|
|
189
235
|
readonly mimeType: string;
|
|
190
236
|
}) => void;
|
|
191
|
-
/** A background line failed: tell the user, naming the agent. */
|
|
237
|
+
/** A background line failed: tell the user, naming the agent by role. */
|
|
192
238
|
export declare const deliverLineFailure: (line: number, message: string) => void;
|
|
193
|
-
/** A background line is blocked on a tool approval — steer the user to it
|
|
194
|
-
|
|
239
|
+
/** A background line is blocked on a tool approval — steer the user to it,
|
|
240
|
+
* by role, and tell the model WHAT it wants to do. W3: the old text asked
|
|
241
|
+
* the user to say a magic phrase ("show <title>") and never said what was
|
|
242
|
+
* being approved — unanswerable on a phone call, where there is no screen to
|
|
243
|
+
* "go look at". `reason` is the approval part's own `reason` field, threaded
|
|
244
|
+
* from the run stream via `onApprovalNeeded` (line-run-reader.ts). */
|
|
245
|
+
export declare const notifyLineApprovalNeeded: (line: number, timelineText: string, reason: string) => void;
|
|
195
246
|
/** A background line advanced a phase — record it as the line's live step
|
|
196
|
-
* (CallScreen's agent board
|
|
197
|
-
* update.
|
|
247
|
+
* (CallScreen's agent board reads `currentStepLabel`/`currentPhase` off the
|
|
248
|
+
* registry) and nudge a spoken update. X2a: deliberately NO timeline row per
|
|
249
|
+
* phase change any more — the board's own card already shows the identical
|
|
250
|
+
* string live, and a 12-step run used to write 12 near-identical Activity
|
|
251
|
+
* rows that buried the actual results; the durable Activity-log row for a
|
|
252
|
+
* background line's work is the ONE `dispatchToBackgroundLine` appends up
|
|
253
|
+
* front. The registry write is unconditional (line-dispatch's own `isStale`
|
|
198
254
|
* guard already keeps a stale-call phase from ever reaching here); the
|
|
199
|
-
*
|
|
200
|
-
*
|
|
255
|
+
* spoken nudge stays guarded like its delivery siblings so a phase that DOES
|
|
256
|
+
* arrive with no live call just updates the board silently. */
|
|
201
257
|
export declare const notifyLinePhase: (line: number, phaseLabel: string, phase?: WorkPhase | null) => void;
|
|
202
258
|
/** True while a call holds the audio path — ChatRoute gates TTS autoplay on it. */
|
|
203
259
|
export declare const isCallActive: () => boolean;
|
|
@@ -209,7 +265,7 @@ export declare const isCallActive: () => boolean;
|
|
|
209
265
|
*/
|
|
210
266
|
export declare const __forceCallState: (patch: Partial<CallState>) => void;
|
|
211
267
|
/** TEST-ONLY companion: append a timeline row while in a forced state. */
|
|
212
|
-
export declare const __forceCallTimelineEntry: (kind: CallTimelineEntry["kind"], text: string,
|
|
268
|
+
export declare const __forceCallTimelineEntry: (kind: CallTimelineEntry["kind"], text: string, line?: number | null) => void;
|
|
213
269
|
/** TEST-ONLY companion: drive the orb's audio level without Web Audio. */
|
|
214
270
|
export declare const __forceCallAudioLevel: (level: number) => void;
|
|
215
271
|
/**
|
|
@@ -44,6 +44,14 @@ export declare const en: {
|
|
|
44
44
|
readonly toolGenericDone: "Finished {{tool}}";
|
|
45
45
|
readonly toolGenericFailed: "{{tool}} didn't complete";
|
|
46
46
|
readonly toolGenericDetail: "Used the {{tool}} capability.";
|
|
47
|
+
readonly toolRememberRunning: "Saving a note";
|
|
48
|
+
readonly toolRememberDone: "Saved a note";
|
|
49
|
+
readonly toolRememberFailed: "Couldn't save the note";
|
|
50
|
+
readonly toolRememberDetail: "Saved a note about you for future conversations.";
|
|
51
|
+
readonly toolForgetRunning: "Forgetting a note";
|
|
52
|
+
readonly toolForgetDone: "Forgot a note";
|
|
53
|
+
readonly toolForgetFailed: "Couldn't forget the note";
|
|
54
|
+
readonly toolForgetDetail: "Deleted a saved note about you.";
|
|
47
55
|
readonly browserSnapshot: "Took a snapshot";
|
|
48
56
|
readonly browserRead: "Read the page";
|
|
49
57
|
readonly browserClick: "Clicked an element";
|
|
@@ -58,6 +66,13 @@ export declare const en: {
|
|
|
58
66
|
readonly executingTasks: "Working on it…";
|
|
59
67
|
readonly workedSteps_one: "Worked · {{count}} step";
|
|
60
68
|
readonly workedSteps_other: "Worked · {{count}} steps";
|
|
69
|
+
readonly subagentRunning: "Subagent · {{description}}…";
|
|
70
|
+
readonly subagentDone: "Subagent · {{description}}";
|
|
71
|
+
readonly subagentDoneSteps_one: "Subagent · {{description}} · {{count}} step";
|
|
72
|
+
readonly subagentDoneSteps_other: "Subagent · {{description}} · {{count}} steps";
|
|
73
|
+
readonly subagentFailed: "Subagent · {{description}} · didn't finish";
|
|
74
|
+
readonly subagentTimedOut: "Subagent · {{description}} · ran out of time";
|
|
75
|
+
readonly subagentVia: "via {{name}}";
|
|
61
76
|
readonly cliAuthStop: {
|
|
62
77
|
readonly noGrant: "Connect to Simetrik to continue";
|
|
63
78
|
readonly reconnectFailed: "Couldn't connect to Simetrik";
|
|
@@ -480,9 +495,6 @@ export declare const en: {
|
|
|
480
495
|
readonly muted: "Mic muted";
|
|
481
496
|
readonly youSaid: "You said";
|
|
482
497
|
readonly agentSaid: "Agent";
|
|
483
|
-
readonly step: "Working";
|
|
484
|
-
readonly done: "Done";
|
|
485
|
-
readonly failed: "Failed";
|
|
486
498
|
readonly speakHint: "Speak to the agent…";
|
|
487
499
|
readonly readyHint: "I'm listening — speak when you're ready.";
|
|
488
500
|
readonly thinkingHint: "Thinking…";
|
|
@@ -501,22 +513,24 @@ export declare const en: {
|
|
|
501
513
|
readonly skillNotFound: "No exact skill match for “{{query}}”";
|
|
502
514
|
readonly skillCatalogUnavailable: "Skill catalog unavailable — retrying";
|
|
503
515
|
readonly noSkillsConfigured: "No skills configured in this workspace";
|
|
504
|
-
readonly phaseCoding: "
|
|
505
|
-
readonly phaseFiles: "
|
|
506
|
-
readonly phaseActions: "
|
|
516
|
+
readonly phaseCoding: "Putting the steps together";
|
|
517
|
+
readonly phaseFiles: "Going through your data";
|
|
518
|
+
readonly phaseActions: "Running the steps";
|
|
507
519
|
readonly lines: "Agents";
|
|
508
520
|
readonly lineLabel: "Agent {{line}}";
|
|
509
521
|
readonly mainAgentLabel: "Main agent";
|
|
510
|
-
readonly
|
|
511
|
-
readonly
|
|
512
|
-
readonly
|
|
513
|
-
readonly
|
|
514
|
-
readonly
|
|
515
|
-
readonly
|
|
516
|
-
readonly
|
|
522
|
+
readonly roleLabelMain: "Main agent";
|
|
523
|
+
readonly roleLabelCli: "{{product}} CLI agent";
|
|
524
|
+
readonly roleLabelTerminal: "Terminal agent";
|
|
525
|
+
readonly roleLabelAnalyst: "Analyst";
|
|
526
|
+
readonly lineNeedsApproval: "Needs your OK";
|
|
527
|
+
readonly lineWorking: "Working…";
|
|
528
|
+
readonly lineReady: "Done";
|
|
529
|
+
readonly lineFailed: "Couldn't finish";
|
|
530
|
+
readonly lineIdle: "Ready";
|
|
517
531
|
readonly activity: "Activity";
|
|
518
|
-
readonly showConversationLog: "Show
|
|
519
|
-
readonly hideConversationLog: "Hide
|
|
532
|
+
readonly showConversationLog: "Show what was said";
|
|
533
|
+
readonly hideConversationLog: "Hide what was said";
|
|
520
534
|
readonly ambientTypingCode: "Typing code…";
|
|
521
535
|
readonly ambientReviewingDiff: "Reviewing the diff…";
|
|
522
536
|
readonly ambientRunningChecks: "Running checks…";
|
|
@@ -44,6 +44,14 @@ export declare const streamEn: {
|
|
|
44
44
|
readonly toolGenericDone: "Finished {{tool}}";
|
|
45
45
|
readonly toolGenericFailed: "{{tool}} didn't complete";
|
|
46
46
|
readonly toolGenericDetail: "Used the {{tool}} capability.";
|
|
47
|
+
readonly toolRememberRunning: "Saving a note";
|
|
48
|
+
readonly toolRememberDone: "Saved a note";
|
|
49
|
+
readonly toolRememberFailed: "Couldn't save the note";
|
|
50
|
+
readonly toolRememberDetail: "Saved a note about you for future conversations.";
|
|
51
|
+
readonly toolForgetRunning: "Forgetting a note";
|
|
52
|
+
readonly toolForgetDone: "Forgot a note";
|
|
53
|
+
readonly toolForgetFailed: "Couldn't forget the note";
|
|
54
|
+
readonly toolForgetDetail: "Deleted a saved note about you.";
|
|
47
55
|
readonly browserSnapshot: "Took a snapshot";
|
|
48
56
|
readonly browserRead: "Read the page";
|
|
49
57
|
readonly browserClick: "Clicked an element";
|
|
@@ -58,6 +66,14 @@ export declare const streamEn: {
|
|
|
58
66
|
readonly executingTasks: "Working on it…";
|
|
59
67
|
readonly workedSteps_one: "Worked · {{count}} step";
|
|
60
68
|
readonly workedSteps_other: "Worked · {{count}} steps";
|
|
69
|
+
readonly subagentRunning: "Subagent · {{description}}…";
|
|
70
|
+
readonly subagentDone: "Subagent · {{description}}";
|
|
71
|
+
readonly subagentDoneSteps_one: "Subagent · {{description}} · {{count}} step";
|
|
72
|
+
readonly subagentDoneSteps_other: "Subagent · {{description}} · {{count}} steps";
|
|
73
|
+
readonly subagentFailed: "Subagent · {{description}} · didn't finish";
|
|
74
|
+
readonly subagentTimedOut: "Subagent · {{description}} · ran out of time";
|
|
75
|
+
/** Attribution chip on an inner tool card. Attribution, not nesting. */
|
|
76
|
+
readonly subagentVia: "via {{name}}";
|
|
61
77
|
readonly cliAuthStop: {
|
|
62
78
|
readonly noGrant: "Connect to Simetrik to continue";
|
|
63
79
|
readonly reconnectFailed: "Couldn't connect to Simetrik";
|
|
@@ -109,6 +125,14 @@ export declare const streamEs: {
|
|
|
109
125
|
toolGenericDone: string;
|
|
110
126
|
toolGenericFailed: string;
|
|
111
127
|
toolGenericDetail: string;
|
|
128
|
+
toolRememberRunning: string;
|
|
129
|
+
toolRememberDone: string;
|
|
130
|
+
toolRememberFailed: string;
|
|
131
|
+
toolRememberDetail: string;
|
|
132
|
+
toolForgetRunning: string;
|
|
133
|
+
toolForgetDone: string;
|
|
134
|
+
toolForgetFailed: string;
|
|
135
|
+
toolForgetDetail: string;
|
|
112
136
|
browserSnapshot: string;
|
|
113
137
|
browserRead: string;
|
|
114
138
|
browserClick: string;
|
|
@@ -123,6 +147,13 @@ export declare const streamEs: {
|
|
|
123
147
|
executingTasks: string;
|
|
124
148
|
workedSteps_one: string;
|
|
125
149
|
workedSteps_other: string;
|
|
150
|
+
subagentRunning: string;
|
|
151
|
+
subagentDone: string;
|
|
152
|
+
subagentDoneSteps_one: string;
|
|
153
|
+
subagentDoneSteps_other: string;
|
|
154
|
+
subagentFailed: string;
|
|
155
|
+
subagentTimedOut: string;
|
|
156
|
+
subagentVia: string;
|
|
126
157
|
cliAuthStop: {
|
|
127
158
|
noGrant: string;
|
|
128
159
|
reconnectFailed: string;
|
|
@@ -174,6 +205,14 @@ export declare const streamPt: {
|
|
|
174
205
|
toolGenericDone: string;
|
|
175
206
|
toolGenericFailed: string;
|
|
176
207
|
toolGenericDetail: string;
|
|
208
|
+
toolRememberRunning: string;
|
|
209
|
+
toolRememberDone: string;
|
|
210
|
+
toolRememberFailed: string;
|
|
211
|
+
toolRememberDetail: string;
|
|
212
|
+
toolForgetRunning: string;
|
|
213
|
+
toolForgetDone: string;
|
|
214
|
+
toolForgetFailed: string;
|
|
215
|
+
toolForgetDetail: string;
|
|
177
216
|
browserSnapshot: string;
|
|
178
217
|
browserRead: string;
|
|
179
218
|
browserClick: string;
|
|
@@ -188,6 +227,13 @@ export declare const streamPt: {
|
|
|
188
227
|
executingTasks: string;
|
|
189
228
|
workedSteps_one: string;
|
|
190
229
|
workedSteps_other: string;
|
|
230
|
+
subagentRunning: string;
|
|
231
|
+
subagentDone: string;
|
|
232
|
+
subagentDoneSteps_one: string;
|
|
233
|
+
subagentDoneSteps_other: string;
|
|
234
|
+
subagentFailed: string;
|
|
235
|
+
subagentTimedOut: string;
|
|
236
|
+
subagentVia: string;
|
|
191
237
|
cliAuthStop: {
|
|
192
238
|
noGrant: string;
|
|
193
239
|
reconnectFailed: string;
|
|
@@ -1,4 +1,26 @@
|
|
|
1
|
-
import { BelongDataParts, BelongUIMessage, SandboxCommandData, ToolCallData } from './belong-data-parts.ts';
|
|
1
|
+
import { BelongDataParts, BelongUIMessage, SandboxCommandData, SubagentData, ToolCallData } from './belong-data-parts.ts';
|
|
2
|
+
/** One tool call in an activity run, paired (for shell) with its same-id output. */
|
|
3
|
+
export type ToolActivityItem = {
|
|
4
|
+
readonly tool: ToolCallData;
|
|
5
|
+
readonly output: SandboxCommandData | null;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* BEL-199 — a delegated subagent in an activity run. It sits INSIDE the one
|
|
9
|
+
* collapsed line beside the tool items, never beside the group.
|
|
10
|
+
*/
|
|
11
|
+
export type SubagentActivityItem = {
|
|
12
|
+
readonly kind: "subagent";
|
|
13
|
+
readonly subagentId: string;
|
|
14
|
+
readonly data: SubagentData;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Deliberate shape note: the TOOL variant carries no `kind` discriminant. It is
|
|
18
|
+
* the shape every existing fixture and story already builds, and a subagent item
|
|
19
|
+
* is distinguishable without one (`"kind" in item`) — so this stays a sound
|
|
20
|
+
* union while a required discriminant would have churned ~25 unrelated call
|
|
21
|
+
* sites across four story files for no safety the guard below doesn't give.
|
|
22
|
+
*/
|
|
23
|
+
export type ActivityItem = ToolActivityItem | SubagentActivityItem;
|
|
2
24
|
export declare const ActivityGroup: ({ items, live, }: {
|
|
3
25
|
readonly items: readonly ActivityItem[];
|
|
4
26
|
readonly live?: boolean | undefined;
|
|
@@ -44,11 +66,6 @@ export type PartRendererProps = {
|
|
|
44
66
|
* `reasoning` parts.
|
|
45
67
|
*/
|
|
46
68
|
export declare const PartRenderer: ({ part, onExecutePlan, historical }: PartRendererProps) => import("react").JSX.Element | null;
|
|
47
|
-
/** One tool call in an activity run, paired (for shell) with its same-id output. */
|
|
48
|
-
export type ActivityItem = {
|
|
49
|
-
readonly tool: ToolCallData;
|
|
50
|
-
readonly output: SandboxCommandData | null;
|
|
51
|
-
};
|
|
52
69
|
export type RenderGroup = {
|
|
53
70
|
readonly kind: "part";
|
|
54
71
|
readonly part: BelongMessagePart;
|
|
@@ -145,16 +145,19 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
145
145
|
reason: z.ZodString;
|
|
146
146
|
state: z.ZodEnum<["pending", "approved", "rejected", "amend_requested", "expired"]>;
|
|
147
147
|
toolName: z.ZodOptional<z.ZodString>;
|
|
148
|
+
subagentId: z.ZodOptional<z.ZodString>;
|
|
148
149
|
}, "strip", z.ZodTypeAny, {
|
|
149
150
|
reason: string;
|
|
150
151
|
approvalId: string;
|
|
151
152
|
state: "pending" | "approved" | "rejected" | "amend_requested" | "expired";
|
|
152
153
|
toolName?: string | undefined;
|
|
154
|
+
subagentId?: string | undefined;
|
|
153
155
|
}, {
|
|
154
156
|
reason: string;
|
|
155
157
|
approvalId: string;
|
|
156
158
|
state: "pending" | "approved" | "rejected" | "amend_requested" | "expired";
|
|
157
159
|
toolName?: string | undefined;
|
|
160
|
+
subagentId?: string | undefined;
|
|
158
161
|
}>;
|
|
159
162
|
}, "strip", z.ZodTypeAny, {
|
|
160
163
|
id: string;
|
|
@@ -163,6 +166,7 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
163
166
|
approvalId: string;
|
|
164
167
|
state: "pending" | "approved" | "rejected" | "amend_requested" | "expired";
|
|
165
168
|
toolName?: string | undefined;
|
|
169
|
+
subagentId?: string | undefined;
|
|
166
170
|
};
|
|
167
171
|
type: "data-approval-request";
|
|
168
172
|
}, {
|
|
@@ -172,6 +176,7 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
172
176
|
approvalId: string;
|
|
173
177
|
state: "pending" | "approved" | "rejected" | "amend_requested" | "expired";
|
|
174
178
|
toolName?: string | undefined;
|
|
179
|
+
subagentId?: string | undefined;
|
|
175
180
|
};
|
|
176
181
|
type: "data-approval-request";
|
|
177
182
|
}>, z.ZodObject<{
|
|
@@ -195,6 +200,7 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
195
200
|
code: string;
|
|
196
201
|
severity?: "error" | "stop" | undefined;
|
|
197
202
|
}>>;
|
|
203
|
+
subagentId: z.ZodOptional<z.ZodString>;
|
|
198
204
|
}, "strip", z.ZodTypeAny, {
|
|
199
205
|
toolName: string;
|
|
200
206
|
state: "completed" | "failed" | "started";
|
|
@@ -205,6 +211,7 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
205
211
|
} | undefined;
|
|
206
212
|
input?: Record<string, unknown> | undefined;
|
|
207
213
|
output?: Record<string, unknown> | null | undefined;
|
|
214
|
+
subagentId?: string | undefined;
|
|
208
215
|
}, {
|
|
209
216
|
toolName: string;
|
|
210
217
|
state: "completed" | "failed" | "started";
|
|
@@ -215,6 +222,7 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
215
222
|
} | undefined;
|
|
216
223
|
input?: Record<string, unknown> | undefined;
|
|
217
224
|
output?: Record<string, unknown> | null | undefined;
|
|
225
|
+
subagentId?: string | undefined;
|
|
218
226
|
}>;
|
|
219
227
|
}, "strip", z.ZodTypeAny, {
|
|
220
228
|
id: string;
|
|
@@ -228,6 +236,7 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
228
236
|
} | undefined;
|
|
229
237
|
input?: Record<string, unknown> | undefined;
|
|
230
238
|
output?: Record<string, unknown> | null | undefined;
|
|
239
|
+
subagentId?: string | undefined;
|
|
231
240
|
};
|
|
232
241
|
type: "data-tool-call";
|
|
233
242
|
}, {
|
|
@@ -242,8 +251,56 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
242
251
|
} | undefined;
|
|
243
252
|
input?: Record<string, unknown> | undefined;
|
|
244
253
|
output?: Record<string, unknown> | null | undefined;
|
|
254
|
+
subagentId?: string | undefined;
|
|
245
255
|
};
|
|
246
256
|
type: "data-tool-call";
|
|
257
|
+
}>, z.ZodObject<{
|
|
258
|
+
type: z.ZodLiteral<"data-subagent">;
|
|
259
|
+
id: z.ZodString;
|
|
260
|
+
data: z.ZodObject<{
|
|
261
|
+
name: z.ZodString;
|
|
262
|
+
description: z.ZodString;
|
|
263
|
+
state: z.ZodEnum<["running", "finished", "failed"]>;
|
|
264
|
+
stepsUsed: z.ZodOptional<z.ZodNumber>;
|
|
265
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
266
|
+
timedOut: z.ZodOptional<z.ZodBoolean>;
|
|
267
|
+
}, "strip", z.ZodTypeAny, {
|
|
268
|
+
name: string;
|
|
269
|
+
state: "failed" | "running" | "finished";
|
|
270
|
+
description: string;
|
|
271
|
+
stepsUsed?: number | undefined;
|
|
272
|
+
summary?: string | undefined;
|
|
273
|
+
timedOut?: boolean | undefined;
|
|
274
|
+
}, {
|
|
275
|
+
name: string;
|
|
276
|
+
state: "failed" | "running" | "finished";
|
|
277
|
+
description: string;
|
|
278
|
+
stepsUsed?: number | undefined;
|
|
279
|
+
summary?: string | undefined;
|
|
280
|
+
timedOut?: boolean | undefined;
|
|
281
|
+
}>;
|
|
282
|
+
}, "strip", z.ZodTypeAny, {
|
|
283
|
+
id: string;
|
|
284
|
+
data: {
|
|
285
|
+
name: string;
|
|
286
|
+
state: "failed" | "running" | "finished";
|
|
287
|
+
description: string;
|
|
288
|
+
stepsUsed?: number | undefined;
|
|
289
|
+
summary?: string | undefined;
|
|
290
|
+
timedOut?: boolean | undefined;
|
|
291
|
+
};
|
|
292
|
+
type: "data-subagent";
|
|
293
|
+
}, {
|
|
294
|
+
id: string;
|
|
295
|
+
data: {
|
|
296
|
+
name: string;
|
|
297
|
+
state: "failed" | "running" | "finished";
|
|
298
|
+
description: string;
|
|
299
|
+
stepsUsed?: number | undefined;
|
|
300
|
+
summary?: string | undefined;
|
|
301
|
+
timedOut?: boolean | undefined;
|
|
302
|
+
};
|
|
303
|
+
type: "data-subagent";
|
|
247
304
|
}>, z.ZodObject<{
|
|
248
305
|
type: z.ZodLiteral<"data-sandbox-command">;
|
|
249
306
|
id: z.ZodString;
|
|
@@ -40,6 +40,12 @@ export type ApprovalRequestData = {
|
|
|
40
40
|
* messages; render the generic label when undefined.
|
|
41
41
|
*/
|
|
42
42
|
readonly toolName?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* BEL-199 attribution — the `data-subagent` part id whose gated call raised this
|
|
45
|
+
* card. The resolution event (`approval_state_changed`) carries no subagentId, so
|
|
46
|
+
* last-write-wins by part id drops it on resolve: pending-card-only by design.
|
|
47
|
+
*/
|
|
48
|
+
readonly subagentId?: string | undefined;
|
|
43
49
|
};
|
|
44
50
|
/**
|
|
45
51
|
* BEL-93 — a friendly question widget the agent emits instead of dumping a wall
|
|
@@ -105,6 +111,41 @@ export type ToolCallData = {
|
|
|
105
111
|
readonly message: string;
|
|
106
112
|
readonly severity?: ToolErrorSeverity | undefined;
|
|
107
113
|
} | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* BEL-199 — the `data-subagent` part id this call ran INSIDE. Absent on every
|
|
116
|
+
* main-loop call (and on every part emitted before BEL-199). The expanded
|
|
117
|
+
* activity group chips a matching item with a muted "via <name>" —
|
|
118
|
+
* attribution, not nesting.
|
|
119
|
+
*/
|
|
120
|
+
readonly subagentId?: string | undefined;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* BEL-199 — one delegated subagent. `running → finished | failed`, one part per
|
|
124
|
+
* subagent, reconciled by id like every other lifecycle part.
|
|
125
|
+
*
|
|
126
|
+
* It renders as an ACTIVITY ITEM: one thin line INSIDE the §42 collapsed
|
|
127
|
+
* activity line, never a card beside it. A failed subagent carries no
|
|
128
|
+
* `ToolErrorSeverity` — deliberately, so it can never reach the collapsed line:
|
|
129
|
+
* the parent agent reads the failure in its tool result and recovers, and
|
|
130
|
+
* surfacing it would read as breakage. Nothing about it is ever red.
|
|
131
|
+
*/
|
|
132
|
+
export type SubagentState = "running" | "finished" | "failed";
|
|
133
|
+
export type SubagentData = {
|
|
134
|
+
/** Registry name, e.g. "general-purpose" — the "via <name>" chip's text. */
|
|
135
|
+
readonly name: string;
|
|
136
|
+
/** The model's own task label; this is what the line shows. */
|
|
137
|
+
readonly description: string;
|
|
138
|
+
readonly state: SubagentState;
|
|
139
|
+
readonly stepsUsed?: number | undefined;
|
|
140
|
+
readonly summary?: string | undefined;
|
|
141
|
+
/**
|
|
142
|
+
* The failure was the wall-clock budget, not an error — an optional EXTRA
|
|
143
|
+
* field rather than a fourth `state` (an unknown enum value would make an
|
|
144
|
+
* older dock drop the whole part; an unknown field it ignores). Lets the line
|
|
145
|
+
* say "ran out of time" in the reader's language instead of relaying English
|
|
146
|
+
* server prose.
|
|
147
|
+
*/
|
|
148
|
+
readonly timedOut?: boolean | undefined;
|
|
108
149
|
};
|
|
109
150
|
export type SandboxCommandData = {
|
|
110
151
|
readonly state: SandboxCommandState;
|
|
@@ -181,6 +222,8 @@ export type BelongDataParts = {
|
|
|
181
222
|
"approval-request": ApprovalRequestData;
|
|
182
223
|
"choice-request": ChoiceRequestData;
|
|
183
224
|
"tool-call": ToolCallData;
|
|
225
|
+
/** BEL-199 — a delegated subagent, folded into the §42 activity line. */
|
|
226
|
+
subagent: SubagentData;
|
|
184
227
|
"sandbox-command": SandboxCommandData;
|
|
185
228
|
"ui-action": UiActionData;
|
|
186
229
|
"cli-reconnect": CliReconnectData;
|
|
@@ -213,5 +256,5 @@ export type WireDataPart<NAME extends keyof BelongDataParts> = {
|
|
|
213
256
|
readonly id: string;
|
|
214
257
|
readonly data: BelongDataParts[NAME];
|
|
215
258
|
};
|
|
216
|
-
export type WireStreamPart = WireTextPart | WireDataPart<"reasoning"> | WireDataPart<"plan"> | WireDataPart<"approval-request"> | WireDataPart<"choice-request"> | WireDataPart<"tool-call"> | WireDataPart<"sandbox-command"> | WireDataPart<"ui-action"> | WireDataPart<"cli-reconnect"> | WireDataPart<"navigation"> | WireDataPart<"artifact"> | WireDataPart<"status"> | WireDataPart<"usage">;
|
|
259
|
+
export type WireStreamPart = WireTextPart | WireDataPart<"reasoning"> | WireDataPart<"plan"> | WireDataPart<"approval-request"> | WireDataPart<"choice-request"> | WireDataPart<"tool-call"> | WireDataPart<"subagent"> | WireDataPart<"sandbox-command"> | WireDataPart<"ui-action"> | WireDataPart<"cli-reconnect"> | WireDataPart<"navigation"> | WireDataPart<"artifact"> | WireDataPart<"status"> | WireDataPart<"usage">;
|
|
217
260
|
export type WireStreamPartType = WireStreamPart["type"];
|
package/dist/types/public.d.ts
CHANGED
|
@@ -252,7 +252,7 @@ export type BelongGlobal = {
|
|
|
252
252
|
errorMessage?: string;
|
|
253
253
|
}) => void;
|
|
254
254
|
/** TEST-ONLY: append a live-call timeline row. */
|
|
255
|
-
readonly __forceCallTimelineEntry?: (kind: "user" | "agent" | "step" | "success" | "error" | "skill" | "schedule", text: string,
|
|
255
|
+
readonly __forceCallTimelineEntry?: (kind: "user" | "agent" | "step" | "success" | "error" | "skill" | "schedule", text: string, line?: number | null) => void;
|
|
256
256
|
/** TEST-ONLY: drive the call orb's audio level (0..1) without Web Audio. */
|
|
257
257
|
readonly __forceCallAudioLevel?: (level: number) => void;
|
|
258
258
|
/** TEST-ONLY: force the agent-lines switchboard state without HTTP dispatch. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@belonguniverseai/react-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
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",
|