@belonguniverseai/react-sdk 0.1.5 → 0.1.7

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 (109) hide show
  1. package/dist/api/agent-grants.d.ts +18 -23
  2. package/dist/api/client.d.ts +1215 -75
  3. package/dist/api/query-keys.d.ts +5 -0
  4. package/dist/api/task-schedules.d.ts +313 -0
  5. package/dist/app/dock-outlet.d.ts +18 -0
  6. package/dist/browser/control-channel.d.ts +9 -0
  7. package/dist/component/{arc-qZMtTEQp.js → arc-D26RO7cK.js} +2 -2
  8. package/dist/component/{architectureDiagram-3BPJPVTR-CtO601Ty.js → architectureDiagram-3BPJPVTR-uiXhyHDF.js} +3 -3
  9. package/dist/component/{blockDiagram-GPEHLZMM-fKkEUEDS.js → blockDiagram-GPEHLZMM-Bm1HEObg.js} +4 -4
  10. package/dist/component/{c4Diagram-AAUBKEIU-KqgmAa9H.js → c4Diagram-AAUBKEIU-BypAuFIJ.js} +3 -3
  11. package/dist/component/{channel-Cd6udgmU.js → channel-MvxNOfHS.js} +2 -2
  12. package/dist/component/{chunk-2J33WTMH-MaLtoDSx.js → chunk-2J33WTMH-MxAoh_Eu.js} +2 -2
  13. package/dist/component/{chunk-4BX2VUAB-DdDabPei.js → chunk-4BX2VUAB-BHpzlyda.js} +2 -2
  14. package/dist/component/{chunk-55IACEB6-DHQfY7ay.js → chunk-55IACEB6-igXCAYDB.js} +2 -2
  15. package/dist/component/{chunk-727SXJPM-DIUibY9s.js → chunk-727SXJPM-BPq4W66f.js} +6 -6
  16. package/dist/component/{chunk-AQP2D5EJ-Bohmsf7Z.js → chunk-AQP2D5EJ-Y9AksdXf.js} +4 -4
  17. package/dist/component/{chunk-FMBD7UC4-CiCh8Wxm.js → chunk-FMBD7UC4-DHrfutng.js} +2 -2
  18. package/dist/component/{chunk-ND2GUHAM-DLKe9Qxr.js → chunk-ND2GUHAM-Ch9c4OTL.js} +2 -2
  19. package/dist/component/{chunk-QZHKN3VN-BEosEHjT.js → chunk-QZHKN3VN-DCe5OD8b.js} +2 -2
  20. package/dist/component/{classDiagram-4FO5ZUOK-5yoauZso.js → classDiagram-4FO5ZUOK-wW5NdcaU.js} +3 -3
  21. package/dist/component/{classDiagram-v2-Q7XG4LA2-5yoauZso.js → classDiagram-v2-Q7XG4LA2-wW5NdcaU.js} +3 -3
  22. package/dist/component/{cose-bilkent-S5V4N54A-ZvjOc5yF.js → cose-bilkent-S5V4N54A-BkRr9q6q.js} +2 -2
  23. package/dist/component/{dagre-BM42HDAG-BirvIeWT.js → dagre-BM42HDAG-BaUecTLo.js} +2 -2
  24. package/dist/component/{diagram-2AECGRRQ-DbK75uYi.js → diagram-2AECGRRQ-BaAo02me.js} +3 -3
  25. package/dist/component/{diagram-5GNKFQAL-Xyau_WDx.js → diagram-5GNKFQAL-DKerYV9c.js} +4 -4
  26. package/dist/component/{diagram-KO2AKTUF-jGJhlVoS.js → diagram-KO2AKTUF-jeKVSHu1.js} +3 -3
  27. package/dist/component/{diagram-LMA3HP47-BIZKHEj8.js → diagram-LMA3HP47-wsR18sOb.js} +3 -3
  28. package/dist/component/{diagram-OG6HWLK6-SsKVgkRq.js → diagram-OG6HWLK6-D6kALGxL.js} +4 -4
  29. package/dist/component/{erDiagram-TEJ5UH35-CD_3Nxu_.js → erDiagram-TEJ5UH35-CQb_EY79.js} +5 -5
  30. package/dist/component/{flowDiagram-I6XJVG4X-Dim5dbSa.js → flowDiagram-I6XJVG4X-B52f9IhS.js} +7 -7
  31. package/dist/component/{ganttDiagram-6RSMTGT7-BHK-3XlP.js → ganttDiagram-6RSMTGT7-B6szKgV7.js} +3 -3
  32. package/dist/component/{gitGraphDiagram-PVQCEYII-Ckff9fHa.js → gitGraphDiagram-PVQCEYII-Cso6Oo6v.js} +4 -4
  33. package/dist/component/{highlighted-body-OFNGDK62-pHPkIg3d.js → highlighted-body-OFNGDK62-CD0QHket.js} +2 -2
  34. package/dist/component/index-Dips44uG.js +2208 -0
  35. package/dist/component/index.js +2 -2
  36. package/dist/component/{infoDiagram-5YYISTIA-Dp_rhKDP.js → infoDiagram-5YYISTIA-BGNkBFoP.js} +2 -2
  37. package/dist/component/{ishikawaDiagram-YF4QCWOH-Ch_zRlUM.js → ishikawaDiagram-YF4QCWOH-CDk8KSNE.js} +2 -2
  38. package/dist/component/{journeyDiagram-JHISSGLW-DLWP05FC.js → journeyDiagram-JHISSGLW-lPfVcAq5.js} +5 -5
  39. package/dist/component/{kanban-definition-UN3LZRKU-BRgTurbj.js → kanban-definition-UN3LZRKU-DN_BkNHr.js} +3 -3
  40. package/dist/component/{linear-b7BWY2Ku.js → linear-C9Fv-7qu.js} +2 -2
  41. package/dist/component/{mermaid-GHXKKRXX-BU0A6vGx.js → mermaid-GHXKKRXX-bJrxMXXe.js} +36152 -32029
  42. package/dist/component/{mindmap-definition-RKZ34NQL-BgBw2ubB.js → mindmap-definition-RKZ34NQL-Duh3XRoZ.js} +4 -4
  43. package/dist/component/{pieDiagram-4H26LBE5-Dr-5pVKk.js → pieDiagram-4H26LBE5-BkKLjdAW.js} +4 -4
  44. package/dist/component/{quadrantDiagram-W4KKPZXB-BG4QvalE.js → quadrantDiagram-W4KKPZXB-DAvb8fUN.js} +3 -3
  45. package/dist/component/{requirementDiagram-4Y6WPE33-BEJzZeiL.js → requirementDiagram-4Y6WPE33-BtRuiyP2.js} +4 -4
  46. package/dist/component/{sankeyDiagram-5OEKKPKP-0Oohwww8.js → sankeyDiagram-5OEKKPKP-N0AD4yPI.js} +2 -2
  47. package/dist/component/{sequenceDiagram-3UESZ5HK-D-GdC1ck.js → sequenceDiagram-3UESZ5HK-BHfCscqu.js} +4 -4
  48. package/dist/component/{stateDiagram-AJRCARHV-DhNmn4mf.js → stateDiagram-AJRCARHV-CogCGofy.js} +3 -3
  49. package/dist/component/{stateDiagram-v2-BHNVJYJU-XFoNYMc3.js → stateDiagram-v2-BHNVJYJU-B1mCX7fI.js} +3 -3
  50. package/dist/component/{timeline-definition-PNZ67QCA-CEOHBCWh.js → timeline-definition-PNZ67QCA-CCbxae4K.js} +3 -3
  51. package/dist/component/{vennDiagram-CIIHVFJN-BLCN_trc.js → vennDiagram-CIIHVFJN-4A3Z5NhT.js} +2 -2
  52. package/dist/component/{wardleyDiagram-YWT4CUSO-BbDSTDli.js → wardleyDiagram-YWT4CUSO-D2FUxcv8.js} +3 -3
  53. package/dist/component/{xychartDiagram-2RQKCTM6-BHKWkvbW.js → xychartDiagram-2RQKCTM6-DELqVNap.js} +3 -3
  54. package/dist/components/embed/AgentGrantAutoConnect.d.ts +1 -0
  55. package/dist/components/embed/CapabilityHints.d.ts +4 -1
  56. package/dist/components/embed/EmbedConversation.d.ts +11 -11
  57. package/dist/components/embed/EmbedRail.d.ts +1 -1
  58. package/dist/components/embed/FilePreview.d.ts +7 -2
  59. package/dist/components/embed/FilePreviewDialog.d.ts +6 -2
  60. package/dist/components/embed/HtmlPreviewFrame.d.ts +7 -0
  61. package/dist/components/embed/MentionInput.d.ts +8 -1
  62. package/dist/components/embed/PreviewContent.d.ts +9 -21
  63. package/dist/components/embed/WelcomeIntro.d.ts +5 -3
  64. package/dist/components/embed/WelcomeSkills.d.ts +7 -0
  65. package/dist/components/embed/file-preview-kind.d.ts +7 -3
  66. package/dist/components/embed/onboarding-story-dock.d.ts +5 -2
  67. package/dist/components/embed/preview-content-kind.d.ts +5 -7
  68. package/dist/components/embed/use-inline-preview-url.d.ts +20 -0
  69. package/dist/components/scheduled/ConfirmDeleteScheduleDialog.d.ts +7 -0
  70. package/dist/components/scheduled/ScheduleDialog.d.ts +13 -0
  71. package/dist/components/scheduled/ScheduledDetailSurface.d.ts +8 -0
  72. package/dist/components/scheduled/ScheduledListSurface.d.ts +7 -0
  73. package/dist/components/scheduled/TimezoneCombobox.d.ts +7 -0
  74. package/dist/components/scheduled/schedule-dialog-model.d.ts +11 -0
  75. package/dist/components/scheduled/schedule-format.d.ts +38 -0
  76. package/dist/embed/agent-grant-refresh.d.ts +7 -7
  77. package/dist/embed/composer-submit.d.ts +7 -0
  78. package/dist/embed/copy.d.ts +93 -15
  79. package/dist/embed/dock-state.d.ts +1 -1
  80. package/dist/embed/locale.d.ts +4 -0
  81. package/dist/embed/slash-commands.d.ts +20 -6
  82. package/dist/embed/tab-id.d.ts +33 -0
  83. package/dist/embed/task-schedule-command.d.ts +32 -0
  84. package/dist/embed/task-schedule-store.d.ts +29 -0
  85. package/dist/embed/theme-preview-params.d.ts +2 -0
  86. package/dist/embed/voice-narration.d.ts +15 -0
  87. package/dist/i18n/messages/en.d.ts +106 -22
  88. package/dist/i18n/messages/pt.d.ts +3 -0
  89. package/dist/i18n/messages/surfaces/aiElements.d.ts +50 -0
  90. package/dist/i18n/messages/surfaces/app.d.ts +15 -0
  91. package/dist/i18n/messages/surfaces/embedMisc.d.ts +45 -8
  92. package/dist/i18n/messages/surfaces/feedback.d.ts +9 -0
  93. package/dist/i18n/messages/surfaces/files.d.ts +37 -0
  94. package/dist/i18n/messages/surfaces/header.d.ts +24 -0
  95. package/dist/i18n/messages/surfaces/login.d.ts +8 -0
  96. package/dist/i18n/messages/surfaces/plan.d.ts +17 -0
  97. package/dist/i18n/messages/surfaces/scheduled.d.ts +253 -0
  98. package/dist/i18n/messages/surfaces/sessions.d.ts +21 -0
  99. package/dist/i18n/messages/surfaces/stream.d.ts +68 -0
  100. package/dist/i18n/messages/surfaces/usage.d.ts +10 -0
  101. package/dist/lib/use-debounced-value.d.ts +2 -0
  102. package/dist/routes/chat.d.ts +3 -2
  103. package/dist/routes/scheduled-detail.d.ts +2 -0
  104. package/dist/routes/scheduled.d.ts +2 -0
  105. package/dist/stream/stream-state-store.d.ts +36 -0
  106. package/dist/types/public.d.ts +45 -10
  107. package/package.json +1 -1
  108. package/dist/components/embed/AgentGrantCard.d.ts +0 -27
  109. package/dist/i18n/messages/surfaces/agentGrant.d.ts +0 -39
