@belonguniverseai/react-sdk 0.6.27 → 0.6.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -0
- package/dist/api/account-scope.d.ts +75 -0
- package/dist/api/client-identity.d.ts +3 -1
- package/dist/api/client.d.ts +592 -96
- package/dist/api/live-artifacts.d.ts +197 -0
- package/dist/api/my-usage.d.ts +28 -0
- package/dist/api/queries.d.ts +6 -4
- package/dist/api/query-keys.d.ts +44 -3
- package/dist/api/task-schedules.d.ts +2 -2
- package/dist/app/dock-story-data.d.ts +4 -1
- package/dist/component/BelongWidget.d.ts +4 -1
- package/dist/component/{abnfDiagram-N423BO3Z-DrnjkZwk.js → abnfDiagram-N423BO3Z-BGC_KU0K.js} +4 -4
- package/dist/component/{arc-CLchGzOM.js → arc-BpIEtZvJ.js} +2 -2
- package/dist/component/{architectureDiagram-T3A2C74G-Du8PLen3.js → architectureDiagram-T3A2C74G-DYlEVfnh.js} +3 -3
- package/dist/component/{blockDiagram-VBNYF7ZC-BxmYbrlL.js → blockDiagram-VBNYF7ZC-BWDnhAW1.js} +4 -4
- package/dist/component/{c4Diagram-5PPSVZJV-DHiwlK7l.js → c4Diagram-5PPSVZJV-VKL0Shn2.js} +3 -3
- package/dist/component/{channel-C2eeNEMi.js → channel-gGd0pNDR.js} +2 -2
- package/dist/component/{chunk-2GRJ4B5K-D6I_U4nB.js → chunk-2GRJ4B5K-CEt4y1jX.js} +2 -2
- package/dist/component/{chunk-2Q5K7J3B-BR3JSmNI.js → chunk-2Q5K7J3B-Dj2wrNzr.js} +2 -2
- package/dist/component/{chunk-5RXB4S5H-DcmzyncC.js → chunk-5RXB4S5H-oJQEn1bH.js} +5 -5
- package/dist/component/{chunk-5VM5RSS4-8ww1xEAz.js → chunk-5VM5RSS4-DddP8MPP.js} +2 -2
- package/dist/component/{chunk-6Q2QTUOP-Chlg3gnC.js → chunk-6Q2QTUOP-CppUJwrF.js} +2 -2
- package/dist/component/{chunk-GF5L2VYU-CgKydjVC.js → chunk-GF5L2VYU--hyUlO9v.js} +6 -6
- package/dist/component/{chunk-JWPE2WC7-13zVpFYT.js → chunk-JWPE2WC7-CN0Ieqel.js} +2 -2
- package/dist/component/{chunk-KBJHAD2P-CP28c_dJ.js → chunk-KBJHAD2P-BWhCQoHz.js} +2 -2
- package/dist/component/{chunk-RYQCIY6F-CaHaa77d.js → chunk-RYQCIY6F-BgNewpQe.js} +2 -2
- package/dist/component/{chunk-XXDRQBXY-Cd0yVkqx.js → chunk-XXDRQBXY-mNH171OF.js} +2 -2
- package/dist/component/{classDiagram-JCYQIIEL-Bn0740dK.js → classDiagram-JCYQIIEL-UjZbWotD.js} +3 -3
- package/dist/component/{classDiagram-v2-OCEON4UE-Bn0740dK.js → classDiagram-v2-OCEON4UE-UjZbWotD.js} +3 -3
- package/dist/component/{cose-bilkent-JH36ORCC-Y6CvxIe4.js → cose-bilkent-JH36ORCC-lsVWGlMj.js} +2 -2
- package/dist/component/{cynefinDiagram-MW4NZA55-BJ_o5gyM.js → cynefinDiagram-MW4NZA55-B5Ss0zoy.js} +3 -3
- package/dist/component/{dagre-VZM6K2ZE-Ce_ZLKlj.js → dagre-VZM6K2ZE-DisWRVfU.js} +3 -3
- package/dist/component/{diagram-7IWD3JNH-K8E_XdII.js → diagram-7IWD3JNH-B2QrdsOh.js} +4 -4
- package/dist/component/{diagram-B4RE2ZJO-DZGs1RuF.js → diagram-B4RE2ZJO-Bs8l4THz.js} +3 -3
- package/dist/component/{diagram-LBJQPF4R-CzKPOqJK.js → diagram-LBJQPF4R-JTadtYMW.js} +3 -3
- package/dist/component/{diagram-Q27KOJAE-UItKj-dk.js → diagram-Q27KOJAE-BQC33flc.js} +4 -4
- package/dist/component/{diagram-UB23O5K3-ZxBLx0B9.js → diagram-UB23O5K3-ujC22dQx.js} +3 -3
- package/dist/component/{ebnfDiagram-BXEA7PRR-BIS2pIB5.js → ebnfDiagram-BXEA7PRR-0WnF2wzt.js} +4 -4
- package/dist/component/{erDiagram-JOGREHBK-BNZB6-ZZ.js → erDiagram-JOGREHBK-CqgMsd5R.js} +5 -5
- package/dist/component/{flowDiagram-UKHOOZJN-B8H3ZNjd.js → flowDiagram-UKHOOZJN-BOM0P8Mk.js} +7 -7
- package/dist/component/{ganttDiagram-PKOTCBZU-2JJJVAY-.js → ganttDiagram-PKOTCBZU-WeRFC1th.js} +3 -3
- package/dist/component/{gitGraphDiagram-DS77QQ5N-BVWxsX1D.js → gitGraphDiagram-DS77QQ5N-CS8L-BA8.js} +4 -4
- package/dist/component/{highlighted-body-OFNGDK62-CmQzAJHd.js → highlighted-body-OFNGDK62-CGejnMyq.js} +2 -2
- package/dist/component/index.js +2 -2
- package/dist/component/{infoDiagram-6WML65LV-B-7B2PTM.js → infoDiagram-6WML65LV-CQQhytkd.js} +2 -2
- package/dist/component/{ishikawaDiagram-WSZJBQD7-DgjY91jV.js → ishikawaDiagram-WSZJBQD7-CjDo3-zt.js} +2 -2
- package/dist/component/{journeyDiagram-NVQOT4AX-fkb_5H2H.js → journeyDiagram-NVQOT4AX-BCCoblta.js} +5 -5
- package/dist/component/{kanban-definition-27J2QSJJ-ZRQERkli.js → kanban-definition-27J2QSJJ-DgTIrgvB.js} +3 -3
- package/dist/component/{linear-DX0_iAiu.js → linear-BOaza_dp.js} +2 -2
- package/dist/component/{mermaid-GHXKKRXX-BhURR8Q_.js → mermaid-GHXKKRXX-BAq5-Vj8.js} +50846 -47377
- package/dist/component/{mindmap-definition-FAOFIHXS-Duc36TEr.js → mindmap-definition-FAOFIHXS-D1oolR3A.js} +4 -4
- package/dist/component/{pegDiagram-VL7TDLO6-Egcz9GLB.js → pegDiagram-VL7TDLO6-C9UxqvBP.js} +4 -4
- package/dist/component/{pieDiagram-7S7Q4E2Y-DEe2GHp7.js → pieDiagram-7S7Q4E2Y-I5IXzOZM.js} +4 -4
- package/dist/component/{quadrantDiagram-CIZ2JOQS-DNfio-6s.js → quadrantDiagram-CIZ2JOQS-DPDFBhEd.js} +3 -3
- package/dist/component/{railroadDiagram-AXF67PYL-B3lRYedY.js → railroadDiagram-AXF67PYL-DIAkhVTf.js} +4 -4
- package/dist/component/{requirementDiagram-LRYGKXZP-DYYxC0Cg.js → requirementDiagram-LRYGKXZP-DBEmV-Qy.js} +4 -4
- package/dist/component/{sankeyDiagram-W5VNT64P-CKQNueMs.js → sankeyDiagram-W5VNT64P-BEeDyDj7.js} +2 -2
- package/dist/component/{sequenceDiagram-SI44F4Z6-ChF8pgI7.js → sequenceDiagram-SI44F4Z6-WYcXWUHF.js} +4 -4
- package/dist/component/{sizeCapture-X5ZJPWSS-BQyVznxb.js → sizeCapture-X5ZJPWSS-BqDBRpiS.js} +2 -2
- package/dist/component/{stateDiagram-OKZ733FA-CAVOTaJQ.js → stateDiagram-OKZ733FA-CfYfR0OH.js} +3 -3
- package/dist/component/{stateDiagram-v2-UEYNNEHI-rGNqHCbu.js → stateDiagram-v2-UEYNNEHI-BSa2VwcQ.js} +3 -3
- package/dist/component/{swimlanes-SLNWSIFB-j8tXsaid.js → swimlanes-SLNWSIFB-C-7mrC4X.js} +4 -4
- package/dist/component/{swimlanesDiagram-ULZ7WXOC-CsbepRMA.js → swimlanesDiagram-ULZ7WXOC-DXcMd7U4.js} +3 -3
- package/dist/component/{timeline-definition-Z64GVDOM-nCRE1AQh.js → timeline-definition-Z64GVDOM-Dp65E80E.js} +3 -3
- package/dist/component/{vennDiagram-T6HMQDX7-C3ubGm9c.js → vennDiagram-T6HMQDX7-CRpZ12TH.js} +2 -2
- package/dist/component/{wardleyDiagram-T6FBY63Y-mKT8yN1z.js → wardleyDiagram-T6FBY63Y-BupsM8K3.js} +3 -3
- package/dist/component/{xychartDiagram-ELKLHX3M-D5AF8jgv.js → xychartDiagram-ELKLHX3M-CUnr8Qbu.js} +3 -3
- package/dist/components/artifacts/ArtifactDetailSurface.d.ts +37 -0
- package/dist/components/artifacts/ArtifactMeta.d.ts +10 -0
- package/dist/components/artifacts/ArtifactsListSurface.d.ts +11 -0
- package/dist/components/artifacts/BindScheduleDialog.d.ts +39 -0
- package/dist/components/artifacts/ConfirmDeleteArtifactDialog.d.ts +9 -0
- package/dist/components/artifacts/ConfirmReshareDialog.d.ts +24 -0
- package/dist/components/artifacts/artifact-format.d.ts +38 -0
- package/dist/components/artifacts/open-artifact-version.d.ts +16 -0
- package/dist/components/artifacts/use-artifact-actions.d.ts +32 -0
- package/dist/components/embed/EmbedComposer.d.ts +5 -1
- package/dist/components/embed/EmbedRail.d.ts +9 -2
- package/dist/components/embed/MobileNavBar.d.ts +2 -1
- package/dist/components/embed/ResponseModeDial.d.ts +11 -0
- package/dist/components/embed/SessionStatsPanel.d.ts +3 -0
- package/dist/components/embed/UsageSettings.d.ts +11 -0
- package/dist/components/embed/format-compact-number.d.ts +8 -0
- package/dist/components/embed/use-artifact-operation-notices.d.ts +1 -0
- package/dist/embed/artifact-action-bridge.d.ts +2 -0
- package/dist/embed/dock-state.d.ts +1 -1
- package/dist/embed/global.d.ts +2 -0
- package/dist/embed/presets.d.ts +1 -0
- package/dist/embed/response-mode.d.ts +48 -0
- package/dist/embed/theme.d.ts +5 -0
- package/dist/i18n/messages/en.d.ts +118 -5
- package/dist/i18n/messages/surfaces/artifacts.d.ts +304 -0
- package/dist/i18n/messages/surfaces/header.d.ts +4 -0
- package/dist/i18n/messages/surfaces/myUsage.d.ts +75 -0
- package/dist/i18n/messages/surfaces/settings.d.ts +12 -0
- package/dist/i18n/messages/surfaces/stats.d.ts +4 -12
- package/dist/i18n/messages/surfaces/stream.d.ts +88 -0
- package/dist/i18n/messages/surfaces/usage.d.ts +0 -8
- package/dist/infrastructure/telemetry/first-response-timing.d.ts +51 -0
- package/dist/lib/use-now.d.ts +32 -0
- package/dist/routes/artifact-detail.d.ts +2 -0
- package/dist/routes/artifacts.d.ts +2 -0
- package/dist/routes/chat/transcript-row.d.ts +1 -0
- package/dist/stream/belong-chat-transport.d.ts +30 -2
- package/dist/stream/belong-data-parts.d.ts +10 -0
- package/dist/stream/message-parts.d.ts +3 -1
- package/dist/stream/queued-message-outbox.d.ts +5 -0
- package/dist/stream/select-session-usage.d.ts +9 -0
- package/dist/stream/session-stats-csv.d.ts +7 -9
- package/dist/types/public.d.ts +4 -4
- package/package.json +1 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Settings → Usage view (plan 018): the user's own consumption.
|
|
3
|
+
*
|
|
4
|
+
* The figure is weighted tokens internally, but users only ever see "tokens":
|
|
5
|
+
* no copy here may say "weighted" (or "ponderados"), name the formula, or hint
|
|
6
|
+
* that token kinds count differently.
|
|
7
|
+
*/
|
|
8
|
+
export declare const myUsageEn: {
|
|
9
|
+
readonly myUsage: {
|
|
10
|
+
readonly thisMonth: "This month";
|
|
11
|
+
readonly today: "Today";
|
|
12
|
+
readonly last30Days: "Last 30 days";
|
|
13
|
+
readonly unit: "tokens";
|
|
14
|
+
readonly explainer: "Tokens measure all the work the agent does for you. Days are counted in UTC.";
|
|
15
|
+
readonly dayValue: "{{date}}: {{tokens}} tokens";
|
|
16
|
+
readonly chartLabel: "Tokens per day over the last 30 days";
|
|
17
|
+
readonly empty: "No usage in the last 30 days.";
|
|
18
|
+
readonly updated: "Updated {{time}} UTC";
|
|
19
|
+
readonly loading: "Loading your usage…";
|
|
20
|
+
readonly loadError: "Couldn't load your usage.";
|
|
21
|
+
readonly retry: "Try again";
|
|
22
|
+
readonly unavailable: "Usage isn't available here yet.";
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const myUsageEs: {
|
|
26
|
+
myUsage: {
|
|
27
|
+
thisMonth: string;
|
|
28
|
+
today: string;
|
|
29
|
+
last30Days: string;
|
|
30
|
+
unit: string;
|
|
31
|
+
explainer: string;
|
|
32
|
+
dayValue: string;
|
|
33
|
+
chartLabel: string;
|
|
34
|
+
empty: string;
|
|
35
|
+
updated: string;
|
|
36
|
+
loading: string;
|
|
37
|
+
loadError: string;
|
|
38
|
+
retry: string;
|
|
39
|
+
unavailable: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export declare const myUsagePt: {
|
|
43
|
+
myUsage: {
|
|
44
|
+
thisMonth: string;
|
|
45
|
+
today: string;
|
|
46
|
+
last30Days: string;
|
|
47
|
+
unit: string;
|
|
48
|
+
explainer: string;
|
|
49
|
+
dayValue: string;
|
|
50
|
+
chartLabel: string;
|
|
51
|
+
empty: string;
|
|
52
|
+
updated: string;
|
|
53
|
+
loading: string;
|
|
54
|
+
loadError: string;
|
|
55
|
+
retry: string;
|
|
56
|
+
unavailable: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export declare const myUsageIt: {
|
|
60
|
+
myUsage: {
|
|
61
|
+
thisMonth: string;
|
|
62
|
+
today: string;
|
|
63
|
+
last30Days: string;
|
|
64
|
+
unit: string;
|
|
65
|
+
explainer: string;
|
|
66
|
+
dayValue: string;
|
|
67
|
+
chartLabel: string;
|
|
68
|
+
empty: string;
|
|
69
|
+
updated: string;
|
|
70
|
+
loading: string;
|
|
71
|
+
loadError: string;
|
|
72
|
+
retry: string;
|
|
73
|
+
unavailable: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
@@ -14,6 +14,8 @@ export declare const settingsEn: {
|
|
|
14
14
|
voiceDescription: string;
|
|
15
15
|
history: string;
|
|
16
16
|
historyDescription: string;
|
|
17
|
+
usage: string;
|
|
18
|
+
usageDescription: string;
|
|
17
19
|
about: string;
|
|
18
20
|
aboutDescription: string;
|
|
19
21
|
apiKeys: string;
|
|
@@ -46,6 +48,7 @@ export declare const settingsEn: {
|
|
|
46
48
|
light: string;
|
|
47
49
|
dark: string;
|
|
48
50
|
presetDescription: string;
|
|
51
|
+
tenantDefault: string;
|
|
49
52
|
advancedAppearance: string;
|
|
50
53
|
advancedDescription: string;
|
|
51
54
|
readRepliesDescription: string;
|
|
@@ -75,6 +78,8 @@ export declare const settingsEs: {
|
|
|
75
78
|
voiceDescription: string;
|
|
76
79
|
history: string;
|
|
77
80
|
historyDescription: string;
|
|
81
|
+
usage: string;
|
|
82
|
+
usageDescription: string;
|
|
78
83
|
about: string;
|
|
79
84
|
aboutDescription: string;
|
|
80
85
|
apiKeys: string;
|
|
@@ -107,6 +112,7 @@ export declare const settingsEs: {
|
|
|
107
112
|
light: string;
|
|
108
113
|
dark: string;
|
|
109
114
|
presetDescription: string;
|
|
115
|
+
tenantDefault: string;
|
|
110
116
|
advancedAppearance: string;
|
|
111
117
|
advancedDescription: string;
|
|
112
118
|
readRepliesDescription: string;
|
|
@@ -136,6 +142,8 @@ export declare const settingsPt: {
|
|
|
136
142
|
voiceDescription: string;
|
|
137
143
|
history: string;
|
|
138
144
|
historyDescription: string;
|
|
145
|
+
usage: string;
|
|
146
|
+
usageDescription: string;
|
|
139
147
|
about: string;
|
|
140
148
|
aboutDescription: string;
|
|
141
149
|
apiKeys: string;
|
|
@@ -168,6 +176,7 @@ export declare const settingsPt: {
|
|
|
168
176
|
light: string;
|
|
169
177
|
dark: string;
|
|
170
178
|
presetDescription: string;
|
|
179
|
+
tenantDefault: string;
|
|
171
180
|
advancedAppearance: string;
|
|
172
181
|
advancedDescription: string;
|
|
173
182
|
readRepliesDescription: string;
|
|
@@ -197,6 +206,8 @@ export declare const settingsIt: {
|
|
|
197
206
|
voiceDescription: string;
|
|
198
207
|
history: string;
|
|
199
208
|
historyDescription: string;
|
|
209
|
+
usage: string;
|
|
210
|
+
usageDescription: string;
|
|
200
211
|
about: string;
|
|
201
212
|
aboutDescription: string;
|
|
202
213
|
apiKeys: string;
|
|
@@ -229,6 +240,7 @@ export declare const settingsIt: {
|
|
|
229
240
|
light: string;
|
|
230
241
|
dark: string;
|
|
231
242
|
presetDescription: string;
|
|
243
|
+
tenantDefault: string;
|
|
232
244
|
advancedAppearance: string;
|
|
233
245
|
advancedDescription: string;
|
|
234
246
|
readRepliesDescription: string;
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
export declare const statsEn: {
|
|
3
3
|
readonly stats: {
|
|
4
4
|
readonly title: "Session stats";
|
|
5
|
-
readonly
|
|
6
|
-
readonly output: "Output";
|
|
7
|
-
readonly total: "Total";
|
|
5
|
+
readonly tokens: "Tokens";
|
|
8
6
|
readonly timeRunning: "Time running";
|
|
9
7
|
readonly turns: "Turns";
|
|
10
8
|
readonly toolCalls: "Tool calls";
|
|
@@ -20,9 +18,7 @@ export declare const statsEn: {
|
|
|
20
18
|
export declare const statsEs: {
|
|
21
19
|
stats: {
|
|
22
20
|
title: string;
|
|
23
|
-
|
|
24
|
-
output: string;
|
|
25
|
-
total: string;
|
|
21
|
+
tokens: string;
|
|
26
22
|
timeRunning: string;
|
|
27
23
|
turns: string;
|
|
28
24
|
toolCalls: string;
|
|
@@ -38,9 +34,7 @@ export declare const statsEs: {
|
|
|
38
34
|
export declare const statsPt: {
|
|
39
35
|
stats: {
|
|
40
36
|
title: string;
|
|
41
|
-
|
|
42
|
-
output: string;
|
|
43
|
-
total: string;
|
|
37
|
+
tokens: string;
|
|
44
38
|
timeRunning: string;
|
|
45
39
|
turns: string;
|
|
46
40
|
toolCalls: string;
|
|
@@ -56,9 +50,7 @@ export declare const statsPt: {
|
|
|
56
50
|
export declare const statsIt: {
|
|
57
51
|
stats: {
|
|
58
52
|
title: string;
|
|
59
|
-
|
|
60
|
-
output: string;
|
|
61
|
-
total: string;
|
|
53
|
+
tokens: string;
|
|
62
54
|
timeRunning: string;
|
|
63
55
|
turns: string;
|
|
64
56
|
toolCalls: string;
|
|
@@ -78,14 +78,35 @@ export declare const streamEn: {
|
|
|
78
78
|
readonly toolForgetDone: "Forgot a note";
|
|
79
79
|
readonly toolForgetFailed: "Couldn't forget the note";
|
|
80
80
|
readonly toolForgetDetail: "Deleted a saved note about you.";
|
|
81
|
+
readonly toolUsageRunning: "Checking your usage";
|
|
82
|
+
readonly toolUsageDone: "Checked your usage";
|
|
83
|
+
readonly toolUsageFailed: "Couldn't check your usage";
|
|
84
|
+
readonly toolUsageDetail: "Looked up how many tokens you've used.";
|
|
81
85
|
readonly toolCheckBackgroundRunning: "Checking a background command";
|
|
82
86
|
readonly toolCheckBackgroundDone: "Checked a background command";
|
|
83
87
|
readonly toolCheckBackgroundFailed: "Couldn't check the background command";
|
|
84
88
|
readonly toolCheckBackgroundDetail: "Read what a command running in the background wrote.";
|
|
89
|
+
readonly toolWaitBackgroundRunning: "Waiting for a background command";
|
|
90
|
+
readonly toolWaitBackgroundDone: "Waited for a background command";
|
|
91
|
+
readonly toolWaitBackgroundFailed: "Couldn't wait for the background command";
|
|
92
|
+
readonly toolWaitBackgroundDetail: "Waited for a command running in the background to finish.";
|
|
85
93
|
readonly toolStopBackgroundRunning: "Stopping a background command";
|
|
86
94
|
readonly toolStopBackgroundDone: "Stopped a background command";
|
|
87
95
|
readonly toolStopBackgroundFailed: "Couldn't stop the background command";
|
|
88
96
|
readonly toolStopBackgroundDetail: "Stopped a command that was running in the background.";
|
|
97
|
+
readonly toolReadFileRunning: "Reading {{file}}";
|
|
98
|
+
readonly toolReadFileDone: "Read {{file}}";
|
|
99
|
+
readonly toolReadFileFailed: "Couldn't read {{file}}";
|
|
100
|
+
readonly toolReadFileDetail: "Read {{path}}.";
|
|
101
|
+
readonly toolWriteFileRunning: "Writing {{file}}";
|
|
102
|
+
readonly toolWriteFileDone: "Wrote {{file}}";
|
|
103
|
+
readonly toolWriteFileFailed: "Couldn't write {{file}}";
|
|
104
|
+
readonly toolWriteFileDetail: "Wrote {{path}}.";
|
|
105
|
+
readonly toolEditFileRunning: "Editing {{file}}";
|
|
106
|
+
readonly toolEditFileDone: "Edited {{file}}";
|
|
107
|
+
readonly toolEditFileFailed: "Couldn't edit {{file}}";
|
|
108
|
+
readonly toolEditFileDetail: "Edited {{path}}.";
|
|
109
|
+
readonly toolFileUnnamed: "a file";
|
|
89
110
|
readonly toolSaveSkillRunning: "Saving a skill";
|
|
90
111
|
readonly toolSaveSkillDone: "Saved a skill";
|
|
91
112
|
readonly toolSaveSkillFailed: "Couldn't save the skill";
|
|
@@ -110,6 +131,7 @@ export declare const streamEn: {
|
|
|
110
131
|
readonly browserRefreshView: "Refreshed the page";
|
|
111
132
|
readonly failedBadge: "failed";
|
|
112
133
|
readonly actionReadFile: "Read a file";
|
|
134
|
+
readonly actionCheckedUsage: "Checked your usage";
|
|
113
135
|
readonly actionWroteFile: "Updated a file";
|
|
114
136
|
readonly actionPublishedArtifact: "Put a report on screen";
|
|
115
137
|
readonly actionLookedUpSkill: "Looked up a skill";
|
|
@@ -263,14 +285,35 @@ export declare const streamEs: {
|
|
|
263
285
|
toolForgetDone: string;
|
|
264
286
|
toolForgetFailed: string;
|
|
265
287
|
toolForgetDetail: string;
|
|
288
|
+
toolUsageRunning: string;
|
|
289
|
+
toolUsageDone: string;
|
|
290
|
+
toolUsageFailed: string;
|
|
291
|
+
toolUsageDetail: string;
|
|
266
292
|
toolCheckBackgroundRunning: string;
|
|
267
293
|
toolCheckBackgroundDone: string;
|
|
268
294
|
toolCheckBackgroundFailed: string;
|
|
269
295
|
toolCheckBackgroundDetail: string;
|
|
296
|
+
toolWaitBackgroundRunning: string;
|
|
297
|
+
toolWaitBackgroundDone: string;
|
|
298
|
+
toolWaitBackgroundFailed: string;
|
|
299
|
+
toolWaitBackgroundDetail: string;
|
|
270
300
|
toolStopBackgroundRunning: string;
|
|
271
301
|
toolStopBackgroundDone: string;
|
|
272
302
|
toolStopBackgroundFailed: string;
|
|
273
303
|
toolStopBackgroundDetail: string;
|
|
304
|
+
toolReadFileRunning: string;
|
|
305
|
+
toolReadFileDone: string;
|
|
306
|
+
toolReadFileFailed: string;
|
|
307
|
+
toolReadFileDetail: string;
|
|
308
|
+
toolWriteFileRunning: string;
|
|
309
|
+
toolWriteFileDone: string;
|
|
310
|
+
toolWriteFileFailed: string;
|
|
311
|
+
toolWriteFileDetail: string;
|
|
312
|
+
toolEditFileRunning: string;
|
|
313
|
+
toolEditFileDone: string;
|
|
314
|
+
toolEditFileFailed: string;
|
|
315
|
+
toolEditFileDetail: string;
|
|
316
|
+
toolFileUnnamed: string;
|
|
274
317
|
toolSaveSkillRunning: string;
|
|
275
318
|
toolSaveSkillDone: string;
|
|
276
319
|
toolSaveSkillFailed: string;
|
|
@@ -295,6 +338,7 @@ export declare const streamEs: {
|
|
|
295
338
|
browserRefreshView: string;
|
|
296
339
|
failedBadge: string;
|
|
297
340
|
actionReadFile: string;
|
|
341
|
+
actionCheckedUsage: string;
|
|
298
342
|
actionWroteFile: string;
|
|
299
343
|
actionPublishedArtifact: string;
|
|
300
344
|
actionLookedUpSkill: string;
|
|
@@ -445,14 +489,35 @@ export declare const streamPt: {
|
|
|
445
489
|
toolForgetDone: string;
|
|
446
490
|
toolForgetFailed: string;
|
|
447
491
|
toolForgetDetail: string;
|
|
492
|
+
toolUsageRunning: string;
|
|
493
|
+
toolUsageDone: string;
|
|
494
|
+
toolUsageFailed: string;
|
|
495
|
+
toolUsageDetail: string;
|
|
448
496
|
toolCheckBackgroundRunning: string;
|
|
449
497
|
toolCheckBackgroundDone: string;
|
|
450
498
|
toolCheckBackgroundFailed: string;
|
|
451
499
|
toolCheckBackgroundDetail: string;
|
|
500
|
+
toolWaitBackgroundRunning: string;
|
|
501
|
+
toolWaitBackgroundDone: string;
|
|
502
|
+
toolWaitBackgroundFailed: string;
|
|
503
|
+
toolWaitBackgroundDetail: string;
|
|
452
504
|
toolStopBackgroundRunning: string;
|
|
453
505
|
toolStopBackgroundDone: string;
|
|
454
506
|
toolStopBackgroundFailed: string;
|
|
455
507
|
toolStopBackgroundDetail: string;
|
|
508
|
+
toolReadFileRunning: string;
|
|
509
|
+
toolReadFileDone: string;
|
|
510
|
+
toolReadFileFailed: string;
|
|
511
|
+
toolReadFileDetail: string;
|
|
512
|
+
toolWriteFileRunning: string;
|
|
513
|
+
toolWriteFileDone: string;
|
|
514
|
+
toolWriteFileFailed: string;
|
|
515
|
+
toolWriteFileDetail: string;
|
|
516
|
+
toolEditFileRunning: string;
|
|
517
|
+
toolEditFileDone: string;
|
|
518
|
+
toolEditFileFailed: string;
|
|
519
|
+
toolEditFileDetail: string;
|
|
520
|
+
toolFileUnnamed: string;
|
|
456
521
|
toolSaveSkillRunning: string;
|
|
457
522
|
toolSaveSkillDone: string;
|
|
458
523
|
toolSaveSkillFailed: string;
|
|
@@ -477,6 +542,7 @@ export declare const streamPt: {
|
|
|
477
542
|
browserRefreshView: string;
|
|
478
543
|
failedBadge: string;
|
|
479
544
|
actionReadFile: string;
|
|
545
|
+
actionCheckedUsage: string;
|
|
480
546
|
actionWroteFile: string;
|
|
481
547
|
actionPublishedArtifact: string;
|
|
482
548
|
actionLookedUpSkill: string;
|
|
@@ -627,14 +693,35 @@ export declare const streamIt: {
|
|
|
627
693
|
toolForgetDone: string;
|
|
628
694
|
toolForgetFailed: string;
|
|
629
695
|
toolForgetDetail: string;
|
|
696
|
+
toolUsageRunning: string;
|
|
697
|
+
toolUsageDone: string;
|
|
698
|
+
toolUsageFailed: string;
|
|
699
|
+
toolUsageDetail: string;
|
|
630
700
|
toolCheckBackgroundRunning: string;
|
|
631
701
|
toolCheckBackgroundDone: string;
|
|
632
702
|
toolCheckBackgroundFailed: string;
|
|
633
703
|
toolCheckBackgroundDetail: string;
|
|
704
|
+
toolWaitBackgroundRunning: string;
|
|
705
|
+
toolWaitBackgroundDone: string;
|
|
706
|
+
toolWaitBackgroundFailed: string;
|
|
707
|
+
toolWaitBackgroundDetail: string;
|
|
634
708
|
toolStopBackgroundRunning: string;
|
|
635
709
|
toolStopBackgroundDone: string;
|
|
636
710
|
toolStopBackgroundFailed: string;
|
|
637
711
|
toolStopBackgroundDetail: string;
|
|
712
|
+
toolReadFileRunning: string;
|
|
713
|
+
toolReadFileDone: string;
|
|
714
|
+
toolReadFileFailed: string;
|
|
715
|
+
toolReadFileDetail: string;
|
|
716
|
+
toolWriteFileRunning: string;
|
|
717
|
+
toolWriteFileDone: string;
|
|
718
|
+
toolWriteFileFailed: string;
|
|
719
|
+
toolWriteFileDetail: string;
|
|
720
|
+
toolEditFileRunning: string;
|
|
721
|
+
toolEditFileDone: string;
|
|
722
|
+
toolEditFileFailed: string;
|
|
723
|
+
toolEditFileDetail: string;
|
|
724
|
+
toolFileUnnamed: string;
|
|
638
725
|
toolSaveSkillRunning: string;
|
|
639
726
|
toolSaveSkillDone: string;
|
|
640
727
|
toolSaveSkillFailed: string;
|
|
@@ -659,6 +746,7 @@ export declare const streamIt: {
|
|
|
659
746
|
browserRefreshView: string;
|
|
660
747
|
failedBadge: string;
|
|
661
748
|
actionReadFile: string;
|
|
749
|
+
actionCheckedUsage: string;
|
|
662
750
|
actionWroteFile: string;
|
|
663
751
|
actionPublishedArtifact: string;
|
|
664
752
|
actionLookedUpSkill: string;
|
|
@@ -9,7 +9,6 @@ export declare const usageEn: {
|
|
|
9
9
|
readonly closeContext: "Close context";
|
|
10
10
|
readonly currentPage: "Current page";
|
|
11
11
|
readonly windowTooltip: "Context window: {{used}} of {{window}} tokens used ({{pct}}%)";
|
|
12
|
-
readonly inOut: "Input {{in}} · output {{out}}";
|
|
13
12
|
readonly turnsThisSessionOne: "{{count}} turn this session";
|
|
14
13
|
readonly turnsThisSessionOther: "{{count}} turns this session";
|
|
15
14
|
readonly panel: {
|
|
@@ -23,7 +22,6 @@ export declare const usageEn: {
|
|
|
23
22
|
};
|
|
24
23
|
readonly freeSpace: "Free space";
|
|
25
24
|
readonly estimateNote: "Breakdown is estimated; the total is as reported by the model.";
|
|
26
|
-
readonly cacheLine: "Cache: {{read}} read · {{write}} written";
|
|
27
25
|
readonly autoCompact: "Auto-compact: {{pct}}% of budget";
|
|
28
26
|
};
|
|
29
27
|
readonly compactionLabel: "Auto-compact: {{used}} of {{limit}} characters used ({{pct}}%)";
|
|
@@ -41,7 +39,6 @@ export declare const usageEs: {
|
|
|
41
39
|
closeContext: string;
|
|
42
40
|
currentPage: string;
|
|
43
41
|
windowTooltip: string;
|
|
44
|
-
inOut: string;
|
|
45
42
|
turnsThisSessionOne: string;
|
|
46
43
|
turnsThisSessionOther: string;
|
|
47
44
|
panel: {
|
|
@@ -55,7 +52,6 @@ export declare const usageEs: {
|
|
|
55
52
|
};
|
|
56
53
|
freeSpace: string;
|
|
57
54
|
estimateNote: string;
|
|
58
|
-
cacheLine: string;
|
|
59
55
|
autoCompact: string;
|
|
60
56
|
};
|
|
61
57
|
compactionLabel: string;
|
|
@@ -73,7 +69,6 @@ export declare const usagePt: {
|
|
|
73
69
|
closeContext: string;
|
|
74
70
|
currentPage: string;
|
|
75
71
|
windowTooltip: string;
|
|
76
|
-
inOut: string;
|
|
77
72
|
turnsThisSessionOne: string;
|
|
78
73
|
turnsThisSessionOther: string;
|
|
79
74
|
panel: {
|
|
@@ -87,7 +82,6 @@ export declare const usagePt: {
|
|
|
87
82
|
};
|
|
88
83
|
freeSpace: string;
|
|
89
84
|
estimateNote: string;
|
|
90
|
-
cacheLine: string;
|
|
91
85
|
autoCompact: string;
|
|
92
86
|
};
|
|
93
87
|
compactionLabel: string;
|
|
@@ -105,7 +99,6 @@ export declare const usageIt: {
|
|
|
105
99
|
closeContext: string;
|
|
106
100
|
currentPage: string;
|
|
107
101
|
windowTooltip: string;
|
|
108
|
-
inOut: string;
|
|
109
102
|
turnsThisSessionOne: string;
|
|
110
103
|
turnsThisSessionOther: string;
|
|
111
104
|
panel: {
|
|
@@ -119,7 +112,6 @@ export declare const usageIt: {
|
|
|
119
112
|
};
|
|
120
113
|
freeSpace: string;
|
|
121
114
|
estimateNote: string;
|
|
122
|
-
cacheLine: string;
|
|
123
115
|
autoCompact: string;
|
|
124
116
|
};
|
|
125
117
|
compactionLabel: string;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export type FirstResponseKey = {
|
|
3
|
+
readonly sessionId: string;
|
|
4
|
+
readonly runId: string;
|
|
5
|
+
readonly clientMessageId: string;
|
|
6
|
+
};
|
|
7
|
+
export type FirstResponseObservation = FirstResponseKey & {
|
|
8
|
+
readonly phase: "acknowledgment" | "main";
|
|
9
|
+
};
|
|
10
|
+
export type FirstResponseSample = FirstResponseObservation & {
|
|
11
|
+
readonly postAcceptedMs: number;
|
|
12
|
+
readonly deliveryMs: number;
|
|
13
|
+
readonly renderMs?: number;
|
|
14
|
+
};
|
|
15
|
+
export declare const firstResponseObservationsSchema: z.ZodArray<z.ZodObject<{
|
|
16
|
+
sessionId: z.ZodString;
|
|
17
|
+
runId: z.ZodString;
|
|
18
|
+
clientMessageId: z.ZodString;
|
|
19
|
+
phase: z.ZodEnum<{
|
|
20
|
+
acknowledgment: "acknowledgment";
|
|
21
|
+
main: "main";
|
|
22
|
+
}>;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
/** One bounded registry per transport; history and reconnect never create entries. */
|
|
25
|
+
export declare const createFirstResponseTiming: (input: {
|
|
26
|
+
readonly nowMs: () => number;
|
|
27
|
+
readonly report: (sample: FirstResponseSample) => void;
|
|
28
|
+
}) => {
|
|
29
|
+
start: ({ clientMessageId }: {
|
|
30
|
+
readonly clientMessageId: string;
|
|
31
|
+
}) => void;
|
|
32
|
+
accepted: (key: FirstResponseKey & {
|
|
33
|
+
readonly sourceMessageId: string;
|
|
34
|
+
}) => void;
|
|
35
|
+
observations: (key: {
|
|
36
|
+
readonly sessionId: string;
|
|
37
|
+
readonly runId: string;
|
|
38
|
+
readonly sourceMessageIds: readonly string[];
|
|
39
|
+
readonly phase: FirstResponseObservation["phase"];
|
|
40
|
+
}) => readonly FirstResponseObservation[];
|
|
41
|
+
delivered: (observation: FirstResponseObservation) => void;
|
|
42
|
+
rendered: (observation: FirstResponseObservation) => void;
|
|
43
|
+
cancel: ({ clientMessageId }: {
|
|
44
|
+
readonly clientMessageId: string;
|
|
45
|
+
}) => void;
|
|
46
|
+
finishRun: (key: {
|
|
47
|
+
readonly sessionId: string;
|
|
48
|
+
readonly runId: string;
|
|
49
|
+
}) => void;
|
|
50
|
+
};
|
|
51
|
+
export declare const reportFirstResponseSample: (sample: FirstResponseSample) => void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The dock's clock, as one moving value every surface can read.
|
|
3
|
+
*
|
|
4
|
+
* Surfaces that say something about time — "Link works until…", "refreshed 2h
|
|
5
|
+
* ago", "hasn't refreshed since…" — used to capture `new Date()` in a
|
|
6
|
+
* `useState` initializer. That freezes the comparison at MOUNT: a link that
|
|
7
|
+
* expired four minutes ago was still offered as live, and an overdue warning
|
|
8
|
+
* never appeared, even after a refetch brought fresh rows (P2, 2026-09-27
|
|
9
|
+
* PR #614 deep audit finding 8). Server-side expiry is enforced, so the damage
|
|
10
|
+
* was a screen that lied, not access — which is exactly the kind of thing a
|
|
11
|
+
* reader stops trusting the rest of the surface over.
|
|
12
|
+
*
|
|
13
|
+
* ONE STORE, not a hook-local interval, and that is the point: every consumer
|
|
14
|
+
* in a render reads the SAME `Date` object. Two independent clocks a few
|
|
15
|
+
* milliseconds apart can straddle an expiry and render "live" beside "expired"
|
|
16
|
+
* in the same paint (§25), which is the bug the frozen `useState` was
|
|
17
|
+
* originally protecting against — this keeps that guarantee and adds movement.
|
|
18
|
+
*
|
|
19
|
+
* One interval for the whole SDK, started by the first subscriber and cleared
|
|
20
|
+
* by the last: nothing ticks while no surface is on screen, and a store that
|
|
21
|
+
* has been idle re-reads the wall clock when it starts again rather than
|
|
22
|
+
* handing out the instant it stopped at.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* How often the shared instant advances. Half a minute: everything the dock
|
|
26
|
+
* says about time is minute-scale or coarser ("works until 10:00", "2h ago"),
|
|
27
|
+
* so this is fine enough that no reader sees a stale answer, and coarse enough
|
|
28
|
+
* that an idle dock is not re-rendering its surfaces every second.
|
|
29
|
+
*/
|
|
30
|
+
export declare const NOW_TICK_MS = 30000;
|
|
31
|
+
/** The current instant, shared with every other consumer of this render. */
|
|
32
|
+
export declare const useNow: () => Date;
|
|
@@ -29,6 +29,7 @@ export type TranscriptRowWiring = {
|
|
|
29
29
|
readonly onGoalStartAnother: () => void;
|
|
30
30
|
};
|
|
31
31
|
export type TranscriptRowProps = {
|
|
32
|
+
readonly onFirstResponseRendered?: ComponentProps<typeof MessageParts>["onFirstResponseRendered"];
|
|
32
33
|
readonly message: BelongUIMessage;
|
|
33
34
|
/** This message's index in the FULL conversation (not the render window). */
|
|
34
35
|
readonly index: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ChatTransport, UIMessageChunk } from 'ai';
|
|
3
|
+
import { FirstResponseObservation, FirstResponseSample } from '../infrastructure/telemetry/first-response-timing.ts';
|
|
3
4
|
import { BelongUIMessage, WireStreamPart } from './belong-data-parts.ts';
|
|
4
5
|
declare const cancelRunResponseSchema: z.ZodObject<{
|
|
5
6
|
recalledMessages: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -22,9 +23,9 @@ export declare const choiceAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
22
23
|
export declare const choiceStateSchema: z.ZodEnum<{
|
|
23
24
|
cancelled: "cancelled";
|
|
24
25
|
pending: "pending";
|
|
25
|
-
detached: "detached";
|
|
26
26
|
dismissed: "dismissed";
|
|
27
27
|
answered: "answered";
|
|
28
|
+
detached: "detached";
|
|
28
29
|
}>;
|
|
29
30
|
/**
|
|
30
31
|
* The wire/stored part union. Exported so the history loader (chat.tsx) can
|
|
@@ -37,6 +38,14 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
37
38
|
type: z.ZodLiteral<"text">;
|
|
38
39
|
id: z.ZodString;
|
|
39
40
|
text: z.ZodString;
|
|
41
|
+
responsePhase: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
42
|
+
phase: z.ZodEnum<{
|
|
43
|
+
acknowledgment: "acknowledgment";
|
|
44
|
+
main: "main";
|
|
45
|
+
}>;
|
|
46
|
+
sourceMessageIds: z.ZodArray<z.ZodString>;
|
|
47
|
+
replyKey: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>>>;
|
|
40
49
|
}, z.core.$strip>, z.ZodObject<{
|
|
41
50
|
type: z.ZodLiteral<"data-reasoning">;
|
|
42
51
|
id: z.ZodString;
|
|
@@ -250,6 +259,7 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
250
259
|
count: z.ZodOptional<z.ZodNumber>;
|
|
251
260
|
}, z.core.$strip>>;
|
|
252
261
|
}, z.core.$strip>>;
|
|
262
|
+
weightedHundredths: z.ZodOptional<z.ZodNumber>;
|
|
253
263
|
}, z.core.$strip>;
|
|
254
264
|
}, z.core.$strip>, z.ZodObject<{
|
|
255
265
|
type: z.ZodLiteral<"data-choice-request">;
|
|
@@ -259,9 +269,9 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
259
269
|
state: z.ZodEnum<{
|
|
260
270
|
cancelled: "cancelled";
|
|
261
271
|
pending: "pending";
|
|
262
|
-
detached: "detached";
|
|
263
272
|
dismissed: "dismissed";
|
|
264
273
|
answered: "answered";
|
|
274
|
+
detached: "detached";
|
|
265
275
|
}>;
|
|
266
276
|
questions: z.ZodArray<z.ZodObject<{
|
|
267
277
|
id: z.ZodString;
|
|
@@ -434,6 +444,10 @@ export declare const RESUME_GRACE_MS = 120000;
|
|
|
434
444
|
* across tests in the same file otherwise). */
|
|
435
445
|
export declare const __resetLiveStreamRegistryForTest: () => void;
|
|
436
446
|
export type BelongChatTransportOptions = {
|
|
447
|
+
readonly firstResponseTiming?: {
|
|
448
|
+
readonly nowMs: () => number;
|
|
449
|
+
readonly report: (sample: FirstResponseSample) => void;
|
|
450
|
+
};
|
|
437
451
|
/** Belong cloud base URL, e.g. `http://localhost:8787`. */
|
|
438
452
|
readonly apiBaseUrl: string;
|
|
439
453
|
/**
|
|
@@ -469,6 +483,10 @@ export type BelongChatTransportOptions = {
|
|
|
469
483
|
readonly foregroundGeneration?: number;
|
|
470
484
|
};
|
|
471
485
|
export type StreamContext = {
|
|
486
|
+
textPhaseKey?: string;
|
|
487
|
+
firstResponseObservations?: (phase: NonNullable<Extract<WireStreamPart, {
|
|
488
|
+
type: "text";
|
|
489
|
+
}>["responsePhase"]>) => readonly FirstResponseObservation[];
|
|
472
490
|
modelActivity?: {
|
|
473
491
|
id: string;
|
|
474
492
|
stepIndex: number;
|
|
@@ -572,6 +590,16 @@ export declare class BelongChatTransport implements ChatTransport<BelongUIMessag
|
|
|
572
590
|
* unaccepted stop.
|
|
573
591
|
*/
|
|
574
592
|
stopSubagent: (runId: string, subagentId: string) => Promise<void>;
|
|
593
|
+
beginFirstResponse: (clientMessageId: string) => void;
|
|
594
|
+
cancelFirstResponse: (clientMessageId: string) => void;
|
|
595
|
+
acceptFirstResponse: (input: {
|
|
596
|
+
sessionId: string;
|
|
597
|
+
runId: string;
|
|
598
|
+
clientMessageId: string;
|
|
599
|
+
messageId: string;
|
|
600
|
+
idempotent: boolean;
|
|
601
|
+
}) => void;
|
|
602
|
+
observeFirstResponseRendered: (observation: FirstResponseObservation) => void;
|
|
575
603
|
sendMessages: ChatTransport<BelongUIMessage>["sendMessages"];
|
|
576
604
|
reconnectToStream: ChatTransport<BelongUIMessage>["reconnectToStream"];
|
|
577
605
|
}
|
|
@@ -310,6 +310,11 @@ export type UsageData = {
|
|
|
310
310
|
readonly autoCompactThresholdChars: number;
|
|
311
311
|
/** The detailed context-window breakdown (own-loop runtimes only). */
|
|
312
312
|
readonly contextWindow?: ContextWindowData | undefined;
|
|
313
|
+
/**
|
|
314
|
+
* Plan 018 — the turn in WEIGHTED tokens, in hundredths: the one unit the
|
|
315
|
+
* dock shows users. Absent on a turn from a cloud that predates it.
|
|
316
|
+
*/
|
|
317
|
+
readonly weightedHundredths?: number | undefined;
|
|
313
318
|
};
|
|
314
319
|
/**
|
|
315
320
|
* Goal Mode M6 — a goal the agent OFFERED. Nothing exists on the backend
|
|
@@ -367,6 +372,11 @@ export type BelongUIMessage = UIMessage<BelongMessageMetadata, BelongDataParts>;
|
|
|
367
372
|
* chunks yet — the transport translates this into `UIMessageChunk`.
|
|
368
373
|
*/
|
|
369
374
|
export type WireTextPart = {
|
|
375
|
+
readonly responsePhase?: {
|
|
376
|
+
readonly phase: "acknowledgment" | "main";
|
|
377
|
+
readonly sourceMessageIds: readonly string[];
|
|
378
|
+
readonly replyKey?: string | undefined;
|
|
379
|
+
} | undefined;
|
|
370
380
|
readonly type: "text";
|
|
371
381
|
readonly id: string;
|
|
372
382
|
readonly text: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BelongMessagePart, PartRendererProps } from './ai-sdk-part-renderers.tsx';
|
|
2
|
+
import { FirstResponseObservation } from '../infrastructure/telemetry/first-response-timing.ts';
|
|
2
3
|
/**
|
|
3
4
|
* The parts a message is INDEXED from (spec deviation 16). File parts render as
|
|
4
5
|
* chips above the message and never reach a render group, and dropping one
|
|
@@ -10,7 +11,7 @@ import { BelongMessagePart, PartRendererProps } from './ai-sdk-part-renderers.ts
|
|
|
10
11
|
* is the same list.
|
|
11
12
|
*/
|
|
12
13
|
export declare const indexableMessageParts: (parts: readonly BelongMessagePart[]) => readonly BelongMessagePart[];
|
|
13
|
-
export declare const MessageParts: ({ parts, streaming, historical, onContinueConnector, onExecutePlan, onFollowContinuation, partProps, }: {
|
|
14
|
+
export declare const MessageParts: ({ parts, streaming, historical, onContinueConnector, onExecutePlan, onFollowContinuation, partProps, onFirstResponseRendered, }: {
|
|
14
15
|
/** The message's parts, file parts already removed (they render as chips). */
|
|
15
16
|
readonly parts: readonly BelongMessagePart[];
|
|
16
17
|
/** This message is the one a run is streaming into right now. */
|
|
@@ -39,4 +40,5 @@ export declare const MessageParts: ({ parts, streaming, historical, onContinueCo
|
|
|
39
40
|
* the named props still wins. Absent = no goal wiring (stories, tests).
|
|
40
41
|
*/
|
|
41
42
|
readonly partProps?: ((part: BelongMessagePart) => Partial<PartRendererProps>) | undefined;
|
|
43
|
+
readonly onFirstResponseRendered?: ((observation: FirstResponseObservation) => void) | undefined;
|
|
42
44
|
}) => import("react").JSX.Element;
|
|
@@ -15,6 +15,11 @@ declare const queuedMessageOutboxEntrySchema: z.ZodObject<{
|
|
|
15
15
|
runtime: z.ZodOptional<z.ZodString>;
|
|
16
16
|
llmProvider: z.ZodOptional<z.ZodString>;
|
|
17
17
|
llmModel: z.ZodOptional<z.ZodString>;
|
|
18
|
+
responseMode: z.ZodOptional<z.ZodEnum<{
|
|
19
|
+
balanced: "balanced";
|
|
20
|
+
fast: "fast";
|
|
21
|
+
smart: "smart";
|
|
22
|
+
}>>;
|
|
18
23
|
workspaceExternalId: z.ZodOptional<z.ZodString>;
|
|
19
24
|
}, z.core.$strip>;
|
|
20
25
|
export type QueuedMessageOutboxEntry = Readonly<z.infer<typeof queuedMessageOutboxEntrySchema>>;
|