@belonguniverseai/react-sdk 0.4.1 → 0.4.3

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 (82) hide show
  1. package/dist/api/agent-grants.d.ts +33 -0
  2. package/dist/api/client.d.ts +154 -10
  3. package/dist/api/retry-fetch.d.ts +3 -1
  4. package/dist/api/task-schedules.d.ts +14 -0
  5. package/dist/browser/agent-link.d.ts +18 -0
  6. package/dist/browser/agent-touch.d.ts +105 -0
  7. package/dist/browser/spa-navigate.d.ts +24 -1
  8. package/dist/component/{arc-Du1-HUt0.js → arc-ByLm_58u.js} +2 -2
  9. package/dist/component/{architectureDiagram-3BPJPVTR-NTFoFNN-.js → architectureDiagram-3BPJPVTR-DcYT4v9Q.js} +3 -3
  10. package/dist/component/{blockDiagram-GPEHLZMM-9LBL4EUV.js → blockDiagram-GPEHLZMM-CHk-YSun.js} +4 -4
  11. package/dist/component/{c4Diagram-AAUBKEIU-C1enIoRg.js → c4Diagram-AAUBKEIU-CEV2fwh-.js} +3 -3
  12. package/dist/component/{channel-CNnOkAN_.js → channel-D67v09ii.js} +2 -2
  13. package/dist/component/{chunk-2J33WTMH-X2Iy3mMD.js → chunk-2J33WTMH-Bsl2GBCp.js} +2 -2
  14. package/dist/component/{chunk-4BX2VUAB-BLlcE09Q.js → chunk-4BX2VUAB-BKmdmdRY.js} +2 -2
  15. package/dist/component/{chunk-55IACEB6-23v_td5T.js → chunk-55IACEB6-DnliqOsL.js} +2 -2
  16. package/dist/component/{chunk-727SXJPM-BC2kAa1t.js → chunk-727SXJPM-O0BgSnK_.js} +6 -6
  17. package/dist/component/{chunk-AQP2D5EJ-CsRFVdwF.js → chunk-AQP2D5EJ-CwBA3VVY.js} +4 -4
  18. package/dist/component/{chunk-FMBD7UC4-CWrggihb.js → chunk-FMBD7UC4-CG5DaKp9.js} +2 -2
  19. package/dist/component/{chunk-ND2GUHAM-Bj78QMsn.js → chunk-ND2GUHAM-COsoTCa0.js} +2 -2
  20. package/dist/component/{chunk-QZHKN3VN-CS_FAlLS.js → chunk-QZHKN3VN-9FjIin4_.js} +2 -2
  21. package/dist/component/{classDiagram-4FO5ZUOK-ci84KOU1.js → classDiagram-4FO5ZUOK-DyQO35S9.js} +3 -3
  22. package/dist/component/{classDiagram-v2-Q7XG4LA2-ci84KOU1.js → classDiagram-v2-Q7XG4LA2-DyQO35S9.js} +3 -3
  23. package/dist/component/{cose-bilkent-S5V4N54A-QLIj0pt2.js → cose-bilkent-S5V4N54A-BTN6Bz9E.js} +2 -2
  24. package/dist/component/{dagre-BM42HDAG-D32wP-VH.js → dagre-BM42HDAG-COU3yvtF.js} +2 -2
  25. package/dist/component/{diagram-2AECGRRQ-Dn47q_hT.js → diagram-2AECGRRQ-r4LO_uyu.js} +3 -3
  26. package/dist/component/{diagram-5GNKFQAL-Df7a_ICg.js → diagram-5GNKFQAL-CraSe8h_.js} +4 -4
  27. package/dist/component/{diagram-KO2AKTUF-CNcoKufc.js → diagram-KO2AKTUF-Dh-L6_aX.js} +3 -3
  28. package/dist/component/{diagram-LMA3HP47-Dq8j6XNs.js → diagram-LMA3HP47-Bv8QREaH.js} +3 -3
  29. package/dist/component/{diagram-OG6HWLK6-CZ1WglbZ.js → diagram-OG6HWLK6-Jf-6CDV4.js} +4 -4
  30. package/dist/component/{erDiagram-TEJ5UH35-CDlHARAu.js → erDiagram-TEJ5UH35-CN8X2drH.js} +5 -5
  31. package/dist/component/{flowDiagram-I6XJVG4X-Cw1mKy8X.js → flowDiagram-I6XJVG4X-CloAsK8k.js} +7 -7
  32. package/dist/component/{ganttDiagram-6RSMTGT7-B3FUForj.js → ganttDiagram-6RSMTGT7-DAlRM4jt.js} +3 -3
  33. package/dist/component/{gitGraphDiagram-PVQCEYII-BgHuuQ27.js → gitGraphDiagram-PVQCEYII-BPVdEwuf.js} +4 -4
  34. package/dist/component/{highlighted-body-OFNGDK62-BTv_Fxf3.js → highlighted-body-OFNGDK62-BEd7ynwt.js} +2 -2
  35. package/dist/component/index.js +2 -2
  36. package/dist/component/{infoDiagram-5YYISTIA-DE9i_OcK.js → infoDiagram-5YYISTIA-CyJi6c7l.js} +2 -2
  37. package/dist/component/{ishikawaDiagram-YF4QCWOH-BDe88Hz2.js → ishikawaDiagram-YF4QCWOH-CNKCQHOP.js} +2 -2
  38. package/dist/component/{journeyDiagram-JHISSGLW-D3t45UC1.js → journeyDiagram-JHISSGLW-DFN0WY5F.js} +5 -5
  39. package/dist/component/{kanban-definition-UN3LZRKU-DfFJIuhU.js → kanban-definition-UN3LZRKU-BT6YDPZA.js} +3 -3
  40. package/dist/component/{linear-AXxuun7R.js → linear-BcyQd0z0.js} +2 -2
  41. package/dist/component/{mermaid-GHXKKRXX-D7NVqIBP.js → mermaid-GHXKKRXX-DiPCfS1n.js} +28526 -27802
  42. package/dist/component/{mindmap-definition-RKZ34NQL-cTac4kYU.js → mindmap-definition-RKZ34NQL-BND7KvId.js} +4 -4
  43. package/dist/component/{pieDiagram-4H26LBE5-B1SubLQb.js → pieDiagram-4H26LBE5-CvDdRFnN.js} +4 -4
  44. package/dist/component/{quadrantDiagram-W4KKPZXB-CzyBW8Cr.js → quadrantDiagram-W4KKPZXB-DMHCLEev.js} +3 -3
  45. package/dist/component/{requirementDiagram-4Y6WPE33-DgS33NcX.js → requirementDiagram-4Y6WPE33-BomcVKb4.js} +4 -4
  46. package/dist/component/{sankeyDiagram-5OEKKPKP-Cp4o_akq.js → sankeyDiagram-5OEKKPKP-D4rmtFCn.js} +2 -2
  47. package/dist/component/{sequenceDiagram-3UESZ5HK-2gf91-2b.js → sequenceDiagram-3UESZ5HK-C0iEDbuE.js} +4 -4
  48. package/dist/component/{stateDiagram-AJRCARHV-BByZezJw.js → stateDiagram-AJRCARHV-x0PonbWT.js} +3 -3
  49. package/dist/component/{stateDiagram-v2-BHNVJYJU-B-IObShO.js → stateDiagram-v2-BHNVJYJU-6Lq1LlSV.js} +3 -3
  50. package/dist/component/{timeline-definition-PNZ67QCA-D_2NG1sj.js → timeline-definition-PNZ67QCA-CIx8lwoQ.js} +3 -3
  51. package/dist/component/{vennDiagram-CIIHVFJN-BjrQUaEs.js → vennDiagram-CIIHVFJN-B27Ya-3D.js} +2 -2
  52. package/dist/component/{wardleyDiagram-YWT4CUSO-DYcvfAeQ.js → wardleyDiagram-YWT4CUSO-efmvFwPj.js} +3 -3
  53. package/dist/component/{xychartDiagram-2RQKCTM6-CtLaJFtQ.js → xychartDiagram-2RQKCTM6-DNJmorKa.js} +3 -3
  54. package/dist/components/ai-elements/dock-link.d.ts +27 -0
  55. package/dist/components/ai-elements/link-safety-modal.d.ts +46 -1
  56. package/dist/components/ai-elements/message.d.ts +29 -2
  57. package/dist/components/ai-elements/prompt-input.d.ts +1 -1
  58. package/dist/components/embed/file-preview-kind.d.ts +6 -1
  59. package/dist/components/embed/parse-csv.d.ts +22 -5
  60. package/dist/components/embed/rail-flags.d.ts +21 -12
  61. package/dist/components/embed/use-preview-bytes.d.ts +12 -0
  62. package/dist/components/embed/use-workspace-preview-file.d.ts +34 -0
  63. package/dist/components/scheduled/ScheduledDetailSurface.d.ts +2 -2
  64. package/dist/components/ui/input-group.d.ts +7 -4
  65. package/dist/embed/slash-commands.d.ts +41 -12
  66. package/dist/embed/use-workspace-file-download.d.ts +10 -2
  67. package/dist/embed/voice/line-dispatch.d.ts +51 -16
  68. package/dist/embed/voice/line-run-reader.d.ts +32 -54
  69. package/dist/embed/voice/line-slots.d.ts +6 -2
  70. package/dist/embed/voice-call-lines.d.ts +38 -11
  71. package/dist/i18n/messages/en.d.ts +16 -5
  72. package/dist/i18n/messages/surfaces/aiElements.d.ts +3 -0
  73. package/dist/i18n/messages/surfaces/scheduled.d.ts +9 -0
  74. package/dist/i18n/messages/surfaces/stream.d.ts +31 -16
  75. package/dist/stream/chat-upload.d.ts +29 -3
  76. package/dist/stream/preview-panel-store.d.ts +8 -0
  77. package/dist/stream/run-line-progress.d.ts +62 -0
  78. package/dist/stream/sandbox-output.d.ts +31 -3
  79. package/dist/stream/stream-state-store.d.ts +56 -0
  80. package/dist/stream/tool-error-copy.d.ts +4 -0
  81. package/dist/test/fetch-stubs.d.ts +16 -0
  82. package/package.json +1 -1
