@belonguniverseai/react-sdk 0.6.3 → 0.6.5

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 (87) hide show
  1. package/dist/api/agent-grants.d.ts +17 -8
  2. package/dist/api/client.d.ts +220 -3
  3. package/dist/api/pre-prompts.d.ts +80 -0
  4. package/dist/api/queries.d.ts +2 -0
  5. package/dist/api/query-keys.d.ts +4 -0
  6. package/dist/api/skills.d.ts +8 -3
  7. package/dist/component/{abnfDiagram-N423BO3Z-C1O9dfJJ.js → abnfDiagram-N423BO3Z-DXtYRs-k.js} +4 -4
  8. package/dist/component/{arc-Cpnt_LFj.js → arc-k2puh3QC.js} +2 -2
  9. package/dist/component/{architectureDiagram-T3A2C74G-iakL6yUj.js → architectureDiagram-T3A2C74G-DAmYa1QR.js} +3 -3
  10. package/dist/component/{blockDiagram-VBNYF7ZC-D7t0jIvW.js → blockDiagram-VBNYF7ZC-zXWS_7FA.js} +4 -4
  11. package/dist/component/{c4Diagram-5PPSVZJV-CRX1o0CJ.js → c4Diagram-5PPSVZJV-DrhhcFC2.js} +3 -3
  12. package/dist/component/{channel-DnM50Ep0.js → channel-BradwEzR.js} +2 -2
  13. package/dist/component/{chunk-2GRJ4B5K-ChTMjM-v.js → chunk-2GRJ4B5K-CFlVgxT_.js} +2 -2
  14. package/dist/component/{chunk-2Q5K7J3B-F2Rpvtwm.js → chunk-2Q5K7J3B-BWVz-RZT.js} +2 -2
  15. package/dist/component/{chunk-5RXB4S5H-B1WLx-ex.js → chunk-5RXB4S5H-DzGJLYck.js} +5 -5
  16. package/dist/component/{chunk-5VM5RSS4-D35VMAuN.js → chunk-5VM5RSS4-BiYvFRMB.js} +2 -2
  17. package/dist/component/{chunk-6Q2QTUOP-DGVp_gyk.js → chunk-6Q2QTUOP-DKkDhyrb.js} +2 -2
  18. package/dist/component/{chunk-GF5L2VYU-CZOQEv_q.js → chunk-GF5L2VYU-DQDnIvXz.js} +6 -6
  19. package/dist/component/{chunk-JWPE2WC7-BbwyDj9g.js → chunk-JWPE2WC7-xUoyVsyD.js} +2 -2
  20. package/dist/component/{chunk-KBJHAD2P-B9qL0VLM.js → chunk-KBJHAD2P-CeI2oVSe.js} +2 -2
  21. package/dist/component/{chunk-RYQCIY6F-5eaMbXXL.js → chunk-RYQCIY6F-DC_eKBFo.js} +2 -2
  22. package/dist/component/{chunk-XXDRQBXY-XJadTIK5.js → chunk-XXDRQBXY-Chbw9HR0.js} +2 -2
  23. package/dist/component/{classDiagram-JCYQIIEL-DVaEk7uT.js → classDiagram-JCYQIIEL-Cm5ICyOE.js} +3 -3
  24. package/dist/component/{classDiagram-v2-OCEON4UE-DVaEk7uT.js → classDiagram-v2-OCEON4UE-Cm5ICyOE.js} +3 -3
  25. package/dist/component/{cose-bilkent-JH36ORCC-DZA30AqI.js → cose-bilkent-JH36ORCC-DaXtU49r.js} +2 -2
  26. package/dist/component/{cynefinDiagram-MW4NZA55-CutZScTQ.js → cynefinDiagram-MW4NZA55-QC8TFvBp.js} +3 -3
  27. package/dist/component/{dagre-VZM6K2ZE-CelPLP8N.js → dagre-VZM6K2ZE-C2OOSYgW.js} +3 -3
  28. package/dist/component/{diagram-7IWD3JNH-Cr5piwKc.js → diagram-7IWD3JNH-Cax2R3mQ.js} +4 -4
  29. package/dist/component/{diagram-B4RE2ZJO-DgLNdZkh.js → diagram-B4RE2ZJO-Cx3_tBen.js} +3 -3
  30. package/dist/component/{diagram-LBJQPF4R-DxeIMTjN.js → diagram-LBJQPF4R-Cv3oJQdh.js} +3 -3
  31. package/dist/component/{diagram-Q27KOJAE-WACyk_gr.js → diagram-Q27KOJAE-C41GeN84.js} +4 -4
  32. package/dist/component/{diagram-UB23O5K3-DbhVYU5T.js → diagram-UB23O5K3-CNmh6MHJ.js} +3 -3
  33. package/dist/component/{ebnfDiagram-BXEA7PRR-DoGrYW10.js → ebnfDiagram-BXEA7PRR-BLWo9Cro.js} +4 -4
  34. package/dist/component/{erDiagram-JOGREHBK-BgewA6fH.js → erDiagram-JOGREHBK-zOwSdp7J.js} +5 -5
  35. package/dist/component/{flowDiagram-UKHOOZJN-1YmYJYcE.js → flowDiagram-UKHOOZJN-DDHQ3RkH.js} +7 -7
  36. package/dist/component/{ganttDiagram-PKOTCBZU-BFAEPYkH.js → ganttDiagram-PKOTCBZU-CXfR2efe.js} +3 -3
  37. package/dist/component/{gitGraphDiagram-DS77QQ5N-CSiPuE-l.js → gitGraphDiagram-DS77QQ5N-CxtaDoUb.js} +4 -4
  38. package/dist/component/{highlighted-body-OFNGDK62-CSJNGt18.js → highlighted-body-OFNGDK62-C4THAl8M.js} +2 -2
  39. package/dist/component/index.js +2 -2
  40. package/dist/component/{infoDiagram-6WML65LV-CoMVfONe.js → infoDiagram-6WML65LV-CJwjv6J3.js} +2 -2
  41. package/dist/component/{ishikawaDiagram-WSZJBQD7-B2YEkQ4b.js → ishikawaDiagram-WSZJBQD7-CtQFMhUI.js} +2 -2
  42. package/dist/component/{journeyDiagram-NVQOT4AX-B7b5ZwlF.js → journeyDiagram-NVQOT4AX-D0YCMj2N.js} +5 -5
  43. package/dist/component/{kanban-definition-27J2QSJJ-C9GPAsBR.js → kanban-definition-27J2QSJJ-DtT1k--r.js} +3 -3
  44. package/dist/component/{linear-Bi0C-9d1.js → linear-98AY9cNO.js} +2 -2
  45. package/dist/component/{mermaid-GHXKKRXX-BaBCeViM.js → mermaid-GHXKKRXX-CpyPA4Tq.js} +29693 -28685
  46. package/dist/component/{mindmap-definition-FAOFIHXS-tHIAo7Ms.js → mindmap-definition-FAOFIHXS-Cb4ZDYiB.js} +4 -4
  47. package/dist/component/{pegDiagram-VL7TDLO6-Db_7lLRV.js → pegDiagram-VL7TDLO6-3n9pdqFl.js} +4 -4
  48. package/dist/component/{pieDiagram-7S7Q4E2Y-C4fs4XCK.js → pieDiagram-7S7Q4E2Y-BdX_Nmhs.js} +4 -4
  49. package/dist/component/{quadrantDiagram-CIZ2JOQS-Bw7vXO0q.js → quadrantDiagram-CIZ2JOQS-B23YDXjA.js} +3 -3
  50. package/dist/component/{railroadDiagram-AXF67PYL-kY0VoZEg.js → railroadDiagram-AXF67PYL-D-KttLwV.js} +4 -4
  51. package/dist/component/{requirementDiagram-LRYGKXZP-BkNtSZm5.js → requirementDiagram-LRYGKXZP-mg4T4J5m.js} +4 -4
  52. package/dist/component/{sankeyDiagram-W5VNT64P-BK_C1BYE.js → sankeyDiagram-W5VNT64P-DSJ1i2V9.js} +2 -2
  53. package/dist/component/{sequenceDiagram-SI44F4Z6-CEmgVZaE.js → sequenceDiagram-SI44F4Z6-5ASel8SG.js} +4 -4
  54. package/dist/component/{sizeCapture-X5ZJPWSS-J5ZNXT4c.js → sizeCapture-X5ZJPWSS-DhE5AZVC.js} +2 -2
  55. package/dist/component/{stateDiagram-OKZ733FA-DrwrNuNs.js → stateDiagram-OKZ733FA-BDvRPjM1.js} +3 -3
  56. package/dist/component/{stateDiagram-v2-UEYNNEHI-DHD85VTD.js → stateDiagram-v2-UEYNNEHI-gO2Xq1pR.js} +3 -3
  57. package/dist/component/{swimlanes-SLNWSIFB-FOK5tys1.js → swimlanes-SLNWSIFB-BppNVeHn.js} +4 -4
  58. package/dist/component/{swimlanesDiagram-ULZ7WXOC-edTvZTge.js → swimlanesDiagram-ULZ7WXOC-DW8klrQx.js} +3 -3
  59. package/dist/component/{timeline-definition-Z64GVDOM-Cc4fTsjY.js → timeline-definition-Z64GVDOM-7bTdkHDS.js} +3 -3
  60. package/dist/component/{vennDiagram-T6HMQDX7-DYZl8srI.js → vennDiagram-T6HMQDX7-BZGZh-tM.js} +2 -2
  61. package/dist/component/{wardleyDiagram-T6FBY63Y-BEvv3PjS.js → wardleyDiagram-T6FBY63Y-Dq_yq7ay.js} +3 -3
  62. package/dist/component/{xychartDiagram-ELKLHX3M-79AgTtk-.js → xychartDiagram-ELKLHX3M-C5Pwwmdi.js} +3 -3
  63. package/dist/components/embed/EmbedComposer.d.ts +16 -1
  64. package/dist/components/embed/EmbedRail.d.ts +5 -1
  65. package/dist/components/embed/MentionInput.d.ts +7 -0
  66. package/dist/components/embed/MobileNavBar.d.ts +5 -2
  67. package/dist/components/embed/SavePromptDialog.d.ts +11 -0
  68. package/dist/components/embed/save-prompt-name.d.ts +39 -0
  69. package/dist/components/embed/use-preview-bytes.d.ts +5 -0
  70. package/dist/components/prompts/ConfirmDeletePromptDialog.d.ts +13 -0
  71. package/dist/components/prompts/EditPromptDialog.d.ts +14 -0
  72. package/dist/components/prompts/PromptsListSurface.d.ts +21 -0
  73. package/dist/embed/copy.d.ts +9 -0
  74. package/dist/embed/dock-state.d.ts +1 -1
  75. package/dist/embed/legal-disclaimer.d.ts +6 -0
  76. package/dist/embed/prompt-slots.d.ts +26 -0
  77. package/dist/embed/slash-commands.d.ts +45 -0
  78. package/dist/embed/voice-unlock.d.ts +36 -0
  79. package/dist/i18n/messages/en.d.ts +41 -0
  80. package/dist/i18n/messages/surfaces/embedMisc.d.ts +3 -0
  81. package/dist/i18n/messages/surfaces/header.d.ts +3 -0
  82. package/dist/i18n/messages/surfaces/prompts.d.ts +158 -0
  83. package/dist/routes/prompts.d.ts +2 -0
  84. package/dist/stream/belong-chat-transport.d.ts +1 -0
  85. package/dist/stream/belong-data-parts.d.ts +2 -0
  86. package/dist/stream/queued-message-outbox.d.ts +25 -0
  87. package/package.json +1 -1
