@belonguniverseai/react-sdk 0.1.2 → 0.1.4

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.
Files changed (100) hide show
  1. package/dist/api/client.d.ts +382 -9
  2. package/dist/api/mutations.d.ts +5 -0
  3. package/dist/api/query-keys.d.ts +9 -0
  4. package/dist/api/workspace-files.d.ts +1 -1
  5. package/dist/app/providers.d.ts +1 -1
  6. package/dist/component/BelongWidget.d.ts +7 -1
  7. package/dist/component/{arc-DPDIJagU.js → arc-BEnKmFiH.js} +2 -2
  8. package/dist/component/{architectureDiagram-3BPJPVTR-WmTdGYxp.js → architectureDiagram-3BPJPVTR-qrW4PiqE.js} +3 -3
  9. package/dist/component/{blockDiagram-GPEHLZMM-myKtXzN1.js → blockDiagram-GPEHLZMM-Cy83RTvZ.js} +4 -4
  10. package/dist/component/{c4Diagram-AAUBKEIU-BbN6n9Vc.js → c4Diagram-AAUBKEIU-DA1KAAqR.js} +3 -3
  11. package/dist/component/{channel-B0H_QP_-.js → channel-S3CulQua.js} +2 -2
  12. package/dist/component/{chunk-2J33WTMH-iwZo17vf.js → chunk-2J33WTMH-B3IpUX0y.js} +2 -2
  13. package/dist/component/{chunk-4BX2VUAB-CKT6dptL.js → chunk-4BX2VUAB-TXwXVoCn.js} +2 -2
  14. package/dist/component/{chunk-55IACEB6-CLJ9pgvn.js → chunk-55IACEB6-TgAuWAzl.js} +2 -2
  15. package/dist/component/{chunk-727SXJPM-BngOIcz0.js → chunk-727SXJPM-CRzAhEpU.js} +6 -6
  16. package/dist/component/{chunk-AQP2D5EJ-iLdnjZec.js → chunk-AQP2D5EJ-BGyYD9fu.js} +4 -4
  17. package/dist/component/{chunk-FMBD7UC4-6uJqTx36.js → chunk-FMBD7UC4-DMPGLPzn.js} +2 -2
  18. package/dist/component/{chunk-ND2GUHAM-BUngsBoq.js → chunk-ND2GUHAM-D4Pq2Sbn.js} +2 -2
  19. package/dist/component/{chunk-QZHKN3VN-CFfcj0kF.js → chunk-QZHKN3VN-pAuUtuaS.js} +2 -2
  20. package/dist/component/{classDiagram-4FO5ZUOK-4Unpku5g.js → classDiagram-4FO5ZUOK-Cfk5JVma.js} +3 -3
  21. package/dist/component/{classDiagram-v2-Q7XG4LA2-4Unpku5g.js → classDiagram-v2-Q7XG4LA2-Cfk5JVma.js} +3 -3
  22. package/dist/component/{cose-bilkent-S5V4N54A-CxgXF1ox.js → cose-bilkent-S5V4N54A-DDqAk-Nd.js} +2 -2
  23. package/dist/component/{dagre-BM42HDAG-CvJZZLBU.js → dagre-BM42HDAG-CRWiZgwY.js} +2 -2
  24. package/dist/component/{diagram-2AECGRRQ-BM26zrSB.js → diagram-2AECGRRQ-vfIORQjw.js} +3 -3
  25. package/dist/component/{diagram-5GNKFQAL-E7W8UahE.js → diagram-5GNKFQAL-BrdNWhYp.js} +4 -4
  26. package/dist/component/{diagram-KO2AKTUF-Cx9n9K8j.js → diagram-KO2AKTUF-BzvQZ4om.js} +3 -3
  27. package/dist/component/{diagram-LMA3HP47-DD5MMO35.js → diagram-LMA3HP47-ByWVR7eR.js} +3 -3
  28. package/dist/component/{diagram-OG6HWLK6-DaiZ4TvN.js → diagram-OG6HWLK6-DFJUF0-3.js} +4 -4
  29. package/dist/component/{erDiagram-TEJ5UH35-ChBEEVA8.js → erDiagram-TEJ5UH35-h-b8M9my.js} +5 -5
  30. package/dist/component/{flowDiagram-I6XJVG4X-DAsWdPx4.js → flowDiagram-I6XJVG4X-Bs5-0VOV.js} +7 -7
  31. package/dist/component/{ganttDiagram-6RSMTGT7-qtGq5aA8.js → ganttDiagram-6RSMTGT7-BFOggcmT.js} +3 -3
  32. package/dist/component/{gitGraphDiagram-PVQCEYII-B-KRbsvH.js → gitGraphDiagram-PVQCEYII-DqyxmsbF.js} +4 -4
  33. package/dist/component/{highlighted-body-OFNGDK62-etsPYV7E.js → highlighted-body-OFNGDK62-Bdj8cutJ.js} +2 -2
  34. package/dist/component/index.js +2 -2
  35. package/dist/component/{infoDiagram-5YYISTIA-BzJ6egpv.js → infoDiagram-5YYISTIA-8md68U3E.js} +2 -2
  36. package/dist/component/{ishikawaDiagram-YF4QCWOH-DnPu1odF.js → ishikawaDiagram-YF4QCWOH-C3xT9wjK.js} +2 -2
  37. package/dist/component/{journeyDiagram-JHISSGLW-BDbOAXFA.js → journeyDiagram-JHISSGLW-BbHXf52q.js} +5 -5
  38. package/dist/component/{kanban-definition-UN3LZRKU-BjvUIgNN.js → kanban-definition-UN3LZRKU-Xcxe9Aqi.js} +3 -3
  39. package/dist/component/{linear-COVcd8bM.js → linear-tnf14jhv.js} +2 -2
  40. package/dist/component/{mermaid-GHXKKRXX-Bk5cDfRV.js → mermaid-GHXKKRXX-DRKI1NOg.js} +31423 -28144
  41. package/dist/component/{mindmap-definition-RKZ34NQL-C0g8QURW.js → mindmap-definition-RKZ34NQL-DT2YOYJT.js} +4 -4
  42. package/dist/component/{pieDiagram-4H26LBE5-Mbexiv4J.js → pieDiagram-4H26LBE5-DnaT-EHy.js} +4 -4
  43. package/dist/component/{quadrantDiagram-W4KKPZXB-BPRDLHzc.js → quadrantDiagram-W4KKPZXB-Chj0SIr_.js} +3 -3
  44. package/dist/component/{requirementDiagram-4Y6WPE33-XjOXpLfB.js → requirementDiagram-4Y6WPE33-C8P86Vfk.js} +4 -4
  45. package/dist/component/{sankeyDiagram-5OEKKPKP-Boo0vXVH.js → sankeyDiagram-5OEKKPKP-BTV3aQxb.js} +2 -2
  46. package/dist/component/{sequenceDiagram-3UESZ5HK-CmZk5hb2.js → sequenceDiagram-3UESZ5HK-CszXtNuQ.js} +4 -4
  47. package/dist/component/{stateDiagram-AJRCARHV-zKdC8ZqU.js → stateDiagram-AJRCARHV-BPKVLcMj.js} +3 -3
  48. package/dist/component/{stateDiagram-v2-BHNVJYJU-C3TFxstc.js → stateDiagram-v2-BHNVJYJU-CAAXRt1C.js} +3 -3
  49. package/dist/component/{timeline-definition-PNZ67QCA-DV17S1NP.js → timeline-definition-PNZ67QCA-CqzXrhgH.js} +3 -3
  50. package/dist/component/{vennDiagram-CIIHVFJN-DtHYS_yc.js → vennDiagram-CIIHVFJN-Cvb9lpke.js} +2 -2
  51. package/dist/component/{wardleyDiagram-YWT4CUSO-BxPk1XTc.js → wardleyDiagram-YWT4CUSO-BzPLaYx7.js} +3 -3
  52. package/dist/component/{xychartDiagram-2RQKCTM6-C3o6FXYC.js → xychartDiagram-2RQKCTM6-C50_ldFc.js} +3 -3
  53. package/dist/components/embed/AgentGrantCard.d.ts +6 -4
  54. package/dist/components/embed/ComposerMenu.d.ts +9 -1
  55. package/dist/components/embed/EmbedRail.d.ts +18 -1
  56. package/dist/components/embed/EmbedSessions.d.ts +6 -4
  57. package/dist/components/embed/MentionInput.d.ts +10 -0
  58. package/dist/components/embed/SlashCommandMenu.d.ts +10 -6
  59. package/dist/components/feedback/feedback-metadata.d.ts +4 -30
  60. package/dist/dev-modal-repro.d.ts +0 -0
  61. package/dist/embed/approval-bus.d.ts +14 -0
  62. package/dist/embed/approval-decision.d.ts +10 -0
  63. package/dist/embed/auto-embed.d.ts +1 -1
  64. package/dist/embed/closed-surface-voice-bus.d.ts +25 -0
  65. package/dist/embed/copy.d.ts +3 -0
  66. package/dist/embed/dock-layout.d.ts +32 -0
  67. package/dist/embed/global.d.ts +4 -3
  68. package/dist/embed/locale.d.ts +24 -5
  69. package/dist/embed/plan-decision.d.ts +3 -1
  70. package/dist/embed/use-workspace-file-download.d.ts +2 -0
  71. package/dist/embed/voice-decision.d.ts +27 -0
  72. package/dist/embed/voice-phrase-match.d.ts +5 -0
  73. package/dist/embed/voice-prefs.d.ts +4 -0
  74. package/dist/embed/voice-send-intent.d.ts +12 -0
  75. package/dist/embed/workspace-scope.d.ts +44 -0
  76. package/dist/i18n/i18n.d.ts +6 -0
  77. package/dist/i18n/index.d.ts +2 -0
  78. package/dist/i18n/messages/en.d.ts +350 -0
  79. package/dist/i18n/messages/es.d.ts +3 -0
  80. package/dist/i18n/messages/surfaces/agentGrant.d.ts +39 -0
  81. package/dist/i18n/messages/surfaces/aiElements.d.ts +101 -0
  82. package/dist/i18n/messages/surfaces/app.d.ts +31 -0
  83. package/dist/i18n/messages/surfaces/embedMisc.d.ts +100 -0
  84. package/dist/i18n/messages/surfaces/feedback.d.ts +19 -0
  85. package/dist/i18n/messages/surfaces/files.d.ts +75 -0
  86. package/dist/i18n/messages/surfaces/header.d.ts +31 -0
  87. package/dist/i18n/messages/surfaces/login.d.ts +17 -0
  88. package/dist/i18n/messages/surfaces/plan.d.ts +35 -0
  89. package/dist/i18n/messages/surfaces/sessions.d.ts +43 -0
  90. package/dist/i18n/messages/surfaces/stream.d.ts +144 -0
  91. package/dist/i18n/messages/surfaces/usage.d.ts +21 -0
  92. package/dist/i18n/messages/types.d.ts +10 -0
  93. package/dist/routes/chat.d.ts +1 -0
  94. package/dist/stream/ai-sdk-part-renderers.d.ts +10 -2
  95. package/dist/stream/belong-chat-transport.d.ts +54 -1
  96. package/dist/stream/belong-data-parts.d.ts +6 -4
  97. package/dist/stream/message-metadata.d.ts +45 -0
  98. package/dist/stream/stream-state-store.d.ts +4 -4
  99. package/dist/types/public.d.ts +20 -4
  100. package/package.json +2 -2
