@belonguniverseai/react-sdk 0.6.26 → 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 +36 -0
- package/dist/api/account-connectors.d.ts +2 -2
- package/dist/api/account-scope.d.ts +75 -0
- package/dist/api/artifact-actions.d.ts +29 -0
- package/dist/api/client-identity.d.ts +3 -1
- package/dist/api/client.d.ts +1972 -226
- package/dist/api/goals.d.ts +4 -4
- 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-schedule-sharing.d.ts +7 -4
- package/dist/api/task-schedules.d.ts +20 -17
- package/dist/app/dock-story-data.d.ts +10 -6
- package/dist/component/BelongWidget.d.ts +4 -1
- package/dist/component/{abnfDiagram-N423BO3Z-DpQ_UaNq.js → abnfDiagram-N423BO3Z-BGC_KU0K.js} +4 -4
- package/dist/component/{arc-BoxI9KQB.js → arc-BpIEtZvJ.js} +2 -2
- package/dist/component/{architectureDiagram-T3A2C74G-C0Pxx-k7.js → architectureDiagram-T3A2C74G-DYlEVfnh.js} +3 -3
- package/dist/component/{blockDiagram-VBNYF7ZC-CPX5VZHq.js → blockDiagram-VBNYF7ZC-BWDnhAW1.js} +4 -4
- package/dist/component/{c4Diagram-5PPSVZJV-6GrzIAcz.js → c4Diagram-5PPSVZJV-VKL0Shn2.js} +3 -3
- package/dist/component/{channel-Dp0k-SEg.js → channel-gGd0pNDR.js} +2 -2
- package/dist/component/{chunk-2GRJ4B5K-CTz4CZNM.js → chunk-2GRJ4B5K-CEt4y1jX.js} +2 -2
- package/dist/component/{chunk-2Q5K7J3B-Bg9gj6WB.js → chunk-2Q5K7J3B-Dj2wrNzr.js} +2 -2
- package/dist/component/{chunk-5RXB4S5H-SJVXjTS4.js → chunk-5RXB4S5H-oJQEn1bH.js} +5 -5
- package/dist/component/{chunk-5VM5RSS4-CCi9rnUJ.js → chunk-5VM5RSS4-DddP8MPP.js} +2 -2
- package/dist/component/{chunk-6Q2QTUOP-DxQKGpDM.js → chunk-6Q2QTUOP-CppUJwrF.js} +2 -2
- package/dist/component/{chunk-GF5L2VYU-C1soxsXo.js → chunk-GF5L2VYU--hyUlO9v.js} +6 -6
- package/dist/component/{chunk-JWPE2WC7-3wshSHI2.js → chunk-JWPE2WC7-CN0Ieqel.js} +2 -2
- package/dist/component/{chunk-KBJHAD2P-DQdZO07y.js → chunk-KBJHAD2P-BWhCQoHz.js} +2 -2
- package/dist/component/{chunk-RYQCIY6F-DUaZ-HUS.js → chunk-RYQCIY6F-BgNewpQe.js} +2 -2
- package/dist/component/{chunk-XXDRQBXY-D3NSjj_n.js → chunk-XXDRQBXY-mNH171OF.js} +2 -2
- package/dist/component/{classDiagram-JCYQIIEL-BVRygNRR.js → classDiagram-JCYQIIEL-UjZbWotD.js} +3 -3
- package/dist/component/{classDiagram-v2-OCEON4UE-BVRygNRR.js → classDiagram-v2-OCEON4UE-UjZbWotD.js} +3 -3
- package/dist/component/{cose-bilkent-JH36ORCC-DLTvBiOo.js → cose-bilkent-JH36ORCC-lsVWGlMj.js} +2 -2
- package/dist/component/{cynefinDiagram-MW4NZA55-xK50k2_4.js → cynefinDiagram-MW4NZA55-B5Ss0zoy.js} +3 -3
- package/dist/component/{dagre-VZM6K2ZE-DMUwiPX1.js → dagre-VZM6K2ZE-DisWRVfU.js} +3 -3
- package/dist/component/{diagram-7IWD3JNH-Cn6oaVgE.js → diagram-7IWD3JNH-B2QrdsOh.js} +4 -4
- package/dist/component/{diagram-B4RE2ZJO-Dc_LVByi.js → diagram-B4RE2ZJO-Bs8l4THz.js} +3 -3
- package/dist/component/{diagram-LBJQPF4R-y80jmIxC.js → diagram-LBJQPF4R-JTadtYMW.js} +3 -3
- package/dist/component/{diagram-Q27KOJAE-Bp6njNLR.js → diagram-Q27KOJAE-BQC33flc.js} +4 -4
- package/dist/component/{diagram-UB23O5K3-D3X1PDYF.js → diagram-UB23O5K3-ujC22dQx.js} +3 -3
- package/dist/component/{ebnfDiagram-BXEA7PRR-9Lw8nzKe.js → ebnfDiagram-BXEA7PRR-0WnF2wzt.js} +4 -4
- package/dist/component/{erDiagram-JOGREHBK-CcG_SaTj.js → erDiagram-JOGREHBK-CqgMsd5R.js} +5 -5
- package/dist/component/{flowDiagram-UKHOOZJN-BiabESAj.js → flowDiagram-UKHOOZJN-BOM0P8Mk.js} +7 -7
- package/dist/component/{ganttDiagram-PKOTCBZU-BAfZiFRN.js → ganttDiagram-PKOTCBZU-WeRFC1th.js} +3 -3
- package/dist/component/{gitGraphDiagram-DS77QQ5N-2_hBA0gy.js → gitGraphDiagram-DS77QQ5N-CS8L-BA8.js} +4 -4
- package/dist/component/{highlighted-body-OFNGDK62-BWKA8a2L.js → highlighted-body-OFNGDK62-CGejnMyq.js} +2 -2
- package/dist/component/index.js +2 -2
- package/dist/component/{infoDiagram-6WML65LV-C-P8lJtc.js → infoDiagram-6WML65LV-CQQhytkd.js} +2 -2
- package/dist/component/{ishikawaDiagram-WSZJBQD7-CkTFVaSp.js → ishikawaDiagram-WSZJBQD7-CjDo3-zt.js} +2 -2
- package/dist/component/{journeyDiagram-NVQOT4AX-CVW--vNB.js → journeyDiagram-NVQOT4AX-BCCoblta.js} +5 -5
- package/dist/component/{kanban-definition-27J2QSJJ-5EmiKkud.js → kanban-definition-27J2QSJJ-DgTIrgvB.js} +3 -3
- package/dist/component/{linear-CSKvOjpb.js → linear-BOaza_dp.js} +2 -2
- package/dist/component/{mermaid-GHXKKRXX-DJmRTUDm.js → mermaid-GHXKKRXX-BAq5-Vj8.js} +54487 -50019
- package/dist/component/{mindmap-definition-FAOFIHXS-D8kuCYBh.js → mindmap-definition-FAOFIHXS-D1oolR3A.js} +4 -4
- package/dist/component/{pegDiagram-VL7TDLO6-BTfnYOZL.js → pegDiagram-VL7TDLO6-C9UxqvBP.js} +4 -4
- package/dist/component/{pieDiagram-7S7Q4E2Y-CzbOJQ6u.js → pieDiagram-7S7Q4E2Y-I5IXzOZM.js} +4 -4
- package/dist/component/{quadrantDiagram-CIZ2JOQS-BCLm-h12.js → quadrantDiagram-CIZ2JOQS-DPDFBhEd.js} +3 -3
- package/dist/component/{railroadDiagram-AXF67PYL-DxjbsMsY.js → railroadDiagram-AXF67PYL-DIAkhVTf.js} +4 -4
- package/dist/component/{requirementDiagram-LRYGKXZP-7CT3WVcX.js → requirementDiagram-LRYGKXZP-DBEmV-Qy.js} +4 -4
- package/dist/component/{sankeyDiagram-W5VNT64P-P0xeL0DB.js → sankeyDiagram-W5VNT64P-BEeDyDj7.js} +2 -2
- package/dist/component/{sequenceDiagram-SI44F4Z6-BZwzqGo7.js → sequenceDiagram-SI44F4Z6-WYcXWUHF.js} +4 -4
- package/dist/component/{sizeCapture-X5ZJPWSS-BmFHn5uM.js → sizeCapture-X5ZJPWSS-BqDBRpiS.js} +2 -2
- package/dist/component/{stateDiagram-OKZ733FA-CVuv1e4U.js → stateDiagram-OKZ733FA-CfYfR0OH.js} +3 -3
- package/dist/component/{stateDiagram-v2-UEYNNEHI-D9ToaXGa.js → stateDiagram-v2-UEYNNEHI-BSa2VwcQ.js} +3 -3
- package/dist/component/{swimlanes-SLNWSIFB-D4imP0Ms.js → swimlanes-SLNWSIFB-C-7mrC4X.js} +4 -4
- package/dist/component/{swimlanesDiagram-ULZ7WXOC-BTQ985v3.js → swimlanesDiagram-ULZ7WXOC-DXcMd7U4.js} +3 -3
- package/dist/component/{timeline-definition-Z64GVDOM-DAHxnCB-.js → timeline-definition-Z64GVDOM-Dp65E80E.js} +3 -3
- package/dist/component/{vennDiagram-T6HMQDX7-K5TNKkRE.js → vennDiagram-T6HMQDX7-CRpZ12TH.js} +2 -2
- package/dist/component/{wardleyDiagram-T6FBY63Y-CYU76C7a.js → wardleyDiagram-T6FBY63Y-BupsM8K3.js} +3 -3
- package/dist/component/{xychartDiagram-ELKLHX3M-CRncQBO_.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/ArtifactApprovalDialog.d.ts +8 -0
- package/dist/components/embed/ArtifactOperationNoticeLine.d.ts +5 -0
- package/dist/components/embed/EmbedComposer.d.ts +5 -1
- package/dist/components/embed/EmbedConversation.d.ts +4 -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/WorkspacePolicySetting.d.ts +1 -0
- package/dist/components/embed/format-compact-number.d.ts +8 -0
- package/dist/components/embed/use-artifact-operation-notices.d.ts +20 -0
- package/dist/components/embed/use-inline-preview-url.d.ts +3 -1
- package/dist/components/scheduled/ScheduledDetailSurface.d.ts +9 -0
- package/dist/embed/artifact-action-bridge.d.ts +70 -0
- package/dist/embed/artifact-operation-notices.d.ts +45 -0
- package/dist/embed/artifact-remint-budget.d.ts +19 -0
- package/dist/embed/artifact-sandbox-hold.d.ts +10 -0
- package/dist/embed/dock-state.d.ts +1 -1
- package/dist/embed/global.d.ts +2 -0
- package/dist/embed/goal-row-model.d.ts +1 -1
- 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/embed/workspace-policy.d.ts +7 -0
- package/dist/i18n/messages/en.d.ts +161 -8
- package/dist/i18n/messages/surfaces/aiElements.d.ts +4 -0
- package/dist/i18n/messages/surfaces/artifacts.d.ts +304 -0
- package/dist/i18n/messages/surfaces/embedMisc.d.ts +84 -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/scheduled.d.ts +22 -2
- package/dist/i18n/messages/surfaces/settings.d.ts +28 -0
- package/dist/i18n/messages/surfaces/stats.d.ts +4 -12
- package/dist/i18n/messages/surfaces/stream.d.ts +120 -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 +39 -7
- 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
|
@@ -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;
|
|
@@ -34,6 +36,10 @@ export declare const settingsEn: {
|
|
|
34
36
|
apiKeysAuthError: string;
|
|
35
37
|
apiKeysCreateError: string;
|
|
36
38
|
apiKeysRevokeError: string;
|
|
39
|
+
workspaceScope: string;
|
|
40
|
+
workspaceScopeDescription: string;
|
|
41
|
+
workspaceScopeApplies: string;
|
|
42
|
+
workspaceScopeSaveError: string;
|
|
37
43
|
profile: string;
|
|
38
44
|
languageDescription: string;
|
|
39
45
|
dockPosition: string;
|
|
@@ -42,6 +48,7 @@ export declare const settingsEn: {
|
|
|
42
48
|
light: string;
|
|
43
49
|
dark: string;
|
|
44
50
|
presetDescription: string;
|
|
51
|
+
tenantDefault: string;
|
|
45
52
|
advancedAppearance: string;
|
|
46
53
|
advancedDescription: string;
|
|
47
54
|
readRepliesDescription: string;
|
|
@@ -71,6 +78,8 @@ export declare const settingsEs: {
|
|
|
71
78
|
voiceDescription: string;
|
|
72
79
|
history: string;
|
|
73
80
|
historyDescription: string;
|
|
81
|
+
usage: string;
|
|
82
|
+
usageDescription: string;
|
|
74
83
|
about: string;
|
|
75
84
|
aboutDescription: string;
|
|
76
85
|
apiKeys: string;
|
|
@@ -91,6 +100,10 @@ export declare const settingsEs: {
|
|
|
91
100
|
apiKeysAuthError: string;
|
|
92
101
|
apiKeysCreateError: string;
|
|
93
102
|
apiKeysRevokeError: string;
|
|
103
|
+
workspaceScope: string;
|
|
104
|
+
workspaceScopeDescription: string;
|
|
105
|
+
workspaceScopeApplies: string;
|
|
106
|
+
workspaceScopeSaveError: string;
|
|
94
107
|
profile: string;
|
|
95
108
|
languageDescription: string;
|
|
96
109
|
dockPosition: string;
|
|
@@ -99,6 +112,7 @@ export declare const settingsEs: {
|
|
|
99
112
|
light: string;
|
|
100
113
|
dark: string;
|
|
101
114
|
presetDescription: string;
|
|
115
|
+
tenantDefault: string;
|
|
102
116
|
advancedAppearance: string;
|
|
103
117
|
advancedDescription: string;
|
|
104
118
|
readRepliesDescription: string;
|
|
@@ -128,6 +142,8 @@ export declare const settingsPt: {
|
|
|
128
142
|
voiceDescription: string;
|
|
129
143
|
history: string;
|
|
130
144
|
historyDescription: string;
|
|
145
|
+
usage: string;
|
|
146
|
+
usageDescription: string;
|
|
131
147
|
about: string;
|
|
132
148
|
aboutDescription: string;
|
|
133
149
|
apiKeys: string;
|
|
@@ -148,6 +164,10 @@ export declare const settingsPt: {
|
|
|
148
164
|
apiKeysAuthError: string;
|
|
149
165
|
apiKeysCreateError: string;
|
|
150
166
|
apiKeysRevokeError: string;
|
|
167
|
+
workspaceScope: string;
|
|
168
|
+
workspaceScopeDescription: string;
|
|
169
|
+
workspaceScopeApplies: string;
|
|
170
|
+
workspaceScopeSaveError: string;
|
|
151
171
|
profile: string;
|
|
152
172
|
languageDescription: string;
|
|
153
173
|
dockPosition: string;
|
|
@@ -156,6 +176,7 @@ export declare const settingsPt: {
|
|
|
156
176
|
light: string;
|
|
157
177
|
dark: string;
|
|
158
178
|
presetDescription: string;
|
|
179
|
+
tenantDefault: string;
|
|
159
180
|
advancedAppearance: string;
|
|
160
181
|
advancedDescription: string;
|
|
161
182
|
readRepliesDescription: string;
|
|
@@ -185,6 +206,8 @@ export declare const settingsIt: {
|
|
|
185
206
|
voiceDescription: string;
|
|
186
207
|
history: string;
|
|
187
208
|
historyDescription: string;
|
|
209
|
+
usage: string;
|
|
210
|
+
usageDescription: string;
|
|
188
211
|
about: string;
|
|
189
212
|
aboutDescription: string;
|
|
190
213
|
apiKeys: string;
|
|
@@ -205,6 +228,10 @@ export declare const settingsIt: {
|
|
|
205
228
|
apiKeysAuthError: string;
|
|
206
229
|
apiKeysCreateError: string;
|
|
207
230
|
apiKeysRevokeError: string;
|
|
231
|
+
workspaceScope: string;
|
|
232
|
+
workspaceScopeDescription: string;
|
|
233
|
+
workspaceScopeApplies: string;
|
|
234
|
+
workspaceScopeSaveError: string;
|
|
208
235
|
profile: string;
|
|
209
236
|
languageDescription: string;
|
|
210
237
|
dockPosition: string;
|
|
@@ -213,6 +240,7 @@ export declare const settingsIt: {
|
|
|
213
240
|
light: string;
|
|
214
241
|
dark: string;
|
|
215
242
|
presetDescription: string;
|
|
243
|
+
tenantDefault: string;
|
|
216
244
|
advancedAppearance: string;
|
|
217
245
|
advancedDescription: string;
|
|
218
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,6 +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.";
|
|
85
|
+
readonly toolCheckBackgroundRunning: "Checking a background command";
|
|
86
|
+
readonly toolCheckBackgroundDone: "Checked a background command";
|
|
87
|
+
readonly toolCheckBackgroundFailed: "Couldn't check the background command";
|
|
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.";
|
|
93
|
+
readonly toolStopBackgroundRunning: "Stopping a background command";
|
|
94
|
+
readonly toolStopBackgroundDone: "Stopped a background command";
|
|
95
|
+
readonly toolStopBackgroundFailed: "Couldn't stop the background command";
|
|
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";
|
|
81
110
|
readonly toolSaveSkillRunning: "Saving a skill";
|
|
82
111
|
readonly toolSaveSkillDone: "Saved a skill";
|
|
83
112
|
readonly toolSaveSkillFailed: "Couldn't save the skill";
|
|
@@ -102,6 +131,7 @@ export declare const streamEn: {
|
|
|
102
131
|
readonly browserRefreshView: "Refreshed the page";
|
|
103
132
|
readonly failedBadge: "failed";
|
|
104
133
|
readonly actionReadFile: "Read a file";
|
|
134
|
+
readonly actionCheckedUsage: "Checked your usage";
|
|
105
135
|
readonly actionWroteFile: "Updated a file";
|
|
106
136
|
readonly actionPublishedArtifact: "Put a report on screen";
|
|
107
137
|
readonly actionLookedUpSkill: "Looked up a skill";
|
|
@@ -255,6 +285,35 @@ export declare const streamEs: {
|
|
|
255
285
|
toolForgetDone: string;
|
|
256
286
|
toolForgetFailed: string;
|
|
257
287
|
toolForgetDetail: string;
|
|
288
|
+
toolUsageRunning: string;
|
|
289
|
+
toolUsageDone: string;
|
|
290
|
+
toolUsageFailed: string;
|
|
291
|
+
toolUsageDetail: string;
|
|
292
|
+
toolCheckBackgroundRunning: string;
|
|
293
|
+
toolCheckBackgroundDone: string;
|
|
294
|
+
toolCheckBackgroundFailed: string;
|
|
295
|
+
toolCheckBackgroundDetail: string;
|
|
296
|
+
toolWaitBackgroundRunning: string;
|
|
297
|
+
toolWaitBackgroundDone: string;
|
|
298
|
+
toolWaitBackgroundFailed: string;
|
|
299
|
+
toolWaitBackgroundDetail: string;
|
|
300
|
+
toolStopBackgroundRunning: string;
|
|
301
|
+
toolStopBackgroundDone: string;
|
|
302
|
+
toolStopBackgroundFailed: string;
|
|
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;
|
|
258
317
|
toolSaveSkillRunning: string;
|
|
259
318
|
toolSaveSkillDone: string;
|
|
260
319
|
toolSaveSkillFailed: string;
|
|
@@ -279,6 +338,7 @@ export declare const streamEs: {
|
|
|
279
338
|
browserRefreshView: string;
|
|
280
339
|
failedBadge: string;
|
|
281
340
|
actionReadFile: string;
|
|
341
|
+
actionCheckedUsage: string;
|
|
282
342
|
actionWroteFile: string;
|
|
283
343
|
actionPublishedArtifact: string;
|
|
284
344
|
actionLookedUpSkill: string;
|
|
@@ -429,6 +489,35 @@ export declare const streamPt: {
|
|
|
429
489
|
toolForgetDone: string;
|
|
430
490
|
toolForgetFailed: string;
|
|
431
491
|
toolForgetDetail: string;
|
|
492
|
+
toolUsageRunning: string;
|
|
493
|
+
toolUsageDone: string;
|
|
494
|
+
toolUsageFailed: string;
|
|
495
|
+
toolUsageDetail: string;
|
|
496
|
+
toolCheckBackgroundRunning: string;
|
|
497
|
+
toolCheckBackgroundDone: string;
|
|
498
|
+
toolCheckBackgroundFailed: string;
|
|
499
|
+
toolCheckBackgroundDetail: string;
|
|
500
|
+
toolWaitBackgroundRunning: string;
|
|
501
|
+
toolWaitBackgroundDone: string;
|
|
502
|
+
toolWaitBackgroundFailed: string;
|
|
503
|
+
toolWaitBackgroundDetail: string;
|
|
504
|
+
toolStopBackgroundRunning: string;
|
|
505
|
+
toolStopBackgroundDone: string;
|
|
506
|
+
toolStopBackgroundFailed: string;
|
|
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;
|
|
432
521
|
toolSaveSkillRunning: string;
|
|
433
522
|
toolSaveSkillDone: string;
|
|
434
523
|
toolSaveSkillFailed: string;
|
|
@@ -453,6 +542,7 @@ export declare const streamPt: {
|
|
|
453
542
|
browserRefreshView: string;
|
|
454
543
|
failedBadge: string;
|
|
455
544
|
actionReadFile: string;
|
|
545
|
+
actionCheckedUsage: string;
|
|
456
546
|
actionWroteFile: string;
|
|
457
547
|
actionPublishedArtifact: string;
|
|
458
548
|
actionLookedUpSkill: string;
|
|
@@ -603,6 +693,35 @@ export declare const streamIt: {
|
|
|
603
693
|
toolForgetDone: string;
|
|
604
694
|
toolForgetFailed: string;
|
|
605
695
|
toolForgetDetail: string;
|
|
696
|
+
toolUsageRunning: string;
|
|
697
|
+
toolUsageDone: string;
|
|
698
|
+
toolUsageFailed: string;
|
|
699
|
+
toolUsageDetail: string;
|
|
700
|
+
toolCheckBackgroundRunning: string;
|
|
701
|
+
toolCheckBackgroundDone: string;
|
|
702
|
+
toolCheckBackgroundFailed: string;
|
|
703
|
+
toolCheckBackgroundDetail: string;
|
|
704
|
+
toolWaitBackgroundRunning: string;
|
|
705
|
+
toolWaitBackgroundDone: string;
|
|
706
|
+
toolWaitBackgroundFailed: string;
|
|
707
|
+
toolWaitBackgroundDetail: string;
|
|
708
|
+
toolStopBackgroundRunning: string;
|
|
709
|
+
toolStopBackgroundDone: string;
|
|
710
|
+
toolStopBackgroundFailed: string;
|
|
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;
|
|
606
725
|
toolSaveSkillRunning: string;
|
|
607
726
|
toolSaveSkillDone: string;
|
|
608
727
|
toolSaveSkillFailed: string;
|
|
@@ -627,6 +746,7 @@ export declare const streamIt: {
|
|
|
627
746
|
browserRefreshView: string;
|
|
628
747
|
failedBadge: string;
|
|
629
748
|
actionReadFile: string;
|
|
749
|
+
actionCheckedUsage: string;
|
|
630
750
|
actionWroteFile: string;
|
|
631
751
|
actionPublishedArtifact: string;
|
|
632
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<{
|
|
@@ -20,11 +21,11 @@ export declare const choiceAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
20
21
|
kind: z.ZodLiteral<"skipped">;
|
|
21
22
|
}, z.core.$strip>], "kind">;
|
|
22
23
|
export declare const choiceStateSchema: z.ZodEnum<{
|
|
23
|
-
detached: "detached";
|
|
24
|
-
pending: "pending";
|
|
25
24
|
cancelled: "cancelled";
|
|
25
|
+
pending: "pending";
|
|
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;
|
|
@@ -54,9 +63,9 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
54
63
|
title: z.ZodString;
|
|
55
64
|
kind: z.ZodString;
|
|
56
65
|
status: z.ZodOptional<z.ZodEnum<{
|
|
57
|
-
pending: "pending";
|
|
58
66
|
failed: "failed";
|
|
59
67
|
completed: "completed";
|
|
68
|
+
pending: "pending";
|
|
60
69
|
in_progress: "in_progress";
|
|
61
70
|
}>>;
|
|
62
71
|
}, z.core.$strip>>;
|
|
@@ -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">;
|
|
@@ -257,11 +267,11 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
257
267
|
data: z.ZodObject<{
|
|
258
268
|
questionRequestId: z.ZodString;
|
|
259
269
|
state: z.ZodEnum<{
|
|
260
|
-
detached: "detached";
|
|
261
|
-
pending: "pending";
|
|
262
270
|
cancelled: "cancelled";
|
|
271
|
+
pending: "pending";
|
|
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;
|
|
@@ -292,13 +302,13 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
292
302
|
data: z.ZodObject<{
|
|
293
303
|
goalId: z.ZodString;
|
|
294
304
|
status: z.ZodEnum<{
|
|
305
|
+
waiting_for_approval: "waiting_for_approval";
|
|
295
306
|
active: "active";
|
|
296
307
|
paused: "paused";
|
|
297
308
|
clarifying: "clarifying";
|
|
298
309
|
completion_claimed: "completion_claimed";
|
|
299
310
|
deferred: "deferred";
|
|
300
311
|
waiting_for_user: "waiting_for_user";
|
|
301
|
-
waiting_for_approval: "waiting_for_approval";
|
|
302
312
|
waiting_for_ui_action: "waiting_for_ui_action";
|
|
303
313
|
blocked: "blocked";
|
|
304
314
|
budget_limited: "budget_limited";
|
|
@@ -337,13 +347,13 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
337
347
|
kind: z.ZodString;
|
|
338
348
|
actor: z.ZodString;
|
|
339
349
|
toStatus: z.ZodNullable<z.ZodEnum<{
|
|
350
|
+
waiting_for_approval: "waiting_for_approval";
|
|
340
351
|
active: "active";
|
|
341
352
|
paused: "paused";
|
|
342
353
|
clarifying: "clarifying";
|
|
343
354
|
completion_claimed: "completion_claimed";
|
|
344
355
|
deferred: "deferred";
|
|
345
356
|
waiting_for_user: "waiting_for_user";
|
|
346
|
-
waiting_for_approval: "waiting_for_approval";
|
|
347
357
|
waiting_for_ui_action: "waiting_for_ui_action";
|
|
348
358
|
blocked: "blocked";
|
|
349
359
|
budget_limited: "budget_limited";
|
|
@@ -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;
|
|
@@ -534,6 +552,10 @@ export declare class BelongChatTransport implements ChatTransport<BelongUIMessag
|
|
|
534
552
|
takeForeground(): void;
|
|
535
553
|
/** Forget an unavailable session so the next send creates a fresh one. */
|
|
536
554
|
reset(): void;
|
|
555
|
+
/** Register Stop before its cross-tab lookup/auth can yield. Later sends
|
|
556
|
+
* wait for the cancellation request, while the UI can stop listening at once.
|
|
557
|
+
*/
|
|
558
|
+
stopRun: (resolveRun: () => string | null | Promise<string | null>) => Promise<readonly RecalledQueuedMessage[]>;
|
|
537
559
|
/**
|
|
538
560
|
* Best-effort server-side cancel of an in-flight run. `useChat`'s `stop()`
|
|
539
561
|
* only aborts the local stream (stops listening); this tells belong-cloud to
|
|
@@ -568,6 +590,16 @@ export declare class BelongChatTransport implements ChatTransport<BelongUIMessag
|
|
|
568
590
|
* unaccepted stop.
|
|
569
591
|
*/
|
|
570
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;
|
|
571
603
|
sendMessages: ChatTransport<BelongUIMessage>["sendMessages"];
|
|
572
604
|
reconnectToStream: ChatTransport<BelongUIMessage>["reconnectToStream"];
|
|
573
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;
|