@belonguniverseai/react-sdk 0.6.32 → 0.6.34

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 (129) hide show
  1. package/dist/api/account-connectors.d.ts +2 -2
  2. package/dist/api/client.d.ts +1722 -125
  3. package/dist/api/computer.d.ts +60 -0
  4. package/dist/api/goals.d.ts +4 -4
  5. package/dist/api/proactive.d.ts +36 -0
  6. package/dist/api/query-keys.d.ts +3 -0
  7. package/dist/api/quota-refusal.d.ts +49 -0
  8. package/dist/api/secret-paste.d.ts +5 -0
  9. package/dist/api/suggestions.d.ts +18 -0
  10. package/dist/api/task-schedule-folders.d.ts +3 -3
  11. package/dist/api/task-schedule-projects.d.ts +5 -5
  12. package/dist/api/task-schedule-sharing.d.ts +13 -1
  13. package/dist/api/task-schedules.d.ts +60 -8
  14. package/dist/api/vault.d.ts +49 -0
  15. package/dist/app/dock-story-data.d.ts +7 -1
  16. package/dist/component/{abnfDiagram-N423BO3Z-Cs6vuzym.js → abnfDiagram-N423BO3Z-K52-wOfg.js} +4 -4
  17. package/dist/component/{architectureDiagram-T3A2C74G-BdBpK2d_.js → architectureDiagram-T3A2C74G-B64SrMLF.js} +6 -6
  18. package/dist/component/{blockDiagram-VBNYF7ZC-Cf6dsn1j.js → blockDiagram-VBNYF7ZC-B7Di5R1s.js} +8 -8
  19. package/dist/component/{c4Diagram-5PPSVZJV-Cxt2hfnn.js → c4Diagram-5PPSVZJV-ClDtA2m4.js} +4 -4
  20. package/dist/component/{channel-COtJQ6CP.js → channel-C6_lLEWW.js} +2 -2
  21. package/dist/component/{chunk-2GRJ4B5K-C14K2lKj.js → chunk-2GRJ4B5K-B07moQal.js} +2 -2
  22. package/dist/component/{chunk-3NCLNEKW-oHacP_OI.js → chunk-3NCLNEKW-TUF1Wrf6.js} +2 -2
  23. package/dist/component/{chunk-4I5QYGJK-CGOVqmKQ.js → chunk-4I5QYGJK-qY-_sgVE.js} +2 -2
  24. package/dist/component/{chunk-5RXB4S5H-CMJnmUzX.js → chunk-5RXB4S5H-BU0H_zl3.js} +6 -6
  25. package/dist/component/{chunk-6Q2QTUOP-B5ACmZa2.js → chunk-6Q2QTUOP-nIHNEMhm.js} +3 -3
  26. package/dist/component/{chunk-7Z6QIM7H-CSfSb_Xc.js → chunk-7Z6QIM7H-D7mHGFzt.js} +8 -8
  27. package/dist/component/{chunk-GF5L2VYU-xi_oDTd2.js → chunk-GF5L2VYU-uM1RliIa.js} +6 -6
  28. package/dist/component/{chunk-I66GZJ75-DB1sFGc-.js → chunk-I66GZJ75-oDyTlx3R.js} +2 -2
  29. package/dist/component/{chunk-J7OUQ5F2-DB9d7Gt_.js → chunk-J7OUQ5F2-c7iD4Gpa.js} +7 -7
  30. package/dist/component/{chunk-JQJVKLGR-De7zUJDv.js → chunk-JQJVKLGR-JeqFPv2A.js} +8 -8
  31. package/dist/component/{chunk-KBJHAD2P-CVoxmRa8.js → chunk-KBJHAD2P-DjQd-FIs.js} +2 -2
  32. package/dist/component/{chunk-NSK5VX7P-ur_ZGcVX.js → chunk-NSK5VX7P-Bq0sOWgd.js} +2 -2
  33. package/dist/component/{chunk-QR6OTTB3-Bl3Z_jKC.js → chunk-QR6OTTB3-DctDLVWm.js} +7 -7
  34. package/dist/component/{chunk-UBXNYLIW-CDKeQUnO.js → chunk-UBXNYLIW-Ka1R3omP.js} +3 -3
  35. package/dist/component/{chunk-W5SLKNZC-Dq8uD14N.js → chunk-W5SLKNZC-CI_OqVnD.js} +2 -2
  36. package/dist/component/{chunk-WRU74C26-BwQb4DnE.js → chunk-WRU74C26-BMkh1mHN.js} +4 -4
  37. package/dist/component/{classDiagram-JCYQIIEL-yl7JabGO.js → classDiagram-JCYQIIEL-C1E0BQye.js} +13 -13
  38. package/dist/component/{classDiagram-v2-OCEON4UE-ozBAEvyC.js → classDiagram-v2-OCEON4UE-hQKKIbDF.js} +13 -13
  39. package/dist/component/{component-DnTvWVQQ.js → component-B44aZ-1Z.js} +24455 -21767
  40. package/dist/component/{cynefinDiagram-MW4NZA55-fdKo3DVx.js → cynefinDiagram-MW4NZA55-0yefvDKM.js} +4 -4
  41. package/dist/component/{dagre-VZM6K2ZE-C7nAehQV.js → dagre-VZM6K2ZE-CBlt7UUF.js} +9 -9
  42. package/dist/component/{diagram-7IWD3JNH-DRM3Hv3P.js → diagram-7IWD3JNH-D0zEzayZ.js} +5 -5
  43. package/dist/component/{diagram-B4RE2ZJO-DXqATSZd.js → diagram-B4RE2ZJO-Dm2FX5kh.js} +3 -3
  44. package/dist/component/{diagram-LBJQPF4R-DJRJfBnF.js → diagram-LBJQPF4R-nQGWQGIp.js} +4 -4
  45. package/dist/component/{diagram-Q27KOJAE-B4cTzsYZ.js → diagram-Q27KOJAE-Co-Dq4kd.js} +6 -6
  46. package/dist/component/{diagram-UB23O5K3-CyUjYCbX.js → diagram-UB23O5K3-ClWS8vTp.js} +4 -4
  47. package/dist/component/{ebnfDiagram-BXEA7PRR-C6GS4eTe.js → ebnfDiagram-BXEA7PRR-Cq6K_q0O.js} +4 -4
  48. package/dist/component/{erDiagram-JOGREHBK-D8qt0_mW.js → erDiagram-JOGREHBK-DvPI-BqP.js} +12 -12
  49. package/dist/component/flowDiagram-UKHOOZJN-2MBQiA4G.js +19 -0
  50. package/dist/component/{ganttDiagram-PKOTCBZU-D6o-gloU.js → ganttDiagram-PKOTCBZU-DXzfT7Q5.js} +3 -3
  51. package/dist/component/{gitGraphDiagram-DS77QQ5N-Cz3kf7xj.js → gitGraphDiagram-DS77QQ5N-CMKpJJJ_.js} +3 -3
  52. package/dist/component/index.js +2 -2
  53. package/dist/component/{infoDiagram-6WML65LV-sdz8qoTE.js → infoDiagram-6WML65LV-Ck5rB_GF.js} +3 -3
  54. package/dist/component/{ishikawaDiagram-WSZJBQD7--tUiPVAr.js → ishikawaDiagram-WSZJBQD7-CHQxwGjK.js} +4 -4
  55. package/dist/component/{journeyDiagram-NVQOT4AX-_-TjqBid.js → journeyDiagram-NVQOT4AX-CnPVgyHk.js} +3 -3
  56. package/dist/component/{kanban-definition-27J2QSJJ-BXBySx2U.js → kanban-definition-27J2QSJJ-CC8oOHrI.js} +9 -9
  57. package/dist/component/{line-C2WkjBlg.js → line-AtEledwJ.js} +2 -2
  58. package/dist/component/{mindmap-definition-FAOFIHXS-CbpSDN_k.js → mindmap-definition-FAOFIHXS-WWI6yyUJ.js} +11 -11
  59. package/dist/component/{pegDiagram-VL7TDLO6-Cp_Wn0PS.js → pegDiagram-VL7TDLO6-D5NeC_IJ.js} +4 -4
  60. package/dist/component/{pieDiagram-7S7Q4E2Y-D6KGBWSF.js → pieDiagram-7S7Q4E2Y-M4MUAitH.js} +4 -4
  61. package/dist/component/{quadrantDiagram-CIZ2JOQS-BWjdUg-z.js → quadrantDiagram-CIZ2JOQS-viErJFsV.js} +2 -2
  62. package/dist/component/{railroadDiagram-AXF67PYL-B5iYZXm-.js → railroadDiagram-AXF67PYL-C8IhZ-59.js} +4 -4
  63. package/dist/component/{requirementDiagram-LRYGKXZP-CewRkYfE.js → requirementDiagram-LRYGKXZP-D1vdZzCs.js} +11 -11
  64. package/dist/component/{sankeyDiagram-W5VNT64P-D3Zb5dQ6.js → sankeyDiagram-W5VNT64P-Bl52MqzW.js} +2 -2
  65. package/dist/component/{sequenceDiagram-SI44F4Z6-BfxhjyrN.js → sequenceDiagram-SI44F4Z6-Cx-Aio7P.js} +4 -4
  66. package/dist/component/{stateDiagram-OKZ733FA-DLd9YI1A.js → stateDiagram-OKZ733FA-CHqMp3xm.js} +14 -14
  67. package/dist/component/{stateDiagram-v2-UEYNNEHI-Dd_FaBaY.js → stateDiagram-v2-UEYNNEHI-DqTLHDUB.js} +13 -13
  68. package/dist/component/{swimlanes-SLNWSIFB-C56sHJuV.js → swimlanes-SLNWSIFB-BkaXpBe5.js} +9 -9
  69. package/dist/component/{swimlanesDiagram-ULZ7WXOC-nHtka4qn.js → swimlanesDiagram-ULZ7WXOC-DyMFUKdr.js} +13 -13
  70. package/dist/component/{timeline-definition-Z64GVDOM-JYR_6zGi.js → timeline-definition-Z64GVDOM-Ba3A3s-L.js} +4 -4
  71. package/dist/component/{vennDiagram-T6HMQDX7-CEGGwXxv.js → vennDiagram-T6HMQDX7-4W_JJhIz.js} +4 -4
  72. package/dist/component/{wardleyDiagram-T6FBY63Y-zZGm618Q.js → wardleyDiagram-T6FBY63Y-CllyyQYm.js} +4 -4
  73. package/dist/component/{xychartDiagram-ELKLHX3M-BYbnWmqD.js → xychartDiagram-ELKLHX3M-DS3MPPul.js} +7 -7
  74. package/dist/components/embed/ComputerSettings.d.ts +7 -0
  75. package/dist/components/embed/EmbedRail.d.ts +15 -2
  76. package/dist/components/embed/EmbedSessions.d.ts +15 -2
  77. package/dist/components/embed/MobileNavBar.d.ts +4 -2
  78. package/dist/components/embed/NextStepCard.d.ts +6 -0
  79. package/dist/components/embed/ProactiveChecksSetting.d.ts +7 -0
  80. package/dist/components/embed/QuotaNoticeCard.d.ts +4 -0
  81. package/dist/components/embed/SessionSwitcher.d.ts +6 -1
  82. package/dist/components/embed/quota-notice-copy.d.ts +3 -0
  83. package/dist/components/embed/use-settings-owner-key.d.ts +15 -0
  84. package/dist/components/pinned/PinnedChatHeader.d.ts +9 -0
  85. package/dist/components/pinned/use-agent-name.d.ts +2 -0
  86. package/dist/components/scheduled/schedule-dialog-model.d.ts +2 -1
  87. package/dist/components/scheduled/schedule-format.d.ts +4 -1
  88. package/dist/components/vault/SecretPasteFeedback.d.ts +6 -0
  89. package/dist/components/vault/SecretsPanel.d.ts +23 -0
  90. package/dist/components/vault/vault-open.d.ts +3 -0
  91. package/dist/embed/goal-cap-notice.d.ts +0 -9
  92. package/dist/embed/goal-edit-command.d.ts +6 -1
  93. package/dist/embed/pinned-chat.d.ts +34 -0
  94. package/dist/embed/quota-notice.d.ts +9 -0
  95. package/dist/embed/theme.d.ts +10 -0
  96. package/dist/embed/voice/agent-spawn.d.ts +12 -2
  97. package/dist/embed/voice/line-run-reader.d.ts +1 -1
  98. package/dist/embed/voice-call.d.ts +10 -1
  99. package/dist/i18n/messages/en.d.ts +135 -8
  100. package/dist/i18n/messages/surfaces/pinned.d.ts +76 -0
  101. package/dist/i18n/messages/surfaces/quota.d.ts +69 -0
  102. package/dist/i18n/messages/surfaces/scheduled.d.ts +69 -5
  103. package/dist/i18n/messages/surfaces/settings.d.ts +148 -0
  104. package/dist/i18n/messages/surfaces/stream.d.ts +56 -4
  105. package/dist/i18n/messages/surfaces/vault.d.ts +120 -0
  106. package/dist/lib/use-tab-leadership.d.ts +1 -0
  107. package/dist/routes/chat/history-cache.d.ts +5 -0
  108. package/dist/routes/chat/history-merge.d.ts +4 -1
  109. package/dist/routes/chat/question-parts.d.ts +26 -0
  110. package/dist/routes/chat/queued-delivery.d.ts +20 -0
  111. package/dist/routes/chat/queued-messages.d.ts +15 -0
  112. package/dist/routes/chat/session-api.d.ts +52 -0
  113. package/dist/routes/chat/session-history-api.d.ts +9 -0
  114. package/dist/routes/chat/transcript-update.d.ts +45 -0
  115. package/dist/routes/chat/use-catch-up-on-return.d.ts +7 -0
  116. package/dist/routes/chat/use-next-step-suggestion.d.ts +38 -0
  117. package/dist/routes/chat/use-quota-notice.d.ts +29 -0
  118. package/dist/routes/chat/use-quota-stop-refresh.d.ts +27 -0
  119. package/dist/routes/chat/use-session-goal.d.ts +6 -0
  120. package/dist/routes/chat.d.ts +9 -15
  121. package/dist/stream/belong-chat-transport.d.ts +23 -11
  122. package/dist/stream/belong-data-parts.d.ts +31 -1
  123. package/dist/stream/pause-notice-copy.d.ts +3 -0
  124. package/dist/stream/provider-blocked.d.ts +16 -0
  125. package/dist/stream/reconnect-backoff.d.ts +39 -0
  126. package/dist/stream/run-error-copy.d.ts +25 -0
  127. package/dist/stream/stream-notice.d.ts +9 -0
  128. package/package.json +1 -1
  129. package/dist/component/flowDiagram-UKHOOZJN-U55NEBew.js +0 -19
