@belonguniverseai/react-sdk 0.6.27 → 0.6.29

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 (143) hide show
  1. package/README.md +43 -4
  2. package/dist/api/account-scope.d.ts +75 -0
  3. package/dist/api/artifact-actions.d.ts +0 -1
  4. package/dist/api/auth-errors.d.ts +21 -0
  5. package/dist/api/client-identity.d.ts +3 -1
  6. package/dist/api/client.d.ts +1394 -162
  7. package/dist/api/goals.d.ts +19 -2
  8. package/dist/api/live-artifacts.d.ts +197 -0
  9. package/dist/api/my-usage.d.ts +28 -0
  10. package/dist/api/queries.d.ts +6 -4
  11. package/dist/api/query-keys.d.ts +44 -3
  12. package/dist/api/task-schedule-sharing.d.ts +18 -3
  13. package/dist/api/task-schedules.d.ts +76 -12
  14. package/dist/app/VoiceOverlay.d.ts +4 -3
  15. package/dist/app/dock-story-data.d.ts +19 -1
  16. package/dist/browser/control-channel.d.ts +9 -0
  17. package/dist/browser/dom-bridge.d.ts +2 -0
  18. package/dist/component/BelongWidget.d.ts +17 -4
  19. package/dist/component/{abnfDiagram-N423BO3Z-DrnjkZwk.js → abnfDiagram-N423BO3Z-BvL7baZ-.js} +4 -4
  20. package/dist/component/{arc-CLchGzOM.js → arc-DVUroP2Z.js} +2 -2
  21. package/dist/component/{architectureDiagram-T3A2C74G-Du8PLen3.js → architectureDiagram-T3A2C74G-CYt93mxs.js} +3 -3
  22. package/dist/component/{blockDiagram-VBNYF7ZC-BxmYbrlL.js → blockDiagram-VBNYF7ZC-yST7U8Pb.js} +4 -4
  23. package/dist/component/{c4Diagram-5PPSVZJV-DHiwlK7l.js → c4Diagram-5PPSVZJV-BHz6Efx3.js} +3 -3
  24. package/dist/component/{channel-C2eeNEMi.js → channel-CKTqNdN4.js} +2 -2
  25. package/dist/component/{chunk-2GRJ4B5K-D6I_U4nB.js → chunk-2GRJ4B5K-Bw2zHHAm.js} +2 -2
  26. package/dist/component/{chunk-2Q5K7J3B-BR3JSmNI.js → chunk-2Q5K7J3B-DpBuF73m.js} +2 -2
  27. package/dist/component/{chunk-5RXB4S5H-DcmzyncC.js → chunk-5RXB4S5H-dxBtwi1p.js} +5 -5
  28. package/dist/component/{chunk-5VM5RSS4-8ww1xEAz.js → chunk-5VM5RSS4-BOTqM1Rc.js} +2 -2
  29. package/dist/component/{chunk-6Q2QTUOP-Chlg3gnC.js → chunk-6Q2QTUOP-DjMXJhRD.js} +2 -2
  30. package/dist/component/{chunk-GF5L2VYU-CgKydjVC.js → chunk-GF5L2VYU-CGpnSfXM.js} +6 -6
  31. package/dist/component/{chunk-JWPE2WC7-13zVpFYT.js → chunk-JWPE2WC7-L5aYKPho.js} +2 -2
  32. package/dist/component/{chunk-KBJHAD2P-CP28c_dJ.js → chunk-KBJHAD2P-DH2RFBaF.js} +2 -2
  33. package/dist/component/{chunk-RYQCIY6F-CaHaa77d.js → chunk-RYQCIY6F-QPgRO0s7.js} +2 -2
  34. package/dist/component/{chunk-XXDRQBXY-Cd0yVkqx.js → chunk-XXDRQBXY-C1ezaFpA.js} +2 -2
  35. package/dist/component/{classDiagram-JCYQIIEL-Bn0740dK.js → classDiagram-JCYQIIEL-Dx7Qx836.js} +3 -3
  36. package/dist/component/{classDiagram-v2-OCEON4UE-Bn0740dK.js → classDiagram-v2-OCEON4UE-Dx7Qx836.js} +3 -3
  37. package/dist/component/{cose-bilkent-JH36ORCC-Y6CvxIe4.js → cose-bilkent-JH36ORCC-Bem1eaLJ.js} +2 -2
  38. package/dist/component/{cynefinDiagram-MW4NZA55-BJ_o5gyM.js → cynefinDiagram-MW4NZA55-DF15EWOu.js} +3 -3
  39. package/dist/component/{dagre-VZM6K2ZE-Ce_ZLKlj.js → dagre-VZM6K2ZE-BVzwev7l.js} +3 -3
  40. package/dist/component/{diagram-7IWD3JNH-K8E_XdII.js → diagram-7IWD3JNH-DzQhKX_v.js} +4 -4
  41. package/dist/component/{diagram-B4RE2ZJO-DZGs1RuF.js → diagram-B4RE2ZJO-DnHINfhE.js} +3 -3
  42. package/dist/component/{diagram-LBJQPF4R-CzKPOqJK.js → diagram-LBJQPF4R-CPqE_GwY.js} +3 -3
  43. package/dist/component/{diagram-Q27KOJAE-UItKj-dk.js → diagram-Q27KOJAE-BjpvfqhL.js} +4 -4
  44. package/dist/component/{diagram-UB23O5K3-ZxBLx0B9.js → diagram-UB23O5K3-BcYqFjqI.js} +3 -3
  45. package/dist/component/{ebnfDiagram-BXEA7PRR-BIS2pIB5.js → ebnfDiagram-BXEA7PRR-DoqGcWGx.js} +4 -4
  46. package/dist/component/{erDiagram-JOGREHBK-BNZB6-ZZ.js → erDiagram-JOGREHBK-DGrj5tIK.js} +5 -5
  47. package/dist/component/{flowDiagram-UKHOOZJN-B8H3ZNjd.js → flowDiagram-UKHOOZJN-B8OuOrVY.js} +7 -7
  48. package/dist/component/{ganttDiagram-PKOTCBZU-2JJJVAY-.js → ganttDiagram-PKOTCBZU-BaxSqTVY.js} +3 -3
  49. package/dist/component/{gitGraphDiagram-DS77QQ5N-BVWxsX1D.js → gitGraphDiagram-DS77QQ5N-W1Sqa3Hc.js} +4 -4
  50. package/dist/component/{highlighted-body-OFNGDK62-CmQzAJHd.js → highlighted-body-OFNGDK62-Cf1UqcGe.js} +2 -2
  51. package/dist/component/index.d.ts +1 -0
  52. package/dist/component/index.js +2 -2
  53. package/dist/component/{infoDiagram-6WML65LV-B-7B2PTM.js → infoDiagram-6WML65LV-BS0JlYPr.js} +2 -2
  54. package/dist/component/{ishikawaDiagram-WSZJBQD7-DgjY91jV.js → ishikawaDiagram-WSZJBQD7-Df_NzOQV.js} +2 -2
  55. package/dist/component/{journeyDiagram-NVQOT4AX-fkb_5H2H.js → journeyDiagram-NVQOT4AX-JWKvZ6rc.js} +5 -5
  56. package/dist/component/{kanban-definition-27J2QSJJ-ZRQERkli.js → kanban-definition-27J2QSJJ-DMvICKAB.js} +3 -3
  57. package/dist/component/{linear-DX0_iAiu.js → linear-D02U2fTS.js} +2 -2
  58. package/dist/component/{mermaid-GHXKKRXX-BhURR8Q_.js → mermaid-GHXKKRXX-B7CJJdoE.js} +51487 -47044
  59. package/dist/component/{mindmap-definition-FAOFIHXS-Duc36TEr.js → mindmap-definition-FAOFIHXS-AzTh8oju.js} +4 -4
  60. package/dist/component/{pegDiagram-VL7TDLO6-Egcz9GLB.js → pegDiagram-VL7TDLO6-DSCzZs_w.js} +4 -4
  61. package/dist/component/{pieDiagram-7S7Q4E2Y-DEe2GHp7.js → pieDiagram-7S7Q4E2Y-CEByr6BB.js} +4 -4
  62. package/dist/component/{quadrantDiagram-CIZ2JOQS-DNfio-6s.js → quadrantDiagram-CIZ2JOQS-BrWOf-GT.js} +3 -3
  63. package/dist/component/{railroadDiagram-AXF67PYL-B3lRYedY.js → railroadDiagram-AXF67PYL-DRtsV2gM.js} +4 -4
  64. package/dist/component/{requirementDiagram-LRYGKXZP-DYYxC0Cg.js → requirementDiagram-LRYGKXZP-_WwAo7AE.js} +4 -4
  65. package/dist/component/{sankeyDiagram-W5VNT64P-CKQNueMs.js → sankeyDiagram-W5VNT64P-DBxP3yyK.js} +2 -2
  66. package/dist/component/{sequenceDiagram-SI44F4Z6-ChF8pgI7.js → sequenceDiagram-SI44F4Z6-B3SNXrpC.js} +4 -4
  67. package/dist/component/{sizeCapture-X5ZJPWSS-BQyVznxb.js → sizeCapture-X5ZJPWSS-D5G8pyPC.js} +2 -2
  68. package/dist/component/{stateDiagram-OKZ733FA-CAVOTaJQ.js → stateDiagram-OKZ733FA-C4UZwsoc.js} +3 -3
  69. package/dist/component/{stateDiagram-v2-UEYNNEHI-rGNqHCbu.js → stateDiagram-v2-UEYNNEHI-DIYB5q15.js} +3 -3
  70. package/dist/component/{swimlanes-SLNWSIFB-j8tXsaid.js → swimlanes-SLNWSIFB-Cc9yJXTh.js} +4 -4
  71. package/dist/component/{swimlanesDiagram-ULZ7WXOC-CsbepRMA.js → swimlanesDiagram-ULZ7WXOC-DsGPiJ-s.js} +3 -3
  72. package/dist/component/{timeline-definition-Z64GVDOM-nCRE1AQh.js → timeline-definition-Z64GVDOM-Dr4-iAeD.js} +3 -3
  73. package/dist/component/{vennDiagram-T6HMQDX7-C3ubGm9c.js → vennDiagram-T6HMQDX7-ZiaZ9jYw.js} +2 -2
  74. package/dist/component/{wardleyDiagram-T6FBY63Y-mKT8yN1z.js → wardleyDiagram-T6FBY63Y-KdF37MT-.js} +3 -3
  75. package/dist/component/{xychartDiagram-ELKLHX3M-D5AF8jgv.js → xychartDiagram-ELKLHX3M-NH_bOKPL.js} +3 -3
  76. package/dist/components/artifacts/ArtifactDetailSurface.d.ts +37 -0
  77. package/dist/components/artifacts/ArtifactMeta.d.ts +10 -0
  78. package/dist/components/artifacts/ArtifactsListSurface.d.ts +11 -0
  79. package/dist/components/artifacts/BindScheduleDialog.d.ts +39 -0
  80. package/dist/components/artifacts/ConfirmDeleteArtifactDialog.d.ts +9 -0
  81. package/dist/components/artifacts/ConfirmReshareDialog.d.ts +24 -0
  82. package/dist/components/artifacts/artifact-format.d.ts +38 -0
  83. package/dist/components/artifacts/open-artifact-version.d.ts +16 -0
  84. package/dist/components/artifacts/use-artifact-actions.d.ts +32 -0
  85. package/dist/components/embed/ComposerContext.d.ts +11 -7
  86. package/dist/components/embed/EmbedComposer.d.ts +7 -1
  87. package/dist/components/embed/EmbedRail.d.ts +9 -2
  88. package/dist/components/embed/GoalRefusalCard.d.ts +5 -1
  89. package/dist/components/embed/MobileNavBar.d.ts +2 -1
  90. package/dist/components/embed/ResponseModeDial.d.ts +11 -0
  91. package/dist/components/embed/SessionStatsPanel.d.ts +3 -0
  92. package/dist/components/embed/UsageSettings.d.ts +11 -0
  93. package/dist/components/embed/format-compact-number.d.ts +8 -0
  94. package/dist/components/embed/use-artifact-operation-notices.d.ts +1 -0
  95. package/dist/components/scheduled/ConfirmRunPausedScheduleDialog.d.ts +18 -0
  96. package/dist/components/scheduled/EmailCopiesFields.d.ts +19 -0
  97. package/dist/components/scheduled/ScheduledDetailSurface.d.ts +2 -1
  98. package/dist/components/scheduled/use-run-now-with-confirmation.d.ts +17 -0
  99. package/dist/embed/artifact-action-bridge.d.ts +13 -3
  100. package/dist/embed/artifact-remint-budget.d.ts +5 -0
  101. package/dist/embed/copy.d.ts +13 -18
  102. package/dist/embed/dock-state.d.ts +1 -1
  103. package/dist/embed/global.d.ts +2 -0
  104. package/dist/embed/goal-edit-command.d.ts +6 -5
  105. package/dist/embed/plan-decision-text.d.ts +1 -0
  106. package/dist/embed/presets.d.ts +1 -0
  107. package/dist/embed/response-mode.d.ts +48 -0
  108. package/dist/embed/theme.d.ts +5 -0
  109. package/dist/embed/voice-config.d.ts +22 -31
  110. package/dist/embed/voice-prefs.d.ts +18 -34
  111. package/dist/i18n/messages/en.d.ts +146 -7
  112. package/dist/i18n/messages/surfaces/artifacts.d.ts +304 -0
  113. package/dist/i18n/messages/surfaces/feedback.d.ts +12 -0
  114. package/dist/i18n/messages/surfaces/header.d.ts +4 -0
  115. package/dist/i18n/messages/surfaces/myUsage.d.ts +75 -0
  116. package/dist/i18n/messages/surfaces/plan.d.ts +4 -0
  117. package/dist/i18n/messages/surfaces/scheduled.d.ts +53 -1
  118. package/dist/i18n/messages/surfaces/settings.d.ts +12 -0
  119. package/dist/i18n/messages/surfaces/stats.d.ts +4 -12
  120. package/dist/i18n/messages/surfaces/stream.d.ts +88 -0
  121. package/dist/i18n/messages/surfaces/usage.d.ts +1 -9
  122. package/dist/infrastructure/telemetry/first-response-timing.d.ts +51 -0
  123. package/dist/lib/tab-control-store.d.ts +14 -0
  124. package/dist/lib/tab-leadership.d.ts +9 -24
  125. package/dist/lib/use-now.d.ts +32 -0
  126. package/dist/lib/use-tab-leadership.d.ts +5 -7
  127. package/dist/routes/artifact-detail.d.ts +2 -0
  128. package/dist/routes/artifacts.d.ts +2 -0
  129. package/dist/routes/chat/history-merge.d.ts +53 -0
  130. package/dist/routes/chat/history-paging.d.ts +25 -6
  131. package/dist/routes/chat/transcript-row.d.ts +1 -0
  132. package/dist/routes/chat/use-catch-up-on-return.d.ts +70 -0
  133. package/dist/routes/chat/use-return-to-page.d.ts +7 -0
  134. package/dist/stream/belong-chat-transport.d.ts +38 -8
  135. package/dist/stream/belong-data-parts.d.ts +10 -0
  136. package/dist/stream/dispatch-once.d.ts +1 -1
  137. package/dist/stream/message-parts.d.ts +3 -1
  138. package/dist/stream/queued-message-outbox.d.ts +6 -0
  139. package/dist/stream/select-session-usage.d.ts +9 -0
  140. package/dist/stream/session-control-context.d.ts +7 -0
  141. package/dist/stream/session-stats-csv.d.ts +7 -9
  142. package/dist/types/public.d.ts +16 -9
  143. package/package.json +1 -1
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The composer's response mode (embed/response-mode.ts), on the Codex app's
3
+ * dial: a pill showing the current mode opens a popover with the mode names
4
+ * over a chunky three-stop slider, and the chosen mode's upside spelled out
5
+ * underneath. The dock names modes only; which model a mode buys is the
6
+ * backend's call, so no model name ever appears here.
7
+ */
8
+ export declare function ResponseModeDial({ className, }: Readonly<{
9
+ /** The composer's shared control sizing. */
10
+ className: string;
11
+ }>): import("react").JSX.Element;
@@ -4,6 +4,9 @@
4
4
  * session, not just the active one, so REST not folded stream parts). Shows
