@belonguniverseai/react-sdk 0.6.33 → 0.6.35

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 (120) hide show
  1. package/dist/api/account-connectors.d.ts +1 -1
  2. package/dist/api/agent-computer.d.ts +9 -0
  3. package/dist/api/client.d.ts +948 -91
  4. package/dist/api/computer.d.ts +60 -0
  5. package/dist/api/goals.d.ts +4 -4
  6. package/dist/api/guide.d.ts +11 -4
  7. package/dist/api/proactive.d.ts +47 -0
  8. package/dist/api/query-keys.d.ts +22 -1
  9. package/dist/api/quota-refusal.d.ts +1 -1
  10. package/dist/api/task-schedule-folders.d.ts +4 -4
  11. package/dist/api/task-schedule-projects.d.ts +7 -7
  12. package/dist/api/task-schedules.d.ts +125 -18
  13. package/dist/app/dock-story-data.d.ts +5 -5
  14. package/dist/component/{abnfDiagram-N423BO3Z-CK4wvzwz.js → abnfDiagram-N423BO3Z-CRZoFiVH.js} +4 -4
  15. package/dist/component/{architectureDiagram-T3A2C74G-DoljsqqO.js → architectureDiagram-T3A2C74G-CaRtqw4X.js} +6 -6
  16. package/dist/component/{blockDiagram-VBNYF7ZC-Ie7SErpH.js → blockDiagram-VBNYF7ZC-BK04msnb.js} +8 -8
  17. package/dist/component/{c4Diagram-5PPSVZJV-rfEof5mj.js → c4Diagram-5PPSVZJV-BMDcb-rm.js} +4 -4
  18. package/dist/component/{channel-C5ABP6lE.js → channel-Da7DEnT8.js} +2 -2
  19. package/dist/component/{chunk-2GRJ4B5K-CWOCv67u.js → chunk-2GRJ4B5K-CxwwCtK7.js} +2 -2
  20. package/dist/component/{chunk-3NCLNEKW-BJYANBvv.js → chunk-3NCLNEKW-C6R8qHlR.js} +2 -2
  21. package/dist/component/{chunk-4I5QYGJK-C29OfER5.js → chunk-4I5QYGJK-Ccf8L2Bk.js} +2 -2
  22. package/dist/component/{chunk-5RXB4S5H-D__NH4Op.js → chunk-5RXB4S5H-V2z-LyAY.js} +6 -6
  23. package/dist/component/{chunk-6Q2QTUOP-BgSQgII8.js → chunk-6Q2QTUOP-C6GL9-4r.js} +3 -3
  24. package/dist/component/{chunk-7Z6QIM7H-vNexNF_V.js → chunk-7Z6QIM7H-BV6R4sWE.js} +8 -8
  25. package/dist/component/{chunk-GF5L2VYU-D3vxqomE.js → chunk-GF5L2VYU-DAD1p6ak.js} +6 -6
  26. package/dist/component/{chunk-I66GZJ75-Dkw1ISGd.js → chunk-I66GZJ75-DEykrnbu.js} +2 -2
  27. package/dist/component/{chunk-J7OUQ5F2-dC67pJWg.js → chunk-J7OUQ5F2-CEWcOukY.js} +7 -7
  28. package/dist/component/{chunk-JQJVKLGR-Djj9TdhH.js → chunk-JQJVKLGR-DCAX80x3.js} +8 -8
  29. package/dist/component/{chunk-KBJHAD2P-dwIA6Vmi.js → chunk-KBJHAD2P-Bk8hJC_U.js} +2 -2
  30. package/dist/component/{chunk-NSK5VX7P-thQxjtNK.js → chunk-NSK5VX7P-D-saWvpt.js} +2 -2
  31. package/dist/component/{chunk-QR6OTTB3-OMd-rgNj.js → chunk-QR6OTTB3-CMv_Vw9A.js} +7 -7
  32. package/dist/component/{chunk-UBXNYLIW-D26S6zO6.js → chunk-UBXNYLIW-BfXPFCA1.js} +3 -3
  33. package/dist/component/{chunk-W5SLKNZC-DLV7M8by.js → chunk-W5SLKNZC-BL-VPYuH.js} +2 -2
  34. package/dist/component/{chunk-WRU74C26-13bvIAgD.js → chunk-WRU74C26-BXxIvhYq.js} +4 -4
  35. package/dist/component/{classDiagram-JCYQIIEL-BFQ72AZA.js → classDiagram-JCYQIIEL-CRKRQjr4.js} +13 -13
  36. package/dist/component/{classDiagram-v2-OCEON4UE-UFfArXpP.js → classDiagram-v2-OCEON4UE-ltwXlVlU.js} +13 -13
  37. package/dist/component/{component-Bhs6PFPY.js → component-BNq6d1iV.js} +23787 -20816
  38. package/dist/component/{cynefinDiagram-MW4NZA55-Bgfw8c41.js → cynefinDiagram-MW4NZA55-Bju0bDR1.js} +4 -4
  39. package/dist/component/{dagre-VZM6K2ZE-CQoUcF3S.js → dagre-VZM6K2ZE-fMS2g5Lt.js} +9 -9
  40. package/dist/component/{diagram-7IWD3JNH-C8-mvAEv.js → diagram-7IWD3JNH-CoDJAyv-.js} +5 -5
  41. package/dist/component/{diagram-B4RE2ZJO-BATqCIx3.js → diagram-B4RE2ZJO-nioVFGn5.js} +3 -3
  42. package/dist/component/{diagram-LBJQPF4R-DwRMRXWz.js → diagram-LBJQPF4R-BuBX2Dz0.js} +4 -4
  43. package/dist/component/{diagram-Q27KOJAE-D6gO0LTm.js → diagram-Q27KOJAE-D6amwUDE.js} +6 -6
  44. package/dist/component/{diagram-UB23O5K3-4nOrWHql.js → diagram-UB23O5K3-BfBhBu7Y.js} +4 -4
  45. package/dist/component/{ebnfDiagram-BXEA7PRR-DCO-Nj3k.js → ebnfDiagram-BXEA7PRR-Cy3CaiTX.js} +4 -4
  46. package/dist/component/{erDiagram-JOGREHBK-hWtImhPN.js → erDiagram-JOGREHBK-BUomkKWY.js} +12 -12
  47. package/dist/component/flowDiagram-UKHOOZJN-C0aiK5kF.js +19 -0
  48. package/dist/component/{ganttDiagram-PKOTCBZU-BE8Mqoej.js → ganttDiagram-PKOTCBZU-BWWeGylo.js} +3 -3
  49. package/dist/component/{gitGraphDiagram-DS77QQ5N-DURS7rAN.js → gitGraphDiagram-DS77QQ5N-BFNi8KrJ.js} +3 -3
  50. package/dist/component/index.js +2 -2
  51. package/dist/component/{infoDiagram-6WML65LV-BqBxR6YB.js → infoDiagram-6WML65LV-Ba4nVdwJ.js} +3 -3
  52. package/dist/component/{ishikawaDiagram-WSZJBQD7-CnYZd1Dq.js → ishikawaDiagram-WSZJBQD7-JBSR3acP.js} +4 -4
  53. package/dist/component/{journeyDiagram-NVQOT4AX-Cgkpx4Qx.js → journeyDiagram-NVQOT4AX-BAGUQhvd.js} +3 -3
  54. package/dist/component/{kanban-definition-27J2QSJJ-CJSdhT0i.js → kanban-definition-27J2QSJJ-CIBw8XVT.js} +9 -9
  55. package/dist/component/{line-BBEHlpsV.js → line-BPXxX2mb.js} +2 -2
  56. package/dist/component/{mindmap-definition-FAOFIHXS-DgHouLA-.js → mindmap-definition-FAOFIHXS-ZwmeO9Ju.js} +11 -11
  57. package/dist/component/{pegDiagram-VL7TDLO6-B_iGQ6sI.js → pegDiagram-VL7TDLO6-g6cHkKXH.js} +4 -4
  58. package/dist/component/{pieDiagram-7S7Q4E2Y-g7GxM0JA.js → pieDiagram-7S7Q4E2Y-6if4UZeA.js} +4 -4
  59. package/dist/component/{quadrantDiagram-CIZ2JOQS-Bp7z4raq.js → quadrantDiagram-CIZ2JOQS-DW9Wi1_3.js} +2 -2
  60. package/dist/component/{railroadDiagram-AXF67PYL-CYx3PP5o.js → railroadDiagram-AXF67PYL-DRKsvNWu.js} +4 -4
  61. package/dist/component/{requirementDiagram-LRYGKXZP-BJNRJceo.js → requirementDiagram-LRYGKXZP-CKtakT6g.js} +11 -11
  62. package/dist/component/{sankeyDiagram-W5VNT64P-Cf0tVHbW.js → sankeyDiagram-W5VNT64P-B-oejkos.js} +2 -2
  63. package/dist/component/{sequenceDiagram-SI44F4Z6-BsAsKMRH.js → sequenceDiagram-SI44F4Z6-3RmdhrrK.js} +4 -4
  64. package/dist/component/{stateDiagram-OKZ733FA-Bpk0vtTK.js → stateDiagram-OKZ733FA-ChwQeLFK.js} +14 -14
  65. package/dist/component/{stateDiagram-v2-UEYNNEHI-CJFoUvD2.js → stateDiagram-v2-UEYNNEHI-Cu0mGIbX.js} +13 -13
  66. package/dist/component/{swimlanes-SLNWSIFB-Be5A0lwq.js → swimlanes-SLNWSIFB-B1f2ZxW_.js} +9 -9
  67. package/dist/component/{swimlanesDiagram-ULZ7WXOC-J8VNaPhM.js → swimlanesDiagram-ULZ7WXOC-CspwK4RG.js} +13 -13
  68. package/dist/component/{timeline-definition-Z64GVDOM-CU9PEkPY.js → timeline-definition-Z64GVDOM-Bg9gKcBJ.js} +4 -4
  69. package/dist/component/{vennDiagram-T6HMQDX7-Cno78tFK.js → vennDiagram-T6HMQDX7-BS7jr5XD.js} +4 -4
  70. package/dist/component/{wardleyDiagram-T6FBY63Y-BEb1Rn5J.js → wardleyDiagram-T6FBY63Y-DVm3XZBO.js} +4 -4
  71. package/dist/component/{xychartDiagram-ELKLHX3M-BwjMczCl.js → xychartDiagram-ELKLHX3M-Cg8qYbc9.js} +7 -7
  72. package/dist/components/ai-elements/chat-link.d.ts +15 -0
  73. package/dist/components/connectors/ConnectorBrandLogo.d.ts +4 -0
  74. package/dist/components/embed/ComputerSettings.d.ts +7 -0
  75. package/dist/components/embed/EmbedConversation.d.ts +4 -1
  76. package/dist/components/embed/EmbedRail.d.ts +8 -2
  77. package/dist/components/embed/EmbedSessions.d.ts +22 -2
  78. package/dist/components/embed/MobileNavBar.d.ts +4 -2
  79. package/dist/components/embed/ProactiveChecksSetting.d.ts +8 -0
  80. package/dist/components/embed/use-settings-owner-key.d.ts +15 -0
  81. package/dist/components/pinned/AgentComputerSheet.d.ts +5 -0
  82. package/dist/components/pinned/AgentMessageNote.d.ts +12 -0
  83. package/dist/components/pinned/PinnedChatHeader.d.ts +15 -0
  84. package/dist/components/pinned/SentByAgentTag.d.ts +1 -0
  85. package/dist/components/pinned/agent-computer-open-state.d.ts +9 -0
  86. package/dist/components/pinned/character/AgentCharacter.d.ts +8 -0
  87. package/dist/components/pinned/character/agent-character-art.d.ts +12 -0
  88. package/dist/components/pinned/personal-agent.d.ts +43 -0
  89. package/dist/components/pinned/profile/AgentProfileSheet.d.ts +14 -0
  90. package/dist/components/pinned/profile/ProfileAboutTab.d.ts +4 -0
  91. package/dist/components/pinned/profile/ProfileActivityTab.d.ts +9 -0
  92. package/dist/components/pinned/profile/ProfileSourcesTab.d.ts +8 -0
  93. package/dist/components/pinned/profile/profile-activity.d.ts +52 -0
  94. package/dist/components/pinned/use-agent-name.d.ts +2 -0
  95. package/dist/components/scheduled/ScheduleFolderDialogs.d.ts +14 -0
  96. package/dist/components/scheduled/ScheduleFolderTree.d.ts +2 -1
  97. package/dist/components/scheduled/ScheduledListSurface.d.ts +7 -0
  98. package/dist/embed/goal-cap-notice.d.ts +0 -9
  99. package/dist/embed/pinned-chat.d.ts +52 -0
  100. package/dist/embed/voice/line-run-reader.d.ts +1 -1
  101. package/dist/embed/voice-call.d.ts +6 -0
  102. package/dist/i18n/messages/en.d.ts +168 -9
  103. package/dist/i18n/messages/surfaces/embedMisc.d.ts +4 -0
  104. package/dist/i18n/messages/surfaces/pinned.d.ts +328 -0
  105. package/dist/i18n/messages/surfaces/scheduled.d.ts +113 -5
  106. package/dist/i18n/messages/surfaces/sessions.d.ts +4 -0
  107. package/dist/i18n/messages/surfaces/settings.d.ts +152 -0
  108. package/dist/i18n/messages/surfaces/stream.d.ts +52 -4
  109. package/dist/i18n/messages/surfaces/vault.d.ts +1 -1
  110. package/dist/routes/chat/history-merge.d.ts +4 -1
  111. package/dist/routes/chat/session-api.d.ts +1 -1
  112. package/dist/routes/chat/use-next-step-suggestion.d.ts +4 -0
  113. package/dist/stream/belong-chat-transport.d.ts +19 -22
  114. package/dist/stream/message-metadata.d.ts +57 -0
  115. package/dist/stream/pause-notice-copy.d.ts +3 -0
  116. package/dist/stream/reconnect-backoff.d.ts +39 -0
  117. package/dist/stream/run-error-copy.d.ts +25 -0
  118. package/dist/stream/stream-notice.d.ts +9 -0
  119. package/package.json +1 -1
  120. package/dist/component/flowDiagram-UKHOOZJN-8qLgX2Wv.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 {};