@@ -0,0 +1,60 @@
1
+ import { z } from 'zod';
2
+ import { ApiClient } from './client.ts';
3
+ declare const computerDeviceSchema: z.ZodObject<{
4
+ deviceId: z.ZodUUID;
5
+ name: z.ZodString;
6
+ os: z.ZodEnum<{
7
+ macos: "macos";
8
+ windows: "windows";
9
+ linux: "linux";
10
+ }>;
11
+ appVersion: z.ZodString;
12
+ pairedAt: z.ZodISODateTime;
13
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
14
+ online: z.ZodBoolean;
15
+ }, z.core.$strip>;
16
+ declare const computerStatusSchema: z.ZodObject<{
17
+ device: z.ZodNullable<z.ZodObject<{
18
+ deviceId: z.ZodUUID;
19
+ name: z.ZodString;
20
+ os: z.ZodEnum<{
21
+ macos: "macos";
22
+ windows: "windows";
23
+ linux: "linux";
24
+ }>;
25
+ appVersion: z.ZodString;
26
+ pairedAt: z.ZodISODateTime;
27
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
28
+ online: z.ZodBoolean;
29
+ }, z.core.$strip>>;
30
+ downloadUrl: z.ZodNullable<z.ZodURL>;
31
+ }, z.core.$strip>;
32
+ export type ComputerDevice = z.infer<typeof computerDeviceSchema>;
33
+ export type ComputerStatus = z.infer<typeof computerStatusSchema>;
34
+ export declare const fetchComputerStatus: (client: ApiClient) => Promise<ComputerStatus>;
35
+ /** A one-time code; single attempt, since a retried POST would mint a second one. */
36
+ export declare const createComputerPairing: (client: ApiClient) => Promise<{
37
+ pairingCode: string;
38
+ expiresAt: string;
39
+ }>;
40
+ export declare const revokeComputer: (client: ApiClient) => Promise<void>;
41
+ /**
42
+ * The deep link the desktop app registers for. It carries the API this dock
43
+ * talks to (an absolute URL, resolved against the host page), so the app
44
+ * pairs with the right regional cell without asking.
45
+ */
46
+ export declare const computerPairingLink: (pairingCode: string, apiBaseUrl: string) => string;
47
+ export declare const useComputerStatus: (ownerCacheKey: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<{
48
+ device: {
49
+ deviceId: string;
50
+ name: string;
51
+ os: "macos" | "windows" | "linux";
52
+ appVersion: string;
53
+ pairedAt: string;
54
+ lastSeenAt: string | null;
55
+ online: boolean;
56
+ } | null;
57
+ downloadUrl: string | null;
58
+ }>, Error>;
59
+ export declare const useRevokeComputer: (ownerCacheKey: string) => () => Promise<void>;
60
+ export {};
@@ -3,12 +3,12 @@ export declare const goalStatusSchema: z.ZodEnum<{
3
3
  waiting_for_approval: "waiting_for_approval";
4
4
  active: "active";
5
5
  paused: "paused";
6
+ blocked: "blocked";
6
7
  clarifying: "clarifying";
7
8
  completion_claimed: "completion_claimed";
8
9
  deferred: "deferred";
9
10
  waiting_for_user: "waiting_for_user";
10
11
  waiting_for_ui_action: "waiting_for_ui_action";
11
- blocked: "blocked";
12
12
  budget_limited: "budget_limited";
13
13
  complete: "complete";
14
14
  cleared: "cleared";
@@ -28,12 +28,12 @@ export declare const goalJournalEntrySchema: z.ZodObject<{
28
28
  waiting_for_approval: "waiting_for_approval";
29
29
  active: "active";
30
30
  paused: "paused";
31
+ blocked: "blocked";
31
32
  clarifying: "clarifying";
32
33
  completion_claimed: "completion_claimed";
33
34
  deferred: "deferred";
34
35
  waiting_for_user: "waiting_for_user";
35
36
  waiting_for_ui_action: "waiting_for_ui_action";
36
- blocked: "blocked";
37
37
  budget_limited: "budget_limited";
38
38
  complete: "complete";
39
39
  cleared: "cleared";
@@ -48,12 +48,12 @@ export declare const goalViewSchema: z.ZodObject<{
48
48
  waiting_for_approval: "waiting_for_approval";
49
49
  active: "active";
50
50
  paused: "paused";
51
+ blocked: "blocked";
51
52
  clarifying: "clarifying";
52
53
  completion_claimed: "completion_claimed";
53
54
  deferred: "deferred";
54
55
  waiting_for_user: "waiting_for_user";
55
56
  waiting_for_ui_action: "waiting_for_ui_action";
56
- blocked: "blocked";
57
57
  budget_limited: "budget_limited";
58
58
  complete: "complete";
59
59
  cleared: "cleared";
@@ -93,12 +93,12 @@ export declare const goalViewSchema: z.ZodObject<{
93
93
  waiting_for_approval: "waiting_for_approval";
94
94
  active: "active";
95
95
  paused: "paused";
96
+ blocked: "blocked";
96
97
  clarifying: "clarifying";
97
98
  completion_claimed: "completion_claimed";
98
99
  deferred: "deferred";
99
100
  waiting_for_user: "waiting_for_user";
100
101
  waiting_for_ui_action: "waiting_for_ui_action";
101
- blocked: "blocked";
102
102
  budget_limited: "budget_limited";
103
103
  complete: "complete";
104
104
  cleared: "cleared";
@@ -0,0 +1,36 @@
1
+ import { z } from 'zod';
2
+ import { ApiClient } from './client.ts';
3
+ declare const proactiveSchema: z.ZodObject<{
4
+ enabled: z.ZodBoolean;
5
+ lastCheckAt: z.ZodNullable<z.ZodISODateTime>;
6
+ nextCheckAt: z.ZodNullable<z.ZodISODateTime>;
7
+ checkingCount: z.ZodNumber;
8
+ slackAvailable: z.ZodBoolean;
9
+ watchedApps: z.ZodDefault<z.ZodArray<z.ZodString>>;
10
+ chat: z.ZodDefault<z.ZodNullable<z.ZodObject<{
11
+ sessionId: z.ZodString;
12
+ unreadCount: z.ZodNumber;
13
+ lastMessageAt: z.ZodNullable<z.ZodISODateTime>;
14
+ lastMessage: z.ZodNullable<z.ZodString>;
15
+ activeRunId: z.ZodNullable<z.ZodString>;
16
+ }, z.core.$strip>>>;
17
+ }, z.core.$strip>;
18
+ export type Proactive = z.infer<typeof proactiveSchema>;
19
+ export type ProactiveState = {
20
+ readonly status: "ready";
21
+ readonly proactive: Proactive;
22
+ } | {
23
+ readonly status: "unavailable";
24
+ };
25
+ /** The pinned chat, created on first use, moved to the Workspace it's opened from. */
26
+ export declare const openPinnedChat: (client: ApiClient, workspaceExternalId: string | null) => Promise<string>;
27
+ export declare const fetchProactive: (client: ApiClient) => Promise<ProactiveState>;
28
+ /** How often the dock re-reads it, and how often while a check is deciding. */
29
+ export declare const PROACTIVE_POLL_MS = 30000;
30
+ export declare const PROACTIVE_ACTIVE_POLL_MS = 4000;
31
+ /** Keyed by the account speaking to the API, so it is purged on a switch. */
32
+ export declare const useProactive: () => import('@tanstack/react-query').UseQueryResult<NoInfer<ProactiveState>, Error>;
33
+ export declare const useSetProactiveEnabled: () => import('@tanstack/react-query').UseMutationResult<void, Error, boolean, unknown>;
34
+ export declare const useCheckNow: () => import('@tanstack/react-query').UseMutationResult<number, Error, void, unknown>;
35
+ export declare const useMarkProactiveRead: () => import('@tanstack/react-query').UseMutationResult<void, Error, void, unknown>;
36
+ export {};
@@ -1,6 +1,8 @@
1
1
  import { Locale } from '../embed/locale.ts';
2
2
  export declare const queryKeys: {
3
3
  sessions: readonly ["belong", "sessions"];
4
+ /** Proactive checks: ACCOUNT-scoped, like `myUsage` below (BEL-348). */
5
+ proactive: (accountKey: string) => readonly ["belong", "proactive", string];
4
6
  session: (sessionId: string) => readonly ["belong", "sessions", string];
5
7
  sessionStats: (sessionId: string) => readonly ["belong", "session-stats", string];
6
8
  messages: (sessionId: string) => readonly ["belong", "sessions", string, "messages"];
@@ -43,6 +45,7 @@ export declare const queryKeys: {
43
45
  /** Invalidation prefix for every task-schedule read (list + detail + runs). */
44
46
  taskSchedules: readonly ["belong", "task-schedules"];
45
47
  apiKeys: (ownerCacheKey: string) => readonly ["belong", "api-keys", string];
48
+ computer: (ownerCacheKey: string) => readonly ["belong", "computer", string];
46
49
  /**
47
50
  * Plan 018 — the signed-in user's own usage. ACCOUNT-scoped (`accountKey`
48
51
  * from `api/account-scope.ts`, right after the prefix like the schedule keys),
@@ -0,0 +1,49 @@
1
+ import { z } from 'zod';
2
+ import { QuotaNoticeData } from '../stream/belong-data-parts.ts';
3
+ /**
4
+ * Console P1 (TS-DOCK-01, DE-QTA-07) — the monthly token quota's refusal of a
5
+ * send. `POST /v1/sessions/:id/messages` answers `429` with this body once the
6
+ * user's month is used up (`exhausted`) or their access is paused
7
+ * (`blocked`). By then the cell has already persisted the user's message and
8
+ * a notice answering it (TS-QTA-09) under the two ids the body names, so the
9
+ * dock renders the card right away and a reload renders the same rows
10
+ * (CLAUDE.md §41).
11
+ *
12
+ * The 429 never retries: `retry-fetch.ts` already treats a 429 whose body
13
+ * carries `{ error: { type } }` as a terminal application refusal, and a
14
+ * replay with the same `clientMessageId` would only return this same body.
15
+ *
16
+ * Classified strictly — every field is required, exactly as the cell writes
17
+ * it — because a body this dock cannot fully read is better left to the
18
+ * chat's generic refusal line than rendered as a half-filled card. Extra
19
+ * fields (the P2 workspace budget fields, TS-DOCK-08) are stripped.
20
+ *
21
+ * Its own module so the transport (which must select the session the refused
22
+ * message was persisted into) and the chat's classifier
23
+ * (`embed/quota-notice.ts`, which imports the transport) share one schema
24
+ * without an import cycle.
25
+ */
26
+ declare const quotaRefusalSchema: z.ZodObject<{
27
+ type: z.ZodLiteral<"quota_exceeded">;
28
+ reason: z.ZodEnum<{
29
+ exhausted: "exhausted";
30
+ blocked: "blocked";
31
+ }>;
32
+ limitWeightedTokens: z.ZodNumber;
33
+ usedWeightedTokens: z.ZodNumber;
34
+ resetsAt: z.ZodNullable<z.ZodISODateTime>;
35
+ productName: z.ZodString;
36
+ messageId: z.ZodString;
37
+ noticeMessageId: z.ZodString;
38
+ }, z.core.$strip>;
39
+ export type QuotaRefusal = z.infer<typeof quotaRefusalSchema>;
40
+ /**
41
+ * Classify an already-parsed error body (the direct session-API path, which
42
+ * parses bodies itself). `null` for anything but a `429` quota refusal.
43
+ */
44
+ export declare const quotaRefusalFromBody: (status: number | null, body: unknown) => QuotaRefusal | null;
45
+ /** Classify a raw response body (the transport reads it as text). */
46
+ export declare const quotaRefusalFromText: (status: number, text: string) => QuotaRefusal | null;
47
+ /** The persisted part's data for a refusal: the same fields the cell stores. */
48
+ export declare const quotaNoticeDataFromRefusal: (refusal: QuotaRefusal) => QuotaNoticeData;
49
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare const isSecretPasteBody: (body: unknown) => boolean;
2
+ /** Fixed safe text: never retain an untrusted server body on this error. */
3
+ export declare class SecretPasteError extends Error {
4
+ constructor();
5
+ }
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ export declare const nextStepSuggestionSchema: z.ZodObject<{
3
+ question: z.ZodString;
4
+ options: z.ZodArray<z.ZodObject<{
5
+ label: z.ZodString;
6
+ message: z.ZodString;
7
+ }, z.core.$strip>>;
8
+ }, z.core.$strip>;
9
+ export type NextStepSuggestion = z.infer<typeof nextStepSuggestionSchema>;
10
+ export declare const nextStepSuggestionsEnabled: (apiBaseUrl: string) => Promise<boolean>;
11
+ /** Test seam: forget what each API answered. */
12
+ export declare const __resetNextStepSuggestionsAvailabilityForTest: () => void;
13
+ export declare const fetchNextStepSuggestion: (input: {
14
+ readonly apiBaseUrl: string;
15
+ readonly sessionId: string;
16
+ readonly locale: string;
17
+ readonly signal: AbortSignal;
18
+ }) => Promise<NextStepSuggestion | null>;
@@ -6,8 +6,8 @@ export declare const MAX_NODE_NAME_CHARS = 120;
6
6
  /** The caller's role in a Project: its owner, Can edit or Can view. */
7
7
  export declare const projectRoleSchema: z.ZodEnum<{
8
8
  edit: "edit";
9
- owner: "owner";
10
9
  view: "view";
10
+ owner: "owner";
11
11
  }>;
12
12
  export type ProjectRole = z.infer<typeof projectRoleSchema>;
13
13
  declare const projectSchema: z.ZodObject<{
@@ -15,8 +15,8 @@ declare const projectSchema: z.ZodObject<{
15
15
  name: z.ZodString;
16
16
  role: z.ZodDefault<z.ZodEnum<{
17
17
  edit: "edit";
18
- owner: "owner";
19
18
  view: "view";
19
+ owner: "owner";
20
20
  }>>;
21
21
  scheduleCount: z.ZodNumber;
22
22
  createdAt: z.ZodISODateTime;
@@ -41,7 +41,7 @@ export type TaskSchedulePlacement = {
41
41
  export declare const useProjects: () => import('@tanstack/react-query').UseQueryResult<NoInfer<{
42
42
  projectId: string;
43
43
  name: string;
44
- role: "edit" | "owner" | "view";
44
+ role: "edit" | "view" | "owner";
45
45
  scheduleCount: number;
46
46
  createdAt: string;
47
47
  updatedAt: string;
@@ -3,16 +3,16 @@ export type ProjectGrantRole = "view" | "edit";
3
3
  declare const projectAccessSchema: z.ZodObject<{
4
4
  role: z.ZodEnum<{
5
5
  edit: "edit";
6
- owner: "owner";
7
6
  view: "view";
7
+ owner: "owner";
8
8
  }>;
9
9
  people: z.ZodArray<z.ZodObject<{
10
10
  userId: z.ZodString;
11
11
  label: z.ZodString;
12
12
  role: z.ZodEnum<{
13
13
  edit: "edit";
14
- owner: "owner";
15
14
  view: "view";
15
+ owner: "owner";
16
16
  }>;
17
17
  }, z.core.$strip>>;
18
18
  invitations: z.ZodArray<z.ZodObject<{
@@ -42,11 +42,11 @@ export type ProjectFile = z.infer<typeof projectFilesSchema>["files"][number];
42
42
  /** The Files tab's upload cap, mirrored from the cloud. */
43
43
  export declare const MAX_PROJECT_FILE_BYTES: number;
44
44
  export declare const useProjectAccess: (projectId: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<{
45
- role: "edit" | "owner" | "view";
45
+ role: "edit" | "view" | "owner";
46
46
  people: {
47
47
  userId: string;
48
48
  label: string;
49
- role: "edit" | "owner" | "view";
49
+ role: "edit" | "view" | "owner";
50
50
  }[];
51
51
  invitations: {
52
52
  id: string;
@@ -80,7 +80,7 @@ export declare const useChangeProjectAccess: () => import('@tanstack/react-query
80
80
  }, unknown>;
81
81
  export declare const useAcceptProjectInvitation: () => import('@tanstack/react-query').UseMutationResult<{
82
82
  projectId: string;
83
- role: "edit" | "owner" | "view";
83
+ role: "edit" | "view" | "owner";
84
84
  }, Error, string, unknown>;
85
85
  export declare const useDeleteProject: () => import('@tanstack/react-query').UseMutationResult<void, Error, string, unknown>;
86
86
  /** Offer the Project to someone with access, or (`toUserId: null`) withdraw the offer. */
@@ -27,9 +27,11 @@ export declare const sharedScheduleSchema: z.ZodObject<{
27
27
  daily: "daily";
28
28
  weekdays: "weekdays";
29
29
  weekly: "weekly";
30
+ custom_weekly: "custom_weekly";
30
31
  interval: "interval";
31
32
  manual: "manual";
32
33
  }>;
34
+ weekdays: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
33
35
  intervalMinutes: z.ZodOptional<z.ZodNumber>;
34
36
  }, z.core.$strip>, z.ZodTransform<{
35
37
  readonly kind: "none";
@@ -39,13 +41,17 @@ export declare const sharedScheduleSchema: z.ZodObject<{
39
41
  readonly kind: "weekdays";
40
42
  } | {
41
43
  readonly kind: "weekly";
44
+ } | {
45
+ readonly kind: "custom_weekly";
46
+ readonly weekdays: number[];
42
47
  } | {
43
48
  readonly kind: "manual";
44
49
  } | {
45
50
  readonly kind: "interval";
46
51
  readonly intervalMinutes: number;
47
52
  }, {
48
- kind: "none" | "daily" | "weekdays" | "weekly" | "interval" | "manual";
53
+ kind: "none" | "daily" | "weekdays" | "weekly" | "custom_weekly" | "interval" | "manual";
54
+ weekdays?: number[] | undefined;
49
55
  intervalMinutes?: number | undefined;
50
56
  }>>;
51
57
  anchorAt: z.ZodISODateTime;
@@ -78,6 +84,9 @@ export declare const useSharedSchedules: () => import('@tanstack/react-query').U
78
84
  readonly kind: "weekdays";
79
85
  } | {
80
86
  readonly kind: "weekly";
87
+ } | {
88
+ readonly kind: "custom_weekly";
89
+ readonly weekdays: number[];
81
90
  } | {
82
91
  readonly kind: "manual";
83
92
  } | {
@@ -117,6 +126,9 @@ export declare const useSharedSchedule: (definitionId: string | null) => import(
117
126
  readonly kind: "weekdays";
118
127
  } | {
119
128
  readonly kind: "weekly";
129
+ } | {
130
+ readonly kind: "custom_weekly";
131
+ readonly weekdays: number[];
120
132
  } | {
121
133
  readonly kind: "manual";
122
134
  } | {
@@ -64,6 +64,7 @@ export declare const recurrenceKindSchema: z.ZodEnum<{
64
64
  daily: "daily";
65
65
  weekdays: "weekdays";
66
66
  weekly: "weekly";
67
+ custom_weekly: "custom_weekly";
67
68
  interval: "interval";
68
69
  manual: "manual";
69
70
  }>;
@@ -87,6 +88,9 @@ export type Recurrence = {
87
88
  readonly kind: "weekdays";
88
89
  } | {
89
90
  readonly kind: "weekly";
91
+ } | {
92
+ readonly kind: "custom_weekly";
93
+ readonly weekdays: number[];
90
94
  } | {
91
95
  readonly kind: "manual";
92
96
  } | {
@@ -105,9 +109,11 @@ export declare const recurrenceSchema: z.ZodPipe<z.ZodObject<{
105
109
  daily: "daily";
106
110
  weekdays: "weekdays";
107
111
  weekly: "weekly";
112
+ custom_weekly: "custom_weekly";
108
113
  interval: "interval";
109
114
  manual: "manual";
110
115
  }>;
116
+ weekdays: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
111
117
  intervalMinutes: z.ZodOptional<z.ZodNumber>;
112
118
  }, z.core.$strip>, z.ZodTransform<{
113
119
  readonly kind: "none";
@@ -117,13 +123,17 @@ export declare const recurrenceSchema: z.ZodPipe<z.ZodObject<{
117
123
  readonly kind: "weekdays";
118
124
  } | {
119
125
  readonly kind: "weekly";
126
+ } | {
127
+ readonly kind: "custom_weekly";
128
+ readonly weekdays: number[];
120
129
  } | {
121
130
  readonly kind: "manual";
122
131
  } | {
123
132
  readonly kind: "interval";
124
133
  readonly intervalMinutes: number;
125
134
  }, {
126
- kind: "none" | "daily" | "weekdays" | "weekly" | "interval" | "manual";
135
+ kind: "none" | "daily" | "weekdays" | "weekly" | "custom_weekly" | "interval" | "manual";
136
+ weekdays?: number[] | undefined;
127
137
  intervalMinutes?: number | undefined;
128
138
  }>>;
129
139
  export declare const taskScheduleSeriesStatusSchema: z.ZodEnum<{
@@ -152,9 +162,11 @@ declare const taskScheduleListItemSchema: z.ZodObject<{
152
162
  daily: "daily";
153
163
  weekdays: "weekdays";
154
164
  weekly: "weekly";
165
+ custom_weekly: "custom_weekly";
155
166
  interval: "interval";
156
167
  manual: "manual";
157
168
  }>;
169
+ weekdays: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
158
170
  intervalMinutes: z.ZodOptional<z.ZodNumber>;
159
171
  }, z.core.$strip>, z.ZodTransform<{
160
172
  readonly kind: "none";
@@ -164,13 +176,17 @@ declare const taskScheduleListItemSchema: z.ZodObject<{
164
176
  readonly kind: "weekdays";
165
177
  } | {
166
178
  readonly kind: "weekly";
179
+ } | {
180
+ readonly kind: "custom_weekly";
181
+ readonly weekdays: number[];
167
182
  } | {
168
183
  readonly kind: "manual";
169
184
  } | {
170
185
  readonly kind: "interval";
171
186
  readonly intervalMinutes: number;
172
187
  }, {
173
- kind: "none" | "daily" | "weekdays" | "weekly" | "interval" | "manual";
188
+ kind: "none" | "daily" | "weekdays" | "weekly" | "custom_weekly" | "interval" | "manual";
189
+ weekdays?: number[] | undefined;
174
190
  intervalMinutes?: number | undefined;
175
191
  }>>;
176
192
  timezone: z.ZodString;
@@ -205,9 +221,11 @@ export declare const taskScheduleDetailSchema: z.ZodObject<{
205
221
  daily: "daily";
206
222
  weekdays: "weekdays";
207
223
  weekly: "weekly";
224
+ custom_weekly: "custom_weekly";
208
225
  interval: "interval";
209
226
  manual: "manual";
210
227
  }>;
228
+ weekdays: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
211
229
  intervalMinutes: z.ZodOptional<z.ZodNumber>;
212
230
  }, z.core.$strip>, z.ZodTransform<{
213
231
  readonly kind: "none";
@@ -217,13 +235,17 @@ export declare const taskScheduleDetailSchema: z.ZodObject<{
217
235
  readonly kind: "weekdays";
218
236
  } | {
219
237
  readonly kind: "weekly";
238
+ } | {
239
+ readonly kind: "custom_weekly";
240
+ readonly weekdays: number[];
220
241
  } | {
221
242
  readonly kind: "manual";
222
243
  } | {
223
244
  readonly kind: "interval";
224
245
  readonly intervalMinutes: number;
225
246
  }, {
226
- kind: "none" | "daily" | "weekdays" | "weekly" | "interval" | "manual";
247
+ kind: "none" | "daily" | "weekdays" | "weekly" | "custom_weekly" | "interval" | "manual";
248
+ weekdays?: number[] | undefined;
227
249
  intervalMinutes?: number | undefined;
228
250
  }>>;
229
251
  timezone: z.ZodString;
@@ -240,8 +262,8 @@ export declare const taskScheduleDetailSchema: z.ZodObject<{
240
262
  createdAt: z.ZodISODateTime;
241
263
  projectRole: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
242
264
  edit: "edit";
243
- owner: "owner";
244
265
  view: "view";
266
+ owner: "owner";
245
267
  }>>>;
246
268
  emailAddresses: z.ZodOptional<z.ZodEnum<{
247
269
  visible: "visible";
@@ -339,6 +361,7 @@ export declare const taskScheduleRunSchema: z.ZodObject<{
339
361
  running: "running";
340
362
  completed: "completed";
341
363
  needs_attention: "needs_attention";
364
+ stopped_early: "stopped_early";
342
365
  }>;
343
366
  scheduledFor: z.ZodISODateTime;
344
367
  startedAt: z.ZodNullable<z.ZodISODateTime>;
@@ -349,6 +372,7 @@ export declare const taskScheduleRunSchema: z.ZodObject<{
349
372
  runId: z.ZodDefault<z.ZodNullable<z.ZodUUID>>;
350
373
  delivery: z.ZodCatch<z.ZodDefault<z.ZodNullable<z.ZodObject<{
351
374
  outcome: z.ZodEnum<{
375
+ unknown: "unknown";
352
376
  partial: "partial";
353
377
  sent: "sent";
354
378
  not_sent: "not_sent";
@@ -364,6 +388,7 @@ export declare const taskScheduleRunSchema: z.ZodObject<{
364
388
  schedule_email: "schedule_email";
365
389
  }>;
366
390
  status: z.ZodEnum<{
391
+ unknown: "unknown";
367
392
  failed: "failed";
368
393
  pending: "pending";
369
394
  skipped: "skipped";
@@ -373,6 +398,22 @@ export declare const taskScheduleRunSchema: z.ZodObject<{
373
398
  subject: z.ZodNullable<z.ZodString>;
374
399
  providerMessageId: z.ZodNullable<z.ZodString>;
375
400
  sentAt: z.ZodNullable<z.ZodISODateTime>;
401
+ providerEvent: z.ZodOptional<z.ZodNullable<z.ZodObject<{
402
+ type: z.ZodEnum<{
403
+ failed: "failed";
404
+ accepted: "accepted";
405
+ delivered: "delivered";
406
+ delivery_delayed: "delivery_delayed";
407
+ bounced: "bounced";
408
+ complained: "complained";
409
+ suppressed: "suppressed";
410
+ }>;
411
+ at: z.ZodISODateTime;
412
+ bounceType: z.ZodNullable<z.ZodEnum<{
413
+ hard: "hard";
414
+ soft: "soft";
415
+ }>>;
416
+ }, z.core.$strip>>>;
376
417
  to: z.ZodOptional<z.ZodArray<z.ZodString>>;
377
418
  cc: z.ZodOptional<z.ZodArray<z.ZodString>>;
378
419
  }, z.core.$strip>>;
@@ -421,6 +462,9 @@ export declare const useTaskSchedules: (filter: TaskScheduleFilter, q: string, p
421
462
  readonly kind: "weekdays";
422
463
  } | {
423
464
  readonly kind: "weekly";
465
+ } | {
466
+ readonly kind: "custom_weekly";
467
+ readonly weekdays: number[];
424
468
  } | {
425
469
  readonly kind: "manual";
426
470
  } | {
@@ -451,6 +495,9 @@ export declare const useTaskSchedule: (taskScheduleId: string | null) => import(
451
495
  readonly kind: "weekdays";
452
496
  } | {
453
497
  readonly kind: "weekly";
498
+ } | {
499
+ readonly kind: "custom_weekly";
500
+ readonly weekdays: number[];
454
501
  } | {
455
502
  readonly kind: "manual";
456
503
  } | {
@@ -465,7 +512,7 @@ export declare const useTaskSchedule: (taskScheduleId: string | null) => import(
465
512
  } | null;
466
513
  messagePreview: string;
467
514
  createdAt: string;
468
- projectRole: "edit" | "owner" | "view" | null;
515
+ projectRole: "edit" | "view" | "owner" | null;
469
516
  explicitTitle: string | null;
470
517
  message: string;
471
518
  mode: "plan" | "approve" | "balanced" | "bypass";
@@ -534,7 +581,7 @@ export declare const useTaskScheduleRuns: (taskScheduleId: string | null) => imp
534
581
  taskScheduleRunId: string;
535
582
  occurrenceKind: "manual" | "scheduled";
536
583
  seriesStatusAtRequest: "active" | "paused" | null;
537
- displayStatus: "failed" | "running" | "completed" | "needs_attention";
584
+ displayStatus: "failed" | "running" | "completed" | "needs_attention" | "stopped_early";
538
585
  scheduledFor: string;
539
586
  startedAt: string | null;
540
587
  finishedAt: string | null;
@@ -543,15 +590,20 @@ export declare const useTaskScheduleRuns: (taskScheduleId: string | null) => imp
543
590
  taskId: string | null;
544
591
  runId: string | null;
545
592
  delivery: {
546
- outcome: "partial" | "sent" | "not_sent";
593
+ outcome: "unknown" | "partial" | "sent" | "not_sent";
547
594
  reason: "no_match" | "missing_outcome" | "provider_failed" | null;
548
595
  emails: {
549
596
  source: "send_email" | "schedule_email";
550
- status: "failed" | "pending" | "skipped" | "sent";
597
+ status: "unknown" | "failed" | "pending" | "skipped" | "sent";
551
598
  recipientCount: number | null;
552
599
  subject: string | null;
553
600
  providerMessageId: string | null;
554
601
  sentAt: string | null;
602
+ providerEvent?: {
603
+ type: "failed" | "accepted" | "delivered" | "delivery_delayed" | "bounced" | "complained" | "suppressed";
604
+ at: string;
605
+ bounceType: "hard" | "soft" | null;
606
+ } | null | undefined;
555
607
  to?: string[] | undefined;
556
608
  cc?: string[] | undefined;
557
609
  }[];
@@ -0,0 +1,49 @@
1
+ import { z } from 'zod';
2
+ declare const errorSchema: z.ZodEnum<{
3
+ unavailable: "unavailable";
4
+ name_taken: "name_taken";
5
+ not_found: "not_found";
6
+ vault_disabled: "vault_disabled";
7
+ invalid_input: "invalid_input";
8
+ missing_scope: "missing_scope";
9
+ }>;
10
+ declare const listSchema: z.ZodObject<{
11
+ enabled: z.ZodBoolean;
12
+ secrets: z.ZodArray<z.ZodObject<{
13
+ name: z.ZodString;
14
+ kind: z.ZodEnum<{
15
+ api_key: "api_key";
16
+ pem: "pem";
17
+ }>;
18
+ reference: z.ZodString;
19
+ createdAt: z.ZodISODateTime;
20
+ updatedAt: z.ZodISODateTime;
21
+ }, z.core.$strict>>;
22
+ }, z.core.$strip>;
23
+ declare const savedSchema: z.ZodObject<{
24
+ reference: z.ZodString;
25
+ }, z.core.$strip>;
26
+ export type VaultError = z.infer<typeof errorSchema>;
27
+ type Failure = {
28
+ readonly ok: false;
29
+ readonly error: VaultError;
30
+ };
31
+ export type VaultResult<T> = ({
32
+ readonly ok: true;
33
+ } & T) | Failure;
34
+ export declare const vaultQueryKey: (account: string) => readonly ["belong", "vault", string];
35
+ export declare const listVaultSecretsRequest: (apiBaseUrl: string, signal?: AbortSignal) => Promise<VaultResult<z.infer<typeof listSchema>>>;
36
+ export declare const createVaultSecretRequest: (apiBaseUrl: string, input: unknown) => Promise<VaultResult<z.infer<typeof savedSchema>>>;
37
+ export declare const replaceVaultSecretRequest: (apiBaseUrl: string, name: string, input: unknown) => Promise<VaultResult<z.infer<typeof savedSchema>>>;
38
+ export declare const deleteVaultSecretRequest: (apiBaseUrl: string, name: string) => Promise<VaultResult<Record<never, never>>>;
39
+ export declare const useVaultSecrets: () => import('@tanstack/react-query').UseQueryResult<NoInfer<VaultResult<{
40
+ enabled: boolean;
41
+ secrets: {
42
+ name: string;
43
+ kind: "api_key" | "pem";
44
+ reference: string;
45
+ createdAt: string;
46
+ updatedAt: string;
47
+ }[];
48
+ }>>, Error>;
49
+ export {};
@@ -25,6 +25,9 @@ export declare function dockStoryData(brand: "belong" | "simetrik"): {
25
25
  readonly kind: "weekdays";
26
26
  } | {
27
27
  readonly kind: "weekly";
28
+ } | {
29
+ readonly kind: "custom_weekly";
30
+ readonly weekdays: number[];
28
31
  } | {
29
32
  readonly kind: "manual";
30
33
  } | {
@@ -55,6 +58,9 @@ export declare function dockStoryData(brand: "belong" | "simetrik"): {
55
58
  readonly kind: "weekdays";
56
59
  } | {
57
60
  readonly kind: "weekly";
61
+ } | {
62
+ readonly kind: "custom_weekly";
63
+ readonly weekdays: number[];
58
64
  } | {
59
65
  readonly kind: "manual";
60
66
  } | {
@@ -69,7 +75,7 @@ export declare function dockStoryData(brand: "belong" | "simetrik"): {
69
75
  } | null;
70
76
  messagePreview: string;
71
77
  createdAt: string;
72
- projectRole: "edit" | "owner" | "view" | null;
78
+ projectRole: "edit" | "view" | "owner" | null;
73
79
  explicitTitle: string | null;
74
80
  message: string;
75
81
  mode: "plan" | "approve" | "balanced" | "bypass";