@belonguniverseai/react-sdk 0.5.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 +93 -8
- package/dist/api/skills.d.ts +6 -1
- package/dist/component/{arc-CtyXH_sw.js → arc-BziuP1aB.js} +2 -2
- package/dist/component/{architectureDiagram-3BPJPVTR-C6NZifN6.js → architectureDiagram-3BPJPVTR-BVwa4QrX.js} +3 -3
- package/dist/component/{blockDiagram-GPEHLZMM-_-K66LP4.js → blockDiagram-GPEHLZMM-CKNImKL2.js} +4 -4
- package/dist/component/{c4Diagram-AAUBKEIU-DL-K-sZW.js → c4Diagram-AAUBKEIU-BcbjcMPA.js} +3 -3
- package/dist/component/{channel-scCA9sxi.js → channel-vtwXLQ1f.js} +2 -2
- package/dist/component/{chunk-2J33WTMH-Dkd9OyM1.js → chunk-2J33WTMH-C6wmoOIl.js} +2 -2
- package/dist/component/{chunk-4BX2VUAB-JbEXcQ3q.js → chunk-4BX2VUAB-DySNI9mv.js} +2 -2
- package/dist/component/{chunk-55IACEB6-Dg96dHvQ.js → chunk-55IACEB6-C4M2cG_c.js} +2 -2
- package/dist/component/{chunk-727SXJPM-Cu3-awqi.js → chunk-727SXJPM-BTqmmKKN.js} +6 -6
- package/dist/component/{chunk-AQP2D5EJ-DLX62MPh.js → chunk-AQP2D5EJ-DiS4043D.js} +4 -4
- package/dist/component/{chunk-FMBD7UC4-BxU0KQRK.js → chunk-FMBD7UC4-Bu05DXe4.js} +2 -2
- package/dist/component/{chunk-ND2GUHAM-CEQj3so6.js → chunk-ND2GUHAM-DfbE4oOG.js} +2 -2
- package/dist/component/{chunk-QZHKN3VN-BWgwT04-.js → chunk-QZHKN3VN-Y8mfHGtB.js} +2 -2
- package/dist/component/{classDiagram-4FO5ZUOK-Ton6m2pw.js → classDiagram-4FO5ZUOK-ChO_m1Vd.js} +3 -3
- package/dist/component/{classDiagram-v2-Q7XG4LA2-Ton6m2pw.js → classDiagram-v2-Q7XG4LA2-ChO_m1Vd.js} +3 -3
- package/dist/component/{cose-bilkent-S5V4N54A-Dja09hp6.js → cose-bilkent-S5V4N54A-B1DDE26M.js} +2 -2
- package/dist/component/{dagre-BM42HDAG-Ch6fODe-.js → dagre-BM42HDAG-BmujNepD.js} +2 -2
- package/dist/component/{diagram-2AECGRRQ-DdDr6tHi.js → diagram-2AECGRRQ-Cbck9DRQ.js} +3 -3
- package/dist/component/{diagram-5GNKFQAL-BT2qfjUH.js → diagram-5GNKFQAL-csRK5clZ.js} +4 -4
- package/dist/component/{diagram-KO2AKTUF-UcWrBVNK.js → diagram-KO2AKTUF-DD3KqnFb.js} +3 -3
- package/dist/component/{diagram-LMA3HP47-D-BCOeIt.js → diagram-LMA3HP47-D6-oakzD.js} +3 -3
- package/dist/component/{diagram-OG6HWLK6-CJDJgfQO.js → diagram-OG6HWLK6-DfxY1IE7.js} +4 -4
- package/dist/component/{erDiagram-TEJ5UH35-kY5sdKqg.js → erDiagram-TEJ5UH35-BDV1C23R.js} +5 -5
- package/dist/component/{flowDiagram-I6XJVG4X-9OddgRiE.js → flowDiagram-I6XJVG4X-mEwMtE2U.js} +7 -7
- package/dist/component/{ganttDiagram-6RSMTGT7-Dc9t8llA.js → ganttDiagram-6RSMTGT7-C_dcTMQX.js} +3 -3
- package/dist/component/{gitGraphDiagram-PVQCEYII-DYjn9Ff5.js → gitGraphDiagram-PVQCEYII-CIKPPQiC.js} +4 -4
- package/dist/component/{highlighted-body-OFNGDK62-D_TDzrFY.js → highlighted-body-OFNGDK62-DpP1DD9S.js} +2 -2
- package/dist/component/index.js +2 -2
- package/dist/component/{infoDiagram-5YYISTIA-CBPoKi7E.js → infoDiagram-5YYISTIA-DKTrvjCm.js} +2 -2
- package/dist/component/{ishikawaDiagram-YF4QCWOH-C3rChBg5.js → ishikawaDiagram-YF4QCWOH-BcuncMnU.js} +2 -2
- package/dist/component/{journeyDiagram-JHISSGLW-DVTybrGG.js → journeyDiagram-JHISSGLW-BTTgY3Of.js} +5 -5
- package/dist/component/{kanban-definition-UN3LZRKU-DNMLC4NQ.js → kanban-definition-UN3LZRKU-D9K5810E.js} +3 -3
- package/dist/component/{linear-B_oPUR6_.js → linear-DondfmT2.js} +2 -2
- package/dist/component/{mermaid-GHXKKRXX-CjZr9GWr.js → mermaid-GHXKKRXX-j_0KsvYs.js} +28535 -28932
- package/dist/component/{mindmap-definition-RKZ34NQL-CErhrdm3.js → mindmap-definition-RKZ34NQL-DMC3vCUq.js} +4 -4
- package/dist/component/{pieDiagram-4H26LBE5-Cno02n3_.js → pieDiagram-4H26LBE5-DmYi_D3l.js} +4 -4
- package/dist/component/{quadrantDiagram-W4KKPZXB-DQV7ytCz.js → quadrantDiagram-W4KKPZXB-DMos-d69.js} +3 -3
- package/dist/component/{requirementDiagram-4Y6WPE33-DBORDX5u.js → requirementDiagram-4Y6WPE33-BpgIfnhZ.js} +4 -4
- package/dist/component/{sankeyDiagram-5OEKKPKP-gNBaVNW1.js → sankeyDiagram-5OEKKPKP-xbJGp8Ms.js} +2 -2
- package/dist/component/{sequenceDiagram-3UESZ5HK-BlxJztMa.js → sequenceDiagram-3UESZ5HK-Bnlm4mVO.js} +4 -4
- package/dist/component/{stateDiagram-AJRCARHV-2ziF_Zes.js → stateDiagram-AJRCARHV-BIooqMYf.js} +3 -3
- package/dist/component/{stateDiagram-v2-BHNVJYJU-BWmzKTMS.js → stateDiagram-v2-BHNVJYJU-C6WAOCCe.js} +3 -3
- package/dist/component/{timeline-definition-PNZ67QCA-OcHhxXWM.js → timeline-definition-PNZ67QCA-lTe5jbcD.js} +3 -3
- package/dist/component/{vennDiagram-CIIHVFJN-Fl9VlPVe.js → vennDiagram-CIIHVFJN-5RYbksB1.js} +2 -2
- package/dist/component/{wardleyDiagram-YWT4CUSO-BNHUW0Ex.js → wardleyDiagram-YWT4CUSO-BSz_UDND.js} +3 -3
- package/dist/component/{xychartDiagram-2RQKCTM6-Bog3Ddue.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/components/ui/badge.d.ts +1 -1
- package/dist/embed/slash-commands.d.ts +24 -7
- 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 +27 -6
- package/dist/i18n/messages/surfaces/embedMisc.d.ts +0 -3
- package/dist/i18n/messages/surfaces/stream.d.ts +74 -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/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
|
@@ -4,9 +4,9 @@ export declare const MAX_AGENT_LINES = 3;
|
|
|
4
4
|
* "idle" is the not-busy resting state — no work in flight, and nothing
|
|
5
5
|
* completed/failed yet worth reporting (a fresh call, or a line rebound onto
|
|
6
6
|
* a persisted session with no activity this call). "ready" is the DISTINCT
|
|
7
|
-
* terminal state after a run actually finished successfully
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* terminal state after a run actually finished successfully, unlike "idle"
|
|
8
|
+
* which never conflates the two anymore (pre-CallScreen-board, both were
|
|
9
|
+
* folded into "ready").
|
|
10
10
|
*/
|
|
11
11
|
export type AgentLineStatus = "idle" | "working" | "ready" | "failed" | "needs_approval";
|
|
12
12
|
export type AgentLine = {
|
|
@@ -28,7 +28,6 @@ export type AgentLine = {
|
|
|
28
28
|
readonly sessionId: string | null;
|
|
29
29
|
readonly label: string;
|
|
30
30
|
readonly status: AgentLineStatus;
|
|
31
|
-
readonly lastText: string;
|
|
32
31
|
/** The line's current run, for `stop_agent` to target — bound by the
|
|
33
32
|
* line-run reader once a background dispatch's POST returns a runId, and
|
|
34
33
|
* cleared back to `null` when that run reaches a terminal state.
|
|
@@ -158,26 +157,6 @@ export declare const isBoundToAnotherLine: (sessionId: string) => boolean;
|
|
|
158
157
|
*/
|
|
159
158
|
export declare const foregroundLineNumber: (sessionId: string | null) => number;
|
|
160
159
|
export declare const openAgentLine: (label: string) => AgentLine | null;
|
|
161
|
-
/**
|
|
162
|
-
* Materialize a line AT A GIVEN NUMBER, unlike `openAgentLine`'s lowest-FREE
|
|
163
|
-
* allocation. F1: role→line is fixed and positional (main=1, cli=2,
|
|
164
|
-
* consulting=3 — `call-roster-store.ts`), so a background dispatch to a role
|
|
165
|
-
* whose line has never been touched must land EXACTLY on that role's number,
|
|
166
|
-
* never wherever happens to be free. `dispatchToBackgroundLine`
|
|
167
|
-
* (voice-call.ts) is the one production caller: "asking the CLI agent for
|
|
168
|
-
* something IS bringing it on" (design doc) means the line materializes on
|
|
169
|
-
* first use instead of reporting `unknown_line` for a line that simply
|
|
170
|
-
* hasn't been dispatched to yet.
|
|
171
|
-
*
|
|
172
|
-
* Returns `null` when `line` is outside the switchboard's
|
|
173
|
-
* 1..MAX_AGENT_LINES range, or when it is already occupied — the caller's
|
|
174
|
-
* own `getLine(line) === undefined` check is expected to make the second
|
|
175
|
-
* case unreachable in practice (this function is only ever called after
|
|
176
|
-
* that check fails), but the guard keeps the contract sound on its own
|
|
177
|
-
* terms rather than trusting every future caller to get the check right
|
|
178
|
-
* (§28).
|
|
179
|
-
*/
|
|
180
|
-
export declare const openAgentLineAt: (line: number, label: string) => AgentLine | null;
|
|
181
160
|
/**
|
|
182
161
|
* RELEASE a line — the mirror of `persistSlotBinding`'s adoption: clears the
|
|
183
162
|
* in-memory entry AND its durable slot together, so the freed number is
|
|
@@ -266,7 +245,7 @@ export declare const bindLineRun: (line: number, runId: string | null) => void;
|
|
|
266
245
|
* is a harmless no-op, which is what keeps the terminal path above uniform.
|
|
267
246
|
*/
|
|
268
247
|
export declare const persistSlotRun: (line: number, runId: string | null) => void;
|
|
269
|
-
export declare const setLineStatus: (line: number, status: AgentLineStatus
|
|
248
|
+
export declare const setLineStatus: (line: number, status: AgentLineStatus) => void;
|
|
270
249
|
/** CallScreen's agent board reads this as the live "what is it doing right
|
|
271
250
|
* now" line under a working line's status dot — written on every phase
|
|
272
251
|
* notification (`notifyLinePhase`) and cleared (`null`) once the line's run
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AgentLineStatus } from './voice-call-lines.ts';
|
|
2
2
|
import { WorkPhase } from './voice-narration.ts';
|
|
3
|
+
import { CallDialOrigin } from './voice/call-active-marker.ts';
|
|
3
4
|
export type CallStatus = "idle" | "connecting" | "in_call" | "error";
|
|
4
5
|
/**
|
|
5
6
|
* One row of the call's execution timeline (the CallScreen activity card):
|
|
@@ -11,12 +12,15 @@ export type CallTimelineEntry = {
|
|
|
11
12
|
readonly id: number;
|
|
12
13
|
readonly atMs: number;
|
|
13
14
|
readonly kind: "user" | "agent" | "step" | "success" | "error" | "skill" | "schedule";
|
|
15
|
+
/** What the row SAYS. Empty for the two terminal kinds (`success`/`error`),
|
|
16
|
+
* whose whole meaning is the kind itself — CallScreen renders their own
|
|
17
|
+
* label and ignores this. See {@link TEXTLESS_KINDS}. */
|
|
14
18
|
readonly text: string;
|
|
15
19
|
/** The switchboard line this row concerns; `null` for a foreground (line 1)
|
|
16
|
-
* row.
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
+
* row. Bookkeeping only — no surface labels a row with an agent name any
|
|
21
|
+
* more (there is one agent, and it is the chat on screen), so this exists
|
|
22
|
+
* so a marker written for a background line can be told apart from one
|
|
23
|
+
* written for the foreground. */
|
|
20
24
|
readonly line: number | null;
|
|
21
25
|
};
|
|
22
26
|
export type CallState = {
|
|
@@ -39,20 +43,63 @@ export type CallState = {
|
|
|
39
43
|
/** True between the user finishing an utterance and the model responding —
|
|
40
44
|
* the "Thinking…" window on the call screen. */
|
|
41
45
|
readonly thinking: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Why the dial currently in flight (or the call it produced) happened —
|
|
48
|
+
* `"user"` for one the user asked for, `"redial"` for a reconnect. Set on
|
|
49
|
+
* the `connecting` transition and read back by two very different consumers:
|
|
50
|
+
* the marker write below (a reconnect CONTINUES the interrupted call's
|
|
51
|
+
* redial streak) and CallScreen, which says "Reconnecting…" rather than
|
|
52
|
+
* "Connecting…" so a microphone that reopened on its own explains itself.
|
|
53
|
+
*/
|
|
54
|
+
readonly dialOrigin: CallDialOrigin;
|
|
42
55
|
/** Wall-clock start of the current call; 0 while idle. */
|
|
43
56
|
readonly callStartedAtMs: number;
|
|
44
57
|
/** Rolling execution timeline, oldest first (capped). */
|
|
45
58
|
readonly timeline: readonly CallTimelineEntry[];
|
|
59
|
+
/** The browser REFUSED to play the agent's audio (autoplay is a request,
|
|
60
|
+
* not a guarantee — an automatically redialed call after a page reload has
|
|
61
|
+
* no fresh user gesture behind it). Drives CallScreen's one-tap "Tap to
|
|
62
|
+
* hear" control; {@link resumeCallAudio} clears it. */
|
|
63
|
+
readonly audioBlocked: boolean;
|
|
46
64
|
readonly errorMessage?: string;
|
|
47
65
|
};
|
|
48
66
|
/**
|
|
49
|
-
* ChatRoute pushes
|
|
50
|
-
*
|
|
67
|
+
* ChatRoute pushes a call-relevant NOTICE onto the timeline — the sentences
|
|
68
|
+
* that explain why nothing ran (a skill lookup miss, a catalog that hasn't
|
|
69
|
+
* loaded), an artifact that opened on screen, a voice-resolved approval.
|
|
70
|
+
* No-op when no call is active.
|
|
71
|
+
*
|
|
72
|
+
* `step` is the only kind ChatRoute writes: it is the one kind whose TEXT is
|
|
73
|
+
* rendered (a `success`/`error` row is its kind label and nothing else — see
|
|
74
|
+
* {@link TEXTLESS_KINDS}), so a notice pushed as anything else would have its
|
|
75
|
+
* sentence silently dropped.
|
|
76
|
+
*
|
|
77
|
+
* Keeps the consecutive-identical-row window: these are free-form sentences
|
|
78
|
+
* written from event handlers that can fire twice on one underlying fact (the
|
|
79
|
+
* voice re-asking for the same missing skill, say), and a verbatim repeat
|
|
80
|
+
* seconds apart says nothing new. The agent's own ACTION rows are the
|
|
81
|
+
* opposite case and have their own entry point — {@link pushCallAction}.
|
|
51
82
|
*/
|
|
52
83
|
export declare const pushCallStep: (text: string) => void;
|
|
53
|
-
/**
|
|
54
|
-
*
|
|
55
|
-
|
|
84
|
+
/**
|
|
85
|
+
* ChatRoute pushes one ACTION onto the call timeline — one line per thing the
|
|
86
|
+
* agent did ("Read a file", "Ran a command"). No-op when no call is active.
|
|
87
|
+
*
|
|
88
|
+
* Deliberately NOT {@link pushCallStep}: the action vocabulary
|
|
89
|
+
* (`tool-action-label.ts`) is a fixed ~15-string set of parameterless
|
|
90
|
+
* constants, so "read three files" is three BYTE-IDENTICAL rows and the
|
|
91
|
+
* dedupe window folded them into one — an agent that read three files logged
|
|
92
|
+
* one, and five unrecognized tools (all "Worked on it") logged one. On a
|
|
93
|
+
* surface whose whole job is "let me follow along while I listen", that is
|
|
94
|
+
* the difference between working and not.
|
|
95
|
+
*
|
|
96
|
+
* Safe to opt out because this call site is already idempotent at source:
|
|
97
|
+
* chat.tsx's `loggedActionPartIdsRef` keys on the tool-call PART id, so the
|
|
98
|
+
* same call re-arriving as started → completed writes exactly one row. Same
|
|
99
|
+
* reasoning, same opt-out, as the terminal markers in `deliverAgentReply` /
|
|
100
|
+
* `deliverAgentFailure`.
|
|
101
|
+
*/
|
|
102
|
+
export declare const pushCallAction: (text: string) => void;
|
|
56
103
|
/** Hard ceiling on the rendered digest — a compact recap, not a transcript. */
|
|
57
104
|
export declare const CONTEXT_DIGEST_MAX_CHARS = 1000;
|
|
58
105
|
/**
|
|
@@ -116,44 +163,6 @@ declare let lineDispatcher: ((req: {
|
|
|
116
163
|
readonly isNewLine: boolean;
|
|
117
164
|
}) => void) | null;
|
|
118
165
|
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);
|
|
157
166
|
export declare const registerCallLineViewSwitcher: (switcher: (sessionId: string) => void) => (() => void);
|
|
158
167
|
export declare const registerCallClearNotifier: (notifier: (sessionId: string) => void) => (() => void);
|
|
159
168
|
/**
|
|
@@ -174,10 +183,11 @@ export declare const notifyCallProgress: (hint: string) => void;
|
|
|
174
183
|
* small work badge while the agent is busy. */
|
|
175
184
|
export declare const setCallWorkPhase: (phase: CallState["workPhase"]) => void;
|
|
176
185
|
/**
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
186
|
+
* The lines strip chip on CallScreen calls this directly (no tool-call round
|
|
187
|
+
* trip, no ack — there is no voice tool for it any more, which is why nothing
|
|
188
|
+
* here reports an outcome): switch the chat panel to the line's session and
|
|
189
|
+
* minimize the call screen. No-op when the line is unknown, never bound to a
|
|
190
|
+
* session, or no view switcher is registered (e.g. ChatRoute hasn't mounted).
|
|
181
191
|
*/
|
|
182
192
|
export declare const showLineOnScreen: (line: number) => void;
|
|
183
193
|
/**
|
|
@@ -198,7 +208,41 @@ export declare const showLineOnScreen: (line: number) => void;
|
|
|
198
208
|
export declare const startCall: (options?: {
|
|
199
209
|
readonly isReconnect?: boolean;
|
|
200
210
|
}) => Promise<void>;
|
|
211
|
+
/**
|
|
212
|
+
* The error panel's "Call again". Dials as a RECONNECT whenever an interrupted
|
|
213
|
+
* call's marker is still there — which, by `keepsCallActiveMarker`, is exactly
|
|
214
|
+
* the case worth reconnecting to: a redial that never became a call. Its
|
|
215
|
+
* `contextDigest` is the only surviving record of what the user was doing, so
|
|
216
|
+
* a bare `startCall()` here opened a COLD call the user had to re-explain,
|
|
217
|
+
* while the recap the failure path deliberately preserved went unread.
|
|
218
|
+
*
|
|
219
|
+
* Deliberately does NOT dismiss the error first: `dismissCallError`'s idle
|
|
220
|
+
* transition is one of the two moments allowed to keep the marker, but only
|
|
221
|
+
* because ✕ means "put the panel away" — routing a RETRY through it would
|
|
222
|
+
* still hand `startCall` a marker whose digest it had to re-read after a
|
|
223
|
+
* needless round trip. `startCall`'s own `connecting` patch replaces the error
|
|
224
|
+
* state (and its panel) synchronously, so there is nothing left to dismiss.
|
|
225
|
+
*/
|
|
226
|
+
export declare const retryCall: () => Promise<void>;
|
|
227
|
+
/**
|
|
228
|
+
* Hang up. The one ending that is an explicit GIVE-UP, so it always takes the
|
|
229
|
+
* interrupted call's marker and any standing reconnect offer with it — stated
|
|
230
|
+
* here rather than left to `keepsCallActiveMarker`, whose `error → idle`
|
|
231
|
+
* branch exists for the ✕ that merely puts the error panel away. Both clears
|
|
232
|
+
* run BEFORE the transition, so that branch sees no marker and agrees.
|
|
233
|
+
*/
|
|
201
234
|
export declare const endCall: () => void;
|
|
235
|
+
/**
|
|
236
|
+
* The user tapped "Tap to hear" — ask the browser to play the agent's audio
|
|
237
|
+
* again, now that a real gesture is on the stack, and take the control down
|
|
238
|
+
* only once playback has ACTUALLY started. Clearing it optimistically would
|
|
239
|
+
* leave a silent call with nothing left to tap.
|
|
240
|
+
*
|
|
241
|
+
* Deliberately not `async`: CallScreen calls this straight from the click
|
|
242
|
+
* handler, and the transport's `play()` runs before the first await, so the
|
|
243
|
+
* gesture the browser is holding out for is still on the stack.
|
|
244
|
+
*/
|
|
245
|
+
export declare const resumeCallAudio: () => void;
|
|
202
246
|
export declare const toggleCallMuted: () => void;
|
|
203
247
|
/** Dismiss a sticky error state (the overlay's ✕). */
|
|
204
248
|
export declare const dismissCallError: () => void;
|
|
@@ -218,9 +262,9 @@ export declare const deliverAgentReply: (text: string) => void;
|
|
|
218
262
|
* must tell the user something went wrong and offer to retry.
|
|
219
263
|
*/
|
|
220
264
|
export declare const deliverAgentFailure: (message: string) => void;
|
|
221
|
-
/** A background line finished:
|
|
222
|
-
*
|
|
223
|
-
export declare const deliverLineReply: (line: number
|
|
265
|
+
/** A background line finished: converge its chip. Nothing is spoken — see
|
|
266
|
+
* this section's header. */
|
|
267
|
+
export declare const deliverLineReply: (line: number) => void;
|
|
224
268
|
/**
|
|
225
269
|
* A background line published an artifact: OPEN it on screen, mirroring
|
|
226
270
|
* chat.tsx's foreground auto-open effect exactly — ALWAYS docked (a persisted
|
|
@@ -234,26 +278,21 @@ export declare const deliverLineArtifact: (line: number, artifact: {
|
|
|
234
278
|
readonly title: string;
|
|
235
279
|
readonly mimeType: string;
|
|
236
280
|
}) => void;
|
|
237
|
-
/** A background line failed:
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
|
|
245
|
-
export declare const notifyLineApprovalNeeded: (line: number, timelineText: string, reason: string) => void;
|
|
281
|
+
/** A background line failed: converge its chip. Nothing is spoken — see this
|
|
282
|
+
* section's header. */
|
|
283
|
+
export declare const deliverLineFailure: (line: number) => void;
|
|
284
|
+
/** A background line is blocked on a tool approval — paint its chip. The
|
|
285
|
+
* approval itself is resolved from the rail's typed chat, on screen, where
|
|
286
|
+
* the user can read what is being approved; the call is not told, and takes
|
|
287
|
+
* no `reason`, because it has no way to name whose approval it is. */
|
|
288
|
+
export declare const notifyLineApprovalNeeded: (line: number) => void;
|
|
246
289
|
/** A background line advanced a phase — record it as the line's live step
|
|
247
|
-
* (CallScreen's agent board
|
|
248
|
-
*
|
|
249
|
-
* phase change
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
* front. The registry write is unconditional (line-dispatch's own `isStale`
|
|
254
|
-
* guard already keeps a stale-call phase from ever reaching here); the
|
|
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. */
|
|
290
|
+
* (CallScreen's agent board and the rail read `currentStepLabel`/
|
|
291
|
+
* `currentPhase` off the registry). X2a: deliberately NO timeline row per
|
|
292
|
+
* phase change — the board's own card already shows the identical string
|
|
293
|
+
* live, and a 12-step run used to write 12 near-identical Activity rows that
|
|
294
|
+
* buried the actual results. The write is unconditional: line-dispatch's own
|
|
295
|
+
* `isStale` guard already keeps a stale-call phase from ever reaching here. */
|
|
257
296
|
export declare const notifyLinePhase: (line: number, phaseLabel: string, phase?: WorkPhase | null) => void;
|
|
258
297
|
/** True while a call holds the audio path — ChatRoute gates TTS autoplay on it. */
|
|
259
298
|
export declare const isCallActive: () => boolean;
|
|
@@ -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";
|
|
@@ -55,9 +63,25 @@ export declare const en: {
|
|
|
55
63
|
readonly browserAssertCreated: "Checked for an existing resource";
|
|
56
64
|
readonly browserRefreshView: "Refreshed the page";
|
|
57
65
|
readonly failedBadge: "failed";
|
|
66
|
+
readonly actionReadFile: "Read a file";
|
|
67
|
+
readonly actionWroteFile: "Updated a file";
|
|
68
|
+
readonly actionPublishedArtifact: "Put a report on screen";
|
|
69
|
+
readonly actionLookedUpSkill: "Looked up a skill";
|
|
70
|
+
readonly actionSubTask: "Worked through a sub-task";
|
|
71
|
+
readonly actionMadePlan: "Put a plan together";
|
|
72
|
+
readonly actionCheckedRules: "Checked the rules";
|
|
73
|
+
readonly actionScheduledTask: "Set up a scheduled task";
|
|
74
|
+
readonly actionGeneric: "Worked on it";
|
|
58
75
|
readonly executingTasks: "Working on it…";
|
|
59
76
|
readonly workedSteps_one: "Worked · {{count}} step";
|
|
60
77
|
readonly workedSteps_other: "Worked · {{count}} steps";
|
|
78
|
+
readonly subagentRunning: "Subagent · {{description}}…";
|
|
79
|
+
readonly subagentDone: "Subagent · {{description}}";
|
|
80
|
+
readonly subagentDoneSteps_one: "Subagent · {{description}} · {{count}} step";
|
|
81
|
+
readonly subagentDoneSteps_other: "Subagent · {{description}} · {{count}} steps";
|
|
82
|
+
readonly subagentFailed: "Subagent · {{description}} · didn't finish";
|
|
83
|
+
readonly subagentTimedOut: "Subagent · {{description}} · ran out of time";
|
|
84
|
+
readonly subagentVia: "via {{name}}";
|
|
61
85
|
readonly cliAuthStop: {
|
|
62
86
|
readonly noGrant: "Connect to Simetrik to continue";
|
|
63
87
|
readonly reconnectFailed: "Couldn't connect to Simetrik";
|
|
@@ -317,7 +341,6 @@ export declare const en: {
|
|
|
317
341
|
readonly thisFile: "this file";
|
|
318
342
|
readonly download: "Download";
|
|
319
343
|
readonly loadingPreview: "Loading preview…";
|
|
320
|
-
readonly poweredByBelong: "Powered by Belong";
|
|
321
344
|
readonly devDefault: "default";
|
|
322
345
|
readonly devModelIdPlaceholder: "model id (blank = env default)";
|
|
323
346
|
readonly devModelIdTitle: "Exact model id for the selected provider — overrides the env pin";
|
|
@@ -474,6 +497,7 @@ export declare const en: {
|
|
|
474
497
|
readonly callScreen: {
|
|
475
498
|
readonly title: "Voice call";
|
|
476
499
|
readonly connecting: "Connecting the call…";
|
|
500
|
+
readonly reconnecting: "Reconnecting the call…";
|
|
477
501
|
readonly listening: "Listening";
|
|
478
502
|
readonly speaking: "Speaking";
|
|
479
503
|
readonly working: "Working on it…";
|
|
@@ -481,6 +505,7 @@ export declare const en: {
|
|
|
481
505
|
readonly youSaid: "You said";
|
|
482
506
|
readonly agentSaid: "Agent";
|
|
483
507
|
readonly speakHint: "Speak to the agent…";
|
|
508
|
+
readonly tapToHear: "Tap to hear the call";
|
|
484
509
|
readonly readyHint: "I'm listening — speak when you're ready.";
|
|
485
510
|
readonly thinkingHint: "Thinking…";
|
|
486
511
|
readonly speakingHint: "Speaking…";
|
|
@@ -501,13 +526,9 @@ export declare const en: {
|
|
|
501
526
|
readonly phaseCoding: "Putting the steps together";
|
|
502
527
|
readonly phaseFiles: "Going through your data";
|
|
503
528
|
readonly phaseActions: "Running the steps";
|
|
504
|
-
readonly
|
|
529
|
+
readonly agentStatus: "Agent status";
|
|
505
530
|
readonly lineLabel: "Agent {{line}}";
|
|
506
531
|
readonly mainAgentLabel: "Main agent";
|
|
507
|
-
readonly roleLabelMain: "Main agent";
|
|
508
|
-
readonly roleLabelData: "{{product}} data agent";
|
|
509
|
-
readonly roleLabelDataGeneric: "Data agent";
|
|
510
|
-
readonly roleLabelAnalyst: "Analyst";
|
|
511
532
|
readonly lineNeedsApproval: "Needs your OK";
|
|
512
533
|
readonly lineWorking: "Working…";
|
|
513
534
|
readonly lineReady: "Done";
|
|
@@ -31,7 +31,6 @@ export declare const embedMiscEn: {
|
|
|
31
31
|
readonly thisFile: "this file";
|
|
32
32
|
readonly download: "Download";
|
|
33
33
|
readonly loadingPreview: "Loading preview…";
|
|
34
|
-
readonly poweredByBelong: "Powered by Belong";
|
|
35
34
|
readonly devDefault: "default";
|
|
36
35
|
readonly devModelIdPlaceholder: "model id (blank = env default)";
|
|
37
36
|
readonly devModelIdTitle: "Exact model id for the selected provider — overrides the env pin";
|
|
@@ -77,7 +76,6 @@ export declare const embedMiscEs: {
|
|
|
77
76
|
thisFile: string;
|
|
78
77
|
download: string;
|
|
79
78
|
loadingPreview: string;
|
|
80
|
-
poweredByBelong: string;
|
|
81
79
|
devDefault: string;
|
|
82
80
|
devModelIdPlaceholder: string;
|
|
83
81
|
devModelIdTitle: string;
|
|
@@ -123,7 +121,6 @@ export declare const embedMiscPt: {
|
|
|
123
121
|
thisFile: string;
|
|
124
122
|
download: string;
|
|
125
123
|
loadingPreview: string;
|
|
126
|
-
poweredByBelong: string;
|
|
127
124
|
devDefault: string;
|
|
128
125
|
devModelIdPlaceholder: string;
|
|
129
126
|
devModelIdTitle: string;
|
|
@@ -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";
|
|
@@ -55,9 +63,27 @@ export declare const streamEn: {
|
|
|
55
63
|
readonly browserAssertCreated: "Checked for an existing resource";
|
|
56
64
|
readonly browserRefreshView: "Refreshed the page";
|
|
57
65
|
readonly failedBadge: "failed";
|
|
66
|
+
readonly actionReadFile: "Read a file";
|
|
67
|
+
readonly actionWroteFile: "Updated a file";
|
|
68
|
+
readonly actionPublishedArtifact: "Put a report on screen";
|
|
69
|
+
readonly actionLookedUpSkill: "Looked up a skill";
|
|
70
|
+
readonly actionSubTask: "Worked through a sub-task";
|
|
71
|
+
readonly actionMadePlan: "Put a plan together";
|
|
72
|
+
readonly actionCheckedRules: "Checked the rules";
|
|
73
|
+
readonly actionScheduledTask: "Set up a scheduled task";
|
|
74
|
+
/** A tool this build has no copy for — a neutral line, never its name. */
|
|
75
|
+
readonly actionGeneric: "Worked on it";
|
|
58
76
|
readonly executingTasks: "Working on it…";
|
|
59
77
|
readonly workedSteps_one: "Worked · {{count}} step";
|
|
60
78
|
readonly workedSteps_other: "Worked · {{count}} steps";
|
|
79
|
+
readonly subagentRunning: "Subagent · {{description}}…";
|
|
80
|
+
readonly subagentDone: "Subagent · {{description}}";
|
|
81
|
+
readonly subagentDoneSteps_one: "Subagent · {{description}} · {{count}} step";
|
|
82
|
+
readonly subagentDoneSteps_other: "Subagent · {{description}} · {{count}} steps";
|
|
83
|
+
readonly subagentFailed: "Subagent · {{description}} · didn't finish";
|
|
84
|
+
readonly subagentTimedOut: "Subagent · {{description}} · ran out of time";
|
|
85
|
+
/** Attribution chip on an inner tool card. Attribution, not nesting. */
|
|
86
|
+
readonly subagentVia: "via {{name}}";
|
|
61
87
|
readonly cliAuthStop: {
|
|
62
88
|
readonly noGrant: "Connect to Simetrik to continue";
|
|
63
89
|
readonly reconnectFailed: "Couldn't connect to Simetrik";
|
|
@@ -109,6 +135,14 @@ export declare const streamEs: {
|
|
|
109
135
|
toolGenericDone: string;
|
|
110
136
|
toolGenericFailed: string;
|
|
111
137
|
toolGenericDetail: string;
|
|
138
|
+
toolRememberRunning: string;
|
|
139
|
+
toolRememberDone: string;
|
|
140
|
+
toolRememberFailed: string;
|
|
141
|
+
toolRememberDetail: string;
|
|
142
|
+
toolForgetRunning: string;
|
|
143
|
+
toolForgetDone: string;
|
|
144
|
+
toolForgetFailed: string;
|
|
145
|
+
toolForgetDetail: string;
|
|
112
146
|
browserSnapshot: string;
|
|
113
147
|
browserRead: string;
|
|
114
148
|
browserClick: string;
|
|
@@ -120,9 +154,25 @@ export declare const streamEs: {
|
|
|
120
154
|
browserAssertCreated: string;
|
|
121
155
|
browserRefreshView: string;
|
|
122
156
|
failedBadge: string;
|
|
157
|
+
actionReadFile: string;
|
|
158
|
+
actionWroteFile: string;
|
|
159
|
+
actionPublishedArtifact: string;
|
|
160
|
+
actionLookedUpSkill: string;
|
|
161
|
+
actionSubTask: string;
|
|
162
|
+
actionMadePlan: string;
|
|
163
|
+
actionCheckedRules: string;
|
|
164
|
+
actionScheduledTask: string;
|
|
165
|
+
actionGeneric: string;
|
|
123
166
|
executingTasks: string;
|
|
124
167
|
workedSteps_one: string;
|
|
125
168
|
workedSteps_other: string;
|
|
169
|
+
subagentRunning: string;
|
|
170
|
+
subagentDone: string;
|
|
171
|
+
subagentDoneSteps_one: string;
|
|
172
|
+
subagentDoneSteps_other: string;
|
|
173
|
+
subagentFailed: string;
|
|
174
|
+
subagentTimedOut: string;
|
|
175
|
+
subagentVia: string;
|
|
126
176
|
cliAuthStop: {
|
|
127
177
|
noGrant: string;
|
|
128
178
|
reconnectFailed: string;
|
|
@@ -174,6 +224,14 @@ export declare const streamPt: {
|
|
|
174
224
|
toolGenericDone: string;
|
|
175
225
|
toolGenericFailed: string;
|
|
176
226
|
toolGenericDetail: string;
|
|
227
|
+
toolRememberRunning: string;
|
|
228
|
+
toolRememberDone: string;
|
|
229
|
+
toolRememberFailed: string;
|
|
230
|
+
toolRememberDetail: string;
|
|
231
|
+
toolForgetRunning: string;
|
|
232
|
+
toolForgetDone: string;
|
|
233
|
+
toolForgetFailed: string;
|
|
234
|
+
toolForgetDetail: string;
|
|
177
235
|
browserSnapshot: string;
|
|
178
236
|
browserRead: string;
|
|
179
237
|
browserClick: string;
|
|
@@ -185,9 +243,25 @@ export declare const streamPt: {
|
|
|
185
243
|
browserAssertCreated: string;
|
|
186
244
|
browserRefreshView: string;
|
|
187
245
|
failedBadge: string;
|
|
246
|
+
actionReadFile: string;
|
|
247
|
+
actionWroteFile: string;
|
|
248
|
+
actionPublishedArtifact: string;
|
|
249
|
+
actionLookedUpSkill: string;
|
|
250
|
+
actionSubTask: string;
|
|
251
|
+
actionMadePlan: string;
|
|
252
|
+
actionCheckedRules: string;
|
|
253
|
+
actionScheduledTask: string;
|
|
254
|
+
actionGeneric: string;
|
|
188
255
|
executingTasks: string;
|
|
189
256
|
workedSteps_one: string;
|
|
190
257
|
workedSteps_other: string;
|
|
258
|
+
subagentRunning: string;
|
|
259
|
+
subagentDone: string;
|
|
260
|
+
subagentDoneSteps_one: string;
|
|
261
|
+
subagentDoneSteps_other: string;
|
|
262
|
+
subagentFailed: string;
|
|
263
|
+
subagentTimedOut: string;
|
|
264
|
+
subagentVia: string;
|
|
191
265
|
cliAuthStop: {
|
|
192
266
|
noGrant: string;
|
|
193
267
|
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;
|