@@ -13,6 +13,14 @@ 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
+ /**
17
+ * The backend error type for a rate-limited mint (BEL-178). Its own status +
18
+ * type precisely so the dock can tell "wait, the provider is throttling" apart
19
+ * from "transient, try again now" — the distinction Belong lacked on
20
+ * 2026-07-24, when a rate limit arrived as a 502 and the ladder below turned
21
+ * one user action into 10–15 provider calls.
22
+ */
23
+ export declare const GRANT_RATE_LIMITED = "rate_limited";
16
24
  /** Injectable timing/randomness so the backoff loop is deterministic in tests. */
17
25
  export type GrantRetryOptions = {
18
26
  readonly maxRetries?: number;
@@ -20,7 +28,23 @@ export type GrantRetryOptions = {
20
28
  readonly sleep?: (ms: number) => Promise<void>;
21
29
  readonly random?: () => number;
22
30
  readonly now?: () => number;
31
+ /**
32
+ * Fired once, BEFORE the rate-limit wait, so the surface can say why nothing
33
+ * is happening ("retrying automatically in 60 s") instead of showing a
34
+ * generic failure the user answers by clicking Retry (BEL-178).
35
+ */
36
+ readonly onRateLimited?: (info: {
37
+ readonly retryAfterMs: number;
38
+ }) => void;
23
39
  };
40
+ /**
41
+ * Did this grant failure come from the provider's rate limiter? Callers that
42
+ * own an OUTER retry (the headless auto-connect, the reconnect note) must NOT
43
+ * re-fire on it: `createAgentGrantRequest` has already waited the provider's
44
+ * window and been refused a second time. Another attempt is one more request
45
+ * into a limiter that is, by then, demonstrably saturated.
46
+ */
47
+ export declare const isRateLimitedGrantError: (error: unknown) => boolean;
24
48
  /**
25
49
  * POST a grant create with two layers of self-heal:
26
50
  * 1. Per attempt — the 409/429 anti-replay / session-cap force-mint retry
@@ -30,6 +54,15 @@ export type GrantRetryOptions = {
30
54
  * `isTransientGrantFailure`): up to `maxRetries` retries with full-jitter
31
55
  * backoff under a total time budget, so a passing Daytona runner blip or a
32
56
  * sandbox write hiccup self-heals instead of surfacing to the user.
57
+ * 3. Rate limiting (BEL-178) — a 429 `rate_limited` schedules EXACTLY ONE
58
+ * retry, at the `retryAfterMs` the backend passed through from the
59
+ * provider. It is deliberately outside layer 2's count and time budget:
60
+ * the provider's window (60 s) is four times the ladder's whole budget,
61
+ * so folding it in would either truncate the wait or spend the budget on
62
+ * requests guaranteed to be refused. One retry, at the honest time — and
63
+ * if that one is refused too, the failure surfaces instead of looping,
64
+ * because a second consecutive refusal means the limiter is saturated by
65
+ * something we can't fix by asking again.
33
66
  * Injectable timing/randomness so the whole loop is unit-testable.
34
67
  */
35
68
  export declare const createAgentGrantRequest: (api: ApiClient, input: {
@@ -436,7 +436,7 @@ export declare const createApiClient: (baseUrl: string) => {
436
436
  skill?: string | undefined;
437
437
  mode?: "plan" | "approve" | "balanced" | "bypass" | "execute" | undefined;
438
438
  runtime?: "mastra" | "claude-managed" | "fake" | "claude-agent-sdk" | undefined;
439
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | undefined;
439
+ llmProvider?: "openai" | "anthropic" | "google" | "cerebras" | "gateway" | undefined;
440
440
  llmModel?: string | undefined;
441
441
  timezone?: string | undefined;
442
442
  workspaceExternalId?: string | undefined;
@@ -463,7 +463,7 @@ export declare const createApiClient: (baseUrl: string) => {
463
463
  skill?: string | undefined;
464
464
  mode?: "plan" | "approve" | "balanced" | "bypass" | "execute" | undefined;
465
465
  runtime?: "mastra" | "claude-managed" | "fake" | "claude-agent-sdk" | undefined;
466
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | undefined;
466
+ llmProvider?: "openai" | "anthropic" | "google" | "cerebras" | "gateway" | undefined;
467
467
  llmModel?: string | undefined;
468
468
  timezone?: string | undefined;
469
469
  workspaceExternalId?: string | undefined;
@@ -489,7 +489,7 @@ export declare const createApiClient: (baseUrl: string) => {
489
489
  skill?: string | undefined;
490
490
  mode?: "plan" | "approve" | "balanced" | "bypass" | "execute" | undefined;
491
491
  runtime?: "mastra" | "claude-managed" | "fake" | "claude-agent-sdk" | undefined;
492
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | undefined;
492
+ llmProvider?: "openai" | "anthropic" | "google" | "cerebras" | "gateway" | undefined;
493
493
  llmModel?: string | undefined;
494
494
  timezone?: string | undefined;
495
495
  workspaceExternalId?: string | undefined;
@@ -515,7 +515,7 @@ export declare const createApiClient: (baseUrl: string) => {
515
515
  skill?: string | undefined;
516
516
  mode?: "plan" | "approve" | "balanced" | "bypass" | "execute" | undefined;
517
517
  runtime?: "mastra" | "claude-managed" | "fake" | "claude-agent-sdk" | undefined;
518
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | undefined;
518
+ llmProvider?: "openai" | "anthropic" | "google" | "cerebras" | "gateway" | undefined;
519
519
  llmModel?: string | undefined;
520
520
  timezone?: string | undefined;
521
521
  workspaceExternalId?: string | undefined;
@@ -613,7 +613,7 @@ export declare const createApiClient: (baseUrl: string) => {
613
613
  };
614
614
  };
615
615
  outputFormat: "json";
616
- status: 404 | 403 | 409;
616
+ status: 403 | 404 | 409;
617
617
  } | {
618
618
  input: {
619
619
  param: {
@@ -673,7 +673,7 @@ export declare const createApiClient: (baseUrl: string) => {
673
673
  };
674
674
  };
675
675
  outputFormat: "json";
676
- status: 404 | 403 | 409;
676
+ status: 403 | 404 | 409;
677
677
  };
678
678
  }>;
679
679
  };
@@ -1161,6 +1161,19 @@ export declare const createApiClient: (baseUrl: string) => {
1161
1161
  };
1162
1162
  outputFormat: "json";
1163
1163
  status: 400;
1164
+ } | {
1165
+ input: {};
1166
+ output: {
1167
+ error: {
1168
+ type: string;
1169
+ reason: import('node_modules/@belong/cloud/src/features/files/file.schemas').UploadTypeRefusal;
1170
+ filename: string;
1171
+ declaredMimeType: string;
1172
+ message: string;
1173
+ };
1174
+ };
1175
+ outputFormat: "json";
1176
+ status: 415;
1164
1177
  } | {
1165
1178
  input: {};
1166
1179
  output: {
@@ -1534,6 +1547,7 @@ export declare const createApiClient: (baseUrl: string) => {
1534
1547
  output: {
1535
1548
  url: string;
1536
1549
  expiresAt: string;
1550
+ expiresInSeconds: number;
1537
1551
  };
1538
1552
  outputFormat: "json";
1539
1553
  status: 201;
@@ -2145,6 +2159,70 @@ export declare const createApiClient: (baseUrl: string) => {
2145
2159
  };
2146
2160
  };
2147
2161
  };
2162
+ } & {
2163
+ v1: {
2164
+ terminal: {
2165
+ workspace: {
2166
+ file: {
2167
+ preview: import('hono/client').ClientRequest<string, "/v1/terminal/workspace/file/preview", {
2168
+ $post: {
2169
+ input: {};
2170
+ output: {
2171
+ error: {
2172
+ type: string;
2173
+ };
2174
+ };
2175
+ outputFormat: "json";
2176
+ status: 503;
2177
+ } | {
2178
+ input: {};
2179
+ output: {
2180
+ error: {
2181
+ type: string;
2182
+ };
2183
+ };
2184
+ outputFormat: "json";
2185
+ status: 409;
2186
+ } | {
2187
+ input: {};
2188
+ output: {
2189
+ error: {
2190
+ type: string;
2191
+ };
2192
+ };
2193
+ outputFormat: "json";
2194
+ status: 400;
2195
+ } | {
2196
+ input: {};
2197
+ output: {
2198
+ error: {
2199
+ type: string;
2200
+ };
2201
+ };
2202
+ outputFormat: "json";
2203
+ status: 404;
2204
+ } | {
2205
+ input: {};
2206
+ output: {
2207
+ fileId: import('node_modules/@belong/cloud/src/platform/ids').FileId;
2208
+ };
2209
+ outputFormat: "json";
2210
+ status: 201;
2211
+ } | {
2212
+ input: {};
2213
+ output: {
2214
+ error: {
2215
+ type: string;
2216
+ };
2217
+ };
2218
+ outputFormat: "json";
2219
+ status: 415;
2220
+ };
2221
+ }>;
2222
+ };
2223
+ };
2224
+ };
2225
+ };
2148
2226
  } & {
2149
2227
  v1: {
2150
2228
  browser: {
@@ -3216,9 +3294,11 @@ export declare const createApiClient: (baseUrl: string) => {
3216
3294
  clientScheduleId: string;
3217
3295
  notification?: {
3218
3296
  kind: "completion_email";
3297
+ recipients?: string[] | undefined;
3219
3298
  } | {
3220
3299
  kind: "custom_email";
3221
3300
  templatePath: string;
3301
+ recipients?: string[] | undefined;
3222
3302
  } | undefined;
3223
3303
  title?: string | undefined;
3224
3304
  mode?: "plan" | "approve" | "balanced" | "bypass" | undefined;
@@ -3239,7 +3319,7 @@ export declare const createApiClient: (baseUrl: string) => {
3239
3319
  originatingSessionId?: string | undefined;
3240
3320
  workspaceExternalId?: string | undefined;
3241
3321
  runtime?: "mastra" | "claude-managed" | "fake" | "claude-agent-sdk" | undefined;
3242
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | undefined;
3322
+ llmProvider?: "openai" | "anthropic" | "google" | "cerebras" | "gateway" | undefined;
3243
3323
  llmModel?: string | undefined;
3244
3324
  };
3245
3325
  };
@@ -3261,9 +3341,11 @@ export declare const createApiClient: (baseUrl: string) => {
3261
3341
  clientScheduleId: string;
3262
3342
  notification?: {
3263
3343
  kind: "completion_email";
3344
+ recipients?: string[] | undefined;
3264
3345
  } | {
3265
3346
  kind: "custom_email";
3266
3347
  templatePath: string;
3348
+ recipients?: string[] | undefined;
3267
3349
  } | undefined;
3268
3350
  title?: string | undefined;
3269
3351
  mode?: "plan" | "approve" | "balanced" | "bypass" | undefined;
@@ -3284,7 +3366,7 @@ export declare const createApiClient: (baseUrl: string) => {
3284
3366
  originatingSessionId?: string | undefined;
3285
3367
  workspaceExternalId?: string | undefined;
3286
3368
  runtime?: "mastra" | "claude-managed" | "fake" | "claude-agent-sdk" | undefined;
3287
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | undefined;
3369
+ llmProvider?: "openai" | "anthropic" | "google" | "cerebras" | "gateway" | undefined;
3288
3370
  llmModel?: string | undefined;
3289
3371
  };
3290
3372
  };
@@ -3311,9 +3393,11 @@ export declare const createApiClient: (baseUrl: string) => {
3311
3393
  clientScheduleId: string;
3312
3394
  notification?: {
3313
3395
  kind: "completion_email";
3396
+ recipients?: string[] | undefined;
3314
3397
  } | {
3315
3398
  kind: "custom_email";
3316
3399
  templatePath: string;
3400
+ recipients?: string[] | undefined;
3317
3401
  } | undefined;
3318
3402
  title?: string | undefined;
3319
3403
  mode?: "plan" | "approve" | "balanced" | "bypass" | undefined;
@@ -3334,7 +3418,7 @@ export declare const createApiClient: (baseUrl: string) => {
3334
3418
  originatingSessionId?: string | undefined;
3335
3419
  workspaceExternalId?: string | undefined;
3336
3420
  runtime?: "mastra" | "claude-managed" | "fake" | "claude-agent-sdk" | undefined;
3337
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | undefined;
3421
+ llmProvider?: "openai" | "anthropic" | "google" | "cerebras" | "gateway" | undefined;
3338
3422
  llmModel?: string | undefined;
3339
3423
  };
3340
3424
  };
@@ -3355,9 +3439,11 @@ export declare const createApiClient: (baseUrl: string) => {
3355
3439
  clientScheduleId: string;
3356
3440
  notification?: {
3357
3441
  kind: "completion_email";
3442
+ recipients?: string[] | undefined;
3358
3443
  } | {
3359
3444
  kind: "custom_email";
3360
3445
  templatePath: string;
3446
+ recipients?: string[] | undefined;
3361
3447
  } | undefined;
3362
3448
  title?: string | undefined;
3363
3449
  mode?: "plan" | "approve" | "balanced" | "bypass" | undefined;
@@ -3378,7 +3464,7 @@ export declare const createApiClient: (baseUrl: string) => {
3378
3464
  originatingSessionId?: string | undefined;
3379
3465
  workspaceExternalId?: string | undefined;
3380
3466
  runtime?: "mastra" | "claude-managed" | "fake" | "claude-agent-sdk" | undefined;
3381
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | undefined;
3467
+ llmProvider?: "openai" | "anthropic" | "google" | "cerebras" | "gateway" | undefined;
3382
3468
  llmModel?: string | undefined;
3383
3469
  };
3384
3470
  };
@@ -3445,9 +3531,11 @@ export declare const createApiClient: (baseUrl: string) => {
3445
3531
  message: string;
3446
3532
  notification: {
3447
3533
  kind: "completion_email";
3534
+ recipients?: string[] | undefined;
3448
3535
  } | {
3449
3536
  kind: "custom_email";
3450
3537
  templatePath: string;
3538
+ recipients?: string[] | undefined;
3451
3539
  };
3452
3540
  mode: "plan" | "approve" | "balanced" | "bypass";
3453
3541
  timeExpression: string;
@@ -4571,4 +4659,60 @@ export declare const createApiClient: (baseUrl: string) => {
4571
4659
  };
4572
4660
  };
4573
4661
  };
4662
+ } & {
4663
+ v1: {
4664
+ admin: {
4665
+ tenants: {
4666
+ ":slug": {
4667
+ assets: {
4668
+ publish: import('hono/client').ClientRequest<string, "/v1/admin/tenants/:slug/assets/publish", {
4669
+ $post: {
4670
+ input: {
4671
+ param: {
4672
+ slug: string;
4673
+ };
4674
+ };
4675
+ output: {
4676
+ error: {
4677
+ type: string;
4678
+ issues: readonly {
4679
+ readonly path: string;
4680
+ readonly message: string;
4681
+ }[];
4682
+ };
4683
+ };
4684
+ outputFormat: "json";
4685
+ status: 422;
4686
+ } | {
4687
+ input: {
4688
+ param: {
4689
+ slug: string;
4690
+ };
4691
+ };
4692
+ output: {
4693
+ readonly tenantId: string;
4694
+ readonly assetsRevision: number;
4695
+ };
4696
+ outputFormat: "json";
4697
+ status: 200;
4698
+ } | {
4699
+ input: {
4700
+ param: {
4701
+ slug: string;
4702
+ };
4703
+ };
4704
+ output: {
4705
+ error: {
4706
+ type: string;
4707
+ };
4708
+ };
4709
+ outputFormat: "json";
4710
+ status: 404;
4711
+ };
4712
+ }>;
4713
+ };
4714
+ };
4715
+ };
4716
+ };
4717
+ };
4574
4718
  };
@@ -18,7 +18,9 @@
18
18
  * matters (`clientMessageId` dedupe on message posts, §18/§28 state guards
19
19
  * on approvals/cancels), so a replay is safe.
20
20
  * - `Retry-After` (seconds form) is honored when present, capped like any
21
- * other delay.
21
+ * other delay — and a `Retry-After` LONGER than that cap ENDS the ladder:
22
+ * the server is throttling, not scaling out, so the response goes back to
23
+ * the caller, whose own policy owns the (long) wait.
22
24
  * - Abort-aware: an aborted `init.signal` short-circuits both the request
23
25
  * and any backoff wait — a user cancel must never be held by a retry.
24
26
  *
@@ -27,9 +27,11 @@ export type CreateTaskScheduleRequest = {
27
27
  readonly recurrence?: Recurrence;
28
28
  readonly notification?: {
29
29
  readonly kind: "completion_email";
30
+ readonly recipients?: readonly string[];
30
31
  } | {
31
32
  readonly kind: "custom_email";
32
33
  readonly templatePath: string;
34
+ readonly recipients?: readonly string[];
33
35
  };
34
36
  readonly mode: ChatMode;
35
37
  readonly clientScheduleId: string;
@@ -246,19 +248,25 @@ declare const taskScheduleDetailSchema: z.ZodObject<{
246
248
  updatedAt: z.ZodString;
247
249
  notification: z.ZodDefault<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
248
250
  kind: z.ZodLiteral<"completion_email">;
251
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
249
252
  }, "strip", z.ZodTypeAny, {
250
253
  kind: "completion_email";
254
+ recipients?: string[] | undefined;
251
255
  }, {
252
256
  kind: "completion_email";
257
+ recipients?: string[] | undefined;
253
258
  }>, z.ZodObject<{
254
259
  kind: z.ZodLiteral<"custom_email">;
255
260
  templatePath: z.ZodString;
261
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
256
262
  }, "strip", z.ZodTypeAny, {
257
263
  kind: "custom_email";
258
264
  templatePath: string;
265
+ recipients?: string[] | undefined;
259
266
  }, {
260
267
  kind: "custom_email";
261
268
  templatePath: string;
269
+ recipients?: string[] | undefined;
262
270
  }>]>>;
263
271
  }, "strip", z.ZodTypeAny, {
264
272
  status: "active" | "completed" | "paused" | "deleted";
@@ -274,9 +282,11 @@ declare const taskScheduleDetailSchema: z.ZodObject<{
274
282
  taskScheduleId: string;
275
283
  notification: {
276
284
  kind: "completion_email";
285
+ recipients?: string[] | undefined;
277
286
  } | {
278
287
  kind: "custom_email";
279
288
  templatePath: string;
289
+ recipients?: string[] | undefined;
280
290
  };
281
291
  recurrence: {
282
292
  readonly kind: "none";
@@ -323,9 +333,11 @@ declare const taskScheduleDetailSchema: z.ZodObject<{
323
333
  messagePreview: string;
324
334
  notification?: {
325
335
  kind: "completion_email";
336
+ recipients?: string[] | undefined;
326
337
  } | {
327
338
  kind: "custom_email";
328
339
  templatePath: string;
340
+ recipients?: string[] | undefined;
329
341
  } | undefined;
330
342
  explicitTitle?: string | null | undefined;
331
343
  }>;
@@ -406,9 +418,11 @@ export declare const useTaskSchedule: (taskScheduleId: string | null) => import(
406
418
  taskScheduleId: string;
407
419
  notification: {
408
420
  kind: "completion_email";
421
+ recipients?: string[] | undefined;
409
422
  } | {
410
423
  kind: "custom_email";
411
424
  templatePath: string;
425
+ recipients?: string[] | undefined;
412
426
  };
413
427
  recurrence: {
414
428
  readonly kind: "none";
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Where a link in agent output should go. Two members only: a third "inert"
3
+ * kind for Streamdown's mid-stream sentinel was dropped because the sentinel
4
+ * never reaches `components.a` (proven in the pipeline suite), so the branch
5
+ * would have been permanently dead.
6
+ */
7
+ export type AgentLinkTarget = {
8
+ readonly kind: "in_app";
9
+ readonly href: string;
10
+ } | {
11
+ readonly kind: "external";
12
+ readonly href: string;
13
+ };
14
+ /**
15
+ * Classify `rawHref`. Fails CLOSED: anything not PROVABLY a path on the live
16
+ * page's own origin is `external`, which is byte-for-byte today's behaviour.
17
+ */
18
+ export declare const classifyAgentLink: (rawHref: string | undefined) => AgentLinkTarget;
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Agent-touch highlight (BEL-147, absorbing BEL-108) — the ONE affordance that
3
+ * shows the user which host-page element the agent is currently driving.
4
+ *
5
+ * Why here. `dom-bridge.ts` is the only code that touches the host page's DOM,
6
+ * and its `click` / `type` / `select` ops already resolve a snapshot `ref` to a
7
+ * live `Element`. That resolved element IS "the thing the agent is interacting
8
+ * with" — nothing else in the system knows it. The dock, meanwhile, already
9
+ * renders a `[ui_action] … [ok]` status card for the declared-UI-action family
10
+ * (`ai-sdk-part-renderers.tsx`), so the missing half was never the dock: it was
11
+ * the HOST PAGE. This module is that half.
12
+ *
13
+ * How it paints, and why it cannot move the host's layout.
14
+ * The glow is NOT an overlay node. Appending a positioned box to the host page
15
+ * means tracking the target through scroll / resize / re-render, and it drops a
16
+ * foreign element into someone else's DOM. Instead we set ONE namespaced
17
+ * attribute on the target and let a single document-scoped rule paint it:
18
+ *
19
+ * [data-belong-agent-touch] { animation: … } → box-shadow only
20
+ *
21
+ * `box-shadow` and `animation` are the ONLY properties the rule declares, and
22
+ * neither participates in layout — a shadow paints outside the border box
23
+ * without reserving space, so nothing reflows and nothing shifts. The glow also
24
+ * follows the element for free: through scrolling, through a host re-render
25
+ * that repositions it, through its own CSS transitions. No rAF loop, no
26
+ * `ResizeObserver`, no coordinate math. (Contrast `OnboardingTour.tsx`, which
27
+ * measures + repositions — it has to, because it dims the page around a
28
+ * cut-out. We only outline one element, so we do not.)
29
+ *
30
+ * Removability. Teardown removes the attribute and the one custom property, and
31
+ * drops the `style` attribute entirely when ours was the only inline property
32
+ * on it — so the host element returns to byte-identical markup. The stylesheet
33
+ * is a single idempotent `<style data-belong-agent-touch>` in `document.head`
34
+ * (the same precedent `shadow-mount.ts` uses for its `@property` block) and is
35
+ * inert while no element carries the attribute: its only selector is an
36
+ * attribute we own and the host will never write.
37
+ *
38
+ * Theme. The colour is read from the live dock theme at show time —
39
+ * `activePalette(peekTheme()).primary`, the same token the dock's own spotlight
40
+ * ring uses. A tenant on `SIMETRIK_INDIGO_THEME` glows indigo; the default
41
+ * Belong tenant glows teal. Nothing here is a colour literal. The value rides
42
+ * on the element as `--belong-agent-touch-color` rather than through the host
43
+ * layout-var contract, because the highlight is per-element and ephemeral —
44
+ * publishing a brand colour on `document.documentElement` would be a new,
45
+ * permanent host contract for a transient effect.
46
+ *
47
+ * Degrading. Every reason a target cannot be highlighted is a returned value
48
+ * (§19), never a throw: a selector that matches nothing, a node from another
49
+ * realm, an element already detached. The agent's action runs either way — the
50
+ * caller in `dom-bridge.ts` ignores the outcome entirely.
51
+ *
52
+ * §41 (a reload must not change what the user sees). The glow is deliberately
53
+ * EPHEMERAL and is not part of the replayable ledger. §41 governs what the dock
54
+ * reconstructs from `task_events`; this is not a rendered part, it is live
55
+ * feedback bound to an in-flight browser command that has already run. After a
56
+ * reload the run resumes and its NEXT command re-highlights; a past command's
57
+ * glow is gone, which is honest — that DOM action is finished. Nothing the user
58
+ * can act on is lost, so there is nothing to persist.
59
+ */
60
+ /** The one attribute the stylesheet keys on. Namespaced; the host never sets it. */
61
+ export declare const AGENT_TOUCH_ATTRIBUTE = "data-belong-agent-touch";
62
+ /** Per-element custom property carrying the tenant's brand colour. */
63
+ export declare const AGENT_TOUCH_COLOR_VAR = "--belong-agent-touch-color";
64
+ /**
65
+ * Floor on how long a glow stays up once shown. A `click` settles in a single
66
+ * tick, so releasing the instant the op returns would paint a frame the user
67
+ * cannot perceive. `release()` therefore waits out this window before clearing.
68
+ */
69
+ export declare const MIN_VISIBLE_MS = 700;
70
+ /**
71
+ * Ceiling, enforced with a timer the show path always arms. A caller that
72
+ * throws, or a command whose result never comes back, must not be able to leave
73
+ * a permanent glow burned onto someone else's application.
74
+ */
75
+ export declare const MAX_HOLD_MS = 10000;
76
+ /** Handle returned to the caller that owns the glow's lifetime. */
77
+ type AgentTouchHandle = {
78
+ /**
79
+ * Clear the glow. Idempotent, and safe to call after a newer highlight has
80
+ * already superseded this one. Honours `MIN_VISIBLE_MS`, so an action that
81
+ * completes instantly still reads as a visible pulse.
82
+ */
83
+ readonly release: () => void;
84
+ };
85
+ /**
86
+ * Why a highlight did not appear. Values, not exceptions (§19) — the caller
87
+ * branches on this only in tests; production ignores it and runs the action.
88
+ */
89
+ type AgentTouchSkipReason = "no_target" | "not_an_html_element" | "detached";
90
+ type ShowAgentTouchResult = {
91
+ readonly shown: true;
92
+ readonly handle: AgentTouchHandle;
93
+ } | {
94
+ readonly shown: false;
95
+ readonly reason: AgentTouchSkipReason;
96
+ };
97
+ /**
98
+ * Paint the glow on the element the agent is about to drive.
99
+ *
100
+ * Accepts `null` / `undefined` directly so a selector-addressed caller can hand
101
+ * over `document.querySelector(sel)` without a guard: a selector that matches
102
+ * nothing degrades to `{ shown: false }` and the agent's action proceeds.
103
+ */
104
+ export declare const showAgentTouch: (target: Element | null | undefined) => ShowAgentTouchResult;
105
+ export {};
@@ -37,6 +37,17 @@
37
37
  * Belong API host as its origin; the guard then measured every navigation —
38
38
  * even a same-origin path — against that foreign host and refused it.)
39
39
  */
40
+ /**
41
+ * The live page origin as a string, or null when it is opaque/unparseable —
42
+ * the single origin anchor for classifying a link in agent output (BEL-109).
43
+ *
44
+ * Deliberately NOT `isCrossOriginNav`: that answers "should I refuse a
45
+ * destructive full load?", whose safe default for an opaque origin is `false`
46
+ * ("same origin, don't refuse"). Reusing it to answer "may I skip the safety
47
+ * modal?" would invert the safety property and classify EVERY link as in-app
48
+ * inside a sandboxed document. Returning null here lets the caller fail CLOSED.
49
+ */
50
+ export declare const pageOrigin: () => string | null;
40
51
  type RouterLocationLike = {
41
52
  readonly pathname: string;
42
53
  readonly search?: string;
@@ -64,7 +75,19 @@ export declare const findHostRouter: (doc?: Document) => DataRouterLike | null;
64
75
  * keeping path, query, and hash — so the user stays on THEIR environment and
65
76
  * the navigation can route client-side instead of full-loading to the wrong
66
77
  * domain. Anything genuinely external is returned unchanged (a real full load
67
- * to the real site). Idempotent: a result is always same-origin or untouched.
78
+ * to the real site).
79
+ *
80
+ * INVARIANT, now ENFORCED rather than merely asserted: the result is either on
81
+ * the LIVE page origin or the input untouched — never a third origin. That used
82
+ * to be violable. `//evil.test/x` is a legal `pathname`, and it is a
83
+ * SCHEME-RELATIVE reference when re-parsed, so rebasing it via
84
+ * `new URL(pathname, here.origin)` produced `https://evil.test/x` — a host in
85
+ * NEITHER input. Two guards now: refuse to rebase a `//`-prefixed pathname (an
86
+ * env-variant rebase has no legitimate use for that shape, and returning it
87
+ * untouched keeps the caller's cross-origin check measuring the host the agent
88
+ * actually named), then re-assert the origin on the way out so the claim is
89
+ * proved instead of reasoned about. Callers still re-check afterwards — this is
90
+ * a security boundary, and that redundancy is deliberate, not dead code.
68
91
  */
69
92
  export declare const resolveNavUrl: (rawUrl: string) => string;
70
93
  /**
@@ -1,4 +1,4 @@
1
- import { O as ln, P as an, Q as g, S as on, T as Z, V as w, W as _, X as sn, Y as rn, Z as z, $ as t, a0 as V, a1 as un, a2 as tn, a3 as fn } from "./mermaid-GHXKKRXX-D7NVqIBP.js";
1
+ import { O as ln, P as an, Q as g, S as on, T as Z, V as w, W as _, X as sn, Y as rn, Z as z, $ as t, a0 as V, a1 as un, a2 as tn, a3 as fn } from "./mermaid-GHXKKRXX-DiPCfS1n.js";
2
2
  globalThis.process = globalThis.process || { env: {} };
3
3
  globalThis.global = globalThis.global || globalThis;
4
4
  function cn(l) {
@@ -83,4 +83,4 @@ function xn() {
83
83
  export {
84
84
  xn as d
85
85
  };
86
- //# sourceMappingURL=arc-Du1-HUt0.js.map
86
+ //# sourceMappingURL=arc-ByLm_58u.js.map
@@ -1,5 +1,5 @@
1
- import { b7 as $e, _ as dt, N as ke, ai as Ze, l as Re, b as qe, a as Qe, q as Je, t as Ke, g as je, s as _e, B as tr, I as er, G as rr, K as ir, c as ye, aR as Ee, b8 as ve, i as ar, d as nr, y as or, b9 as sr, ba as hr } from "./mermaid-GHXKKRXX-D7NVqIBP.js";
2
- import { p as lr } from "./chunk-4BX2VUAB-BLlcE09Q.js";
1
+ import { b7 as $e, _ as dt, N as ke, ai as Ze, l as Re, b as qe, a as Qe, q as Je, t as Ke, g as je, s as _e, B as tr, I as er, G as rr, K as ir, c as ye, aR as Ee, b8 as ve, i as ar, d as nr, y as or, b9 as sr, ba as hr } from "./mermaid-GHXKKRXX-DiPCfS1n.js";
2
+ import { p as lr } from "./chunk-4BX2VUAB-BKmdmdRY.js";
3
3
  import { p as fr } from "./wardley-L42UT6IY-HA1eSIS_.js";
4
4
  import { c as Se } from "./cytoscape.esm-C31R6JOv.js";
5
5
  globalThis.process = globalThis.process || { env: {} };
@@ -4694,4 +4694,4 @@ var Pr = /* @__PURE__ */ dt(async (C, G, w, U) => {
4694
4694
  export {
4695
4695
  Wr as diagram
4696
4696
  };
4697
- //# sourceMappingURL=architectureDiagram-3BPJPVTR-NTFoFNN-.js.map
4697
+ //# sourceMappingURL=architectureDiagram-3BPJPVTR-DcYT4v9Q.js.map
@@ -1,7 +1,7 @@
1
- import { g as pe } from "./chunk-FMBD7UC4-CWrggihb.js";
2
- import { aq as fe, ar as Ut, as as xe, at as ye, au as be, av as we, aw as me, ax as Se, ay as Le, az as ke, aA as ve, aB as Ee, aC as _e, aD as Te, aE as De, aF as Be, aG as Ne, aH as Ie, aI as Ce, aJ as Oe, aK as Re, aL as Ae, aM as ze, aN as Me, aO as Pe, _ as d, G as at, d as D, e as Fe, l as k, B as We, D as Ye, aP as He, ac as Ke, ad as Ue, c as A, a9 as Xe, aQ as P, aR as vt, aS as $, aT as Ve, u as tt, k as je, aU as Ge, i as Ot, aV as Rt, aW as Ze } from "./mermaid-GHXKKRXX-D7NVqIBP.js";
1
+ import { g as pe } from "./chunk-FMBD7UC4-CG5DaKp9.js";
2
+ import { aq as fe, ar as Ut, as as xe, at as ye, au as be, av as we, aw as me, ax as Se, ay as Le, az as ke, aA as ve, aB as Ee, aC as _e, aD as Te, aE as De, aF as Be, aG as Ne, aH as Ie, aI as Ce, aJ as Oe, aK as Re, aL as Ae, aM as ze, aN as Me, aO as Pe, _ as d, G as at, d as D, e as Fe, l as k, B as We, D as Ye, aP as He, ac as Ke, ad as Ue, c as A, a9 as Xe, aQ as P, aR as vt, aS as $, aT as Ve, u as tt, k as je, aU as Ge, i as Ot, aV as Rt, aW as Ze } from "./mermaid-GHXKKRXX-DiPCfS1n.js";
3
3
  import { G as qe } from "./graph-BZLHvygk.js";
4
- import { c as Je } from "./channel-CNnOkAN_.js";
4
+ import { c as Je } from "./channel-D67v09ii.js";
5
5
  globalThis.process = globalThis.process || { env: {} };
6
6
  globalThis.global = globalThis.global || globalThis;
7
7
  function Qe(e) {
@@ -2418,4 +2418,4 @@ var Ta = /* @__PURE__ */ d(function(e, t) {
2418
2418
  export {
2419
2419
  Ra as diagram
2420
2420
  };
2421
- //# sourceMappingURL=blockDiagram-GPEHLZMM-9LBL4EUV.js.map
2421
+ //# sourceMappingURL=blockDiagram-GPEHLZMM-CHk-YSun.js.map