@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
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ruling 5 (spec §7) — "Not now" on the proposal card, persisted per device.
|
|
3
|
+
* localStorage only for v1: a server-side dismissal marker is a later slice
|
|
4
|
+
* (spec "Not in this design"), so a reload on ANOTHER device shows the offer
|
|
5
|
+
* again — documented, acceptable. Every read/write is wrapped in try/catch:
|
|
6
|
+
* a private window throws on `localStorage` access, and this must never be
|
|
7
|
+
* the thing that breaks the card.
|
|
8
|
+
*/
|
|
9
|
+
export declare const goalProposalDismissalKey: (sessionId: string) => string;
|
|
10
|
+
export declare const readGoalProposalDismissed: (sessionId: string) => boolean;
|
|
11
|
+
export declare const writeGoalProposalDismissed: (sessionId: string) => void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* "resumes 09:00" — the goal pill's one piece of copy built from a time
|
|
3
|
+
* rather than a status key (`goal-status-label.ts`).
|
|
4
|
+
*
|
|
5
|
+
* Formatted in the VIEWER's locale and timezone, client-side, from the
|
|
6
|
+
* UTC instant the backend sends: the person reading the pill is the person
|
|
7
|
+
* who has to know whether 09:00 has happened yet, and a server-rendered
|
|
8
|
+
* time would be in the server's zone. `now` is a parameter rather than a
|
|
9
|
+
* `new Date()` inside (CLAUDE.md §25 — do not hide time), which is also
|
|
10
|
+
* what makes the same-day branch testable.
|
|
11
|
+
*
|
|
12
|
+
* Same day → the time alone ("09:00"); any other day → date and time
|
|
13
|
+
* ("Sep 12, 09:00"), because "09:00" on its own reads as *this morning*
|
|
14
|
+
* and a goal that is asleep until tomorrow is exactly the case where that
|
|
15
|
+
* misreads. Null for a missing or unparsable instant — the caller falls
|
|
16
|
+
* back to the plain "scheduled" label rather than rendering "Invalid Date".
|
|
17
|
+
*/
|
|
18
|
+
export declare const formatGoalResumeTime: (input: {
|
|
19
|
+
readonly resumeAt: string | null | undefined;
|
|
20
|
+
readonly now: Date;
|
|
21
|
+
readonly locale: string;
|
|
22
|
+
}) => string | null;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { GoalElapsed } from './goal-plain-units.ts';
|
|
2
|
+
import { GoalView } from '../api/goals.ts';
|
|
3
|
+
export type GoalRowTone = "live" | "calm" | "attention";
|
|
4
|
+
export type GoalRowActionKind = "cancel_setup" | "pause" | "resume" | "wake_now" | "details" | "answer" | "review" | "show_me" | "tell_it" | "give_it_more" | "new_goal";
|
|
5
|
+
export type GoalRowAction = {
|
|
6
|
+
readonly kind: GoalRowActionKind;
|
|
7
|
+
readonly labelKey: string;
|
|
8
|
+
};
|
|
9
|
+
export type GoalRowCopy = {
|
|
10
|
+
readonly key: string;
|
|
11
|
+
readonly vars?: Readonly<Record<string, string | number>>;
|
|
12
|
+
};
|
|
13
|
+
export type GoalRowModel = {
|
|
14
|
+
readonly tone: GoalRowTone;
|
|
15
|
+
readonly headline: GoalRowCopy;
|
|
16
|
+
readonly detail: GoalRowCopy | null;
|
|
17
|
+
/** Non-null only where the row shows a clock (working, checking, paused).
|
|
18
|
+
* The component renders it through `goal.units.*` and passes the result
|
|
19
|
+
* into `detail.vars` as `elapsed`. */
|
|
20
|
+
readonly elapsed: GoalElapsed | null;
|
|
21
|
+
/** Non-null ONLY for `deferred`. The component formats it in the viewer's
|
|
22
|
+
* zone and passes it into `headline.vars` as `time`. */
|
|
23
|
+
readonly resumeAt: string | null;
|
|
24
|
+
readonly primary: GoalRowAction | null;
|
|
25
|
+
readonly secondary: GoalRowAction | null;
|
|
26
|
+
};
|
|
27
|
+
export declare const goalRowModel: (goal: GoalView, now: Date) => GoalRowModel | null;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type GoalRunwayPreset = "quick" | "normal" | "long";
|
|
2
|
+
export type GoalRunwayLabelKey = "goal.compose.runwayQuick" | "goal.compose.runwayNormal" | "goal.compose.runwayLong";
|
|
3
|
+
export type GoalRunwayDetailKey = "goal.compose.runwayQuickDetail" | "goal.compose.runwayNormalDetail" | "goal.compose.runwayLongDetail";
|
|
4
|
+
export declare const goalRunwayLabelKey: (preset: GoalRunwayPreset) => GoalRunwayLabelKey;
|
|
5
|
+
export declare const goalRunwayDetailKey: (preset: GoalRunwayPreset) => GoalRunwayDetailKey;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const goalScheduleCommand: (objective: string) => string;
|
|
2
|
+
/**
|
|
3
|
+
* The i18n key naming the cadence this objective's own words imply, or null
|
|
4
|
+
* when they imply none (final review, Low 5: spec §5 asks the ending's button
|
|
5
|
+
* to say "Run this again {{cadence}}", and the flat "on a schedule" never
|
|
6
|
+
* named the cadence `goalScheduleCommand` had already guessed).
|
|
7
|
+
*
|
|
8
|
+
* A KEY, not the `phrase` above: the phrase is the `/schedule` parser's own
|
|
9
|
+
* English input and must stay English, while the button is read by a user in
|
|
10
|
+
* their own language.
|
|
11
|
+
*/
|
|
12
|
+
export declare const goalScheduleCadenceKey: (objective: string) => string | null;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { GoalStatus } from '../api/goals.ts';
|
|
2
|
+
export type GoalStatusLabelKey = "goal.statusLabel.clarifying" | "goal.statusLabel.active" | "goal.statusLabel.completionClaimed" | "goal.statusLabel.paused" | "goal.statusLabel.deferred" | "goal.statusLabel.waitingForUser" | "goal.statusLabel.waitingForApproval" | "goal.statusLabel.waitingForUiAction" | "goal.statusLabel.blocked" | "goal.statusLabel.budgetLimited" | "goal.statusLabel.complete" | "goal.statusLabel.cleared";
|
|
3
|
+
export declare const goalStatusLabelKey: (status: GoalStatus) => GoalStatusLabelKey;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `GoalBadge`'s time-usage line, pulled out to a pure helper (task-9 review,
|
|
3
|
+
* finding 4). The prior version always rendered `Math.round(seconds / 60)`
|
|
4
|
+
* minutes, which read as "130 of 10080 min" for a week-long cap — CLAUDE.md
|
|
5
|
+
* §11 asks for human units, not a five-digit minute count.
|
|
6
|
+
*
|
|
7
|
+
* Rule: minutes when the cap is under 60 minutes, hours when the cap is
|
|
8
|
+
* under 48 hours, else days — chosen from the CAP so `used`/`max` always
|
|
9
|
+
* share one unit ("2 of 10 h", never "90 min of 10 h"). Both values round
|
|
10
|
+
* to integers in that unit; the caller (`GoalBadge.tsx`) applies
|
|
11
|
+
* `toLocaleString()` for large counts, same as the tokens line.
|
|
12
|
+
*/
|
|
13
|
+
export type GoalTimeUnit = "min" | "h" | "d";
|
|
14
|
+
export type GoalTimeUsage = {
|
|
15
|
+
readonly used: number;
|
|
16
|
+
readonly max: number;
|
|
17
|
+
readonly unit: GoalTimeUnit;
|
|
18
|
+
};
|
|
19
|
+
export declare const formatGoalTimeUsage: (activeSeconds: number, maxActiveSeconds: number) => GoalTimeUsage;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CapturedScreenshot } from './screen-capture.ts';
|
|
2
|
+
import { IssueReportClientContext } from './issue-report.ts';
|
|
3
|
+
import { ClientErrorEntry } from './client-error-log.ts';
|
|
4
|
+
export type IssueReportRequest = {
|
|
5
|
+
readonly sessionId: string | null;
|
|
6
|
+
readonly taskId: string | null;
|
|
7
|
+
readonly screenshot: CapturedScreenshot | null;
|
|
8
|
+
readonly context: IssueReportClientContext;
|
|
9
|
+
readonly clientErrors: readonly ClientErrorEntry[];
|
|
10
|
+
};
|
|
11
|
+
export declare const openIssueReport: (request: IssueReportRequest) => void;
|
|
12
|
+
export declare const closeIssueReport: () => void;
|
|
13
|
+
export declare const peekIssueReport: () => IssueReportRequest | null;
|
|
14
|
+
export declare const subscribeIssueReport: (listener: () => void) => (() => void);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { captureScreen } from './screen-capture.ts';
|
|
2
|
+
import { DockView } from './dock-state.ts';
|
|
3
|
+
export declare const requestIssueReport: (input: {
|
|
4
|
+
readonly dockView: DockView;
|
|
5
|
+
readonly taskId?: string | null;
|
|
6
|
+
/** Injected in tests. */
|
|
7
|
+
readonly capture?: typeof captureScreen;
|
|
8
|
+
}) => Promise<void>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { DockView } from './dock-state.ts';
|
|
2
|
+
/**
|
|
3
|
+
* The server's own caps (`apps/belong-cloud/src/features/issue-reports/issue-report.schemas.ts`,
|
|
4
|
+
* `hostUrl`/`userAgent`), mirrored here so a page with a long URL or an
|
|
5
|
+
* unusual user agent string never produces a report the route refuses with
|
|
6
|
+
* `invalid_meta`. Without this, the ONE feature whose job is catching the
|
|
7
|
+
* unreportable becomes the thing that cannot be reported: the SDK collapses
|
|
8
|
+
* that 400 to `request_failed` and the dialog says "Try again," which never
|
|
9
|
+
* succeeds for that user.
|
|
10
|
+
*/
|
|
11
|
+
export declare const MAX_HOST_URL_CHARS = 2000;
|
|
12
|
+
export declare const MAX_USER_AGENT_CHARS = 500;
|
|
13
|
+
export type IssueReportViewport = {
|
|
14
|
+
readonly widthPx: number;
|
|
15
|
+
readonly heightPx: number;
|
|
16
|
+
/** Device pixel ratio x100 — an integer, per §11. */
|
|
17
|
+
readonly dprX100: number;
|
|
18
|
+
};
|
|
19
|
+
export type IssueReportClientContext = {
|
|
20
|
+
readonly hostUrl: string;
|
|
21
|
+
readonly dockView: DockView;
|
|
22
|
+
readonly sdkVersion: string;
|
|
23
|
+
readonly sdkBuiltAt: string | null;
|
|
24
|
+
readonly viewport: IssueReportViewport;
|
|
25
|
+
readonly locale: string;
|
|
26
|
+
readonly userAgent: string;
|
|
27
|
+
readonly capturedAt: string;
|
|
28
|
+
};
|
|
29
|
+
export declare const readViewport: (win: {
|
|
30
|
+
readonly innerWidth: number;
|
|
31
|
+
readonly innerHeight: number;
|
|
32
|
+
readonly devicePixelRatio: number;
|
|
33
|
+
}) => IssueReportViewport;
|
|
34
|
+
export declare const buildIssueReportContext: (input: {
|
|
35
|
+
readonly dockView: DockView;
|
|
36
|
+
readonly hostUrl: string;
|
|
37
|
+
readonly locale: string;
|
|
38
|
+
readonly userAgent: string;
|
|
39
|
+
readonly viewport: IssueReportViewport;
|
|
40
|
+
readonly capturedAt: string;
|
|
41
|
+
}) => IssueReportClientContext;
|
|
@@ -23,7 +23,11 @@ export type DisclaimerCopy = {
|
|
|
23
23
|
* the product and the user's next move — never the transport. */
|
|
24
24
|
readonly acceptError: string;
|
|
25
25
|
readonly languageHint: string;
|
|
26
|
-
/**
|
|
26
|
+
/** Accuracy reminder beside the tenant's beta status in the footer. */
|
|
27
|
+
readonly shortReminder: string;
|
|
28
|
+
/** Simetrik legal's caveat, first in the footer's info popover: the AI may
|
|
29
|
+
* err, and the beta may carry a later cost. It names no trial length —
|
|
30
|
+
* Simetrik runs the beta and sets its duration per client. */
|
|
27
31
|
readonly shortLine: string;
|
|
28
32
|
};
|
|
29
33
|
export declare const DISCLAIMER_COPY: Record<Locale, DisclaimerCopy>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type LibraryComposerRequest = {
|
|
3
|
+
readonly kind: "prompt";
|
|
4
|
+
readonly prePromptId: string;
|
|
5
|
+
} | {
|
|
6
|
+
readonly kind: "skill";
|
|
7
|
+
readonly name: string;
|
|
8
|
+
};
|
|
9
|
+
type Composer = {
|
|
10
|
+
readonly insert: (request: LibraryComposerRequest) => boolean;
|
|
11
|
+
readonly focus: () => void;
|
|
12
|
+
};
|
|
13
|
+
/** Each dock owns its handoff. Requests are synchronous and never queued. */
|
|
14
|
+
export declare function LibraryComposerProvider({ children, scopeKey, chatVisible, onAccepted, }: {
|
|
15
|
+
readonly children: ReactNode;
|
|
16
|
+
readonly scopeKey: string;
|
|
17
|
+
readonly chatVisible: boolean;
|
|
18
|
+
readonly onAccepted: () => void;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
20
|
+
/** False means no current, enabled composer accepted this library item. */
|
|
21
|
+
export declare const useLibraryComposer: () => Composer["insert"];
|
|
22
|
+
/** Register the current keep-alive composer without adding API/query dependencies. */
|
|
23
|
+
export declare function useRegisterLibraryComposer(composer: Composer): void;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DockView } from './dock-state.ts';
|
|
2
|
+
export declare const isLibraryView: (view: DockView) => view is "skills" | "prompts";
|
|
3
|
+
/** Preserve the selected library section; otherwise prefer available skills. */
|
|
4
|
+
export declare const libraryEntryView: (view: DockView, skillsUnavailable: boolean) => "skills" | "prompts";
|
|
5
|
+
/** Company Discover does not depend on the personal-upload capability. */
|
|
6
|
+
export declare const useLibrarySkillsUnavailable: () => boolean;
|
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Portal container context.
|
|
3
|
-
*
|
|
4
|
-
* Radix overlays (DropdownMenu, Tooltip, Popover, …) portal to
|
|
5
|
-
* `document.body` by default. When the dock is mounted inside a Shadow DOM for
|
|
6
|
-
* style isolation (the production embed — see `embed/bootstrap.ts`), that
|
|
7
|
-
* default would drop the overlay into the host's light DOM, OUTSIDE the shadow
|
|
8
|
-
* root, where none of our injected CSS reaches — so it would render unstyled.
|
|
9
|
-
*
|
|
10
|
-
* This context carries the element those portals should mount into instead: a
|
|
11
|
-
* node that lives INSIDE the shadow root, so overlays inherit the dock's
|
|
12
|
-
* isolated styles. The default is `null`, which means "no override" — Radix
|
|
13
|
-
* falls back to `document.body`. That's exactly right for the dev SPA and
|
|
14
|
-
* Storybook, where there is no shadow root and the styles live in the document
|
|
15
|
-
* head.
|
|
16
|
-
*/
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
17
2
|
export declare const PortalContainerContext: import('react').Context<HTMLElement | null>;
|
|
18
3
|
/**
|
|
19
4
|
* The element Radix portals should mount into, or `null` to use Radix's
|
|
@@ -21,3 +6,19 @@ export declare const PortalContainerContext: import('react').Context<HTMLElement
|
|
|
21
6
|
* `container` prop — Radix treats `null`/`undefined` as "use the default".
|
|
22
7
|
*/
|
|
23
8
|
export declare const usePortalContainer: () => HTMLElement | null;
|
|
9
|
+
/** Settings follows the agent's footprint even though it portals outside the dock. */
|
|
10
|
+
export type DockSurface = {
|
|
11
|
+
readonly layout: "docked" | "fullscreen" | "mobile";
|
|
12
|
+
readonly widthPx: number;
|
|
13
|
+
readonly side: "left" | "right";
|
|
14
|
+
readonly settingsOpen: boolean;
|
|
15
|
+
readonly onSettingsOpenChange: (open: boolean) => void;
|
|
16
|
+
};
|
|
17
|
+
export declare const DockSurfaceContext: import('react').Context<DockSurface | null>;
|
|
18
|
+
export declare const useDockSurface: () => DockSurface | null;
|
|
19
|
+
/** Portal roots are siblings of the dock, so they need the same tenant tokens. */
|
|
20
|
+
export type PortalTheme = {
|
|
21
|
+
readonly style: CSSProperties;
|
|
22
|
+
readonly className: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
export declare const usePortalTheme: () => PortalTheme;
|
package/dist/embed/presets.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ export declare const PRESET_NAME_SCHEMA: z.ZodEnum<{
|
|
|
9
9
|
}>;
|
|
10
10
|
export declare const BELONG_LIGHT_PALETTE: BelongThemePalette;
|
|
11
11
|
export declare const BELONG_DARK_PALETTE: BelongThemePalette;
|
|
12
|
-
export declare const BELONG_FONT_FAMILY = "
|
|
13
|
-
export declare const BELONG_RADIUS = "
|
|
12
|
+
export declare const BELONG_FONT_FAMILY = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif";
|
|
13
|
+
export declare const BELONG_RADIUS = "16px";
|
|
14
14
|
export declare const BELONG_BRAND: BelongThemeBrand;
|
|
15
15
|
export declare const SIMETRIK_BRAND: BelongThemeBrand;
|
|
16
16
|
export declare const SIMETRIK_LIGHT_PALETTE: BelongThemePalette;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Fragments stay out of HTTP request logs and referrers. */
|
|
2
|
+
export declare const scheduleInvitationLink: (pageUrl: string, token: string) => string;
|
|
3
|
+
export declare const scheduleInvitationToken: (input: string) => string | null;
|
|
4
|
+
export declare const consumeScheduleInvitation: () => string | null;
|
|
5
|
+
export declare const clearScheduleInvitation: () => void;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rasterize the host page for an issue report.
|
|
3
|
+
*
|
|
4
|
+
* snapdom clones the DOM into an SVG foreignObject with styles inlined, then
|
|
5
|
+
* paints it to a canvas. It is the one such library that walks SHADOW ROOTS,
|
|
6
|
+
* which is not optional here: the dock itself lives in one, so anything else
|
|
7
|
+
* (html2canvas, notably) would photograph the host app with a hole where
|
|
8
|
+
* Belong is.
|
|
9
|
+
*
|
|
10
|
+
* KNOWN LIMITS — say them here so they are not re-discovered from a confusing
|
|
11
|
+
* report:
|
|
12
|
+
* • cross-origin images and cross-origin iframes come out blank;
|
|
13
|
+
* • this is a re-render of the DOM, not a photograph of pixels — a canvas
|
|
14
|
+
* element or an unusual CSS feature can differ from what the user saw;
|
|
15
|
+
* • it costs a beat on a large page, which is why capture runs on the click
|
|
16
|
+
* and the dialog opens after it.
|
|
17
|
+
*
|
|
18
|
+
* DEVICE PIXEL RATIO: snapdom's `toCanvas` defaults `dpr` to
|
|
19
|
+
* `window.devicePixelRatio || 1` and multiplies the OUTPUT canvas dimensions
|
|
20
|
+
* by it, on top of `scale`. `captureScale`/`MAX_SCREENSHOT_WIDTH_PX` below
|
|
21
|
+
* only account for `scale` — so left at its default, a capture on a 2x
|
|
22
|
+
* display would produce a canvas 2x wider than the documented 1600px cap
|
|
23
|
+
* promises, inflating bytes and pushing more captures into the
|
|
24
|
+
* `MAX_SCREENSHOT_BYTES` refusal. `dpr: 1` is passed explicitly so the
|
|
25
|
+
* output is in CSS pixels and `MAX_SCREENSHOT_WIDTH_PX` means what it says
|
|
26
|
+
* regardless of the display's pixel ratio.
|
|
27
|
+
*
|
|
28
|
+
* WEBP-WITH-PNG-FALLBACK: `defaultEncode` always *requests* "image/webp". The
|
|
29
|
+
* PNG fallback is not a second encode call in this file — it is the browser's
|
|
30
|
+
* own behavior. Per the HTML spec, `HTMLCanvasElement.toBlob` given a type it
|
|
31
|
+
* cannot encode must produce `image/png` instead. So on a UA without a WebP
|
|
32
|
+
* encoder, the very same call already yields a PNG blob, and `blob.type`
|
|
33
|
+
* carries the truth of which one it got. A later task propagates `blob.type`
|
|
34
|
+
* into the upload, and the route accepts both `image/webp` and `image/png` —
|
|
35
|
+
* that is exactly why it accepts two. One consequence: PNG ignores the
|
|
36
|
+
* `quality` argument entirely, so the low-quality retry below can be a no-op
|
|
37
|
+
* on those browsers (same bytes both times) — the designed outcome there is
|
|
38
|
+
* still a report with no picture rather than an oversized upload, never a
|
|
39
|
+
* silently-too-big send.
|
|
40
|
+
*
|
|
41
|
+
* Never throws: every failure is `null`, and the dialog then offers to send the
|
|
42
|
+
* report without a picture. A capture failure must not cost us the report.
|
|
43
|
+
*
|
|
44
|
+
* A THROWN failure (as opposed to the "over the cap even at low quality"
|
|
45
|
+
* refusal above, which is not a failure) is also recorded into the client-
|
|
46
|
+
* error ring buffer (`client-error-log.ts`), so the answer to "why is there
|
|
47
|
+
* no image" travels INSIDE the report itself — the one place an operator is
|
|
48
|
+
* already looking — rather than being indistinguishable from a user who
|
|
49
|
+
* removed the screenshot or an object-store put that failed server-side.
|
|
50
|
+
* Recording is wrapped in its own try/catch: it must not be able to violate
|
|
51
|
+
* the never-throws contract above, even if the recorder itself somehow threw.
|
|
52
|
+
*
|
|
53
|
+
* The library is imported lazily so it stays out of the dock's main chunk —
|
|
54
|
+
* most sessions never open this dialog.
|
|
55
|
+
*/
|
|
56
|
+
export declare const MAX_SCREENSHOT_WIDTH_PX = 1600;
|
|
57
|
+
export declare const MAX_SCREENSHOT_BYTES = 2000000;
|
|
58
|
+
export type CapturedScreenshot = {
|
|
59
|
+
readonly blob: Blob;
|
|
60
|
+
readonly widthPx: number;
|
|
61
|
+
readonly heightPx: number;
|
|
62
|
+
};
|
|
63
|
+
export type Rasterizer = (element: Element, options: {
|
|
64
|
+
readonly scale: number;
|
|
65
|
+
readonly dpr: number;
|
|
66
|
+
}) => Promise<HTMLCanvasElement>;
|
|
67
|
+
export type Encoder = (canvas: HTMLCanvasElement, quality: number) => Promise<Blob | null>;
|
|
68
|
+
/** Shrink only what is wider than the cap; never upscale. */
|
|
69
|
+
export declare const captureScale: (elementWidthPx: number) => number;
|
|
70
|
+
export declare const captureScreen: (input: {
|
|
71
|
+
readonly element: Element;
|
|
72
|
+
readonly rasterize?: Rasterizer;
|
|
73
|
+
readonly encode?: Encoder;
|
|
74
|
+
}) => Promise<CapturedScreenshot | null>;
|
|
@@ -43,6 +43,30 @@ export type BuiltinCommand = {
|
|
|
43
43
|
readonly type: "unschedule";
|
|
44
44
|
} | {
|
|
45
45
|
readonly type: "unschedule_invalid";
|
|
46
|
+
} | {
|
|
47
|
+
readonly type: "goal";
|
|
48
|
+
readonly action: "create";
|
|
49
|
+
readonly objective: string;
|
|
50
|
+
} | {
|
|
51
|
+
readonly type: "goal";
|
|
52
|
+
readonly action: "open_sheet";
|
|
53
|
+
} | {
|
|
54
|
+
readonly type: "goal";
|
|
55
|
+
readonly action: "status" | "pause" | "resume" | "clear";
|
|
56
|
+
} | {
|
|
57
|
+
readonly type: "goal";
|
|
58
|
+
readonly action: "edit";
|
|
59
|
+
readonly objective: string;
|
|
60
|
+
} | {
|
|
61
|
+
readonly type: "goal";
|
|
62
|
+
readonly action: "turns";
|
|
63
|
+
readonly maxTurns: number;
|
|
64
|
+
} | {
|
|
65
|
+
readonly type: "goal";
|
|
66
|
+
readonly action: "budget";
|
|
67
|
+
readonly tokenBudget: number;
|
|
68
|
+
} | {
|
|
69
|
+
readonly type: "goal_invalid";
|
|
46
70
|
};
|
|
47
71
|
/**
|
|
48
72
|
* Recognize a submitted draft as a built-in command. `/compact` remains an
|
|
@@ -24,6 +24,13 @@ export declare const partsInTimezone: (instant: Date, timezone: string) => WallC
|
|
|
24
24
|
* by the gap. Exported for the Scheduled dialog's date+time+timezone →
|
|
25
25
|
* instant conversion (the server ports the same algorithm). */
|
|
26
26
|
export declare const instantInTimezone: (wall: WallClock, timezone: string) => Date;
|
|
27
|
+
/** The Scheduled dialog's "next run" reading, localized to the VIEWER's
|
|
28
|
+
* locale but the SCHEDULE's own timezone (chat.tsx decomposition campaign —
|
|
29
|
+
* extracted out of `ChatRoute` as a pure helper, no behavior change). */
|
|
30
|
+
export declare const scheduleLocalTime: (locale: Locale, schedule: {
|
|
31
|
+
readonly scheduledFor: string;
|
|
32
|
+
readonly timezone: string;
|
|
33
|
+
}) => string;
|
|
27
34
|
export declare const parseTaskScheduleCommand: (input: {
|
|
28
35
|
readonly argumentsText: string;
|
|
29
36
|
readonly locale: Locale;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SetStateAction } from 'react';
|
|
2
|
+
import { WorkspaceScope } from './workspace-scope.ts';
|
|
3
|
+
type DraftScope = {
|
|
4
|
+
readonly apiBaseUrl: string;
|
|
5
|
+
readonly workspace: WorkspaceScope;
|
|
6
|
+
};
|
|
7
|
+
/** Explicit New chat discards the unbound main draft; switching sessions does not. */
|
|
8
|
+
export declare function discardSessionDraft(sessionId: string, scope: DraftScope): void;
|
|
9
|
+
/** Text drafts survive session remounts/reloads in this tab; nothing is sent to the server. */
|
|
10
|
+
export declare function useSessionDraft(initialSessionId: string, transportSessionId: string | null, scope: DraftScope): readonly [string, (next: SetStateAction<string>) => void];
|
|
11
|
+
export {};
|