@belonguniverseai/react-sdk 0.6.21 → 0.6.23
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 +69 -0
- package/dist/api/account-connectors.d.ts +2 -2
- package/dist/api/api-keys.d.ts +22 -0
- package/dist/api/client-identity.d.ts +12 -0
- package/dist/api/client.d.ts +2453 -92
- package/dist/api/goals.d.ts +179 -0
- package/dist/api/issue-reports.d.ts +13 -0
- package/dist/api/query-keys.d.ts +19 -0
- package/dist/api/report-client-error.d.ts +3 -0
- package/dist/api/retry-fetch.d.ts +19 -0
- package/dist/api/session-end.d.ts +2 -0
- package/dist/api/skill-library.d.ts +100 -0
- package/dist/api/skills.d.ts +3 -1
- package/dist/api/task-schedule-sharing.d.ts +166 -0
- package/dist/api/task-schedules.d.ts +23 -1
- package/dist/app/BelongDock.d.ts +0 -28
- package/dist/app/dock-demo-features.d.ts +13 -0
- package/dist/app/dock-demo-transport.d.ts +37 -0
- package/dist/app/dock-outlet.d.ts +15 -5
- package/dist/app/dock-story-data.d.ts +116 -0
- package/dist/browser/allowed-ops.d.ts +18 -0
- package/dist/browser/host-mcp.d.ts +31 -0
- package/dist/component/THIRD_PARTY_NOTICES.txt +24 -0
- package/dist/component/{abnfDiagram-N423BO3Z-DZRUOUZQ.js → abnfDiagram-N423BO3Z-bM1BoI0O.js} +4 -4
- package/dist/component/{arc-B4biduil.js → arc-DaSgre52.js} +2 -2
- package/dist/component/{architectureDiagram-T3A2C74G-q8voStNN.js → architectureDiagram-T3A2C74G-avMCXzQw.js} +3 -3
- package/dist/component/{blockDiagram-VBNYF7ZC-C0TDyTgw.js → blockDiagram-VBNYF7ZC-Cg6EDrdt.js} +4 -4
- package/dist/component/{c4Diagram-5PPSVZJV-rxRyd6rh.js → c4Diagram-5PPSVZJV-DhUs6wdK.js} +3 -3
- package/dist/component/{channel-CUruDJSx.js → channel-DlmuDpcv.js} +2 -2
- package/dist/component/{chunk-2GRJ4B5K-Kff5Fvbi.js → chunk-2GRJ4B5K-Drdf-9Az.js} +2 -2
- package/dist/component/{chunk-2Q5K7J3B-BT3ZD31a.js → chunk-2Q5K7J3B-CG6mCJjr.js} +2 -2
- package/dist/component/{chunk-5RXB4S5H-CYZ36tQD.js → chunk-5RXB4S5H-DYJwqjr4.js} +5 -5
- package/dist/component/{chunk-5VM5RSS4-BweQRk7u.js → chunk-5VM5RSS4-B21XfkBj.js} +2 -2
- package/dist/component/{chunk-6Q2QTUOP-DHcoXRhe.js → chunk-6Q2QTUOP-DZkWqf90.js} +2 -2
- package/dist/component/{chunk-GF5L2VYU-DtE5ljCc.js → chunk-GF5L2VYU-5hBEo1f5.js} +6 -6
- package/dist/component/{chunk-JWPE2WC7-ClHq4gN2.js → chunk-JWPE2WC7-DAn-TcDC.js} +2 -2
- package/dist/component/{chunk-KBJHAD2P-BeCfHf5W.js → chunk-KBJHAD2P-CEMDhN2A.js} +2 -2
- package/dist/component/{chunk-RYQCIY6F-CuAngwHt.js → chunk-RYQCIY6F-BWL1otLK.js} +2 -2
- package/dist/component/{chunk-XXDRQBXY-D9c0CJyR.js → chunk-XXDRQBXY-D0TWnqlD.js} +2 -2
- package/dist/component/{classDiagram-JCYQIIEL-DdzIbKj1.js → classDiagram-JCYQIIEL-CjU-7xK0.js} +3 -3
- package/dist/component/{classDiagram-v2-OCEON4UE-DdzIbKj1.js → classDiagram-v2-OCEON4UE-CjU-7xK0.js} +3 -3
- package/dist/component/{cose-bilkent-JH36ORCC-hME9BYGm.js → cose-bilkent-JH36ORCC-MkPQhZKJ.js} +2 -2
- package/dist/component/{cynefinDiagram-MW4NZA55-BiceKBPh.js → cynefinDiagram-MW4NZA55-Wf-Eh_MR.js} +3 -3
- package/dist/component/{dagre-VZM6K2ZE-DiPOLAUX.js → dagre-VZM6K2ZE-D1ND11ws.js} +3 -3
- package/dist/component/{diagram-7IWD3JNH-BSDWgxjs.js → diagram-7IWD3JNH-ChO63Ikp.js} +4 -4
- package/dist/component/{diagram-B4RE2ZJO-BdpGOPaT.js → diagram-B4RE2ZJO-CFVIZBxd.js} +3 -3
- package/dist/component/{diagram-LBJQPF4R-B0V6_5ih.js → diagram-LBJQPF4R-BFErKt-H.js} +3 -3
- package/dist/component/{diagram-Q27KOJAE-CYDb40TJ.js → diagram-Q27KOJAE-3EA2fDKz.js} +4 -4
- package/dist/component/{diagram-UB23O5K3-DgwjRdl5.js → diagram-UB23O5K3-D914yr1r.js} +3 -3
- package/dist/component/{ebnfDiagram-BXEA7PRR-D-C7SWec.js → ebnfDiagram-BXEA7PRR-BlRDglJm.js} +4 -4
- package/dist/component/{erDiagram-JOGREHBK-DLJCjcXM.js → erDiagram-JOGREHBK-BgHUzm41.js} +5 -5
- package/dist/component/{flowDiagram-UKHOOZJN-BZfBucKB.js → flowDiagram-UKHOOZJN-Cf42sXVK.js} +7 -7
- package/dist/component/{ganttDiagram-PKOTCBZU-CxTHmusv.js → ganttDiagram-PKOTCBZU-Bqai8Nqw.js} +3 -3
- package/dist/component/{gitGraphDiagram-DS77QQ5N-B_dWXxMf.js → gitGraphDiagram-DS77QQ5N-M6yX_E4b.js} +4 -4
- package/dist/component/{highlighted-body-OFNGDK62-CQ1ZdhQ-.js → highlighted-body-OFNGDK62-C2rmuXAs.js} +2 -2
- package/dist/component/index.js +2 -2
- package/dist/component/{infoDiagram-6WML65LV-P4GO-aVw.js → infoDiagram-6WML65LV-Bk4qDfY4.js} +2 -2
- package/dist/component/{ishikawaDiagram-WSZJBQD7-BMXMrxKI.js → ishikawaDiagram-WSZJBQD7-CQ0-i0XP.js} +2 -2
- package/dist/component/{journeyDiagram-NVQOT4AX-DPdTmxkF.js → journeyDiagram-NVQOT4AX-CK9lX22d.js} +5 -5
- package/dist/component/{kanban-definition-27J2QSJJ-sYw64NrE.js → kanban-definition-27J2QSJJ-CrIKfzfe.js} +3 -3
- package/dist/component/{linear-DYjDg3gl.js → linear-CzN3Xd3g.js} +2 -2
- package/dist/component/{mermaid-GHXKKRXX-DfdCmrs3.js → mermaid-GHXKKRXX-B-ea5OKA.js} +116618 -105206
- package/dist/component/{mindmap-definition-FAOFIHXS-UkAbrucA.js → mindmap-definition-FAOFIHXS-DUDsEObz.js} +4 -4
- package/dist/component/{pegDiagram-VL7TDLO6-BGab1it6.js → pegDiagram-VL7TDLO6-DFJ-rOLH.js} +4 -4
- package/dist/component/{pieDiagram-7S7Q4E2Y-BnY70Pr-.js → pieDiagram-7S7Q4E2Y-OwliOUdN.js} +4 -4
- package/dist/component/{quadrantDiagram-CIZ2JOQS-Cv1bjdQb.js → quadrantDiagram-CIZ2JOQS-CLKxzqPi.js} +3 -3
- package/dist/component/{railroadDiagram-AXF67PYL-DJhLbGB_.js → railroadDiagram-AXF67PYL-_jBOX7-D.js} +4 -4
- package/dist/component/{requirementDiagram-LRYGKXZP-CLW3CgbU.js → requirementDiagram-LRYGKXZP-CxfMaDPH.js} +4 -4
- package/dist/component/{sankeyDiagram-W5VNT64P-vnapx0yf.js → sankeyDiagram-W5VNT64P-D-qOUzh7.js} +2 -2
- package/dist/component/{sequenceDiagram-SI44F4Z6-I43iQsY0.js → sequenceDiagram-SI44F4Z6-B57h29Ae.js} +4 -4
- package/dist/component/{sizeCapture-X5ZJPWSS-D9LGwwwC.js → sizeCapture-X5ZJPWSS-DlIoKfk1.js} +2 -2
- package/dist/component/snapdom-DkzCA8S0.js +7061 -0
- package/dist/component/{stateDiagram-OKZ733FA-BXejMYGk.js → stateDiagram-OKZ733FA-CNNoDNwB.js} +3 -3
- package/dist/component/{stateDiagram-v2-UEYNNEHI-BP05TJSl.js → stateDiagram-v2-UEYNNEHI-xYjW9R-s.js} +3 -3
- package/dist/component/{swimlanes-SLNWSIFB-CfmDVYhs.js → swimlanes-SLNWSIFB-Chjr6NCU.js} +4 -4
- package/dist/component/{swimlanesDiagram-ULZ7WXOC-DfjQBUfV.js → swimlanesDiagram-ULZ7WXOC-A9mWwnCX.js} +3 -3
- package/dist/component/{timeline-definition-Z64GVDOM-C0BwzTs3.js → timeline-definition-Z64GVDOM-DldyCd1l.js} +3 -3
- package/dist/component/{vennDiagram-T6HMQDX7-CRf8sGBL.js → vennDiagram-T6HMQDX7-BGfiPWG2.js} +2 -2
- package/dist/component/{wardleyDiagram-T6FBY63Y-C2h7TQ4a.js → wardleyDiagram-T6FBY63Y-Bzn9DJ27.js} +3 -3
- package/dist/component/{xychartDiagram-ELKLHX3M-CBcAwmdF.js → xychartDiagram-ELKLHX3M-nMaNgT12.js} +3 -3
- package/dist/components/ai-elements/message.d.ts +2 -2
- package/dist/components/ai-elements/prompt-input.d.ts +3 -1
- package/dist/components/ai-elements/task.d.ts +2 -1
- package/dist/components/ai-elements/terminal-task.d.ts +2 -1
- package/dist/components/connectors/portal-theme.d.ts +2 -8
- package/dist/components/embed/AgentChatIcon.d.ts +1 -1
- package/dist/components/embed/AgentPhaseIcon.d.ts +16 -14
- package/dist/components/embed/ApiKeysSettings.d.ts +1 -0
- package/dist/components/embed/BetaBadge.d.ts +8 -10
- package/dist/components/embed/ComposerContext.d.ts +9 -0
- package/dist/components/embed/EmbedAvatar.d.ts +19 -18
- package/dist/components/embed/EmbedComposer.d.ts +13 -1
- package/dist/components/embed/EmbedHeader.d.ts +13 -30
- package/dist/components/embed/EmbedRail.d.ts +29 -10
- package/dist/components/embed/EmbedSessions.d.ts +10 -12
- package/dist/components/embed/GoalActions.d.ts +15 -0
- package/dist/components/embed/GoalBadge.d.ts +17 -0
- package/dist/components/embed/GoalClearDialog.d.ts +6 -0
- package/dist/components/embed/GoalClearedLine.d.ts +3 -0
- package/dist/components/embed/GoalCompletionCard.d.ts +12 -0
- package/dist/components/embed/GoalComposeSheet.d.ts +20 -0
- package/dist/components/embed/GoalProposalCard.d.ts +29 -0
- package/dist/components/embed/GoalRailView.d.ts +15 -0
- package/dist/components/embed/GoalRefusalCard.d.ts +22 -0
- package/dist/components/embed/GoalSetCard.d.ts +5 -0
- package/dist/components/embed/GoalSnoozeMenu.d.ts +14 -0
- package/dist/components/embed/GoalStatusRow.d.ts +6 -0
- package/dist/components/embed/GoalTimeline.d.ts +6 -0
- package/dist/components/embed/LegalShortDisclaimer.d.ts +6 -8
- package/dist/components/embed/MentionInput.d.ts +9 -3
- package/dist/components/embed/MobileNavBar.d.ts +16 -10
- package/dist/components/embed/OnboardingOverlay.d.ts +3 -1
- package/dist/components/embed/OnboardingTour.d.ts +1 -10
- package/dist/components/embed/OnboardingWelcome.d.ts +1 -11
- package/dist/components/embed/PlanPanel.d.ts +3 -1
- package/dist/components/embed/PreviewPanel.d.ts +3 -1
- package/dist/components/embed/QuestionCard.d.ts +12 -1
- package/dist/components/embed/ScheduleNotices.d.ts +23 -0
- package/dist/components/embed/SentAsGoalTag.d.ts +1 -0
- package/dist/components/embed/SessionSwitcher.d.ts +12 -0
- package/dist/components/embed/SubagentAvatar.d.ts +8 -0
- package/dist/components/embed/SubagentsPaneBody.d.ts +3 -0
- package/dist/components/embed/WorkspacePane.d.ts +3 -1
- package/dist/components/embed/navigation-layout.d.ts +7 -0
- package/dist/components/embed/rail-flags.d.ts +6 -0
- package/dist/components/embed/use-prompt-invocations.d.ts +6 -1
- package/dist/components/feedback/IssueReportController.d.ts +1 -0
- package/dist/components/feedback/IssueReportDialog.d.ts +6 -0
- package/dist/components/prompts/PromptPreviewDialog.d.ts +10 -0
- package/dist/components/prompts/PromptsListSurface.d.ts +4 -4
- package/dist/components/scheduled/ConfirmDeleteScheduleDialog.d.ts +1 -0
- package/dist/components/scheduled/ScheduleDialog.d.ts +4 -0
- package/dist/components/scheduled/ScheduledDetailSurface.d.ts +1 -0
- package/dist/components/scheduled/ScheduledHeader.d.ts +3 -0
- package/dist/components/scheduled/ScheduledListSurface.d.ts +1 -1
- package/dist/components/scheduled/ShareScheduleDialog.d.ts +10 -0
- package/dist/components/scheduled/SharedSchedulesSurface.d.ts +1 -0
- package/dist/components/scheduled/schedule-dialog-model.d.ts +5 -2
- package/dist/components/skills/ConfirmDeleteSkillDialog.d.ts +9 -0
- package/dist/components/skills/SkillDiscover.d.ts +1 -0
- package/dist/components/skills/SkillLibraryToolSync.d.ts +4 -0
- package/dist/components/skills/SkillsListSurface.d.ts +29 -0
- package/dist/components/skills/UploadSkillDialog.d.ts +32 -0
- package/dist/components/skills/skill-archive-file.d.ts +15 -0
- package/dist/components/ui/card.d.ts +1 -1
- package/dist/components/ui/dialog.d.ts +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +2 -2
- package/dist/components/ui/hover-card.d.ts +1 -1
- package/dist/components/ui/popover.d.ts +1 -1
- package/dist/components/ui/select.d.ts +1 -1
- package/dist/components/ui/shadow-dialog-focus.d.ts +5 -0
- package/dist/components/ui/tooltip.d.ts +1 -1
- package/dist/embed/brand-marks.d.ts +3 -3
- package/dist/embed/client-error-log.d.ts +72 -0
- package/dist/embed/copy.d.ts +8 -2
- package/dist/embed/dock-open-request.d.ts +32 -0
- package/dist/embed/dock-state.d.ts +1 -1
- package/dist/embed/goal-actions-model.d.ts +9 -0
- package/dist/embed/goal-cap-notice.d.ts +36 -0
- package/dist/embed/goal-deep-link.d.ts +24 -0
- package/dist/embed/goal-edit-command.d.ts +25 -0
- package/dist/embed/goal-journal.d.ts +53 -0
- package/dist/embed/goal-live-status.d.ts +2 -0
- package/dist/embed/goal-plain-units.d.ts +35 -0
- package/dist/embed/goal-progress.d.ts +15 -0
- package/dist/embed/goal-proposal-dismissal.d.ts +11 -0
- package/dist/embed/goal-resume-time.d.ts +22 -0
- package/dist/embed/goal-row-model.d.ts +27 -0
- package/dist/embed/goal-runway.d.ts +5 -0
- package/dist/embed/goal-schedule-handoff.d.ts +12 -0
- package/dist/embed/goal-status-label.d.ts +3 -0
- package/dist/embed/goal-time-usage.d.ts +19 -0
- package/dist/embed/issue-report-bus.d.ts +14 -0
- package/dist/embed/issue-report-open.d.ts +8 -0
- package/dist/embed/issue-report.d.ts +41 -0
- package/dist/embed/legal-disclaimer.d.ts +5 -1
- package/dist/embed/library-composer.d.ts +24 -0
- package/dist/embed/library-navigation.d.ts +6 -0
- package/dist/embed/portal-container.d.ts +17 -16
- package/dist/embed/presets.d.ts +2 -2
- package/dist/embed/schedule-invitation.d.ts +5 -0
- package/dist/embed/screen-capture.d.ts +74 -0
- package/dist/embed/slash-commands.d.ts +24 -0
- package/dist/embed/task-schedule-command.d.ts +7 -0
- package/dist/embed/use-session-draft.d.ts +11 -0
- package/dist/i18n/messages/en.d.ts +599 -4
- package/dist/i18n/messages/surfaces/feedback.d.ts +84 -0
- package/dist/i18n/messages/surfaces/files.d.ts +4 -0
- package/dist/i18n/messages/surfaces/header.d.ts +20 -0
- package/dist/i18n/messages/surfaces/navigation.d.ts +149 -0
- package/dist/i18n/messages/surfaces/prompts.d.ts +56 -5
- package/dist/i18n/messages/surfaces/scheduled.d.ts +233 -1
- package/dist/i18n/messages/surfaces/sessions.d.ts +16 -0
- package/dist/i18n/messages/surfaces/settings.d.ts +229 -0
- package/dist/i18n/messages/surfaces/skills.d.ts +299 -0
- package/dist/i18n/messages/surfaces/stream.d.ts +232 -0
- package/dist/i18n/messages/surfaces/usage.d.ts +56 -0
- package/dist/i18n/messages/surfaces/workspace.d.ts +20 -0
- package/dist/public-api.d.ts +1 -1
- package/dist/routes/chat/part-renderer-extra-props.d.ts +43 -0
- package/dist/routes/chat/use-goal-receipt.d.ts +37 -0
- package/dist/routes/chat/use-host-draft-request.d.ts +2 -0
- package/dist/routes/chat/use-session-goal.d.ts +227 -0
- package/dist/routes/chat.d.ts +11 -1
- package/dist/routes/goal.d.ts +1 -0
- package/dist/routes/library.d.ts +4 -0
- package/dist/routes/skills.d.ts +2 -0
- package/dist/stream/activity-items.d.ts +25 -0
- package/dist/stream/ai-sdk-part-renderers.d.ts +67 -32
- package/dist/stream/belong-chat-transport.d.ts +157 -2
- package/dist/stream/belong-data-parts.d.ts +56 -6
- package/dist/stream/goal-store.d.ts +43 -0
- package/dist/stream/message-metadata.d.ts +1 -0
- package/dist/stream/message-parts.d.ts +42 -0
- package/dist/stream/select-goal-set-part-id.d.ts +2 -0
- package/dist/stream/select-latest-goal.d.ts +13 -0
- package/dist/stream/subagent-controls-store.d.ts +20 -0
- package/dist/stream/subagent-lanes-model.d.ts +175 -0
- package/dist/stream/subagent-lanes.d.ts +90 -0
- package/dist/stream/use-publish-subagent-controls.d.ts +11 -0
- package/dist/stream/workspace-focus-store.d.ts +7 -1
- package/dist/test/render.d.ts +18 -1
- package/dist/test/subagent-fixtures.d.ts +24 -0
- package/dist/types/public.d.ts +54 -1
- package/package.json +1 -1
- package/dist/components/ai-elements/reasoning.d.ts +0 -26
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
/** Usage meter + context-window panel dock strings. */
|
|
2
2
|
export declare const usageEn: {
|
|
3
3
|
readonly usage: {
|
|
4
|
+
readonly expandComposer: "Expand message input";
|
|
5
|
+
readonly collapseComposer: "Compact message input";
|
|
6
|
+
readonly filesShort_one: "{{count}} file";
|
|
7
|
+
readonly filesShort_other: "{{count}} files";
|
|
8
|
+
readonly contextTitle: "Context for this message";
|
|
9
|
+
readonly filesToSend: "Files to send";
|
|
10
|
+
readonly attachedFiles_one: "{{count}} file attached";
|
|
11
|
+
readonly attachedFiles_other: "{{count}} files attached";
|
|
12
|
+
readonly filesNote: "These files will be sent with your next message.";
|
|
13
|
+
readonly emptyFiles: "Attach files to include them in your next message.";
|
|
14
|
+
readonly pageNote: "Page label only; this control does not attach page contents.";
|
|
15
|
+
readonly removeFile: "Remove {{name}}";
|
|
16
|
+
readonly closeContext: "Close context";
|
|
17
|
+
readonly currentPage: "Current page";
|
|
4
18
|
readonly tooltip: "Auto-compacts at {{chars}} chars; {{tokens}} tokens used this session";
|
|
5
19
|
readonly windowTooltip: "Context window: {{used}} of {{window}} tokens used ({{pct}}%)";
|
|
6
20
|
readonly context: "Context {{pct}}%";
|
|
@@ -27,6 +41,20 @@ export declare const usageEn: {
|
|
|
27
41
|
};
|
|
28
42
|
export declare const usageEs: {
|
|
29
43
|
usage: {
|
|
44
|
+
expandComposer: string;
|
|
45
|
+
collapseComposer: string;
|
|
46
|
+
filesShort_one: string;
|
|
47
|
+
filesShort_other: string;
|
|
48
|
+
contextTitle: string;
|
|
49
|
+
filesToSend: string;
|
|
50
|
+
attachedFiles_one: string;
|
|
51
|
+
attachedFiles_other: string;
|
|
52
|
+
filesNote: string;
|
|
53
|
+
emptyFiles: string;
|
|
54
|
+
pageNote: string;
|
|
55
|
+
removeFile: string;
|
|
56
|
+
closeContext: string;
|
|
57
|
+
currentPage: string;
|
|
30
58
|
tooltip: string;
|
|
31
59
|
windowTooltip: string;
|
|
32
60
|
context: string;
|
|
@@ -53,6 +81,20 @@ export declare const usageEs: {
|
|
|
53
81
|
};
|
|
54
82
|
export declare const usagePt: {
|
|
55
83
|
usage: {
|
|
84
|
+
expandComposer: string;
|
|
85
|
+
collapseComposer: string;
|
|
86
|
+
filesShort_one: string;
|
|
87
|
+
filesShort_other: string;
|
|
88
|
+
contextTitle: string;
|
|
89
|
+
filesToSend: string;
|
|
90
|
+
attachedFiles_one: string;
|
|
91
|
+
attachedFiles_other: string;
|
|
92
|
+
filesNote: string;
|
|
93
|
+
emptyFiles: string;
|
|
94
|
+
pageNote: string;
|
|
95
|
+
removeFile: string;
|
|
96
|
+
closeContext: string;
|
|
97
|
+
currentPage: string;
|
|
56
98
|
tooltip: string;
|
|
57
99
|
windowTooltip: string;
|
|
58
100
|
context: string;
|
|
@@ -79,6 +121,20 @@ export declare const usagePt: {
|
|
|
79
121
|
};
|
|
80
122
|
export declare const usageIt: {
|
|
81
123
|
usage: {
|
|
124
|
+
expandComposer: string;
|
|
125
|
+
collapseComposer: string;
|
|
126
|
+
filesShort_one: string;
|
|
127
|
+
filesShort_other: string;
|
|
128
|
+
contextTitle: string;
|
|
129
|
+
filesToSend: string;
|
|
130
|
+
attachedFiles_one: string;
|
|
131
|
+
attachedFiles_other: string;
|
|
132
|
+
filesNote: string;
|
|
133
|
+
emptyFiles: string;
|
|
134
|
+
pageNote: string;
|
|
135
|
+
removeFile: string;
|
|
136
|
+
closeContext: string;
|
|
137
|
+
currentPage: string;
|
|
82
138
|
tooltip: string;
|
|
83
139
|
windowTooltip: string;
|
|
84
140
|
context: string;
|
|
@@ -8,6 +8,11 @@ export declare const workspaceEn: {
|
|
|
8
8
|
readonly shownByBelong: "Shown by Belong";
|
|
9
9
|
readonly openedByYou: "You opened this";
|
|
10
10
|
readonly planTitle: "Plan";
|
|
11
|
+
readonly subagentsFilterAll: "All {{count}}";
|
|
12
|
+
readonly subagentsFilterRunning: "Running {{count}}";
|
|
13
|
+
readonly subagentsFilterAttention: "Needs a look {{count}}";
|
|
14
|
+
readonly subagentsFilterDone: "Done {{count}}";
|
|
15
|
+
readonly subagentsOpen: "Open";
|
|
11
16
|
};
|
|
12
17
|
};
|
|
13
18
|
export declare const workspaceEs: {
|
|
@@ -18,6 +23,11 @@ export declare const workspaceEs: {
|
|
|
18
23
|
shownByBelong: string;
|
|
19
24
|
openedByYou: string;
|
|
20
25
|
planTitle: string;
|
|
26
|
+
subagentsFilterAll: string;
|
|
27
|
+
subagentsFilterRunning: string;
|
|
28
|
+
subagentsFilterAttention: string;
|
|
29
|
+
subagentsFilterDone: string;
|
|
30
|
+
subagentsOpen: string;
|
|
21
31
|
};
|
|
22
32
|
};
|
|
23
33
|
export declare const workspacePt: {
|
|
@@ -28,6 +38,11 @@ export declare const workspacePt: {
|
|
|
28
38
|
shownByBelong: string;
|
|
29
39
|
openedByYou: string;
|
|
30
40
|
planTitle: string;
|
|
41
|
+
subagentsFilterAll: string;
|
|
42
|
+
subagentsFilterRunning: string;
|
|
43
|
+
subagentsFilterAttention: string;
|
|
44
|
+
subagentsFilterDone: string;
|
|
45
|
+
subagentsOpen: string;
|
|
31
46
|
};
|
|
32
47
|
};
|
|
33
48
|
export declare const workspaceIt: {
|
|
@@ -38,5 +53,10 @@ export declare const workspaceIt: {
|
|
|
38
53
|
shownByBelong: string;
|
|
39
54
|
openedByYou: string;
|
|
40
55
|
planTitle: string;
|
|
56
|
+
subagentsFilterAll: string;
|
|
57
|
+
subagentsFilterRunning: string;
|
|
58
|
+
subagentsFilterAttention: string;
|
|
59
|
+
subagentsFilterDone: string;
|
|
60
|
+
subagentsOpen: string;
|
|
41
61
|
};
|
|
42
62
|
};
|
package/dist/public-api.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { BelongGlobal, BelongInitInput, BelongTheme, BelongThemeBrand, BelongThemeDensity, BelongThemeMode, BelongThemePalette, BelongThemeSide, PartialBelongTheme, RouteHandler, RouteHandlerResult, UiActionHandler, UiActionResult, } from './types/public.ts';
|
|
1
|
+
export type { BelongBrowserControlConfig, BelongBrowserOpName, BelongGlobal, BelongHostMcpConfig, BelongInitInput, BelongOpenOptions, BelongTheme, BelongThemeBrand, BelongThemeDensity, BelongThemeMode, BelongThemePalette, BelongThemeSide, PartialBelongTheme, RouteHandler, RouteHandlerResult, UiActionHandler, UiActionResult, } from './types/public.ts';
|
|
2
2
|
export { SdkProviders } from './app/providers.tsx';
|
|
3
3
|
export { createApiClient, setBelongToken } from './api/client.ts';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { SessionGoalApi } from './use-session-goal.ts';
|
|
2
|
+
import { GoalProposalData } from '../../stream/belong-data-parts.ts';
|
|
3
|
+
export type PartRendererExtraProps = {
|
|
4
|
+
readonly onContinueConnector?: ((connectorId: string, name: string) => Promise<void>) | undefined;
|
|
5
|
+
readonly onExecutePlan?: (() => void) | undefined;
|
|
6
|
+
readonly onConfirmGoal?: ((proposal: GoalProposalData) => Promise<void>) | undefined;
|
|
7
|
+
readonly renderGoalSetCard?: true | undefined;
|
|
8
|
+
readonly goalFileCount: number;
|
|
9
|
+
readonly onGoalSchedule: (command: string) => void;
|
|
10
|
+
readonly onGoalGetFiles?: (() => void) | undefined;
|
|
11
|
+
readonly onGoalStartAnother: () => void;
|
|
12
|
+
/** Task 17 — the proposal card's "Edit first", hidden under the same rule
|
|
13
|
+
* as `onConfirmGoal` (streaming / already resolved). */
|
|
14
|
+
readonly onEditGoalProposal?: ((proposal: GoalProposalData) => void) | undefined;
|
|
15
|
+
readonly onOpenGoalProposal?: (() => void) | undefined;
|
|
16
|
+
/** Fix round 1 (Low 4) — a FUNCTION, not a bare boolean: only the dispatch
|
|
17
|
+
* site (`ai-sdk-part-renderers.tsx`) knows which offer's objective to ask
|
|
18
|
+
* about, since `partRendererExtraProps` is called once per message before
|
|
19
|
+
* the specific part type is known. */
|
|
20
|
+
readonly isGoalProposalStarted: (objective: string) => boolean;
|
|
21
|
+
readonly goalProposalSessionId: string | null;
|
|
22
|
+
};
|
|
23
|
+
export type PartRendererExtraPropsInput = {
|
|
24
|
+
readonly isStreaming: boolean;
|
|
25
|
+
/** This message's index in the transcript. */
|
|
26
|
+
readonly messageIndex: number;
|
|
27
|
+
readonly lastUserMessageIndex: number;
|
|
28
|
+
readonly messageId: string;
|
|
29
|
+
readonly continueConnectorFor: (messageId: string) => (connectorId: string, name: string) => Promise<void>;
|
|
30
|
+
readonly onExecutePlan: () => void;
|
|
31
|
+
readonly hasLiveGoal: boolean;
|
|
32
|
+
readonly isGoalSetPart: boolean;
|
|
33
|
+
readonly goalFileCount: number;
|
|
34
|
+
readonly onGoalSchedule: (command: string) => void;
|
|
35
|
+
readonly onGoalGetFiles?: (() => void) | undefined;
|
|
36
|
+
readonly onGoalStartAnother: () => void;
|
|
37
|
+
/** Task 17 — read straight off the door instead of threading `confirmGoal`
|
|
38
|
+
* as its own field: `goalDoor` already carries everything the proposal
|
|
39
|
+
* card needs. */
|
|
40
|
+
readonly goalDoor: SessionGoalApi["goalDoor"];
|
|
41
|
+
readonly onOpenGoalView: (() => void) | undefined;
|
|
42
|
+
};
|
|
43
|
+
export declare const partRendererExtraProps: (input: PartRendererExtraPropsInput) => PartRendererExtraProps;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { BelongUIMessage } from '../../stream/belong-data-parts.ts';
|
|
2
|
+
import { GoalView } from '../../api/goals.ts';
|
|
3
|
+
export type GoalReceiptState = {
|
|
4
|
+
readonly goalSetPartIds: ReadonlySet<string>;
|
|
5
|
+
readonly setupProgress: {
|
|
6
|
+
readonly index: number;
|
|
7
|
+
readonly total: number;
|
|
8
|
+
} | undefined;
|
|
9
|
+
/** The completion card's "Run this again on a schedule" — drops the
|
|
10
|
+
* already-built `/schedule …` line into the draft and focuses it. The
|
|
11
|
+
* user still presses Enter; this never sends on their behalf. */
|
|
12
|
+
readonly onGoalScheduleFollowUp: (command: string) => void;
|
|
13
|
+
/** The completion card's "Set another goal" — opens Task 16's compose
|
|
14
|
+
* sheet directly (spec §5: "new chat + compose sheet"). Final review
|
|
15
|
+
* (Medium 6): this used to pre-type `/goal ` into the draft, which cost
|
|
16
|
+
* the user an extra Enter — and the bare-`/goal` slash menu ate that
|
|
17
|
+
* Enter, so it was two. */
|
|
18
|
+
readonly onGoalAnotherFollowUp: () => void;
|
|
19
|
+
};
|
|
20
|
+
export declare const useGoalReceipt: (messages: readonly BelongUIMessage[], goal: GoalView | null, setDraft: (value: string) => void,
|
|
21
|
+
/** `goalDoor.onSetGoal` — the compose-sheet opener, or `undefined` once a
|
|
22
|
+
* `goals_disabled` 503 has been seen this mount. The draft prefill is the
|
|
23
|
+
* fallback for that one case: a completion card CAN outlive the door (the
|
|
24
|
+
* card renders from a stored part), and a dead button is worse than a
|
|
25
|
+
* pre-typed command. */
|
|
26
|
+
openGoalComposeSheet: (() => void) | undefined) => GoalReceiptState;
|
|
27
|
+
/**
|
|
28
|
+
* True when this part is the ONE `data-goal` part, for its goal, that
|
|
29
|
+
* should render the "Goal set" receipt. Typed structurally (not against
|
|
30
|
+
* `BelongMessagePart`) so this module stays decoupled from the renderer
|
|
31
|
+
* module — every message part shape chat.tsx passes in already has `type`
|
|
32
|
+
* and an optional wire `id`.
|
|
33
|
+
*/
|
|
34
|
+
export declare const isGoalSetPart: (messageId: string, part: {
|
|
35
|
+
readonly type: string;
|
|
36
|
+
readonly id?: string;
|
|
37
|
+
}, goalSetPartIds: ReadonlySet<string>) => boolean;
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { UseChatHelpers } from '@ai-sdk/react';
|
|
2
|
+
import { fetchSessionGoal, GoalView } from '../../api/goals.ts';
|
|
3
|
+
import { GoalRefusal } from '../../embed/goal-cap-notice.ts';
|
|
4
|
+
import { ChatMode } from '../../embed/chat-mode.ts';
|
|
5
|
+
import { GoalRunwayPreset } from '../../embed/goal-runway.ts';
|
|
6
|
+
import { BuiltinCommand } from '../../embed/slash-commands.ts';
|
|
7
|
+
import { GoalComposeValue } from '../../components/embed/GoalComposeSheet.tsx';
|
|
8
|
+
import { BelongUIMessage, GoalProposalData } from '../../stream/belong-data-parts.ts';
|
|
9
|
+
/**
|
|
10
|
+
* The card a waiting goal is waiting ON, named by the row action that offers
|
|
11
|
+
* it. Client-only (appendix A §4): the wait ends when the user acts on the
|
|
12
|
+
* CARD, never when a button on the row is pressed, so this scrolls and
|
|
13
|
+
* focuses and does nothing else.
|
|
14
|
+
*/
|
|
15
|
+
export type PendingCardKind = "answer" | "review" | "show_me";
|
|
16
|
+
/**
|
|
17
|
+
* `startGoal`'s input (Task 16) — the ONE creation path's full shape, shared
|
|
18
|
+
* by every door: the compose sheet's submit, `/goal <objective>` (via the
|
|
19
|
+
* sheet), the proposal card's future Confirm, and the row's `new_goal`
|
|
20
|
+
* hand-off (Task 8, which only ever fills in `objective`). `criteria` and
|
|
21
|
+
* `runway` ride straight onto the message body (Task 15's `goal: { objective,
|
|
22
|
+
* criteria?, runway? }`); `mode`, when given, is the door's OWN resolved
|
|
23
|
+
* choice and is sent as-is — see the fallback below for the one caller that
|
|
24
|
+
* still doesn't resolve it itself.
|
|
25
|
+
*/
|
|
26
|
+
export type StartGoalInput = {
|
|
27
|
+
readonly objective: string;
|
|
28
|
+
readonly criteria?: readonly string[];
|
|
29
|
+
readonly runway?: GoalRunwayPreset;
|
|
30
|
+
readonly mode?: ChatMode;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Fix wave (Task 8 review, finding 1): the KIND decides the selector — a goal
|
|
34
|
+
* waiting for an approval must not land on a question card just because a
|
|
35
|
+
* question card appears first in the transcript. And within one kind, the card
|
|
36
|
+
* the goal is waiting on is the NEWEST: a transcript keeps every card the
|
|
37
|
+
* conversation ever showed, so `querySelector`'s first match is the OLDEST,
|
|
38
|
+
* which is normally one the user already settled. Prefer an explicitly pending
|
|
39
|
+
* card; otherwise take the last.
|
|
40
|
+
*/
|
|
41
|
+
export declare const scrollAndFocusPendingCard: (kind: PendingCardKind) => void;
|
|
42
|
+
/** Every prop `<GoalComposeSheet>` takes — named once so `composeSheet` and
|
|
43
|
+
* `goalDoor.composeSheet` below don't have to repeat the shape. */
|
|
44
|
+
type GoalComposeSheetProps = {
|
|
45
|
+
readonly open: boolean;
|
|
46
|
+
readonly initial: GoalComposeValue;
|
|
47
|
+
readonly planModeResolved: boolean;
|
|
48
|
+
readonly onCancel: () => void;
|
|
49
|
+
readonly onSubmit: (value: GoalComposeValue) => void;
|
|
50
|
+
readonly onReturnFocus: () => void;
|
|
51
|
+
};
|
|
52
|
+
/** `openGoalComposeSheet`'s optional prefill — every field optional so a
|
|
53
|
+
* bare `/goal` (no prefill at all) and "Edit first" (all three) share one
|
|
54
|
+
* door. */
|
|
55
|
+
export type GoalComposeSheetPrefill = {
|
|
56
|
+
readonly objective?: string;
|
|
57
|
+
readonly criteria?: readonly string[];
|
|
58
|
+
readonly runway?: GoalRunwayPreset;
|
|
59
|
+
};
|
|
60
|
+
export type SessionGoalApi = {
|
|
61
|
+
/** The ON-SCREEN session's goal, or null. */
|
|
62
|
+
readonly goal: GoalView | null;
|
|
63
|
+
readonly hasLiveGoal: boolean;
|
|
64
|
+
readonly startGoal: (input: StartGoalInput) => Promise<void>;
|
|
65
|
+
/** The proposal card's Confirm (`ai-sdk-part-renderers.tsx`'s `onConfirmGoal`)
|
|
66
|
+
* hands over the WHOLE offer — this adapts it onto `startGoal` so `chat.tsx`
|
|
67
|
+
* doesn't need its own wrapper (the line-count ratchet). Fix round 1
|
|
68
|
+
* (Medium 1) — widened from a bare objective so Start actually creates
|
|
69
|
+
* what the card promised (criteria + runway included). */
|
|
70
|
+
readonly confirmGoal: (proposal: GoalProposalData) => Promise<void>;
|
|
71
|
+
readonly runGoalCommand: (command: Extract<BuiltinCommand, {
|
|
72
|
+
type: "goal";
|
|
73
|
+
}>) => Promise<void>;
|
|
74
|
+
/** Opens the compose sheet — `chat.tsx`'s mode-menu "Set a goal…" entry —
|
|
75
|
+
* or `undefined` once a `goals_disabled` 503 has been seen this mount (the
|
|
76
|
+
* initial fetch, or a refused creation): a deployment without goals never
|
|
77
|
+
* shows a door the backend will only refuse. */
|
|
78
|
+
readonly onSetGoal: (() => void) | undefined;
|
|
79
|
+
/** The compose sheet's open/closed state and what it starts from — the ONE
|
|
80
|
+
* door onto `startGoal`, reached from the mode menu, a bare `/goal` (or
|
|
81
|
+
* `/goal <objective>`, prefilled), and — Task 17 — the proposal card's
|
|
82
|
+
* "Edit first". Flat fields for tests that drive one at a time; `composeSheet`
|
|
83
|
+
* below bundles them exactly as `<GoalComposeSheet>` takes them, so
|
|
84
|
+
* `chat.tsx` can spread the whole thing in one line. */
|
|
85
|
+
readonly sheetOpen: boolean;
|
|
86
|
+
readonly sheetInitial: GoalComposeValue;
|
|
87
|
+
/** True when the composer was in plan mode at the moment this sheet
|
|
88
|
+
* opened — the sheet says so and resolves the send to Auto itself. */
|
|
89
|
+
readonly sheetPlanModeResolved: boolean;
|
|
90
|
+
/** Task 17 widens this from a bare objective to the sheet's whole prefill
|
|
91
|
+
* — "Edit first" needs criteria and a runway too, not just the text. */
|
|
92
|
+
readonly openGoalComposeSheet: (prefill?: GoalComposeSheetPrefill) => void;
|
|
93
|
+
readonly closeGoalComposeSheet: () => void;
|
|
94
|
+
readonly submitGoalComposeSheet: (value: GoalComposeValue) => void;
|
|
95
|
+
/** `<GoalComposeSheet {...composeSheet} />` — every prop that component
|
|
96
|
+
* takes, bundled once so the ratchet on `chat.tsx` (CLAUDE.md) never has
|
|
97
|
+
* to grow for this door. */
|
|
98
|
+
readonly composeSheet: GoalComposeSheetProps;
|
|
99
|
+
/**
|
|
100
|
+
* Task 17 — the proposal card's "Started" state (spec §7), given the
|
|
101
|
+
* offer's own objective text: derived from `GoalView` + the loaded
|
|
102
|
+
* message list (never local state — §12/§41), true only when the
|
|
103
|
+
* session's goal origin message is BOTH a goal-origin message (Task 9's
|
|
104
|
+
* `isGoalOriginMessage`) AND carries this exact objective — so a goal
|
|
105
|
+
* started via `/goal` or the compose sheet with different words leaves an
|
|
106
|
+
* unanswered proposal card as-is (fix round 1, Low 4). Takes the
|
|
107
|
+
* objective rather than being a bare boolean because only the dispatch
|
|
108
|
+
* site (`ai-sdk-part-renderers.tsx`) knows which offer's card is asking.
|
|
109
|
+
*/
|
|
110
|
+
readonly isGoalProposalStarted: (objective: string) => boolean;
|
|
111
|
+
/** Opens the compose sheet prefilled from a proposal's own fields — the
|
|
112
|
+
* proposal card's "Edit first" (Task 17). */
|
|
113
|
+
readonly onEditGoalProposal: (proposal: GoalProposalData) => void;
|
|
114
|
+
/**
|
|
115
|
+
* The ON-SCREEN session id, for the proposal card's per-device dismissal
|
|
116
|
+
* key (ruling 5) — `null` for the rare frame before any session is known.
|
|
117
|
+
* Fix round 1 (Low 5) — was `?? ""`, which would have made every such
|
|
118
|
+
* render share ONE dismissal key (`belong:goal-proposal-dismissed:`);
|
|
119
|
+
* `null` instead tells the card to render without "Not now" until a real
|
|
120
|
+
* session id exists, per `GoalProposalCard`'s own `sessionId` prop.
|
|
121
|
+
*/
|
|
122
|
+
readonly goalProposalSessionId: string | null;
|
|
123
|
+
/** `onSetGoal`, `confirmGoal` and `composeSheet` again, bundled into ONE
|
|
124
|
+
* destructured field so `chat.tsx` (CLAUDE.md's line-count ratchet) needs
|
|
125
|
+
* exactly one line to receive the whole door. */
|
|
126
|
+
readonly goalDoor: {
|
|
127
|
+
readonly onSetGoal: (() => void) | undefined;
|
|
128
|
+
readonly confirmGoal: (proposal: GoalProposalData) => Promise<void>;
|
|
129
|
+
readonly composeSheet: GoalComposeSheetProps;
|
|
130
|
+
readonly isGoalProposalStarted: (objective: string) => boolean;
|
|
131
|
+
readonly onEditGoalProposal: (proposal: GoalProposalData) => void;
|
|
132
|
+
readonly goalProposalSessionId: string | null;
|
|
133
|
+
};
|
|
134
|
+
/** Hand the mount `GET /goal` its answer. Publishes the view AND the settled
|
|
135
|
+
* signal, so both halves of "what does this session's goal look like" are
|
|
136
|
+
* decided in one place. */
|
|
137
|
+
readonly seedGoalFromServer: (sessionId: string, outcome: Awaited<ReturnType<typeof fetchSessionGoal>>) => void;
|
|
138
|
+
/** The next user message resumes the goal (the row's `Tell it what to try`). */
|
|
139
|
+
readonly armResumeOnNextSend: () => void;
|
|
140
|
+
/** The client message ids `startGoal` has sent with a `goal` body, this
|
|
141
|
+
* mount. Task 9's `SentAsGoalTag` reconciliation: the optimistic source of
|
|
142
|
+
* truth for the render frame(s) before `GoalView.originatingClientMessageId`
|
|
143
|
+
* exists (§41 — a reload takes over from there). See `isGoalOriginMessage`. */
|
|
144
|
+
readonly goalOriginIds: ReadonlySet<string>;
|
|
145
|
+
/** Fix round 1 (Task 9 review, finding 2) — `handleCreateSendError` calls
|
|
146
|
+
* this once it has confirmed the failed send WAS a goal-creation send. A
|
|
147
|
+
* refused creation must not leave its message id tagged forever: this
|
|
148
|
+
* drops it from `goalOriginIds` if it was already captured, and disarms
|
|
149
|
+
* the one-shot arm if the message never arrived (e.g. the transport
|
|
150
|
+
* rejected before `messages` ever grew). Exposed mainly for the test
|
|
151
|
+
* suite, which drives it directly to simulate that call. */
|
|
152
|
+
readonly dropGoalOriginOnRefusal: () => void;
|
|
153
|
+
/** Task 14 — the refused `/goal`'s ANSWER, a card under the user's own
|
|
154
|
+
* bubble instead of a chat notice telling them to type another command.
|
|
155
|
+
* `null` when there is nothing to answer. Client-only state (never
|
|
156
|
+
* reconciled from the server), so it never survives a reload. */
|
|
157
|
+
readonly refusal: GoalRefusal | null;
|
|
158
|
+
/** The id of the user message this refusal is answering, so `chat.tsx` can
|
|
159
|
+
* render the card under that exact bubble. `null` for a refusal that
|
|
160
|
+
* never got as far as sending anything (the client's own "you already
|
|
161
|
+
* have one" pre-check) — `chat.tsx` renders the card in the transcript
|
|
162
|
+
* flow instead, where the old notice used to sit. */
|
|
163
|
+
readonly refusalMessageId: string | null;
|
|
164
|
+
/** Fix round 1 — Replace/Retry's async chain is in flight; the card
|
|
165
|
+
* disables its buttons on this so a fast double click can't fire two. */
|
|
166
|
+
readonly refusalBusy: boolean;
|
|
167
|
+
/** Answers the card's dismiss — clears the refusal and nothing else. */
|
|
168
|
+
readonly dismissRefusal: () => void;
|
|
169
|
+
/** `useChat`'s `onError` (final review, finding 1) — the send-error path
|
|
170
|
+
* for a goal-creation send. `wasGoalCreateSend` is read internally
|
|
171
|
+
* (`isGoalCreateSendPending`'s old job): every OTHER failure of the chat
|
|
172
|
+
* is left entirely to its own error surface. A refusal `goalRefusalFromError`
|
|
173
|
+
* recognises is HELD as `refusal` (never a `notice(...)` string) and the
|
|
174
|
+
* chat's own error state is cleared so the generic bubble never doubles
|
|
175
|
+
* up on the same refusal. */
|
|
176
|
+
readonly handleCreateSendError: (error: unknown, clearChatError: () => void) => void;
|
|
177
|
+
/** "Clear it and set this one" — clears the existing goal, then starts this
|
|
178
|
+
* one with the objective the refused send carried. */
|
|
179
|
+
readonly onRefusalReplace: () => void;
|
|
180
|
+
/** "Keep the text" — puts the refused objective back in the composer. */
|
|
181
|
+
readonly onRefusalKeepText: () => void;
|
|
182
|
+
/** `not_sent` → "Try again"; `plan_mode` → "Run on Auto". Both just
|
|
183
|
+
* re-send the same objective (`startGoal` resolves plan mode itself). */
|
|
184
|
+
readonly onRefusalRetry: () => void;
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* True when THIS message is the one that started the goal. Reconciled from
|
|
188
|
+
* `GoalView.originatingClientMessageId` (Task 6) so the tag survives a
|
|
189
|
+
* reload; the optimistic local flag only covers the first frame — matching on
|
|
190
|
+
* the client message id (never the objective text) is what makes the two
|
|
191
|
+
* agree without ever tagging the wrong bubble when the user sends the same
|
|
192
|
+
* sentence twice.
|
|
193
|
+
*
|
|
194
|
+
* Fix round 1 (Task 9 review, finding 2) — once the SERVER has answered
|
|
195
|
+
* (`goal.originatingClientMessageId` is set), that answer is authoritative
|
|
196
|
+
* and wins outright (§12: check the fact directly, don't lean on a flag that
|
|
197
|
+
* might be stale). Before this, a stale id still sitting in `optimisticIds`
|
|
198
|
+
* (one the refusal cleanup below didn't reach, or a future multi-attempt
|
|
199
|
+
* race) could keep tagging a bubble the server never named as the origin.
|
|
200
|
+
* The optimistic set is consulted ONLY for the frame(s) before the server has
|
|
201
|
+
* said anything about this session's goal.
|
|
202
|
+
*/
|
|
203
|
+
export declare const isGoalOriginMessage: (input: {
|
|
204
|
+
readonly goal: Pick<GoalView, "originatingClientMessageId"> | null;
|
|
205
|
+
readonly clientMessageId: string | null | undefined;
|
|
206
|
+
readonly optimisticIds: ReadonlySet<string>;
|
|
207
|
+
}) => boolean;
|
|
208
|
+
export type SessionGoalInput = {
|
|
209
|
+
readonly apiBaseUrl: string;
|
|
210
|
+
readonly sessionId: string | null;
|
|
211
|
+
readonly transportSessionId: string | null;
|
|
212
|
+
readonly messages: readonly BelongUIMessage[];
|
|
213
|
+
readonly mode: ChatMode;
|
|
214
|
+
readonly sendMessage: UseChatHelpers<BelongUIMessage>["sendMessage"];
|
|
215
|
+
readonly onModeChange: (mode: ChatMode) => void;
|
|
216
|
+
readonly notice: (text: string) => void;
|
|
217
|
+
/** Runs inside the click gesture, immediately before a creation send —
|
|
218
|
+
* ChatRoute's TTS unlock + voice-turn reset, which stay its business. */
|
|
219
|
+
readonly beforeSend: () => void;
|
|
220
|
+
readonly devOverrides: Readonly<Record<string, unknown>>;
|
|
221
|
+
/** Task 14 — "Keep the text" (a refused goal's cap card) hands the refused
|
|
222
|
+
* objective back to the composer through the SAME door
|
|
223
|
+
* `useGoalReceipt`'s follow-ups already use. */
|
|
224
|
+
readonly setDraft: (value: string) => void;
|
|
225
|
+
};
|
|
226
|
+
export declare const useSessionGoal: (input: SessionGoalInput) => SessionGoalApi;
|
|
227
|
+
export {};
|
package/dist/routes/chat.d.ts
CHANGED
|
@@ -25,7 +25,17 @@ export type QueuedMessage = {
|
|
|
25
25
|
readonly submittedAt: number;
|
|
26
26
|
readonly state: "queued" | "failed";
|
|
27
27
|
};
|
|
28
|
-
export declare const ChatRoute: ({ sessionId, reconcileBackgroundRun, }?: {
|
|
28
|
+
export declare const ChatRoute: ({ sessionId, draftId, reconcileBackgroundRun, onOpenGoalView, onOpenFilesView, }?: {
|
|
29
29
|
readonly sessionId?: string;
|
|
30
|
+
readonly draftId?: string;
|
|
30
31
|
readonly reconcileBackgroundRun?: boolean;
|
|
32
|
+
/** Put the Goal view on screen (the dock owns navigation — same path the
|
|
33
|
+
* header pill takes). Omitted in tests and stories, where the row's
|
|
34
|
+
* Details simply does nothing. */
|
|
35
|
+
readonly onOpenGoalView?: (() => void) | undefined;
|
|
36
|
+
/** Put the Files view on screen — same navigation door as the rail's Files
|
|
37
|
+
* item (Task 13's completion card "Get the files"). Omitted in tests and
|
|
38
|
+
* stories, where the button simply doesn't render (`GoalCompletionCard`
|
|
39
|
+
* hides it on `undefined`). */
|
|
40
|
+
readonly onOpenFilesView?: (() => void) | undefined;
|
|
31
41
|
}) => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GoalRoute: () => import("react").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SandboxCommandData, SubagentData, ToolCallData } from './belong-data-parts.ts';
|
|
2
|
+
/** One tool call in an activity run, paired (for shell) with its same-id output. */
|
|
3
|
+
export type ToolActivityItem = {
|
|
4
|
+
readonly tool: ToolCallData;
|
|
5
|
+
readonly output: SandboxCommandData | null;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* BEL-199 — a delegated subagent in an activity run. It sits INSIDE the one
|
|
9
|
+
* collapsed line beside the tool items, never beside the group.
|
|
10
|
+
*/
|
|
11
|
+
export type SubagentActivityItem = {
|
|
12
|
+
readonly kind: "subagent";
|
|
13
|
+
readonly subagentId: string;
|
|
14
|
+
readonly data: SubagentData;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Deliberate shape note: the TOOL variant carries no `kind` discriminant. It is
|
|
18
|
+
* the shape every existing fixture and story already builds, and a subagent item
|
|
19
|
+
* is distinguishable without one (`"kind" in item`) — so this stays a sound
|
|
20
|
+
* union while a required discriminant would have churned ~25 unrelated call
|
|
21
|
+
* sites across four story files for no safety the guard below doesn't give.
|
|
22
|
+
*/
|
|
23
|
+
export type ActivityItem = ToolActivityItem | SubagentActivityItem;
|
|
24
|
+
export declare const isSubagentItem: (item: ActivityItem) => item is SubagentActivityItem;
|
|
25
|
+
export declare const isToolItem: (item: ActivityItem) => item is ToolActivityItem;
|
|
@@ -1,30 +1,19 @@
|
|
|
1
1
|
import { MessageContinuation } from './message-continuation.ts';
|
|
2
|
-
import { BelongDataParts, BelongUIMessage,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
readonly output: SandboxCommandData | null;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* BEL-199 — a delegated subagent in an activity run. It sits INSIDE the one
|
|
10
|
-
* collapsed line beside the tool items, never beside the group.
|
|
11
|
-
*/
|
|
12
|
-
export type SubagentActivityItem = {
|
|
13
|
-
readonly kind: "subagent";
|
|
14
|
-
readonly subagentId: string;
|
|
15
|
-
readonly data: SubagentData;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Deliberate shape note: the TOOL variant carries no `kind` discriminant. It is
|
|
19
|
-
* the shape every existing fixture and story already builds, and a subagent item
|
|
20
|
-
* is distinguishable without one (`"kind" in item`) — so this stays a sound
|
|
21
|
-
* union while a required discriminant would have churned ~25 unrelated call
|
|
22
|
-
* sites across four story files for no safety the guard below doesn't give.
|
|
23
|
-
*/
|
|
24
|
-
export type ActivityItem = ToolActivityItem | SubagentActivityItem;
|
|
25
|
-
export declare const ActivityGroup: ({ items, live, }: {
|
|
2
|
+
import { BelongDataParts, BelongUIMessage, GoalProposalData } from './belong-data-parts.ts';
|
|
3
|
+
import { ActivityItem } from './activity-items.ts';
|
|
4
|
+
import { SubagentLanesContext, SubagentMessageIndex } from './subagent-lanes-model.ts';
|
|
5
|
+
export declare const ActivityGroup: ({ items, live, subagents, }: {
|
|
26
6
|
readonly items: readonly ActivityItem[];
|
|
7
|
+
/** The collapsed line's shimmer: true only for the LAST group of the streaming message. */
|
|
27
8
|
readonly live?: boolean | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Spec 2026-09-16 §4a — the message this group belongs to. The lanes nest
|
|
11
|
+
* their calls (and a wave its lanes) from every group of it, and tick and
|
|
12
|
+
* offer Stop while IT streams: an approval or question card after them makes
|
|
13
|
+
* this group non-last while the subagents still run. Absent (a story, a unit
|
|
14
|
+
* test), the group is its own message and the lanes follow `live`.
|
|
15
|
+
*/
|
|
16
|
+
readonly subagents?: SubagentLanesContext | undefined;
|
|
28
17
|
}) => import("react").JSX.Element;
|
|
29
18
|
/** A segment of a message's text: prose to render as markdown, or a `@`-mention. */
|
|
30
19
|
type TextSegment = {
|
|
@@ -45,12 +34,34 @@ type TextSegment = {
|
|
|
45
34
|
export declare const splitMentionSegments: (text: string) => readonly TextSegment[];
|
|
46
35
|
export type BelongMessagePart = BelongUIMessage["parts"][number];
|
|
47
36
|
export type PartRendererProps = {
|
|
37
|
+
/** Only the current part of the active runtime turn is live. A stopped
|
|
38
|
+
* stream may retain a native `streaming` state in the message snapshot. */
|
|
39
|
+
readonly live?: boolean;
|
|
48
40
|
readonly part: BelongMessagePart;
|
|
49
41
|
/**
|
|
50
42
|
* Renders the plan card's "Run this plan" CTA when provided (chat.tsx
|
|
51
43
|
* omits it while a run streams so the CTA can't double-submit).
|
|
52
44
|
*/
|
|
53
45
|
readonly onExecutePlan?: (() => void) | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Renders the goal-proposal card's Confirm when provided (chat.tsx omits
|
|
48
|
+
* it while a run streams, so the CTA can't double-submit — same rule as
|
|
49
|
+
* `onExecutePlan`).
|
|
50
|
+
*/
|
|
51
|
+
readonly onConfirmGoal?: ((proposal: GoalProposalData) => Promise<void>) | undefined;
|
|
52
|
+
/** Task 17 — the proposal card's "Edit first", gated the same as
|
|
53
|
+
* `onConfirmGoal` (streaming, or already resolved). */
|
|
54
|
+
readonly onEditGoalProposal?: ((proposal: GoalProposalData) => void) | undefined;
|
|
55
|
+
/** Task 17 — the proposal card's collapsed "Started" line's "Open it". */
|
|
56
|
+
readonly onOpenGoalProposal?: (() => void) | undefined;
|
|
57
|
+
/** Task 17 — derived from `GoalView`, never local state (§12/§41). Fix
|
|
58
|
+
* round 1 (Low 4) — a function of the SPECIFIC offer's objective, called
|
|
59
|
+
* at the `data-goal-proposal` dispatch arm below where that text is
|
|
60
|
+
* known, so an unrelated goal elsewhere in the transcript can't flip
|
|
61
|
+
* this offer's card to "Started". */
|
|
62
|
+
readonly isGoalProposalStarted?: ((objective: string) => boolean) | undefined;
|
|
63
|
+
/** Task 17 — ruling 5's per-device dismissal key is per session. */
|
|
64
|
+
readonly goalProposalSessionId?: string | null | undefined;
|
|
54
65
|
readonly onContinueConnector?: ((connectorId: string, name: string) => Promise<void>) | undefined;
|
|
55
66
|
/**
|
|
56
67
|
* Follows the turn an approval card's decision started (an agent-raised plan
|
|
@@ -64,15 +75,38 @@ export type PartRendererProps = {
|
|
|
64
75
|
* side effects. Absent/false = live part, dispatch as usual.
|
|
65
76
|
*/
|
|
66
77
|
readonly historical?: boolean | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Task 12 — true when THIS `data-goal` part is the ONE part designated,
|
|
80
|
+
* FOR ITS GOAL, to render the "Goal set" receipt (fix round 1: one per
|
|
81
|
+
* `goalId`, not one globally). `chat.tsx` computes the designated ids once
|
|
82
|
+
* per render (`useGoalReceipt` / `selectGoalSetPartIds`,
|
|
83
|
+
* `routes/chat/use-goal-receipt.ts`) and gates this prop per-part via
|
|
84
|
+
* `isGoalSetPart`, the same way it gates `onExecutePlan`/`onConfirmGoal` on
|
|
85
|
+
* `isStreaming`/`hasLiveGoal`. Every other `data-goal` part — including
|
|
86
|
+
* every earlier/later status update of the SAME goal, and every part of a
|
|
87
|
+
* DIFFERENT goal that already claimed its own receipt — renders nothing
|
|
88
|
+
* (see the dispatch below).
|
|
89
|
+
*/
|
|
90
|
+
readonly renderGoalSetCard?: boolean | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Task 13 — the ending's inputs (spec §5). `goalFileCount` is the whole
|
|
93
|
+
* session's `file`/`data-artifact` part count (`countSessionFiles`),
|
|
94
|
+
* threaded through unconditionally — unlike the CTAs above, the completion
|
|
95
|
+
* card is not a mid-run double-submit risk, so it needs no `isStreaming`
|
|
96
|
+
* gate. `onGoalGetFiles` stays optional at THIS layer too: undefined hides
|
|
97
|
+
* the button exactly as `GoalCompletionCard` documents.
|
|
98
|
+
*/
|
|
99
|
+
readonly goalFileCount?: number | undefined;
|
|
100
|
+
readonly onGoalSchedule?: ((command: string) => void) | undefined;
|
|
101
|
+
readonly onGoalGetFiles?: (() => void) | undefined;
|
|
102
|
+
readonly onGoalStartAnother?: (() => void) | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Spec 2026-09-16 §4a — the subagents of this part's message, so an approval
|
|
105
|
+
* card a subagent raised can name it. Absent = no attribution.
|
|
106
|
+
*/
|
|
107
|
+
readonly subagents?: SubagentMessageIndex | undefined;
|
|
67
108
|
};
|
|
68
|
-
|
|
69
|
-
* The AI SDK's `UIMessagePart` union is open at the patch-version
|
|
70
|
-
* boundary, so we cannot use `.exhaustive()` here — `.otherwise(() =>
|
|
71
|
-
* null)` keeps unknown variants quiet. The supported types come from
|
|
72
|
-
* `BelongDataParts` (above) plus the SDK's built-in `text` and
|
|
73
|
-
* `reasoning` parts.
|
|
74
|
-
*/
|
|
75
|
-
export declare const PartRenderer: ({ part, onExecutePlan, historical, onContinueConnector, onFollowContinuation, }: PartRendererProps) => import("react").JSX.Element | null;
|
|
109
|
+
export declare const PartRenderer: ({ part, onExecutePlan, onConfirmGoal, onEditGoalProposal, onOpenGoalProposal, isGoalProposalStarted, goalProposalSessionId, historical, live, onContinueConnector, renderGoalSetCard, goalFileCount, onGoalSchedule, onGoalGetFiles, onGoalStartAnother, onFollowContinuation, subagents, }: PartRendererProps) => import("react").JSX.Element | null;
|
|
76
110
|
export type RenderGroup = {
|
|
77
111
|
readonly kind: "part";
|
|
78
112
|
readonly part: BelongMessagePart;
|
|
@@ -84,3 +118,4 @@ export type RenderGroup = {
|
|
|
84
118
|
};
|
|
85
119
|
export declare const groupMessageParts: (parts: readonly BelongMessagePart[]) => readonly RenderGroup[];
|
|
86
120
|
export type { BelongDataParts };
|
|
121
|
+
export type { ActivityItem, ToolActivityItem } from './activity-items.ts';
|