@@ -9,6 +9,15 @@ export type AgentGrantStatusView = {
9
9
  readonly grantedAt: string | null;
10
10
  readonly expiresAt: string | null;
11
11
  };
12
+ export type AgentGrantSourceTrigger = "auto_connect" | "preemptive_refresh" | "reactive_reconnect";
13
+ export type CreateAgentGrantRequestInput = {
14
+ readonly provider: string;
15
+ readonly scopeExternalId: string;
16
+ /** Optional while an older dock or restored stream part is in use. */
17
+ readonly sourceTrigger?: AgentGrantSourceTrigger;
18
+ /** The `reconnect_cli` tool-call id for a reactive reconnect. */
19
+ readonly reconnectId?: string;
20
+ };
12
21
  export declare const useAgentGrantStatus: (input: {
13
22
  readonly provider: string;
14
23
  readonly scopeExternalId: string;
@@ -51,6 +60,12 @@ export declare const isRateLimitedGrantError: (error: unknown) => boolean;
51
60
  * ladders must stop instead of repeating the whole mint + revoke pipeline.
52
61
  */
53
62
  export declare const isSessionLimitedGrantError: (error: unknown) => boolean;
63
+ /**
64
+ * True when a grant failed after the provider session was already minted.
65
+ * Outer auto-connect retries must stop here as well as the inner retry loop,
66
+ * otherwise one React retry chain can still create multiple orphan sessions.
67
+ */
68
+ export declare const isPostMintGrantError: (error: unknown) => boolean;
54
69
  /**
55
70
  * POST a grant create with two layers of self-heal:
56
71
  * 1. Per attempt — the 409/429 anti-replay / session-cap force-mint retry
@@ -71,10 +86,7 @@ export declare const isSessionLimitedGrantError: (error: unknown) => boolean;
71
86
  * something we can't fix by asking again.
72
87
  * Injectable timing/randomness so the whole loop is unit-testable.
73
88
  */
74
- export declare const createAgentGrantRequest: (api: ApiClient, input: {
75
- readonly provider: string;
76
- readonly scopeExternalId: string;
77
- }, opts?: GrantRetryOptions) => Promise<unknown>;
89
+ export declare const createAgentGrantRequest: (api: ApiClient, input: CreateAgentGrantRequestInput, opts?: GrantRetryOptions) => Promise<unknown>;
78
90
  /**
79
91
  * BEL-79 fail-fast beacon: tell the backend a reactive reconnect has FAILED for
80
92
  * good (after `createAgentGrantRequest`'s own forceRotate+retry), so the worker's
@@ -89,7 +101,4 @@ export declare const signalReconnectFailedRequest: (api: ApiClient, input: {
89
101
  readonly scopeExternalId: string;
90
102
  readonly reconnectId: string;
91
103
  }) => Promise<void>;
92
- export declare const useCreateAgentGrant: () => import('@tanstack/react-query').UseMutationResult<unknown, Error, {
93
- readonly provider: string;
94
- readonly scopeExternalId: string;
95
- }, unknown>;
104
+ export declare const useCreateAgentGrant: () => import('@tanstack/react-query').UseMutationResult<unknown, Error, CreateAgentGrantRequestInput, unknown>;
@@ -617,7 +617,7 @@ export declare const createApiClient: (baseUrl: string) => {
617
617
  };
618
618
  };
619
619
  outputFormat: "json";
620
- status: 403 | 404 | 409;
620
+ status: 404 | 403 | 409;
621
621
  } | {
622
622
  input: {
623
623
  param: {
@@ -677,7 +677,7 @@ export declare const createApiClient: (baseUrl: string) => {
677
677
  };
678
678
  };
679
679
  outputFormat: "json";
680
- status: 403 | 404 | 409;
680
+ status: 404 | 403 | 409;
681
681
  };
682
682
  }>;
683
683
  };
@@ -866,6 +866,8 @@ export declare const createApiClient: (baseUrl: string) => {
866
866
  readonly totalInputTokens: number;
867
867
  readonly totalOutputTokens: number;
868
868
  readonly totalTokens: number;
869
+ readonly totalCacheReadInputTokens: number;
870
+ readonly totalCacheWriteInputTokens: number;
869
871
  readonly turns: number;
870
872
  readonly runningMs: number;
871
873
  readonly toolCalls: number;
@@ -908,6 +910,8 @@ export declare const createApiClient: (baseUrl: string) => {
908
910
  readonly totalInputTokens: number;
909
911
  readonly totalOutputTokens: number;
910
912
  readonly totalTokens: number;
913
+ readonly totalCacheReadInputTokens: number;
914
+ readonly totalCacheWriteInputTokens: number;
911
915
  readonly turns: number;
912
916
  readonly runningMs: number;
913
917
  readonly toolCalls: number;
@@ -1204,7 +1208,7 @@ export declare const createApiClient: (baseUrl: string) => {
1204
1208
  output: {
1205
1209
  error: {
1206
1210
  type: string;
1207
- reason: import('node_modules/@belong/cloud/src/features/files/file.schemas').UploadTypeRefusal;
1211
+ reason: import('../../../../apps/belong-cloud/src/features/files/file.schemas').UploadTypeRefusal;
1208
1212
  filename: string;
1209
1213
  declaredMimeType: string;
1210
1214
  message: string;
@@ -3200,6 +3204,8 @@ export declare const createApiClient: (baseUrl: string) => {
3200
3204
  json: {
3201
3205
  provider: string;
3202
3206
  scopeExternalId: string;
3207
+ sourceTrigger?: "reactive_reconnect" | "auto_connect" | "preemptive_refresh" | undefined;
3208
+ reconnectId?: string | undefined;
3203
3209
  };
3204
3210
  };
3205
3211
  output: {
@@ -3213,6 +3219,8 @@ export declare const createApiClient: (baseUrl: string) => {
3213
3219
  json: {
3214
3220
  provider: string;
3215
3221
  scopeExternalId: string;
3222
+ sourceTrigger?: "reactive_reconnect" | "auto_connect" | "preemptive_refresh" | undefined;
3223
+ reconnectId?: string | undefined;
3216
3224
  };
3217
3225
  };
3218
3226
  output: {
@@ -3227,6 +3235,8 @@ export declare const createApiClient: (baseUrl: string) => {
3227
3235
  json: {
3228
3236
  provider: string;
3229
3237
  scopeExternalId: string;
3238
+ sourceTrigger?: "reactive_reconnect" | "auto_connect" | "preemptive_refresh" | undefined;
3239
+ reconnectId?: string | undefined;
3230
3240
  };
3231
3241
  };
3232
3242
  output: {
@@ -3241,6 +3251,8 @@ export declare const createApiClient: (baseUrl: string) => {
3241
3251
  json: {
3242
3252
  provider: string;
3243
3253
  scopeExternalId: string;
3254
+ sourceTrigger?: "reactive_reconnect" | "auto_connect" | "preemptive_refresh" | undefined;
3255
+ reconnectId?: string | undefined;
3244
3256
  };
3245
3257
  };
3246
3258
  output: {
@@ -3255,6 +3267,8 @@ export declare const createApiClient: (baseUrl: string) => {
3255
3267
  json: {
3256
3268
  provider: string;
3257
3269
  scopeExternalId: string;
3270
+ sourceTrigger?: "reactive_reconnect" | "auto_connect" | "preemptive_refresh" | undefined;
3271
+ reconnectId?: string | undefined;
3258
3272
  };
3259
3273
  };
3260
3274
  output: {
@@ -3269,6 +3283,8 @@ export declare const createApiClient: (baseUrl: string) => {
3269
3283
  json: {
3270
3284
  provider: string;
3271
3285
  scopeExternalId: string;
3286
+ sourceTrigger?: "reactive_reconnect" | "auto_connect" | "preemptive_refresh" | undefined;
3287
+ reconnectId?: string | undefined;
3272
3288
  };
3273
3289
  };
3274
3290
  output: {
@@ -3284,6 +3300,8 @@ export declare const createApiClient: (baseUrl: string) => {
3284
3300
  json: {
3285
3301
  provider: string;
3286
3302
  scopeExternalId: string;
3303
+ sourceTrigger?: "reactive_reconnect" | "auto_connect" | "preemptive_refresh" | undefined;
3304
+ reconnectId?: string | undefined;
3287
3305
  };
3288
3306
  };
3289
3307
  output: {
@@ -3299,6 +3317,8 @@ export declare const createApiClient: (baseUrl: string) => {
3299
3317
  json: {
3300
3318
  provider: string;
3301
3319
  scopeExternalId: string;
3320
+ sourceTrigger?: "reactive_reconnect" | "auto_connect" | "preemptive_refresh" | undefined;
3321
+ reconnectId?: string | undefined;
3302
3322
  };
3303
3323
  };
3304
3324
  output: {
@@ -4273,6 +4293,203 @@ export declare const createApiClient: (baseUrl: string) => {
4273
4293
  };
4274
4294
  };
4275
4295
  };
4296
+ } & {
4297
+ v1: {
4298
+ "pre-prompts": import('hono/client').ClientRequest<string, "/v1/pre-prompts", {
4299
+ $get: {
4300
+ input: {
4301
+ query: {
4302
+ workspaceExternalId?: string | string[];
4303
+ limit?: string | string[];
4304
+ };
4305
+ };
4306
+ output: {
4307
+ prePrompts: {
4308
+ prePromptId: import('node_modules/@belong/cloud/src/platform/ids').PrePromptId;
4309
+ name: string;
4310
+ description: string;
4311
+ body: string;
4312
+ createdAt: string;
4313
+ }[];
4314
+ };
4315
+ outputFormat: "json";
4316
+ status: 200;
4317
+ };
4318
+ $post: {
4319
+ input: {
4320
+ json: {
4321
+ name: string;
4322
+ body: string;
4323
+ clientPrePromptId: string;
4324
+ description?: string | undefined;
4325
+ workspaceExternalId?: string | undefined;
4326
+ };
4327
+ };
4328
+ output: {
4329
+ error: {
4330
+ type: string;
4331
+ requiredScope: string;
4332
+ };
4333
+ };
4334
+ outputFormat: "json";
4335
+ status: 403;
4336
+ } | {
4337
+ input: {
4338
+ json: {
4339
+ name: string;
4340
+ body: string;
4341
+ clientPrePromptId: string;
4342
+ description?: string | undefined;
4343
+ workspaceExternalId?: string | undefined;
4344
+ };
4345
+ };
4346
+ output: {
4347
+ prePromptId: import('node_modules/@belong/cloud/src/platform/ids').PrePromptId;
4348
+ name: string;
4349
+ };
4350
+ outputFormat: "json";
4351
+ status: 200 | 201;
4352
+ } | {
4353
+ input: {
4354
+ json: {
4355
+ name: string;
4356
+ body: string;
4357
+ clientPrePromptId: string;
4358
+ description?: string | undefined;
4359
+ workspaceExternalId?: string | undefined;
4360
+ };
4361
+ };
4362
+ output: {
4363
+ error: {
4364
+ type: string;
4365
+ name: string;
4366
+ };
4367
+ };
4368
+ outputFormat: "json";
4369
+ status: 409;
4370
+ };
4371
+ }>;
4372
+ };
4373
+ } & {
4374
+ v1: {
4375
+ "pre-prompts": {
4376
+ ":prePromptId": import('hono/client').ClientRequest<string, "/v1/pre-prompts/:prePromptId", {
4377
+ $patch: {
4378
+ input: {
4379
+ param: {
4380
+ prePromptId: string;
4381
+ };
4382
+ } & {
4383
+ json: {
4384
+ name?: string | undefined;
4385
+ body?: string | undefined;
4386
+ description?: string | undefined;
4387
+ };
4388
+ };
4389
+ output: {
4390
+ error: {
4391
+ type: string;
4392
+ requiredScope: string;
4393
+ };
4394
+ };
4395
+ outputFormat: "json";
4396
+ status: 403;
4397
+ } | {
4398
+ input: {
4399
+ param: {
4400
+ prePromptId: string;
4401
+ };
4402
+ } & {
4403
+ json: {
4404
+ name?: string | undefined;
4405
+ body?: string | undefined;
4406
+ description?: string | undefined;
4407
+ };
4408
+ };
4409
+ output: {
4410
+ prePromptId: import('node_modules/@belong/cloud/src/platform/ids').PrePromptId;
4411
+ };
4412
+ outputFormat: "json";
4413
+ status: 200;
4414
+ } | {
4415
+ input: {
4416
+ param: {
4417
+ prePromptId: string;
4418
+ };
4419
+ } & {
4420
+ json: {
4421
+ name?: string | undefined;
4422
+ body?: string | undefined;
4423
+ description?: string | undefined;
4424
+ };
4425
+ };
4426
+ output: {
4427
+ error: {
4428
+ type: string;
4429
+ };
4430
+ };
4431
+ outputFormat: "json";
4432
+ status: 404;
4433
+ } | {
4434
+ input: {
4435
+ param: {
4436
+ prePromptId: string;
4437
+ };
4438
+ } & {
4439
+ json: {
4440
+ name?: string | undefined;
4441
+ body?: string | undefined;
4442
+ description?: string | undefined;
4443
+ };
4444
+ };
4445
+ output: {
4446
+ error: {
4447
+ type: string;
4448
+ };
4449
+ };
4450
+ outputFormat: "json";
4451
+ status: 409;
4452
+ };
4453
+ $delete: {
4454
+ input: {
4455
+ param: {
4456
+ prePromptId: string;
4457
+ };
4458
+ };
4459
+ output: null;
4460
+ outputFormat: "body";
4461
+ status: 204;
4462
+ } | {
4463
+ input: {
4464
+ param: {
4465
+ prePromptId: string;
4466
+ };
4467
+ };
4468
+ output: {
4469
+ error: {
4470
+ type: string;
4471
+ requiredScope: string;
4472
+ };
4473
+ };
4474
+ outputFormat: "json";
4475
+ status: 403;
4476
+ } | {
4477
+ input: {
4478
+ param: {
4479
+ prePromptId: string;
4480
+ };
4481
+ };
4482
+ output: {
4483
+ error: {
4484
+ type: string;
4485
+ };
4486
+ };
4487
+ outputFormat: "json";
4488
+ status: 404;
4489
+ };
4490
+ }>;
4491
+ };
4492
+ };
4276
4493
  } & {
4277
4494
  v1: {
4278
4495
  admin: {
@@ -0,0 +1,80 @@
1
+ import { ApiClient } from './client.ts';
2
+ /** One saved prompt as the `/` menu and the save dialog see it. */
3
+ export type PrePromptSummary = {
4
+ readonly prePromptId: string;
5
+ readonly name: string;
6
+ readonly description: string;
7
+ /** The FULL saved text — the menu splices this straight into the composer. */
8
+ readonly body: string;
9
+ };
10
+ export declare const listPrePromptsRequest: (api: ApiClient, query?: {
11
+ readonly workspaceExternalId?: string;
12
+ }) => Promise<readonly PrePromptSummary[]>;
13
+ export declare const usePrePrompts: () => import('@tanstack/react-query').UseQueryResult<NoInfer<readonly PrePromptSummary[]>, Error>;
14
+ type CreatePrePromptInput = {
15
+ readonly name: string;
16
+ readonly body: string;
17
+ readonly description: string;
18
+ readonly clientPrePromptId: string;
19
+ };
20
+ /**
21
+ * What a save attempt actually did, as a VALUE the dialog matches on — the
22
+ * client mirror of the route's §19 result. `idempotent` is a retried POST
23
+ * resolving to the row the first attempt wrote (retry-fetch re-sends POSTs);
24
+ * `invalid` is the perimeter refusing a name/body the dialog should have
25
+ * caught.
26
+ */
27
+ type CreatePrePromptOutcome = {
28
+ readonly status: "created";
29
+ readonly prePromptId: string;
30
+ readonly name: string;
31
+ } | {
32
+ readonly status: "idempotent";
33
+ readonly prePromptId: string;
34
+ readonly name: string;
35
+ } | {
36
+ readonly status: "name_taken";
37
+ } | {
38
+ readonly status: "invalid";
39
+ } | {
40
+ readonly status: "error";
41
+ };
42
+ export declare const useCreatePrePrompt: () => import('@tanstack/react-query').UseMutationResult<CreatePrePromptOutcome, Error, CreatePrePromptInput, unknown>;
43
+ /** The patch the edit dialog sends — every field optional, but never all of
44
+ * them absent (the server rejects a patch that changes nothing as a 400). */
45
+ type UpdatePrePromptPatch = {
46
+ readonly name?: string;
47
+ readonly description?: string;
48
+ readonly body?: string;
49
+ };
50
+ type UpdatePrePromptInput = {
51
+ readonly prePromptId: string;
52
+ readonly patch: UpdatePrePromptPatch;
53
+ };
54
+ /**
55
+ * What an edit attempt did, as a VALUE (§19). `not_found` is the one the
56
+ * surface must not swallow: it means this prompt is gone — deleted in another
57
+ * tab, or by another device — so the list the user is looking at is stale.
58
+ */
59
+ type UpdatePrePromptOutcome = {
60
+ readonly status: "updated";
61
+ readonly prePromptId: string;
62
+ } | {
63
+ readonly status: "name_taken";
64
+ } | {
65
+ readonly status: "not_found";
66
+ } | {
67
+ readonly status: "invalid";
68
+ } | {
69
+ readonly status: "error";
70
+ };
71
+ type DeletePrePromptOutcome = {
72
+ readonly status: "deleted";
73
+ } | {
74
+ readonly status: "not_found";
75
+ } | {
76
+ readonly status: "error";
77
+ };
78
+ export declare const useUpdatePrePrompt: () => import('@tanstack/react-query').UseMutationResult<UpdatePrePromptOutcome, Error, UpdatePrePromptInput, unknown>;
79
+ export declare const useDeletePrePrompt: () => import('@tanstack/react-query').UseMutationResult<DeletePrePromptOutcome, Error, string, unknown>;
80
+ export {};
@@ -23,6 +23,8 @@ export declare const useSessionStats: (sessionId: string | null) => import('@tan
23
23
  readonly totalInputTokens: number;
24
24
  readonly totalOutputTokens: number;
25
25
  readonly totalTokens: number;
26
+ readonly totalCacheReadInputTokens: number;
27
+ readonly totalCacheWriteInputTokens: number;
26
28
  readonly turns: number;
27
29
  readonly runningMs: number;
28
30
  readonly toolCalls: number;
@@ -25,4 +25,8 @@ export declare const queryKeys: {
25
25
  taskScheduleList: (workspaceKey: string, filter: string, q: string) => readonly ["belong", "task-schedules", "list", string, string, string];
26
26
  taskSchedule: (workspaceKey: string, taskScheduleId: string) => readonly ["belong", "task-schedules", "detail", string, string];
27
27
  taskScheduleRuns: (workspaceKey: string, taskScheduleId: string) => readonly ["belong", "task-schedules", "detail", string, string, "runs"];
28
+ /** Invalidation prefix for every saved-prompt read (BEL-256). */
29
+ prePrompts: readonly ["belong", "pre-prompts"];
30
+ /** Workspace-scoped saved-prompt list (same "" unscoped convention). */
31
+ prePromptList: (workspaceKey: string) => readonly ["belong", "pre-prompts", "list", string];
28
32
  };
@@ -1,7 +1,12 @@
1
1
  import { ApiClient } from './client.ts';
2
- /** Where a skill comes from: the tenant's app (GCS knowledge tree) or the
3
- * user's own install in their sandbox. */
4
- export type SkillSource = "app" | "user";
2
+ /**
3
+ * Where a picker option comes from: the tenant's app (GCS knowledge tree), the
4
+ * user's own sandbox-installed skill, or — CLIENT-MINTED ONLY — a pre-prompt
5
+ * the user saved (BEL-256). The backend never sends `"prompt"`; the slash-menu
6
+ * merge stamps it (see `prePromptOptions` in embed/slash-commands.ts), which is
7
+ * why `skillSummarySchema`'s enum below stays `["app", "user"]`.
8
+ */
9
+ export type SkillSource = "app" | "user" | "prompt";
5
10
  export type SkillSummary = {
6
11
  readonly name: string;
7
12
  readonly description: string;
@@ -1,6 +1,6 @@
1
- import { g as p, r as u, d as n } from "./chunk-6Q2QTUOP-DGVp_gyk.js";
2
- import { p as f } from "./chunk-JWPE2WC7-BbwyDj9g.js";
3
- import { _ as a, l as o } from "./mermaid-GHXKKRXX-BaBCeViM.js";
1
+ import { g as p, r as u, d as n } from "./chunk-6Q2QTUOP-DKkDhyrb.js";
2
+ import { p as f } from "./chunk-JWPE2WC7-xUoyVsyD.js";
3
+ import { _ as a, l as o } from "./mermaid-GHXKKRXX-CpyPA4Tq.js";
4
4
  import { M as c, b as g } from "./cynefin-VYW2F7L2-DAyxamLw.js";
5
5
  globalThis.process = globalThis.process || { env: {} };
6
6
  globalThis.global = globalThis.global || globalThis;
@@ -87,4 +87,4 @@ var b = g().RailroadAbnf.parser.LangiumParser, l = /* @__PURE__ */ a((e) => {
87
87
  export {
88
88
  T as diagram
89
89
  };
90
- //# sourceMappingURL=abnfDiagram-N423BO3Z-C1O9dfJJ.js.map
90
+ //# sourceMappingURL=abnfDiagram-N423BO3Z-DXtYRs-k.js.map
@@ -1,4 +1,4 @@
1
- import { H as ln, I as an, J as g, K as on, M as Q, N as w, O as _, P as sn, Q as rn, S as X, T as t, V as J, W as un, X as tn, Y as fn } from "./mermaid-GHXKKRXX-BaBCeViM.js";
1
+ import { H as ln, I as an, J as g, K as on, M as Q, N as w, O as _, P as sn, Q as rn, S as X, T as t, V as J, W as un, X as tn, Y as fn } from "./mermaid-GHXKKRXX-CpyPA4Tq.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-Cpnt_LFj.js.map
86
+ //# sourceMappingURL=arc-k2puh3QC.js.map
@@ -1,5 +1,5 @@
1
- import { p as ke } from "./chunk-JWPE2WC7-BbwyDj9g.js";
2
- import { ba as qe, _ as ct, G as Qe, ag as Je, l as Se, b as Ke, a as je, o as _e, p as tr, g as er, s as rr, q as ir, D as ar, z as nr, E as or, c as me, b2 as Ee, al as ve, i as sr, d as hr, r as lr, am as fr, bb as cr } from "./mermaid-GHXKKRXX-BaBCeViM.js";
1
+ import { p as ke } from "./chunk-JWPE2WC7-xUoyVsyD.js";
2
+ import { ba as qe, _ as ct, G as Qe, ag as Je, l as Se, b as Ke, a as je, o as _e, p as tr, g as er, s as rr, q as ir, D as ar, z as nr, E as or, c as me, b2 as Ee, al as ve, i as sr, d as hr, r as lr, am as fr, bb as cr } from "./mermaid-GHXKKRXX-CpyPA4Tq.js";
3
3
  import { p as gr } from "./cynefin-VYW2F7L2-DAyxamLw.js";
4
4
  import { c as Fe } from "./cytoscape.esm-C31R6JOv.js";
5
5
  globalThis.process = globalThis.process || { env: {} };
@@ -4781,4 +4781,4 @@ var Ur = /* @__PURE__ */ ct(async (w, F, M, P) => {
4781
4781
  export {
4782
4782
  zr as diagram
4783
4783
  };
4784
- //# sourceMappingURL=architectureDiagram-T3A2C74G-iakL6yUj.js.map
4784
+ //# sourceMappingURL=architectureDiagram-T3A2C74G-DAmYa1QR.js.map
@@ -1,7 +1,7 @@
1
- import { g as de } from "./chunk-5VM5RSS4-D35VMAuN.js";
2
- import { aD as pe, aE as Kt, aF as fe, aG as xe, aH as ye, aI as be, aJ as we, aK as me, aL as Se, aM as Le, aN as ke, aO as ve, aP as Ee, aQ as _e, aR as Te, aS as De, aT as Be, aU as Ne, aV as Ie, aW as Ce, aX as Oe, aY as Re, aZ as Ae, a_ as ze, a$ as Me, _ as g, z as rt, d as D, e as Pe, l as k, q as Fe, t as We, c as R, b0 as Ye, aa as He, ab as Ke, a6 as Ue, b1 as M, b2 as kt, b3 as Q, av as Xe, y as $, k as Ve, b4 as je, i as Ct, b5 as Ot, b6 as Ge } from "./mermaid-GHXKKRXX-BaBCeViM.js";
1
+ import { g as de } from "./chunk-5VM5RSS4-BiYvFRMB.js";
2
+ import { aD as pe, aE as Kt, aF as fe, aG as xe, aH as ye, aI as be, aJ as we, aK as me, aL as Se, aM as Le, aN as ke, aO as ve, aP as Ee, aQ as _e, aR as Te, aS as De, aT as Be, aU as Ne, aV as Ie, aW as Ce, aX as Oe, aY as Re, aZ as Ae, a_ as ze, a$ as Me, _ as g, z as rt, d as D, e as Pe, l as k, q as Fe, t as We, c as R, b0 as Ye, aa as He, ab as Ke, a6 as Ue, b1 as M, b2 as kt, b3 as Q, av as Xe, y as $, k as Ve, b4 as je, i as Ct, b5 as Ot, b6 as Ge } from "./mermaid-GHXKKRXX-CpyPA4Tq.js";
3
3
  import { G as Ze } from "./graph-CWpEkm4G.js";
4
- import { c as qe } from "./channel-DnM50Ep0.js";
4
+ import { c as qe } from "./channel-BradwEzR.js";
5
5
  globalThis.process = globalThis.process || { env: {} };
6
6
  globalThis.global = globalThis.global || globalThis;
7
7
  function Je(e) {
@@ -2419,4 +2419,4 @@ var Ea = /* @__PURE__ */ g(function(e, t) {
2419
2419
  export {
2420
2420
  Ca as diagram
2421
2421
  };
2422
- //# sourceMappingURL=blockDiagram-VBNYF7ZC-D7t0jIvW.js.map
2422
+ //# sourceMappingURL=blockDiagram-VBNYF7ZC-zXWS_7FA.js.map
@@ -1,5 +1,5 @@
1
- import { g as Oe, d as Re } from "./chunk-2GRJ4B5K-ChTMjM-v.js";
2
- import { s as Se, g as De, a as Pe, b as Be, _ as y, c as Dt, d as Nt, l as he, e as Ie, f as Me, h as Tt, i as pe, j as Le, w as Ne, k as Jt, m as ue } from "./mermaid-GHXKKRXX-BaBCeViM.js";
1
+ import { g as Oe, d as Re } from "./chunk-2GRJ4B5K-CFlVgxT_.js";
2
+ import { s as Se, g as De, a as Pe, b as Be, _ as y, c as Dt, d as Nt, l as he, e as Ie, f as Me, h as Tt, i as pe, j as Le, w as Ne, k as Jt, m as ue } from "./mermaid-GHXKKRXX-CpyPA4Tq.js";
3
3
  globalThis.process = globalThis.process || { env: {} };
4
4
  globalThis.global = globalThis.global || globalThis;
5
5
  var jt = (function() {
@@ -1583,4 +1583,4 @@ var T0 = /* @__PURE__ */ y(function(e, t, s, o) {
1583
1583
  export {
1584
1584
  P0 as diagram
1585
1585
  };
1586
- //# sourceMappingURL=c4Diagram-5PPSVZJV-CRX1o0CJ.js.map
1586
+ //# sourceMappingURL=c4Diagram-5PPSVZJV-DrhhcFC2.js.map
@@ -1,8 +1,8 @@
1
- import { U as s, C as a } from "./mermaid-GHXKKRXX-BaBCeViM.js";
1
+ import { U as s, C as a } from "./mermaid-GHXKKRXX-CpyPA4Tq.js";
2
2
  globalThis.process = globalThis.process || { env: {} };
3
3
  globalThis.global = globalThis.global || globalThis;
4
4
  const g = (l, o) => s.lang.round(a.parse(l)[o]);
5
5
  export {
6
6
  g as c
7
7
  };
8
- //# sourceMappingURL=channel-DnM50Ep0.js.map
8
+ //# sourceMappingURL=channel-BradwEzR.js.map
@@ -1,4 +1,4 @@
1
- import { _ as l, d as n, n as d, j as o } from "./mermaid-GHXKKRXX-BaBCeViM.js";
1
+ import { _ as l, d as n, n as d, j as o } from "./mermaid-GHXKKRXX-CpyPA4Tq.js";
2
2
  globalThis.process = globalThis.process || { env: {} };
3
3
  globalThis.global = globalThis.global || globalThis;
4
4
  var c = /* @__PURE__ */ l((r, t) => {
@@ -68,4 +68,4 @@ export {
68
68
  m as g,
69
69
  y as h
70
70
  };
71
- //# sourceMappingURL=chunk-2GRJ4B5K-ChTMjM-v.js.map
71
+ //# sourceMappingURL=chunk-2GRJ4B5K-CFlVgxT_.js.map
@@ -1,4 +1,4 @@
1
- import { _ as t } from "./mermaid-GHXKKRXX-BaBCeViM.js";
1
+ import { _ as t } from "./mermaid-GHXKKRXX-CpyPA4Tq.js";
2
2
  globalThis.process = globalThis.process || { env: {} };
3
3
  globalThis.global = globalThis.global || globalThis;
4
4
  var a = class {
@@ -18,4 +18,4 @@ var a = class {
18
18
  export {
19
19
  a as I
20
20
  };
21
- //# sourceMappingURL=chunk-2Q5K7J3B-F2Rpvtwm.js.map
21
+ //# sourceMappingURL=chunk-2Q5K7J3B-BWVz-RZT.js.map
@@ -1,7 +1,7 @@
1
- import { g as te } from "./chunk-XXDRQBXY-XJadTIK5.js";
2
- import { s as ee } from "./chunk-KBJHAD2P-B9qL0VLM.js";
3
- import { _ as f, l as _, c as $, x as se, y as ie, a as re, b as ae, g as ne, s as oe, o as le, p as ce, ac as he, k as j, q as ue, d as bt, a8 as de } from "./mermaid-GHXKKRXX-BaBCeViM.js";
4
- import { f as fe } from "./chunk-2GRJ4B5K-ChTMjM-v.js";
1
+ import { g as te } from "./chunk-XXDRQBXY-Chbw9HR0.js";
2
+ import { s as ee } from "./chunk-KBJHAD2P-CeI2oVSe.js";
3
+ import { _ as f, l as _, c as $, x as se, y as ie, a as re, b as ae, g as ne, s as oe, o as le, p as ce, ac as he, k as j, q as ue, d as bt, a8 as de } from "./mermaid-GHXKKRXX-CpyPA4Tq.js";
4
+ import { f as fe } from "./chunk-2GRJ4B5K-CFlVgxT_.js";
5
5
  globalThis.process = globalThis.process || { env: {} };
6
6
  globalThis.global = globalThis.global || globalThis;
7
7
  var vt = (function() {
@@ -1414,4 +1414,4 @@ export {
1414
1414
  We as b,
1415
1415
  He as s
1416
1416
  };
1417
- //# sourceMappingURL=chunk-5RXB4S5H-B1WLx-ex.js.map
1417
+ //# sourceMappingURL=chunk-5RXB4S5H-DzGJLYck.js.map
@@ -1,4 +1,4 @@
1
- import { _ as l } from "./mermaid-GHXKKRXX-BaBCeViM.js";
1
+ import { _ as l } from "./mermaid-GHXKKRXX-CpyPA4Tq.js";
2
2
  globalThis.process = globalThis.process || { env: {} };
3
3
  globalThis.global = globalThis.global || globalThis;
4
4
  var o = /* @__PURE__ */ l(() => `
@@ -19,4 +19,4 @@ var o = /* @__PURE__ */ l(() => `
19
19
  export {
20
20
  o as g
21
21
  };
22
- //# sourceMappingURL=chunk-5VM5RSS4-D35VMAuN.js.map
22
+ //# sourceMappingURL=chunk-5VM5RSS4-BiYvFRMB.js.map
@@ -1,4 +1,4 @@
1
- import { _ as p, l as w, G as L, z as E, q as I, Z as X, e as q, i as G, c as H } from "./mermaid-GHXKKRXX-BaBCeViM.js";
1
+ import { _ as p, l as w, G as L, z as E, q as I, Z as X, e as q, i as G, c as H } from "./mermaid-GHXKKRXX-CpyPA4Tq.js";
2
2
  globalThis.process = globalThis.process || { env: {} };
3
3
  globalThis.global = globalThis.global || globalThis;
4
4
  var z = "", b = "", N = "", A = [], R = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ p((e) => G(e, H()), "sanitizeText"), F = /* @__PURE__ */ p((e) => {
@@ -670,4 +670,4 @@ export {
670
670
  ue as g,
671
671
  ge as r
672
672
  };
673
- //# sourceMappingURL=chunk-6Q2QTUOP-DGVp_gyk.js.map
673
+ //# sourceMappingURL=chunk-6Q2QTUOP-DKkDhyrb.js.map