@@ -1,9 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  export declare const goalStatusSchema: z.ZodEnum<{
3
- waiting_for_approval: "waiting_for_approval";
4
3
  active: "active";
5
4
  paused: "paused";
6
5
  blocked: "blocked";
6
+ waiting_for_approval: "waiting_for_approval";
7
7
  clarifying: "clarifying";
8
8
  completion_claimed: "completion_claimed";
9
9
  deferred: "deferred";
@@ -25,10 +25,10 @@ export declare const goalJournalEntrySchema: z.ZodObject<{
25
25
  kind: z.ZodString;
26
26
  actor: z.ZodString;
27
27
  toStatus: z.ZodNullable<z.ZodEnum<{
28
- waiting_for_approval: "waiting_for_approval";
29
28
  active: "active";
30
29
  paused: "paused";
31
30
  blocked: "blocked";
31
+ waiting_for_approval: "waiting_for_approval";
32
32
  clarifying: "clarifying";
33
33
  completion_claimed: "completion_claimed";
34
34
  deferred: "deferred";
@@ -45,10 +45,10 @@ export type GoalJournalEntry = z.infer<typeof goalJournalEntrySchema>;
45
45
  export declare const goalViewSchema: z.ZodObject<{
46
46
  goalId: z.ZodString;
47
47
  status: z.ZodEnum<{
48
- waiting_for_approval: "waiting_for_approval";
49
48
  active: "active";
50
49
  paused: "paused";
51
50
  blocked: "blocked";
51
+ waiting_for_approval: "waiting_for_approval";
52
52
  clarifying: "clarifying";
53
53
  completion_claimed: "completion_claimed";
54
54
  deferred: "deferred";
@@ -90,10 +90,10 @@ export declare const goalViewSchema: z.ZodObject<{
90
90
  kind: z.ZodString;
91
91
  actor: z.ZodString;
92
92
  toStatus: z.ZodNullable<z.ZodEnum<{
93
- waiting_for_approval: "waiting_for_approval";
94
93
  active: "active";
95
94
  paused: "paused";
96
95
  blocked: "blocked";
96
+ waiting_for_approval: "waiting_for_approval";
97
97
  clarifying: "clarifying";
98
98
  completion_claimed: "completion_claimed";
99
99
  deferred: "deferred";
@@ -7,9 +7,16 @@ export type GuideState = {
7
7
  } | {
8
8
  readonly status: "unavailable";
9
9
  };
10
- export declare const fetchGuide: (client: ApiClient, locale: Locale) => Promise<GuideState>;
11
10
  /**
12
- * Keyed by locale only: the guide is public and deployment-wide, so it has no
13
- * account key. A language switch is a new key, so the view refetches.
11
+ * `pinnedChat`: this dock shows the personal agent's pinned chat (BEL-348). It is
12
+ * turned on per user and the guide route has no actor, so the dock says so, and
13
+ * the cloud adds the section about Sima. `pinnedChatEmail`: it also offers this
14
+ * user that chat's messages by email, so the cloud adds the paragraph about that.
14
15
  */
15
- export declare const useGuide: (locale: Locale) => import('@tanstack/react-query').UseQueryResult<NoInfer<GuideState>, Error>;
16
+ export declare const fetchGuide: (client: ApiClient, locale: Locale, pinnedChat?: boolean, pinnedChatEmail?: boolean) => Promise<GuideState>;
17
+ /**
18
+ * Keyed by locale (and whether this dock shows the pinned chat): the guide is
19
+ * public and deployment-wide, so it has no account key. A language switch is a
20
+ * new key, so the view refetches.
21
+ */
22
+ export declare const useGuide: (locale: Locale, pinnedChat?: boolean, pinnedChatEmail?: boolean) => import('@tanstack/react-query').UseQueryResult<NoInfer<GuideState>, Error>;
@@ -0,0 +1,47 @@
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
+ emailEnabled: z.ZodDefault<z.ZodBoolean>;
10
+ emailAddress: z.ZodDefault<z.ZodNullable<z.ZodString>>;
11
+ watchedApps: z.ZodDefault<z.ZodArray<z.ZodString>>;
12
+ readsConnectedApps: z.ZodDefault<z.ZodBoolean>;
13
+ readsSimetrik: z.ZodDefault<z.ZodBoolean>;
14
+ chat: z.ZodDefault<z.ZodNullable<z.ZodObject<{
15
+ sessionId: z.ZodString;
16
+ unreadCount: z.ZodNumber;
17
+ lastMessageAt: z.ZodNullable<z.ZodISODateTime>;
18
+ lastMessage: z.ZodNullable<z.ZodString>;
19
+ activeRunId: z.ZodNullable<z.ZodString>;
20
+ }, z.core.$strip>>>;
21
+ }, z.core.$strip>;
22
+ export type Proactive = z.infer<typeof proactiveSchema>;
23
+ export type ProactiveState = {
24
+ readonly status: "ready";
25
+ readonly proactive: Proactive;
26
+ } | {
27
+ readonly status: "unavailable";
28
+ };
29
+ /** The pinned chat, created on first use, moved to the Workspace it's opened from. */
30
+ export declare const openPinnedChat: (client: ApiClient, workspaceExternalId: string | null) => Promise<string>;
31
+ export declare const fetchProactive: (client: ApiClient) => Promise<ProactiveState>;
32
+ /** How often the dock re-reads it, and how often while a check is deciding. */
33
+ export declare const PROACTIVE_POLL_MS = 30000;
34
+ export declare const PROACTIVE_ACTIVE_POLL_MS = 4000;
35
+ /** Keyed by the account speaking to the API, so it is purged on a switch. */
36
+ export declare const useProactive: () => import('@tanstack/react-query').UseQueryResult<NoInfer<ProactiveState>, Error>;
37
+ /**
38
+ * What the dock already read, without ever asking: for a surface that only needs
39
+ * to know whether the pinned chat is on (the Guide). The dock's own poll keeps it
40
+ * current; nothing here starts a request.
41
+ */
42
+ export declare const usePeekProactive: () => import('@tanstack/react-query').UseQueryResult<NoInfer<ProactiveState>, Error>;
43
+ export declare const useSetProactiveEnabled: () => import('@tanstack/react-query').UseMutationResult<void, Error, boolean, unknown>;
44
+ export declare const useSetProactiveEmail: () => import('@tanstack/react-query').UseMutationResult<void, Error, boolean, unknown>;
45
+ export declare const useCheckNow: () => import('@tanstack/react-query').UseMutationResult<number, Error, void, unknown>;
46
+ export declare const useMarkProactiveRead: () => import('@tanstack/react-query').UseMutationResult<void, Error, void, unknown>;
47
+ export {};
@@ -1,6 +1,10 @@
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];
6
+ /** A mint, per account and Workspace. `workspaceKey` is "" when unscoped. */
7
+ agentComputerLink: (accountKey: string, workspaceKey: string) => readonly ["belong", "agent-computer-link", string, string];
4
8
  session: (sessionId: string) => readonly ["belong", "sessions", string];
5
9
  sessionStats: (sessionId: string) => readonly ["belong", "session-stats", string];
6
10
  messages: (sessionId: string) => readonly ["belong", "sessions", string, "messages"];
@@ -42,7 +46,18 @@ export declare const queryKeys: {
42
46
  agentGrant: (provider: string, scopeExternalId: string) => readonly ["belong", "agent-grant", string, string];
43
47
  /** Invalidation prefix for every task-schedule read (list + detail + runs). */
44
48
  taskSchedules: readonly ["belong", "task-schedules"];
49
+ /**
50
+ * Shared tasks (#613), ACCOUNT-scoped like the schedule reads below, with the
51
+ * account right after the prefix. The list, one shared task and "Accepting as
52
+ * …" carry titles, instructions, recipient email addresses and the caller's
53
+ * own sharing account, so a host that swaps accounts in place must never
54
+ * paint the previous user's.
55
+ */
56
+ sharedScheduleList: (accountKey: string) => readonly ["belong", "task-schedules", "shared-list", string];
57
+ sharedScheduleDetail: (accountKey: string, definitionId: string | null) => readonly ["belong", "task-schedules", "shared-detail", string, string | null];
58
+ sharingAccount: (accountKey: string) => readonly ["belong", "task-schedules", "sharing-account", string];
45
59
  apiKeys: (ownerCacheKey: string) => readonly ["belong", "api-keys", string];
60
+ computer: (ownerCacheKey: string) => readonly ["belong", "computer", string];
46
61
  /**
47
62
  * Plan 018 — the signed-in user's own usage. ACCOUNT-scoped (`accountKey`
48
63
  * from `api/account-scope.ts`, right after the prefix like the schedule keys),
@@ -54,7 +69,7 @@ export declare const queryKeys: {
54
69
  * The Simetrik agent Guide in one dock language. Public and deployment-wide,
55
70
  * so it carries no account key; the locale is the whole identity.
56
71
  */
57
- guide: (locale: Locale) => readonly ["belong", "guide", import('../component').BelongLocale];
72
+ guide: (locale: Locale, pinnedChat?: boolean, pinnedChatEmail?: boolean) => readonly ["belong", "guide", import('../component').BelongLocale, "plain" | "pinned-chat", "email" | "no-email"];
58
73
  /**
59
74
  * Schedule reads are ACCOUNT-scoped as well as workspace-scoped (`accountKey`
60
75
  * from `api/account-scope.ts`). `/v1/task-schedules` keys off the caller, and
@@ -76,6 +91,12 @@ export declare const queryKeys: {
76
91
  taskScheduleFolders: (accountKey: string, workspaceKey: string) => readonly ["belong", "task-schedules", "folders", string, string];
77
92
  /** Who has access to one Project (and its pending links and handover). */
78
93
  projectAccess: (accountKey: string, workspaceKey: string, projectId: string) => readonly ["belong", "task-schedules", "project-access", string, string, string];
94
+ /**
95
+ * Who has access to one shared task, and its open links. Keyed by account
96
+ * like `projectAccess`: the share dialog shows a link straight from this
97
+ * read, so the previous account's answer must never serve the next one.
98
+ */
99
+ scheduleAccess: (accountKey: string, definitionId: string | null) => readonly ["belong", "task-schedules", "schedule-access", string, string | null];
79
100
  projectFiles: (accountKey: string, workspaceKey: string, projectId: string) => readonly ["belong", "task-schedules", "project-files", string, string, string];
80
101
  taskSchedule: (accountKey: string, workspaceKey: string, taskScheduleId: string) => readonly ["belong", "task-schedules", "detail", string, string, string];
81
102
  taskScheduleRuns: (accountKey: string, workspaceKey: string, taskScheduleId: string) => readonly ["belong", "task-schedules", "detail", string, string, string, "runs"];
@@ -26,8 +26,8 @@ import { QuotaNoticeData } from '../stream/belong-data-parts.ts';
26
26
  declare const quotaRefusalSchema: z.ZodObject<{
27
27
  type: z.ZodLiteral<"quota_exceeded">;
28
28
  reason: z.ZodEnum<{
29
- exhausted: "exhausted";
30
29
  blocked: "blocked";
30
+ exhausted: "exhausted";
31
31
  }>;
32
32
  limitWeightedTokens: z.ZodNumber;
33
33
  usedWeightedTokens: z.ZodNumber;
@@ -5,18 +5,18 @@ export declare const MAX_FOLDER_DEPTH = 5;
5
5
  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
+ view: "view";
8
9
  edit: "edit";
9
10
  owner: "owner";
10
- view: "view";
11
11
  }>;
12
12
  export type ProjectRole = z.infer<typeof projectRoleSchema>;
13
13
  declare const projectSchema: z.ZodObject<{
14
14
  projectId: z.ZodUUID;
15
15
  name: z.ZodString;
16
16
  role: z.ZodDefault<z.ZodEnum<{
17
+ view: "view";
17
18
  edit: "edit";
18
19
  owner: "owner";
19
- view: "view";
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: "view" | "edit" | "owner";
45
45
  scheduleCount: number;
46
46
  createdAt: string;
47
47
  updatedAt: string;
@@ -85,7 +85,7 @@ export declare const useDeleteTaskScheduleFolder: () => import('@tanstack/react-
85
85
  /** Move a schedule into a Project (and optional folder), or out of every Project. Changes nothing else. */
86
86
  export declare const usePlaceTaskSchedule: () => import('@tanstack/react-query').UseMutationResult<{
87
87
  taskScheduleId: string;
88
- status: "completed" | "active" | "paused" | "deleted";
88
+ status: "active" | "completed" | "paused" | "deleted";
89
89
  }, Error, {
90
90
  readonly taskScheduleId: string;
91
91
  readonly placement: TaskSchedulePlacement;
@@ -2,24 +2,24 @@ import { z } from 'zod';
2
2
  export type ProjectGrantRole = "view" | "edit";
3
3
  declare const projectAccessSchema: z.ZodObject<{
4
4
  role: z.ZodEnum<{
5
+ view: "view";
5
6
  edit: "edit";
6
7
  owner: "owner";
7
- view: "view";
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
+ view: "view";
13
14
  edit: "edit";
14
15
  owner: "owner";
15
- view: "view";
16
16
  }>;
17
17
  }, z.core.$strip>>;
18
18
  invitations: z.ZodArray<z.ZodObject<{
19
19
  id: z.ZodUUID;
20
20
  role: z.ZodEnum<{
21
- edit: "edit";
22
21
  view: "view";
22
+ edit: "edit";
23
23
  }>;
24
24
  expiresAt: z.ZodISODateTime;
25
25
  token: z.ZodNullable<z.ZodString>;
@@ -42,15 +42,15 @@ 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: "view" | "edit" | "owner";
46
46
  people: {
47
47
  userId: string;
48
48
  label: string;
49
- role: "edit" | "owner" | "view";
49
+ role: "view" | "edit" | "owner";
50
50
  }[];
51
51
  invitations: {
52
52
  id: string;
53
- role: "edit" | "view";
53
+ role: "view" | "edit";
54
54
  expiresAt: string;
55
55
  token: string | null;
56
56
  }[];
@@ -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: "view" | "edit" | "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. */
@@ -137,8 +137,8 @@ export declare const recurrenceSchema: z.ZodPipe<z.ZodObject<{
137
137
  intervalMinutes?: number | undefined;
138
138
  }>>;
139
139
  export declare const taskScheduleSeriesStatusSchema: z.ZodEnum<{
140
- completed: "completed";
141
140
  active: "active";
141
+ completed: "completed";
142
142
  paused: "paused";
143
143
  deleted: "deleted";
144
144
  }>;
@@ -151,8 +151,8 @@ declare const taskScheduleListItemSchema: z.ZodObject<{
151
151
  folderId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
152
152
  title: z.ZodString;
153
153
  status: z.ZodEnum<{
154
- completed: "completed";
155
154
  active: "active";
155
+ completed: "completed";
156
156
  paused: "paused";
157
157
  deleted: "deleted";
158
158
  }>;
@@ -193,9 +193,9 @@ declare const taskScheduleListItemSchema: z.ZodObject<{
193
193
  nextRunAt: z.ZodNullable<z.ZodISODateTime>;
194
194
  lastRun: z.ZodNullable<z.ZodObject<{
195
195
  status: z.ZodEnum<{
196
- failed: "failed";
197
196
  running: "running";
198
197
  completed: "completed";
198
+ failed: "failed";
199
199
  }>;
200
200
  at: z.ZodNullable<z.ZodISODateTime>;
201
201
  }, z.core.$strip>>;
@@ -210,8 +210,8 @@ export declare const taskScheduleDetailSchema: z.ZodObject<{
210
210
  folderId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
211
211
  title: z.ZodString;
212
212
  status: z.ZodEnum<{
213
- completed: "completed";
214
213
  active: "active";
214
+ completed: "completed";
215
215
  paused: "paused";
216
216
  deleted: "deleted";
217
217
  }>;
@@ -252,18 +252,18 @@ export declare const taskScheduleDetailSchema: z.ZodObject<{
252
252
  nextRunAt: z.ZodNullable<z.ZodISODateTime>;
253
253
  lastRun: z.ZodNullable<z.ZodObject<{
254
254
  status: z.ZodEnum<{
255
- failed: "failed";
256
255
  running: "running";
257
256
  completed: "completed";
257
+ failed: "failed";
258
258
  }>;
259
259
  at: z.ZodNullable<z.ZodISODateTime>;
260
260
  }, z.core.$strip>>;
261
261
  messagePreview: z.ZodString;
262
262
  createdAt: z.ZodISODateTime;
263
263
  projectRole: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
264
+ view: "view";
264
265
  edit: "edit";
265
266
  owner: "owner";
266
- view: "view";
267
267
  }>>>;
268
268
  emailAddresses: z.ZodOptional<z.ZodEnum<{
269
269
  visible: "visible";
@@ -357,9 +357,9 @@ export declare const taskScheduleRunSchema: z.ZodObject<{
357
357
  paused: "paused";
358
358
  }>>>;
359
359
  displayStatus: z.ZodEnum<{
360
- failed: "failed";
361
360
  running: "running";
362
361
  completed: "completed";
362
+ failed: "failed";
363
363
  needs_attention: "needs_attention";
364
364
  stopped_early: "stopped_early";
365
365
  }>;
@@ -372,6 +372,7 @@ export declare const taskScheduleRunSchema: z.ZodObject<{
372
372
  runId: z.ZodDefault<z.ZodNullable<z.ZodUUID>>;
373
373
  delivery: z.ZodCatch<z.ZodDefault<z.ZodNullable<z.ZodObject<{
374
374
  outcome: z.ZodEnum<{
375
+ unknown: "unknown";
375
376
  partial: "partial";
376
377
  sent: "sent";
377
378
  not_sent: "not_sent";
@@ -387,8 +388,9 @@ export declare const taskScheduleRunSchema: z.ZodObject<{
387
388
  schedule_email: "schedule_email";
388
389
  }>;
389
390
  status: z.ZodEnum<{
390
- failed: "failed";
391
+ unknown: "unknown";
391
392
  pending: "pending";
393
+ failed: "failed";
392
394
  skipped: "skipped";
393
395
  sent: "sent";
394
396
  }>;
@@ -396,6 +398,22 @@ export declare const taskScheduleRunSchema: z.ZodObject<{
396
398
  subject: z.ZodNullable<z.ZodString>;
397
399
  providerMessageId: z.ZodNullable<z.ZodString>;
398
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>>>;
399
417
  to: z.ZodOptional<z.ZodArray<z.ZodString>>;
400
418
  cc: z.ZodOptional<z.ZodArray<z.ZodString>>;
401
419
  }, z.core.$strip>>;
@@ -435,7 +453,7 @@ export type TaskScheduleListPlace = {
435
453
  export declare const useTaskSchedules: (filter: TaskScheduleFilter, q: string, place?: TaskScheduleListPlace) => import('@tanstack/react-query').UseInfiniteQueryResult<{
436
454
  taskScheduleId: string;
437
455
  title: string;
438
- status: "completed" | "active" | "paused" | "deleted";
456
+ status: "active" | "completed" | "paused" | "deleted";
439
457
  recurrence: {
440
458
  readonly kind: "none";
441
459
  } | {
@@ -456,7 +474,7 @@ export declare const useTaskSchedules: (filter: TaskScheduleFilter, q: string, p
456
474
  timezone: string;
457
475
  nextRunAt: string | null;
458
476
  lastRun: {
459
- status: "failed" | "running" | "completed";
477
+ status: "running" | "completed" | "failed";
460
478
  at: string | null;
461
479
  } | null;
462
480
  messagePreview: string;
@@ -465,10 +483,49 @@ export declare const useTaskSchedules: (filter: TaskScheduleFilter, q: string, p
465
483
  projectId?: string | null | undefined;
466
484
  folderId?: string | null | undefined;
467
485
  }[], Error>;
486
+ /**
487
+ * The first page of a list, kept fresh for a surface that shows only a few rows. Its
488
+ * own query: polling the list above would refetch every page Scheduled has loaded
489
+ * under its key. `active` is `upcoming` plus a one-shot running right now, which has
490
+ * no next run (task-schedule-series.repo.ts).
491
+ */
492
+ export declare const useTaskSchedulesFirstPage: (filter: "active" | "completed") => import('@tanstack/react-query').UseQueryResult<NoInfer<{
493
+ taskScheduleId: string;
494
+ title: string;
495
+ status: "active" | "completed" | "paused" | "deleted";
496
+ recurrence: {
497
+ readonly kind: "none";
498
+ } | {
499
+ readonly kind: "daily";
500
+ } | {
501
+ readonly kind: "weekdays";
502
+ } | {
503
+ readonly kind: "weekly";
504
+ } | {
505
+ readonly kind: "custom_weekly";
506
+ readonly weekdays: number[];
507
+ } | {
508
+ readonly kind: "manual";
509
+ } | {
510
+ readonly kind: "interval";
511
+ readonly intervalMinutes: number;
512
+ };
513
+ timezone: string;
514
+ nextRunAt: string | null;
515
+ lastRun: {
516
+ status: "running" | "completed" | "failed";
517
+ at: string | null;
518
+ } | null;
519
+ messagePreview: string;
520
+ createdAt: string;
521
+ shared?: boolean | undefined;
522
+ projectId?: string | null | undefined;
523
+ folderId?: string | null | undefined;
524
+ }[]>, Error>;
468
525
  export declare const useTaskSchedule: (taskScheduleId: string | null) => import('@tanstack/react-query').UseQueryResult<NoInfer<{
469
526
  taskScheduleId: string;
470
527
  title: string;
471
- status: "completed" | "active" | "paused" | "deleted";
528
+ status: "active" | "completed" | "paused" | "deleted";
472
529
  recurrence: {
473
530
  readonly kind: "none";
474
531
  } | {
@@ -489,12 +546,12 @@ export declare const useTaskSchedule: (taskScheduleId: string | null) => import(
489
546
  timezone: string;
490
547
  nextRunAt: string | null;
491
548
  lastRun: {
492
- status: "failed" | "running" | "completed";
549
+ status: "running" | "completed" | "failed";
493
550
  at: string | null;
494
551
  } | null;
495
552
  messagePreview: string;
496
553
  createdAt: string;
497
- projectRole: "edit" | "owner" | "view" | null;
554
+ projectRole: "view" | "edit" | "owner" | null;
498
555
  explicitTitle: string | null;
499
556
  message: string;
500
557
  mode: "plan" | "approve" | "balanced" | "bypass";
@@ -563,7 +620,7 @@ export declare const useTaskScheduleRuns: (taskScheduleId: string | null) => imp
563
620
  taskScheduleRunId: string;
564
621
  occurrenceKind: "manual" | "scheduled";
565
622
  seriesStatusAtRequest: "active" | "paused" | null;
566
- displayStatus: "failed" | "running" | "completed" | "needs_attention" | "stopped_early";
623
+ displayStatus: "running" | "completed" | "failed" | "needs_attention" | "stopped_early";
567
624
  scheduledFor: string;
568
625
  startedAt: string | null;
569
626
  finishedAt: string | null;
@@ -572,20 +629,31 @@ export declare const useTaskScheduleRuns: (taskScheduleId: string | null) => imp
572
629
  taskId: string | null;
573
630
  runId: string | null;
574
631
  delivery: {
575
- outcome: "partial" | "sent" | "not_sent";
632
+ outcome: "unknown" | "partial" | "sent" | "not_sent";
576
633
  reason: "no_match" | "missing_outcome" | "provider_failed" | null;
577
634
  emails: {
578
635
  source: "send_email" | "schedule_email";
579
- status: "failed" | "pending" | "skipped" | "sent";
636
+ status: "unknown" | "pending" | "failed" | "skipped" | "sent";
580
637
  recipientCount: number | null;
581
638
  subject: string | null;
582
639
  providerMessageId: string | null;
583
640
  sentAt: string | null;
641
+ providerEvent?: {
642
+ type: "failed" | "accepted" | "delivered" | "delivery_delayed" | "bounced" | "complained" | "suppressed";
643
+ at: string;
644
+ bounceType: "hard" | "soft" | null;
645
+ } | null | undefined;
584
646
  to?: string[] | undefined;
585
647
  cc?: string[] | undefined;
586
648
  }[];
587
649
  } | null;
588
650
  }[], Error>;
651
+ /**
652
+ * The newest run of each schedule, while it's on screen. The list's `lastRun` says
653
+ * "running" for a run that stopped to wait on the user; only the runs endpoint can
654
+ * tell, and only by asking again.
655
+ */
656
+ export declare const useLatestTaskScheduleRuns: (taskScheduleIds: readonly string[]) => ReadonlyMap<string, TaskScheduleRun>;
589
657
  export type CreateTaskScheduleSeriesInput = {
590
658
  readonly scheduledFor: string;
591
659
  readonly timeExpression: string;
@@ -633,16 +701,55 @@ export declare const useCreateTaskSchedule: () => import('@tanstack/react-query'
633
701
  }, Error, CreateTaskScheduleSeriesInput, unknown>;
634
702
  export declare const useUpdateTaskSchedule: () => import('@tanstack/react-query').UseMutationResult<{
635
703
  taskScheduleId: string;
636
- status: "completed" | "active" | "paused" | "deleted";
704
+ status: "active" | "completed" | "paused" | "deleted";
637
705
  nextRunAt: string | null;
638
706
  }, Error, UpdateTaskScheduleSeriesInput, unknown>;
639
707
  export declare const usePauseTaskSchedule: () => import('@tanstack/react-query').UseMutationResult<{
640
708
  status: "paused";
641
709
  }, Error, string, unknown>;
642
710
  export declare const useResumeTaskSchedule: () => import('@tanstack/react-query').UseMutationResult<{
643
- status: "completed" | "active" | "needs_attention";
711
+ status: "active" | "completed" | "needs_attention";
644
712
  nextRunAt: string | null;
645
713
  }, Error, string, unknown>;
714
+ /** #851 — what a bulk pause answers: each task counted once, and the ids an Undo resumes. */
715
+ declare const bulkPauseResultSchema: z.ZodObject<{
716
+ paused: z.ZodNumber;
717
+ alreadyPaused: z.ZodNumber;
718
+ completed: z.ZodNumber;
719
+ notFound: z.ZodNumber;
720
+ pausedTaskScheduleIds: z.ZodArray<z.ZodUUID>;
721
+ }, z.core.$strip>;
722
+ export type BulkPauseResult = z.infer<typeof bulkPauseResultSchema>;
723
+ /** #851 — pause every task in a Project folder and in the folders under it, in one write. */
724
+ export declare const usePauseTaskScheduleFolder: () => import('@tanstack/react-query').UseMutationResult<{
725
+ paused: number;
726
+ alreadyPaused: number;
727
+ completed: number;
728
+ notFound: number;
729
+ pausedTaskScheduleIds: string[];
730
+ }, Error, string, unknown>;
731
+ /**
732
+ * #851 — how a resume of many ids ended. `needsAttention` tasks stayed
733
+ * paused (their connection or shared original needs fixing). When a chunk
734
+ * fails, the chunks before it have already resumed, so `incomplete` keeps
735
+ * that count and `unconfirmedIds` (the failed chunk and every later one) to
736
+ * retry. Resume is idempotent: an id that did resume answers `notPaused`.
737
+ */
738
+ export type BulkResumeOutcome = {
739
+ readonly status: "resumed";
740
+ readonly resumed: number;
741
+ readonly needsAttention: number;
742
+ } | {
743
+ readonly status: "incomplete";
744
+ readonly resumed: number;
745
+ readonly needsAttention: number;
746
+ readonly unconfirmedIds: readonly string[];
747
+ };
748
+ /**
749
+ * #851 — resume exactly these tasks: the Undo of a bulk pause, which can
750
+ * return more ids than one resume takes, so they go 100 at a time.
751
+ */
752
+ export declare const useResumeTaskSchedulesByIds: () => import('@tanstack/react-query').UseMutationResult<BulkResumeOutcome, Error, readonly string[], unknown>;
646
753
  /** The two statuses run-now accepts — what the UI showed when it asked (#837). */
647
754
  export type RunNowSeriesStatus = "active" | "paused";
648
755
  /** The 409 run-now answers when the task's status is no longer the expected one. */