5
5
  * tokens, time running, turns, tool calls, runtime + a per-turn table, with two
6
6
  * CSV exports.
7
+ *
8
+ * Plan 018 — tokens are WEIGHTED tokens, the one unit users see; the raw
9
+ * input / output split is not shown (nor exported).
7
10
  */
8
11
  export type SessionStatsPanelProps = {
9
12
  readonly sessionId: string | null;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Settings → Usage (plan 018): the signed-in user's own consumption, in
3
+ * weighted tokens — month-to-date, today, and a 30-day daily strip.
4
+ *
5
+ * One unit only. The raw input / output / cache counts never reach the dock
6
+ * (`GET /v1/usage` does not send them). Days are UTC days, and the view says so.
7
+ * Quiet by design (§42): primary-coloured bars, muted text, no red. A load
8
+ * failure is one muted line with a retry, and a cloud that predates the route
9
+ * says "not available yet" instead of failing.
10
+ */
11
+ export declare const UsageSettings: () => import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Locale-aware compact numbers for the Usage view (plan 018): "1.3M" in
3
+ * English, "1,3 M" in Spanish — `formatTokens` predates the dock's locales and
4
+ * always writes "." and "k". One formatter per locale, built once.
5
+ */
6
+ export declare const formatCompactNumber: (value: number, locale: string) => string;
7
+ /** A full, grouped number for tooltips and screen readers: "1,250,000". */
8
+ export declare const formatWholeNumber: (value: number, locale: string) => string;
@@ -15,5 +15,6 @@ export declare const useArtifactOperationNotices: (input: {
15
15
  }) => {
16
16
  readonly notice: ArtifactOperationNotice;
17
17
  readonly onOperation: (operation: ArtifactOperation, sighting: ArtifactOperationSighting) => void;
18
+ readonly onReconnectRequired: (reconnectId: string) => void;
18
19
  readonly stop: () => void;
19
20
  };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * "Run now" confirmation for a PAUSED schedule (list card menu + detail menu).
3
+ *
4
+ * #837: run-now on a paused task runs the whole task once, emails included,
5
+ * and the task stays paused. Users reasonably read "paused" as "nothing will
6
+ * go out", so an email that arrives afterwards looks like a bug unless the
7
+ * surface says so first. An active task runs straight away, as before.
8
+ *
9
+ * Every schedule notifies by email (completion or custom), so the copy names
10
+ * emails unconditionally. Not red (§42): nothing is failing and the user is
11
+ * choosing it, so the confirm is the ordinary primary button.
12
+ */
13
+ export declare const ConfirmRunPausedScheduleDialog: (props: {
14
+ readonly open: boolean;
15
+ readonly onOpenChange: (open: boolean) => void;
16
+ readonly busy: boolean;
17
+ readonly onConfirm: () => void;
18
+ }) => import("react").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { EmailCopies } from '../../api/task-schedules.ts';
2
+ export type EmailCopiesText = {
3
+ readonly cc: string;
4
+ readonly bcc: string;
5
+ readonly replyTo: string;
6
+ };
7
+ export declare const EMPTY_EMAIL_COPIES_TEXT: EmailCopiesText;
8
+ export declare const emailCopiesText: (copies: EmailCopies | null | undefined) => EmailCopiesText;
9
+ /** `null` when any list is invalid; empty lists are dropped from the result. */
10
+ export declare const parseEmailCopies: (text: EmailCopiesText) => EmailCopies | null;
11
+ export declare const EmailCopiesFields: (props: {
12
+ readonly value: EmailCopiesText;
13
+ readonly onChange: (value: EmailCopiesText) => void;
14
+ readonly disabled: boolean;
15
+ /** Section label when expanded; collapsed, the link reads "Add CC, BCC or Reply-To". */
16
+ readonly label: string;
17
+ readonly help: string;
18
+ readonly testIdPrefix: string;
19
+ }) => import("react").JSX.Element;
@@ -1,8 +1,9 @@
1
- import { TaskScheduleDetail, TaskScheduleRun } from '../../api/task-schedules.ts';
1
+ import { EmailCopies, TaskScheduleDetail, TaskScheduleRun } from '../../api/task-schedules.ts';
2
2
  export declare const EmailNotificationIndicator: (props: {
3
3
  readonly notification: TaskScheduleDetail["notification"];
4
4
  readonly shared?: boolean;
5
5
  readonly sharedRecipients?: readonly string[] | undefined;
6
+ readonly sharedCopies?: EmailCopies | null | undefined;
6
7
  }) => import("react").JSX.Element;
7
8
  export declare const MicrosoftTeamsDeliveryIndicator: (props: {
8
9
  readonly delivery: NonNullable<TaskScheduleDetail["microsoftTeamsDelivery"]>;
@@ -0,0 +1,17 @@
1
+ import { TaskScheduleDetail } from '../../api/task-schedules.ts';
2
+ export declare const useRunNowWithConfirmation: (props: {
3
+ readonly taskScheduleId: string;
4
+ readonly onStarted: () => void;
5
+ readonly onFailed: () => void;
6
+ }) => {
7
+ /** Start Run now from the status the surface currently shows. */
8
+ request: (shownStatus: TaskScheduleDetail["status"]) => void;
9
+ pending: boolean;
10
+ /** Spread onto `ConfirmRunPausedScheduleDialog`. */
11
+ dialog: {
12
+ open: boolean;
13
+ busy: boolean;
14
+ onOpenChange: (open: boolean) => void;
15
+ onConfirm: () => void;
16
+ };
17
+ };
@@ -11,9 +11,16 @@ export type ArtifactActionBridge = {
11
11
  /**
12
12
  * Why a bridge asks its owner for a fresh preview mint (new token, new document key, new frame):
13
13
  * `navigation` — a second document loaded in the frame (the report reloaded or navigated itself);
14
- * `stale` — the bridge was created for a frame that already loaded, or for a key already spent.
14
+ * `stale` — the bridge was created for a frame that already loaded, or for a key already spent;
15
+ * `unanswered` — the document never answered its challenge (#796).
15
16
  */
16
- export type ArtifactRemintReason = "navigation" | "stale";
17
+ export type ArtifactRemintReason = "navigation" | "stale" | "unanswered";
18
+ /**
19
+ * Visible time the parent waits for the report to answer its challenge. A document served without
20
+ * its single-use key (a refetch, a failed key claim, an early self-navigation) never answers and
21
+ * would otherwise stay without actions until its preview URL renews, about 12 minutes later (#796).
22
+ */
23
+ export declare const ARTIFACT_CHALLENGE_TIMEOUT_MS = 10000;
17
24
  /**
18
25
  * How the parent learned a snapshot: `transition` = it just changed in front of this view (a
19
26
  * submission, an approval decision, an observed status read); `snapshot` = a current read the
@@ -47,7 +54,8 @@ export declare const nextArtifactPollDelayMs: (previous: {
47
54
  * challenge sent on the frame's FIRST load, and the minted document key; origin "null" is never an
48
55
  * authority. The first document is the one the parent navigated the frame to; any later load is a
49
56
  * document the report chose (reload or navigation), so the bridge retires and asks for a re-mint
50
- * rather than offering that document a channel.
57
+ * rather than offering that document a channel. A challenge still unanswered after 10 s of visible
58
+ * time also asks for a re-mint; the bridge keeps listening until its owner replaces it.
51
59
  */
52
60
  export declare const createArtifactActionBridge: (input: {
53
61
  readonly frame: HTMLIFrameElement;
@@ -59,6 +67,8 @@ export declare const createArtifactActionBridge: (input: {
59
67
  readonly onRemint: (reason: ArtifactRemintReason) => void;
60
68
  /** Every validated snapshot this bridge received, for trusted parent UI (never the report). */
61
69
  readonly onOperation?: (operation: ArtifactOperation, sighting: ArtifactOperationSighting) => void;
70
+ /** An authenticated API refusal needs connection repair; never a report-requested method. */
71
+ readonly onReconnectRequired?: (reconnectId: string) => void;
62
72
  /** The frame already finished a load before this bridge existed: its document is unknown. */
63
73
  readonly frameAlreadyLoaded?: boolean;
64
74
  readonly requestWindow?: ArtifactRequestWindow;
@@ -7,6 +7,11 @@
7
7
  export declare const ARTIFACT_SELF_RELOAD_WINDOW_MS = 60000;
8
8
  /** Delay before each successive re-mint inside one window. Its length is the per-window cap. */
9
9
  export declare const ARTIFACT_REMINT_BACKOFF_MS: readonly number[];
10
+ /**
11
+ * Re-mints one view spends on a report that never answered its challenge (it was served without
12
+ * its single-use key). Separate from the self-reload allowance: the report did nothing wrong (#796).
13
+ */
14
+ export declare const ARTIFACT_UNANSWERED_REMINTS_PER_VIEW = 2;
10
15
  export type ArtifactRemintDecision = {
11
16
  readonly kind: "remint";
12
17
  readonly delayMs: number;
@@ -68,8 +68,8 @@ export type MenuCopy = {
68
68
  readonly history: string;
69
69
  readonly voice: string;
70
70
  readonly pushToTalk: string;
71
- readonly pressAnyKey: string;
72
- readonly change: string;
71
+ /** Push-to-talk key select: the option that binds no key. */
72
+ readonly pushToTalkOff: string;
73
73
  readonly reset: string;
74
74
  readonly voiceSend: string;
75
75
  readonly voiceSendConfirm: string;
@@ -96,9 +96,6 @@ export type SkillsPanelCopy = {
96
96
  export type DockCopy = {
97
97
  readonly welcomeCard: WelcomeCardContent;
98
98
  readonly tour: TourCopy;
99
- /** Localized name for the Space key (every other code renders via
100
- * `formatKeyCode`, which is already language-neutral). */
101
- readonly spaceKeyLabel: string;
102
99
  readonly replayMenu: string;
103
100
  readonly language: {
104
101
  readonly label: string;
@@ -159,25 +156,22 @@ export type DockCopy = {
159
156
  readonly micTooltip: (keyLabel: string) => string;
160
157
  /** Mobile variant of the mic tooltip — omits the keyboard fallback. */
161
158
  readonly micTooltipTouch: string;
159
+ /** Desktop mic tooltip while no push-to-talk key is bound — says where to pick one. */
160
+ readonly micTooltipNoKey: string;
162
161
  readonly viewPlan: string;
163
162
  readonly hidePlan: string;
164
163
  };
165
164
  };
166
165
  export declare const DOCK_COPY: Record<Locale, DockCopy>;
167
- /**
168
- * Human label for the push-to-talk key, localized where a translation exists:
169
- * "Space" reads "Espacio"/"Espaço" in ES/PT; every other code goes through
170
- * `formatKeyCode` ("ControlLeft" → "Left Ctrl", "KeyV" → "V", …).
171
- */
172
- export declare const voiceKeyLabel: (code: string, locale: Locale) => string;
173
166
  /**
174
167
  * Flatten the variant-keyed welcome-card content into the strings the
175
- * presentational card renders, injecting the LIVE voice key label, then
176
- * applying the active theme's per-locale `copy` override (BEL-135) when a
177
- * tenant supplies one — Simetrik's preset, or a published theme.json. A
178
- * neutral host with no override gets the variant copy as-is.
168
+ * presentational card renders, injecting the LIVE voice key label (`null`
169
+ * when no push-to-talk key is bound), then applying the active theme's
170
+ * per-locale `copy` override (BEL-135) when a tenant supplies one — Simetrik's
171
+ * preset, or a published theme.json. A neutral host with no override gets the
172
+ * variant copy as-is.
179
173
  */
180
- export declare const resolveWelcomeCardCopy: (locale: Locale, variant: DockCopyVariant, keyLabel: string, override?: DockCopyOverride, options?: {
174
+ export declare const resolveWelcomeCardCopy: (locale: Locale, variant: DockCopyVariant, keyLabel: string | null, override?: DockCopyOverride, options?: {
181
175
  readonly mobile?: boolean;
182
176
  readonly voiceAvailable?: boolean;
183
177
  }) => WelcomeCardCopy;
@@ -192,8 +186,9 @@ export type ResolvedWelcomeCopy = {
192
186
  };
193
187
  export declare const resolveWelcomeCopy: (locale: Locale, variant: DockCopyVariant, override: DockCopyOverride | undefined) => ResolvedWelcomeCopy;
194
188
  /** Merge the locale-independent step defs with this locale's titles/bodies,
195
- * injecting the LIVE voice key label and picking the variant's `/` step. */
196
- export declare const buildTourSteps: (locale: Locale, keyLabel: string, variant: DockCopyVariant, options?: {
189
+ * injecting the LIVE voice key label (`null` when no push-to-talk key is
190
+ * bound) and picking the variant's `/` step. */
191
+ export declare const buildTourSteps: (locale: Locale, keyLabel: string | null, variant: DockCopyVariant, options?: {
197
192
  readonly mobile?: boolean;
198
193
  }) => readonly TourStep[];
199
194
  export {};
@@ -5,7 +5,7 @@
5
5
  * in the stream-state store; this module owns only view + size. Best-effort:
6
6
  * disabled/quota'd storage just means no cross-reload restore.
7
7
  */
8
- export type DockView = "chat" | "goal" | "files" | "scheduled" | "prompts" | "connectors" | "skills";
8
+ export type DockView = "chat" | "goal" | "files" | "scheduled" | "prompts" | "connectors" | "skills" | "artifacts";
9
9
  export type DockSize = "collapsed" | "expanded" | "fullscreen";
10
10
  export type DockState = {
11
11
  readonly view: DockView;
@@ -1,4 +1,6 @@
1
1
  import { BelongGlobal, BelongInitInput, RouteHandler, UiActionHandler } from '../types/public.ts';
2
+ /** Release listeners and invalidate pending theme reads when an embed leaves. */
3
+ export declare const stopTenantThemeRefresh: () => void;
2
4
  type AgentGrantConfig = {
3
5
  readonly provider: string;
4
6
  readonly scopeExternalId: string | null;
@@ -1,3 +1,4 @@
1
+ import { TFunction } from 'i18next';
1
2
  import { GoalActionOutcome, GoalEditInput } from '../api/goals.ts';
2
3
  import { BuiltinCommand } from './slash-commands.ts';
3
4
  /** The three `/goal` sub-commands that map onto `POST .../goal/edit`. */
@@ -13,13 +14,13 @@ type GoalEditCommand = Extract<BuiltinCommand, {
13
14
  type GoalEditOutcome = GoalActionOutcome | {
14
15
  readonly status: "no_change";
15
16
  };
16
- type GoalEditNoticeKey = "goal.revived" | "goal.edited" | "goal.notEditable" | "goal.editUsage" | "goal.none" | "goal.disabled" | "goal.error";
17
17
  /** Command → `POST .../goal/edit` request body. */
18
18
  export declare const goalEditRequestBody: (command: GoalEditCommand) => GoalEditInput;
19
19
  /**
20
- * `editSessionGoal` outcome → the i18n key for the local notice. A `revived`
21
- * edit (a raised cap that un-stalled a `budget_limited` goal) gets its own
22
- * copy distinct from a plain edit — see `GoalActionOutcome`'s `revived` flag.
20
+ * `editSessionGoal` outcome → the local notice. A `revived` edit (a raised
21
+ * cap that un-stalled a `budget_limited` goal) gets its own copy distinct
22
+ * from a plain edit — see `GoalActionOutcome`'s `revived` flag — and one
23
+ * that left the goal `budget_limited` says it is still stopped (#766).
23
24
  */
24
- export declare const goalEditNoticeKey: (outcome: GoalEditOutcome) => GoalEditNoticeKey;
25
+ export declare const goalEditNoticeText: (t: TFunction, outcome: GoalEditOutcome) => string;
25
26
  export {};
@@ -0,0 +1 @@
1
+ export { PLAN_DECISION_TEXTS, recognizePlanDecisionText } from '@belong/codec/plan-decision-text';
@@ -6,6 +6,7 @@ export declare const PRESET_NAME_SCHEMA: z.ZodEnum<{
6
6
  custom: "custom";
7
7
  belong: "belong";
8
8
  simetrik: "simetrik";
9
+ tenant: "tenant";
9
10
  }>;
10
11
  export declare const BELONG_LIGHT_PALETTE: BelongThemePalette;
11
12
  export declare const BELONG_DARK_PALETTE: BelongThemePalette;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * The composer's RESPONSE MODE — Fast / Balanced / Smart on a three-stop
3
+ * slider (the Codex app's dial). Every mode is named for its upside: a person
4
+ * picks what they want more of, never "less" of anything.
5
+ *
6
+ * fast → quick answers for simple requests
7
+ * balanced → everyday work
8
+ * smart → the most capable, for complex multi-step work (the default)
9
+ *
10
+ * The dock only ever names a MODE. Which model a mode buys is the backend's
11
+ * call (`response-mode-model.ts`), so no model name ever reaches a customer.
12
+ *
13
+ * "Never picked" is NOT "picked Smart". Until a person picks a mode the dial
14
+ * shows Smart but the dock sends no mode at all, so the deployment decides:
15
+ * its own model today, or the intention model switch where that is enabled. A
16
+ * pick — Smart included — is the person's choice, sent with every message and
17
+ * outranking the switch.
18
+ *
19
+ * A personal preference, not a per-conversation one: the mode a person last
20
+ * picked carries into new chats, the way other assistants remember your last
21
+ * choice. Persisted best-effort to localStorage (zod-validated at the storage
22
+ * perimeter); private mode, disabled storage or a junk value read as "never
23
+ * picked". The transport stamps the pick on every send (beside the locale),
24
+ * and the backend keeps it durable on the message, so a continuation after a
25
+ * reload still runs in the mode the person chose.
26
+ */
27
+ /** Fastest first — the slider's stops, left to right. */
28
+ export declare const RESPONSE_MODES: readonly ["fast", "balanced", "smart"];
29
+ export type ResponseMode = (typeof RESPONSE_MODES)[number];
30
+ /** What the dial shows before a person picks: the deployment's own model. */
31
+ export declare const DEFAULT_RESPONSE_MODE: ResponseMode;
32
+ /** Narrow an untrusted value (storage, a slider position's lookup) to a mode. */
33
+ export declare const parseResponseMode: (value: unknown) => ResponseMode | null;
34
+ /** The mode the person picked, or null when they never did — sends carry a mode only then. */
35
+ export declare const peekResponseModePick: () => ResponseMode | null;
36
+ /** The mode the dial shows: the person's pick, else the default. */
37
+ export declare const peekResponseMode: () => ResponseMode;
38
+ export declare const subscribeResponseMode: (listener: () => void) => (() => void);
39
+ /** Pick `mode` — Smart included — and remember it for this browser. */
40
+ export declare const writeResponseMode: (mode: ResponseMode) => void;
41
+ /** Test-only: back to a browser that never picked a mode. */
42
+ export declare const __resetResponseModeForTest: () => void;
43
+ /** The current mode, re-rendering on change. */
44
+ export declare const useResponseMode: () => ResponseMode;
45
+ /** Ask the API once whether it offers the dial (repeat calls are no-ops). */
46
+ export declare const askResponseModesAvailability: (apiBaseUrl: string) => void;
47
+ /** Whether the composer should show the dial for this API (the shell asked). */
48
+ export declare const useResponseModesAvailable: (apiBaseUrl: string) => boolean;
@@ -4,6 +4,11 @@ export declare const DEFAULT_THEME: BelongTheme;
4
4
  export declare const peekTheme: () => BelongTheme;
5
5
  export declare const subscribeTheme: (listener: () => void) => (() => void);
6
6
  export declare const setTheme: (partial: PartialBelongTheme) => void;
7
+ /** Start a branding scope. Old global prefs cannot override a tenant's default. */
8
+ export declare const configureTenantTheme: (scope: string, inline?: PartialBelongTheme) => void;
9
+ /** Refresh the baseline even while a user-selected style is active. No writes
10
+ * to local preferences: only explicit user/host overrides are persisted. */
11
+ export declare const setPublishedTenantTheme: (partial: PartialBelongTheme | null) => void;
7
12
  /** Switch the active theme style. Built-in presets render their pure palette;
8
13
  * the Custom style overlays the user's accent/cssVars stash. */
9
14
  export declare const applyPreset: (name: PresetName) => void;
@@ -1,35 +1,23 @@
1
+ import { z } from 'zod';
1
2
  /**
2
- * Voice configuration — module-level knobs shared by the capture engine
3
- * (`voice-bus.ts`) and the TTS player (`voice-tts.ts`).
4
- *
5
- * The host sets these once at init (or via the public API):
6
- *
7
- * • `apiBaseUrl` — where `/v1/voice/*` lives (same origin as the rest
8
- * of the backend RPC client). Default "" → same-origin
9
- * relative fetch.
10
- * • `pushToTalkKey` — a `KeyboardEvent.code` (default "ControlLeft") the
11
- * dock binds for hold-to-talk. This is the HOST default;
12
- * the end user may override it per browser via
13
- * `voice-prefs.ts` (the dock binds the EFFECTIVE key
14
- * from `getEffectivePushToTalkKey()`).
15
- * • `autoplayTts` — whether assistant replies are spoken aloud by default.
16
- * • `voiceId` — TTS voice id; "" means "let the backend default apply".
17
- * • `utteranceFlushMs` — how long (ms) to wait before flushing a buffered
18
- * partial utterance to the backend. Default 1000.
19
- * • `callSilenceMs` — silence window (ms) after which a live call turn ends.
20
- * Default 3000.
21
- * • `ttsPlaybackRate` — client-side playback speed for spoken audio (filler +
22
- * reply). Gemini's batch TTS has no rate knob, so we slow
23
- * it on the element (pitch preserved). Default 0.9 (10%
24
- * slower); sane range 0.5–1.5.
25
- * • `ttsChunkGapMs` — minimum pause (ms) between sentence chunks in
26
- * conversational playback, so consecutive sentences
27
- * breathe like natural speech instead of running
28
- * back-to-back. Default 350; 0 disables the pause.
29
- *
30
- * Plain module state mirrors `theme.ts`: no class, no DI — these are global
31
- * UX preferences for the embedded dock, not domain state.
3
+ * The keys push-to-talk may bind. The dock swallows the key's keydown on the
4
+ * whole page while it is bound, so a key that types (letters, digits, Space,
5
+ * Enter, Tab) would silently eat that character in every text field. F-keys the
6
+ * browser owns (F1 help, F3 find, F5 reload, F6/F10 focus moves, F7 caret
7
+ * browsing, F11 fullscreen, F12 devtools) are left out too: an idle-only
8
+ * `preventDefault` cannot keep them from firing mid-recording.
32
9
  */
10
+ export declare const PUSH_TO_TALK_KEYS: readonly ["ControlRight", "ControlLeft", "AltRight", "AltLeft", "F2", "F8", "F9"];
11
+ export type PushToTalkKey = (typeof PUSH_TO_TALK_KEYS)[number];
12
+ export declare const pushToTalkKeySchema: z.ZodEnum<{
13
+ ControlRight: "ControlRight";
14
+ ControlLeft: "ControlLeft";
15
+ AltRight: "AltRight";
16
+ AltLeft: "AltLeft";
17
+ F2: "F2";
18
+ F8: "F8";
19
+ F9: "F9";
20
+ }>;
33
21
  export type VoiceConfigInput = {
34
22
  readonly apiBaseUrl?: string;
35
23
  readonly pushToTalkKey?: string;
@@ -43,7 +31,10 @@ export type VoiceConfigInput = {
43
31
  /** Merge host-provided config; `undefined` fields leave the current value intact. */
44
32
  export declare const configureVoice: (input: VoiceConfigInput) => void;
45
33
  export declare const getVoiceApiBaseUrl: () => string;
46
- export declare const getPushToTalkKey: () => string;
34
+ /** The host's default key, or `null` when the host binds none. */
35
+ export declare const getPushToTalkKey: () => PushToTalkKey | null;
36
+ /** Test-only: drop a host default set via `configureVoice` (back to none). */
37
+ export declare const __resetPushToTalkKeyForTest: () => void;
47
38
  export declare const getAutoplayTtsDefault: () => boolean;
48
39
  export declare const getVoiceId: () => string;
49
40
  export declare const getUtteranceFlushMs: () => number;
@@ -1,32 +1,20 @@
1
+ import { PushToTalkKey } from './voice-config.ts';
2
+ /** What the user picked in Settings: a key to hold, or push-to-talk off. */
3
+ export type PushToTalkChoice = PushToTalkKey | "off";
4
+ /** `useSyncExternalStore` subscribe — fires whenever the user's choice changes, in any tab. */
5
+ export declare const subscribePushToTalkKey: (listener: () => void) => (() => void);
6
+ /** The user's own choice, or `null` when they never chose (host default applies). */
7
+ export declare const peekUserPushToTalkChoice: () => PushToTalkChoice | null;
8
+ /** The key the dock actually binds — the user's choice over the host default — or `null` for none. */
9
+ export declare const getEffectivePushToTalkKey: () => PushToTalkKey | null;
10
+ /** `useSyncExternalStore` snapshot — the effective key (a primitive, so stable). */
11
+ export declare const peekPushToTalkKey: () => PushToTalkKey | null;
1
12
  /**
2
- * User voice preferences — the per-browser push-to-talk key override and the
3
- * first-conversation voice hint flag.
4
- *
5
- * Host default (voice-config `pushToTalkKey`) ◀ user pref (localStorage)
6
- *
7
- * `voice-config.ts` carries the HOST's deployment-wide knobs (set once via
8
- * `configureVoice`); this module layers the END USER's own choice on top, the
9
- * same way `theme.ts` layers user prefs over the host theme. Components read
10
- * the EFFECTIVE key (user pref if set, else host default) through a tiny
11
- * external store (`subscribePushToTalkKey` / `peekPushToTalkKey`) so the
12
- * settings UI, the composer tooltip, and the dock's key handler all rebind
13
- * live when the user picks a new key.
14
- *
15
- * localStorage is a perimeter: the prefs bag is zod-validated on read and any
16
- * junk (corrupted JSON, wrong shape, storage disabled) degrades to "no pref".
13
+ * Persist the user's choice and notify subscribers. The value comes from a
14
+ * form control, so it is parsed here: anything outside the key list and "off"
15
+ * is ignored.
17
16
  */
18
- /** `useSyncExternalStore` subscribe — fires on set/clear of the user key. */
19
- export declare const subscribePushToTalkKey: (listener: () => void) => (() => void);
20
- /** The user's own override, or `null` when the host default applies. */
21
- export declare const peekUserPushToTalkKey: () => string | null;
22
- /** The key the dock actually binds: user pref if set, else the host default. */
23
- export declare const getEffectivePushToTalkKey: () => string;
24
- /** `useSyncExternalStore` snapshot — the effective key (string, so stable). */
25
- export declare const peekPushToTalkKey: () => string;
26
- /** Persist a user-chosen `KeyboardEvent.code` and notify subscribers. */
27
- export declare const setUserPushToTalkKey: (code: string) => void;
28
- /** Drop the user override (back to the host default) and notify subscribers. */
29
- export declare const clearUserPushToTalkKey: () => void;
17
+ export declare const setUserPushToTalkChoice: (choice: string) => void;
30
18
  /** True once the push-to-talk hint chip was dismissed (X or first capture). */
31
19
  export declare const readVoiceHintDismissed: () => boolean;
32
20
  /** Persist the hint dismissal so it never shows again in this browser. */
@@ -46,14 +34,10 @@ export type VoiceClosedSendMode = "confirm" | "auto";
46
34
  export declare const subscribeVoiceClosedSendMode: (listener: () => void) => (() => void);
47
35
  export declare const peekVoiceClosedSendMode: () => VoiceClosedSendMode;
48
36
  export declare const setVoiceClosedSendMode: (mode: VoiceClosedSendMode) => void;
37
+ /** Human label for a push-to-talk key: "ControlLeft" → "Left Ctrl". */
38
+ export declare const formatKeyCode: (code: PushToTalkKey) => string;
49
39
  /**
50
- * Human label for a `KeyboardEvent.code`: "ControlLeft" → "Left Ctrl",
51
- * "KeyA" → "A", "Digit7" → "7". Codes with no friendlier reading ("Space",
52
- * "F1", unknown codes) pass through unchanged.
53
- */
54
- export declare const formatKeyCode: (code: string) => string;
55
- /**
56
- * Test-only: clear listeners and re-seed the user key from localStorage. The
40
+ * Test-only: clear listeners and re-seed the user's choice from localStorage. The
57
41
  * store is a module singleton, so unit tests reset it in `beforeEach`.
58
42
  */
59
43
  export declare const __resetVoicePrefsForTest: () => void;