@@ -13,27 +13,29 @@ export declare const useAgentGrantStatus: (input: {
13
13
  readonly provider: string;
14
14
  readonly scopeExternalId: string;
15
15
  } | null) => import('@tanstack/react-query').UseQueryResult<NoInfer<AgentGrantStatusView>, Error>;
16
+ /** Injectable timing/randomness so the backoff loop is deterministic in tests. */
17
+ export type GrantRetryOptions = {
18
+ readonly maxRetries?: number;
19
+ readonly budgetMs?: number;
20
+ readonly sleep?: (ms: number) => Promise<void>;
21
+ readonly random?: () => number;
22
+ readonly now?: () => number;
23
+ };
16
24
  /**
17
- * POST a grant create, with the connect self-heal. Two provider rejections
18
- * recover the same way:
19
- *
20
- * - 409 (anti-replay): the cached web JWT already minted a grant (e.g. on a
21
- * prior connect), so the provider refuses it.
22
- * - 429 (session cap): the workspace is at its concurrent-session limit. The
23
- * backend has just best-effort revoked-all the user's leaked sessions to
24
- * free a slot (§ agent-grant.service.ts), so a retry now fits under the cap.
25
- *
26
- * Either way: force-mint a brand-new token (`forceRotateBelongToken` →
27
- * cacheMode:"off") and retry ONCE — the next request carries a JWT the provider
28
- * has never seen, into a now-under-cap workspace. A no-op for non-Auth0 hosts
29
- * (the retry re-sends the same token and fails identically, surfacing exactly
30
- * as before). Standalone so the retry is unit-testable (mirrors
31
- * `deleteSessionRequest`).
25
+ * POST a grant create with two layers of self-heal:
26
+ * 1. Per attempt — the 409/429 anti-replay / session-cap force-mint retry
27
+ * (see `attemptGrantOnce`).
28
+ * 2. Across attempts a bounded backoff retry for TRANSIENT infra failures
29
+ * (502, 503 sandbox_unavailable, network errors see `runGrantIteration` /
30
+ * `isTransientGrantFailure`): up to `maxRetries` retries with full-jitter
31
+ * backoff under a total time budget, so a passing Daytona runner blip or a
32
+ * sandbox write hiccup self-heals instead of surfacing to the user.
33
+ * Injectable timing/randomness so the whole loop is unit-testable.
32
34
  */
33
35
  export declare const createAgentGrantRequest: (api: ApiClient, input: {
34
36
  readonly provider: string;
35
37
  readonly scopeExternalId: string;
36
- }) => Promise<unknown>;
38
+ }, opts?: GrantRetryOptions) => Promise<unknown>;
37
39
  /**
38
40
  * BEL-79 fail-fast beacon: tell the backend a reactive reconnect has FAILED for
39
41
  * good (after `createAgentGrantRequest`'s own forceRotate+retry), so the worker's
@@ -52,10 +54,3 @@ export declare const useCreateAgentGrant: () => import('@tanstack/react-query').
52
54
  readonly provider: string;
53
55
  readonly scopeExternalId: string;
54
56
  }, unknown>;
55
- export declare const useRevokeAgentGrant: () => import('@tanstack/react-query').UseMutationResult<{
56
- status: "revoked";
57
- }, Error, {
58
- readonly grantId: string;
59
- readonly provider: string;
60
- readonly scopeExternalId: string;
61
- }, unknown>;