@@ -0,0 +1,100 @@
1
+ /** Embed misc dock strings (composer pickers, workspace tree, shell/CSV/preview
2
+ * panels, attribution, dev runtime bar, avatar menu, conversation frame). */
3
+ export declare const embedMiscEn: {
4
+ readonly embed: {
5
+ readonly yourSkills: "Your skills";
6
+ readonly skillsMenuLabel: "Skills";
7
+ readonly minimizeSkills: "Minimize skills";
8
+ readonly expandSkills: "Expand skills";
9
+ readonly workspaceFilesMenuLabel: "Workspace files";
10
+ readonly previewFile: "Preview {{name}}";
11
+ readonly downloadFile: "Download {{name}}";
12
+ readonly refresh: "Refresh";
13
+ readonly refreshWorkspaceFiles: "Refresh workspace files";
14
+ readonly searchWorkspace: "Search workspace…";
15
+ readonly searchWorkspaceFiles: "Search workspace files";
16
+ readonly workspaceCreateHint: "Open the terminal once to create your workspace, then refresh.";
17
+ readonly workspaceLoadError: "Couldn't load your workspace files.";
18
+ readonly workspaceNoFiles: "No files yet — what Belong writes in your workspace shows up here.";
19
+ readonly workspaceNoMatches: "No matches.";
20
+ readonly csvEmpty: "This file is empty.";
21
+ readonly csvRowLimit: "Showing the first {{shown}} of {{total}} rows — download for the full file.";
22
+ readonly preview: "Preview";
23
+ readonly exitFullscreen: "Exit fullscreen";
24
+ readonly fullscreen: "Fullscreen";
25
+ readonly closePreview: "Close preview";
26
+ readonly nothingToPreview: "Nothing to preview yet.";
27
+ readonly resizePreview: "Resize preview";
28
+ readonly previewTruncated: "… (truncated — download for the full file)";
29
+ readonly noInlinePreview: "No inline preview for {{type}}.";
30
+ readonly thisFile: "this file";
31
+ readonly download: "Download";
32
+ readonly loadingPreview: "Loading preview…";
33
+ readonly poweredByBelong: "Powered by Belong";
34
+ readonly devDefault: "default";
35
+ readonly devModelIdPlaceholder: "model id (blank = env default)";
36
+ readonly devModelIdTitle: "Exact model id for the selected provider — overrides the env pin";
37
+ readonly devBadge: "dev";
38
+ readonly devRuntimeLabel: "runtime:";
39
+ readonly devModelLabel: "model (mastra):";
40
+ readonly closeDevMode: "Close dev mode";
41
+ readonly deployedAt: "deployed {{label}}";
42
+ readonly devOverrideActive: "Dev override active — click to change";
43
+ readonly micUnmuted: "Mic unmuted";
44
+ readonly micMuted: "Mic muted";
45
+ readonly agentWorking: "{{name}} is working…";
46
+ readonly clearChat: "Clear chat";
47
+ readonly clearChatTooltip: "Clear chat (the assistant keeps the full context)";
48
+ readonly clear: "Clear";
49
+ readonly stop: "Stop";
50
+ };
51
+ };
52
+ export declare const embedMiscEs: {
53
+ embed: {
54
+ yourSkills: string;
55
+ skillsMenuLabel: string;
56
+ minimizeSkills: string;
57
+ expandSkills: string;
58
+ workspaceFilesMenuLabel: string;
59
+ previewFile: string;
60
+ downloadFile: string;
61
+ refresh: string;
62
+ refreshWorkspaceFiles: string;
63
+ searchWorkspace: string;
64
+ searchWorkspaceFiles: string;
65
+ workspaceCreateHint: string;
66
+ workspaceLoadError: string;
67
+ workspaceNoFiles: string;
68
+ workspaceNoMatches: string;
69
+ csvEmpty: string;
70
+ csvRowLimit: string;
71
+ preview: string;
72
+ exitFullscreen: string;
73
+ fullscreen: string;
74
+ closePreview: string;
75
+ nothingToPreview: string;
76
+ resizePreview: string;
77
+ previewTruncated: string;
78
+ noInlinePreview: string;
79
+ thisFile: string;
80
+ download: string;
81
+ loadingPreview: string;
82
+ poweredByBelong: string;
83
+ devDefault: string;
84
+ devModelIdPlaceholder: string;
85
+ devModelIdTitle: string;
86
+ devBadge: string;
87
+ devRuntimeLabel: string;
88
+ devModelLabel: string;
89
+ closeDevMode: string;
90
+ deployedAt: string;
91
+ devOverrideActive: string;
92
+ micUnmuted: string;
93
+ micMuted: string;
94
+ agentWorking: string;
95
+ clearChat: string;
96
+ clearChatTooltip: string;
97
+ clear: string;
98
+ stop: string;
99
+ };
100
+ };
@@ -0,0 +1,19 @@
1
+ /** Message feedback dock strings. */
2
+ export declare const feedbackEn: {
3
+ readonly feedback: {
4
+ readonly goodResponse: "Good response";
5
+ readonly badResponse: "Bad response";
6
+ readonly reasonPlaceholder: "What was off? (optional)";
7
+ readonly skip: "Skip";
8
+ readonly send: "Send";
9
+ };
10
+ };
11
+ export declare const feedbackEs: {
12
+ feedback: {
13
+ goodResponse: string;
14
+ badResponse: string;
15
+ reasonPlaceholder: string;
16
+ skip: string;
17
+ send: string;
18
+ };
19
+ };
@@ -0,0 +1,75 @@
1
+ /** Files dock strings. */
2
+ export declare const filesEn: {
3
+ readonly files: {
4
+ readonly refreshFiles: "Refresh files";
5
+ readonly searchDocumentsPlaceholder: "Search documents…";
6
+ readonly searchDocuments: "Search documents";
7
+ readonly noFilesYet: "No files yet";
8
+ readonly noFilesHint: "Ask Belong to create some, or drop a file below.";
9
+ readonly uploading: "Uploading…";
10
+ readonly dropFilesOrBrowse: "Drop files here or browse";
11
+ readonly supportedTypes: "Supports PDF, DOC, MD, TXT, XLSX";
12
+ readonly previewFile: "Preview {{filename}}";
13
+ readonly downloadFile: "Download {{filename}}";
14
+ readonly uploadedInConversation: "Uploaded in this conversation";
15
+ readonly noInlinePreview: "No inline preview for {{mimeType}}.";
16
+ readonly download: "Download";
17
+ readonly loadingPreview: "Loading preview…";
18
+ readonly truncatedNotice: "… (truncated — download for the full file)";
19
+ readonly previewGenerateFailed: "Couldn't generate a preview.";
20
+ readonly previewTooLong: "Preview is taking too long.";
21
+ readonly previewUnavailable: "Can't preview this file — download it instead.";
22
+ readonly generatingPreview: "Generating preview…";
23
+ readonly pageAlt: "{{filename}} page {{page}}";
24
+ readonly previewOf: "Preview of {{filename}}";
25
+ readonly searchWorkspacePlaceholder: "Search workspace files…";
26
+ readonly searchWorkspace: "Search workspace files";
27
+ readonly workspaceFiles: "Workspace files";
28
+ readonly refresh: "Refresh";
29
+ readonly refreshWorkspaceFiles: "Refresh workspace files";
30
+ readonly workspaceEmpty: "No files yet — what Claude writes in your workspace shows up here.";
31
+ readonly noMatches: "No matches.";
32
+ readonly ageJustNow: "just now";
33
+ readonly ageMinutes: "{{count}}m ago";
34
+ readonly ageHours: "{{count}}h ago";
35
+ readonly ageDays: "{{count}}d ago";
36
+ readonly attachmentFallback: "attachment";
37
+ };
38
+ };
39
+ export declare const filesEs: {
40
+ files: {
41
+ refreshFiles: string;
42
+ searchDocumentsPlaceholder: string;
43
+ searchDocuments: string;
44
+ noFilesYet: string;
45
+ noFilesHint: string;
46
+ uploading: string;
47
+ dropFilesOrBrowse: string;
48
+ supportedTypes: string;
49
+ previewFile: string;
50
+ downloadFile: string;
51
+ uploadedInConversation: string;
52
+ noInlinePreview: string;
53
+ download: string;
54
+ loadingPreview: string;
55
+ truncatedNotice: string;
56
+ previewGenerateFailed: string;
57
+ previewTooLong: string;
58
+ previewUnavailable: string;
59
+ generatingPreview: string;
60
+ pageAlt: string;
61
+ previewOf: string;
62
+ searchWorkspacePlaceholder: string;
63
+ searchWorkspace: string;
64
+ workspaceFiles: string;
65
+ refresh: string;
66
+ refreshWorkspaceFiles: string;
67
+ workspaceEmpty: string;
68
+ noMatches: string;
69
+ ageJustNow: string;
70
+ ageMinutes: string;
71
+ ageHours: string;
72
+ ageDays: string;
73
+ attachmentFallback: string;
74
+ };
75
+ };
@@ -0,0 +1,31 @@
1
+ /** Header and rail dock strings. */
2
+ export declare const headerEn: {
3
+ readonly header: {
4
+ readonly byBelong: "by Belong";
5
+ readonly navChat: "Chat";
6
+ readonly navFiles: "Files";
7
+ readonly chatPlanRunning: "Chat — plan running, {{completed}} of {{total}} steps done";
8
+ readonly devMode: "Dev mode";
9
+ readonly devModeTitle: "Dev mode (belong:dev)";
10
+ readonly muteReplies: "Mute replies";
11
+ readonly readRepliesAloud: "Read replies aloud";
12
+ readonly speechNotSupported: "Speech not supported";
13
+ readonly expand: "Expand";
14
+ readonly collapse: "Collapse";
15
+ };
16
+ };
17
+ export declare const headerEs: {
18
+ header: {
19
+ byBelong: string;
20
+ navChat: string;
21
+ navFiles: string;
22
+ chatPlanRunning: string;
23
+ devMode: string;
24
+ devModeTitle: string;
25
+ muteReplies: string;
26
+ readRepliesAloud: string;
27
+ speechNotSupported: string;
28
+ expand: string;
29
+ collapse: string;
30
+ };
31
+ };
@@ -0,0 +1,17 @@
1
+ /** Login dock strings. */
2
+ export declare const loginEn: {
3
+ readonly login: {
4
+ readonly welcome: "Welcome to {{name}}";
5
+ readonly byBelong: "by Belong";
6
+ readonly signInPrompt: "Sign in to start chatting.";
7
+ readonly signIn: "Sign in";
8
+ };
9
+ };
10
+ export declare const loginEs: {
11
+ login: {
12
+ welcome: string;
13
+ byBelong: string;
14
+ signInPrompt: string;
15
+ signIn: string;
16
+ };
17
+ };
@@ -0,0 +1,35 @@
1
+ /** Plan dock strings. */
2
+ export declare const planEn: {
3
+ readonly plan: {
4
+ readonly cueReady: "Plan ready — View";
5
+ readonly fallbackTitle: "Plan";
6
+ readonly closeLabel: "Close plan";
7
+ readonly emptyState: "No plan yet. Ask the agent to plan something.";
8
+ readonly resizeLabel: "Resize plan";
9
+ readonly stepCompleted: "completed";
10
+ readonly stepFailed: "failed";
11
+ readonly stepPending: "pending";
12
+ readonly progressDone: "done";
13
+ readonly failedPrefix: "Failed:";
14
+ readonly failedHelp: "Tell me what to do";
15
+ readonly approveAndRun: "Approve & run";
16
+ readonly reject: "Reject";
17
+ };
18
+ };
19
+ export declare const planEs: {
20
+ plan: {
21
+ cueReady: string;
22
+ fallbackTitle: string;
23
+ closeLabel: string;
24
+ emptyState: string;
25
+ resizeLabel: string;
26
+ stepCompleted: string;
27
+ stepFailed: string;
28
+ stepPending: string;
29
+ progressDone: string;
30
+ failedPrefix: string;
31
+ failedHelp: string;
32
+ approveAndRun: string;
33
+ reject: string;
34
+ };
35
+ };
@@ -0,0 +1,43 @@
1
+ /** Sessions dock strings. */
2
+ export declare const sessionsEn: {
3
+ readonly sessions: {
4
+ readonly chats: "Chats";
5
+ readonly newChat: "New chat";
6
+ readonly noChatsYet: "No chats yet";
7
+ readonly untitledChat: "Untitled chat";
8
+ readonly confirmDelete: "Confirm delete";
9
+ readonly cancelDelete: "Cancel delete";
10
+ readonly deleteChat: "Delete chat";
11
+ readonly renameChat: "Rename chat";
12
+ readonly chatName: "Chat name";
13
+ readonly saveName: "Save name";
14
+ readonly cancelRename: "Cancel rename";
15
+ readonly recentSessions: "Recent sessions";
16
+ readonly loading: "Loading…";
17
+ readonly failedToLoad: "Failed to load: {{message}}";
18
+ readonly noSessionsYet: "No sessions yet.";
19
+ readonly untitledSession: "Untitled session";
20
+ readonly updated: "updated";
21
+ };
22
+ };
23
+ export declare const sessionsEs: {
24
+ sessions: {
25
+ chats: string;
26
+ newChat: string;
27
+ noChatsYet: string;
28
+ untitledChat: string;
29
+ confirmDelete: string;
30
+ cancelDelete: string;
31
+ deleteChat: string;
32
+ renameChat: string;
33
+ chatName: string;
34
+ saveName: string;
35
+ cancelRename: string;
36
+ recentSessions: string;
37
+ loading: string;
38
+ failedToLoad: string;
39
+ noSessionsYet: string;
40
+ untitledSession: string;
41
+ updated: string;
42
+ };
43
+ };
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Stream part-renderer strings (`src/stream/ai-sdk-part-renderers.tsx`): the
3
+ * cards the assistant's live stream renders — approval + choice widgets, tool
4
+ * activity tasks, browser step labels, consolidated terminal groups, artifact
5
+ * cards, and the CLI reconnect chip. Status-code badges (`ok` / `no_handler` /
6
+ * wire `data.status`) are technical chrome and stay verbatim, per the same
7
+ * rule as `embed/copy.ts`.
8
+ */
9
+ export declare const streamEn: {
10
+ readonly stream: {
11
+ readonly copyOutput: "Copy output";
12
+ readonly terminalOutput: "terminal output";
13
+ readonly skillChip: "Skill: {{name}}";
14
+ readonly failedSuffix: " — failed";
15
+ readonly approvalRequired: "Approval required";
16
+ readonly approve: "Approve";
17
+ readonly requestChanges: "Request changes";
18
+ readonly reject: "Reject";
19
+ readonly approving: "Approving…";
20
+ readonly rejecting: "Rejecting…";
21
+ readonly sending: "Sending…";
22
+ readonly decisionApproved: "approved";
23
+ readonly decisionRejected: "rejected";
24
+ readonly decisionAmendRequested: "amend requested";
25
+ readonly expired: "expired";
26
+ readonly alreadyResolved: "already resolved";
27
+ readonly alwaysAllowTool: "Always allow {{toolName}}";
28
+ readonly alwaysAllowAction: "Always allow this action";
29
+ readonly submitError: "That didn't go through — {{message}}. Try again.";
30
+ readonly errorServerAnswered: "the server answered {{status}}";
31
+ readonly errorRequestUnreachable: "the request didn't reach the server";
32
+ readonly answered: "answered";
33
+ readonly alreadyAnswered: "already answered";
34
+ readonly submit: "Submit";
35
+ readonly toolShellRunning: "Running a command";
36
+ readonly toolShellDone: "Ran a command";
37
+ readonly toolShellFailed: "A command didn't complete";
38
+ readonly toolShellDetail: "Executed a command in the workspace.";
39
+ readonly toolApprovalRunning: "Requesting approval";
40
+ readonly toolApprovalDone: "Requested approval";
41
+ readonly toolApprovalFailed: "Couldn't request approval";
42
+ readonly toolApprovalDetail: "Asked for your approval to proceed.";
43
+ readonly toolGenericRunning: "Working on {{tool}}";
44
+ readonly toolGenericDone: "Finished {{tool}}";
45
+ readonly toolGenericFailed: "{{tool}} didn't complete";
46
+ readonly toolGenericDetail: "Used the {{tool}} capability.";
47
+ readonly browserSnapshot: "Took a snapshot";
48
+ readonly browserRead: "Read the page";
49
+ readonly browserClick: "Clicked an element";
50
+ readonly browserType: "Typed text";
51
+ readonly browserNavigate: "Opened a page";
52
+ readonly browserSelfTest: "Checked the page connection";
53
+ readonly browserResolveResource: "Looked up a resource";
54
+ readonly browserAwaitProcessed: "Waited for processing";
55
+ readonly browserAssertCreated: "Checked for an existing resource";
56
+ readonly failedBadge: "failed";
57
+ readonly failedCount_one: "{{count}} failed";
58
+ readonly failedCount_other: "{{count}} failed";
59
+ readonly workedOnPageSteps_one: "Worked on the page · {{count}} step";
60
+ readonly workedOnPageSteps_other: "Worked on the page · {{count}} steps";
61
+ readonly workedSteps_one: "Worked · {{count}} step";
62
+ readonly workedSteps_other: "Worked · {{count}} steps";
63
+ readonly workingSteps_one: "Working… · {{count}} step";
64
+ readonly workingSteps_other: "Working… · {{count}} steps";
65
+ readonly ranCommands_one: "Ran {{count}} command";
66
+ readonly ranCommands_other: "Ran {{count}} commands";
67
+ readonly runningCommands_one: "Running {{count}} command…";
68
+ readonly runningCommands_other: "Running {{count}} commands…";
69
+ readonly open: "Open";
70
+ readonly reconnectNeeded: "The {{provider}} session needs reconnecting to continue.";
71
+ readonly reconnect: "Reconnect";
72
+ readonly reconnecting: "Reconnecting…";
73
+ readonly reconnected: "Reconnected";
74
+ readonly retry: "Retry";
75
+ };
76
+ };
77
+ export declare const streamEs: {
78
+ stream: {
79
+ copyOutput: string;
80
+ terminalOutput: string;
81
+ skillChip: string;
82
+ failedSuffix: string;
83
+ approvalRequired: string;
84
+ approve: string;
85
+ requestChanges: string;
86
+ reject: string;
87
+ approving: string;
88
+ rejecting: string;
89
+ sending: string;
90
+ decisionApproved: string;
91
+ decisionRejected: string;
92
+ decisionAmendRequested: string;
93
+ expired: string;
94
+ alreadyResolved: string;
95
+ alwaysAllowTool: string;
96
+ alwaysAllowAction: string;
97
+ submitError: string;
98
+ errorServerAnswered: string;
99
+ errorRequestUnreachable: string;
100
+ answered: string;
101
+ alreadyAnswered: string;
102
+ submit: string;
103
+ toolShellRunning: string;
104
+ toolShellDone: string;
105
+ toolShellFailed: string;
106
+ toolShellDetail: string;
107
+ toolApprovalRunning: string;
108
+ toolApprovalDone: string;
109
+ toolApprovalFailed: string;
110
+ toolApprovalDetail: string;
111
+ toolGenericRunning: string;
112
+ toolGenericDone: string;
113
+ toolGenericFailed: string;
114
+ toolGenericDetail: string;
115
+ browserSnapshot: string;
116
+ browserRead: string;
117
+ browserClick: string;
118
+ browserType: string;
119
+ browserNavigate: string;
120
+ browserSelfTest: string;
121
+ browserResolveResource: string;
122
+ browserAwaitProcessed: string;
123
+ browserAssertCreated: string;
124
+ failedBadge: string;
125
+ failedCount_one: string;
126
+ failedCount_other: string;
127
+ workedOnPageSteps_one: string;
128
+ workedOnPageSteps_other: string;
129
+ workedSteps_one: string;
130
+ workedSteps_other: string;
131
+ workingSteps_one: string;
132
+ workingSteps_other: string;
133
+ ranCommands_one: string;
134
+ ranCommands_other: string;
135
+ runningCommands_one: string;
136
+ runningCommands_other: string;
137
+ open: string;
138
+ reconnectNeeded: string;
139
+ reconnect: string;
140
+ reconnecting: string;
141
+ reconnected: string;
142
+ retry: string;
143
+ };
144
+ };
@@ -0,0 +1,21 @@
1
+ /** Usage meter dock strings. */
2
+ export declare const usageEn: {
3
+ readonly usage: {
4
+ readonly tooltip: "Auto-compacts at {{chars}} chars; {{tokens}} tokens used this session";
5
+ readonly context: "Context {{pct}}%";
6
+ readonly tokens: "{{count}} tokens";
7
+ readonly lastTurn: "Last turn: {{in}} in / {{out}} out";
8
+ readonly turnsThisSessionOne: "{{count}} turn this session";
9
+ readonly turnsThisSessionOther: "{{count}} turns this session";
10
+ };
11
+ };
12
+ export declare const usageEs: {
13
+ usage: {
14
+ tooltip: string;
15
+ context: string;
16
+ tokens: string;
17
+ lastTurn: string;
18
+ turnsThisSessionOne: string;
19
+ turnsThisSessionOther: string;
20
+ };
21
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The shape every locale catalog must satisfy: the SAME key structure as the
3
+ * English source of truth (`en.ts`), but with every leaf widened to a free
4
+ * `string`. Typing `es` as `LocaleMessages<typeof en>` makes a forgotten
5
+ * translation a COMPILE error (missing key) instead of a silent runtime
6
+ * fallback — without locking each value to the English literal.
7
+ */
8
+ export type LocaleMessages<T> = {
9
+ readonly [K in keyof T]: T[K] extends string ? string : LocaleMessages<T[K]>;
10
+ };
@@ -23,6 +23,7 @@ export type QueuedMessage = {
23
23
  readonly clientId: string;
24
24
  readonly text: string;
25
25
  readonly submittedAt: number;
26
+ readonly state: "queued" | "failed";
26
27
  };
27
28
  export declare const ChatRoute: ({ sessionId }?: {
28
29
  sessionId?: string;
@@ -2,8 +2,9 @@ import { BelongDataParts, BelongUIMessage, SandboxCommandData, ToolCallData } fr
2
2
  export declare const ToolActivityGroup: ({ tools }: {
3
3
  readonly tools: readonly ToolCallData[];
4
4
  }) => import("react").JSX.Element;
5
- export declare const TerminalTaskGroup: ({ commands, }: {
5
+ export declare const TerminalTaskGroup: ({ commands, turnStreaming, }: {
6
6
  readonly commands: readonly TerminalCommand[];
7
+ readonly turnStreaming?: boolean;
7
8
  }) => import("react").JSX.Element;
8
9
  /** A segment of a message's text: prose to render as markdown, or a `@`-mention. */
9
10
  type TextSegment = {
@@ -30,6 +31,13 @@ export type PartRendererProps = {
30
31
  * omits it while a run streams so the CTA can't double-submit).
31
32
  */
32
33
  readonly onExecutePlan?: (() => void) | undefined;
34
+ /**
35
+ * The part belongs to a restored-history message (`metadata.fromHistory`,
36
+ * stamped by `loadSessionHistory`). The dispatch renderers (navigation,
37
+ * ui_action, cli-reconnect) render settled and never re-fire their one-shot
38
+ * side effects. Absent/false = live part, dispatch as usual.
39
+ */
40
+ readonly historical?: boolean | undefined;
33
41
  };
34
42
  /**
35
43
  * The AI SDK's `UIMessagePart` union is open at the patch-version
@@ -38,7 +46,7 @@ export type PartRendererProps = {
38
46
  * `BelongDataParts` (above) plus the SDK's built-in `text` and
39
47
  * `reasoning` parts.
40
48
  */
41
- export declare const PartRenderer: ({ part, onExecutePlan }: PartRendererProps) => import("react").JSX.Element | null;
49
+ export declare const PartRenderer: ({ part, onExecutePlan, historical }: PartRendererProps) => import("react").JSX.Element | null;
42
50
  /** One shell command paired with its (same-id) sandbox output, if any. */
43
51
  export type TerminalCommand = {
44
52
  readonly command: ToolCallData;
@@ -1,6 +1,34 @@
1
1
  import { z } from 'zod';
2
2
  import { ChatTransport, UIMessageChunk } from 'ai';
3
3
  import { BelongUIMessage, WireStreamPart } from './belong-data-parts.ts';
4
+ declare const cancelRunResponseSchema: z.ZodObject<{
5
+ recalledMessages: z.ZodDefault<z.ZodArray<z.ZodObject<{
6
+ messageId: z.ZodString;
7
+ clientMessageId: z.ZodNullable<z.ZodString>;
8
+ text: z.ZodString;
9
+ }, "strip", z.ZodTypeAny, {
10
+ clientMessageId: string | null;
11
+ text: string;
12
+ messageId: string;
13
+ }, {
14
+ clientMessageId: string | null;
15
+ text: string;
16
+ messageId: string;
17
+ }>, "many">>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ recalledMessages: {
20
+ clientMessageId: string | null;
21
+ text: string;
22
+ messageId: string;
23
+ }[];
24
+ }, {
25
+ recalledMessages?: {
26
+ clientMessageId: string | null;
27
+ text: string;
28
+ messageId: string;
29
+ }[] | undefined;
30
+ }>;
31
+ export type RecalledQueuedMessage = z.infer<typeof cancelRunResponseSchema>["recalledMessages"][number];
4
32
  /**
5
33
  * The wire/stored part union. Exported so the history loader (chat.tsx) can
6
34
  * validate persisted assistant parts against the SAME shapes the live stream
@@ -652,6 +680,14 @@ export type BelongChatTransportOptions = {
652
680
  * production uses `STALL_TIMEOUT_MS`.
653
681
  */
654
682
  readonly stallTimeoutMs?: number;
683
+ /**
684
+ * Workspace isolation: the host workspace this transport's session belongs
685
+ * to. Defaults to the CURRENT scope at construction — captured once, so a
686
+ * workspace-A transport still streaming after the host switched to B keeps
687
+ * persisting its cursor under A's key and stamping A on its requests.
688
+ * Tests may pin it explicitly.
689
+ */
690
+ readonly workspaceExternalId?: string | null;
655
691
  };
656
692
  export type StreamContext = {
657
693
  /** Stable id we emit on every `text-delta`. Null when no text run is open. */
@@ -682,15 +718,32 @@ export type StreamContext = {
682
718
  export declare class BelongChatTransport implements ChatTransport<BelongUIMessage> {
683
719
  #private;
684
720
  constructor(options: BelongChatTransportOptions);
721
+ /**
722
+ * The server session this transport is pinned to (adopted at construction
723
+ * or created on first send), or null before any exists. The queued-send
724
+ * path reads THIS — never the live workspace-keyed pointer — so a steering
725
+ * message posts to the conversation on screen even inside the scope
726
+ * store's poll window after a host workspace switch.
727
+ */
728
+ get sessionId(): string | null;
729
+ /** The construction-captured workspace (see #workspaceExternalId). */
730
+ get workspaceExternalId(): string | null;
685
731
  /** Drop the cached session so the next `sendMessages` creates a new one. */
686
732
  reset(): void;
687
733
  /**
688
734
  * Best-effort server-side cancel of an in-flight run. `useChat`'s `stop()`
689
735
  * only aborts the local stream (stops listening); this tells belong-cloud to
690
736
  * actually halt the agent (POST /v1/runs/:runId/cancel → run-cancel pub/sub).
737
+ *
738
+ * BEL-144 — the backend also recalls the session's queued-but-unclaimed
739
+ * messages so they never execute; their text is returned here for the caller
740
+ * to restore into the composer. Any failure (network, non-2xx, old backend
741
+ * without the field) collapses to an empty list — the cancel stays
742
+ * best-effort.
691
743
  */
692
- cancelRun: (runId: string) => Promise<void>;
744
+ cancelRun: (runId: string) => Promise<readonly RecalledQueuedMessage[]>;
693
745
  sendMessages: ChatTransport<BelongUIMessage>["sendMessages"];
694
746
  reconnectToStream: ChatTransport<BelongUIMessage>["reconnectToStream"];
695
747
  }
696
748
  export declare const wireToUiChunks: (part: WireStreamPart, ctx: StreamContext) => readonly UIMessageChunk[];
749
+ export {};
@@ -1,4 +1,5 @@
1
1
  import { UIMessage } from 'ai';
2
+ import { BelongMessageMetadata } from './message-metadata.ts';
2
3
  /**
3
4
  * F2 — per-step execution status. Optional: absent means `pending`
4
5
  * (back-compat with plans proposed before F2 and the initial propose). The
@@ -183,11 +184,12 @@ export type BelongDataParts = {
183
184
  };
184
185
  /**
185
186
  * The concrete `UIMessage` shape the chat surface and transport speak.
186
- * Metadata is typed `unknown` and read defensively at use sites (e.g. the
187
- * user-bubble skill chip reads `metadata.skill` via a narrowing guard) — keep
188
- * it `unknown` so new metadata fields need no type-plumbing changes.
187
+ * Metadata was `unknown` until the `fromHistory` gate needed to propagate
188
+ * reliably now it's the `belongMessageMetadataSchema`-inferred type, parsed
189
+ * once at the wire perimeter (§4) so use sites read typed fields instead of
190
+ * re-narrowing.
189
191
  */
190
- export type BelongUIMessage = UIMessage<unknown, BelongDataParts>;
192
+ export type BelongUIMessage = UIMessage<BelongMessageMetadata, BelongDataParts>;
191
193
  /**
192
194
  * Wire shape emitted by belong-cloud's SSE adapter. This stays as a
193
195
  * separate union because the server side has not migrated to AI-SDK