@belonguniverseai/react-sdk 0.6.23 → 0.6.24

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/client.d.ts +265 -29
  2. package/dist/api/mutations.d.ts +9 -1
  3. package/dist/api/query-keys.d.ts +8 -0
  4. package/dist/api/skill-library.d.ts +81 -0
  5. package/dist/component/{abnfDiagram-N423BO3Z-bM1BoI0O.js → abnfDiagram-N423BO3Z-BZFjrvGh.js} +4 -4
  6. package/dist/component/{arc-DaSgre52.js → arc-R371iLQK.js} +2 -2
  7. package/dist/component/{architectureDiagram-T3A2C74G-avMCXzQw.js → architectureDiagram-T3A2C74G-CcH5CU8G.js} +3 -3
  8. package/dist/component/{blockDiagram-VBNYF7ZC-Cg6EDrdt.js → blockDiagram-VBNYF7ZC-CO21oaME.js} +4 -4
  9. package/dist/component/{c4Diagram-5PPSVZJV-DhUs6wdK.js → c4Diagram-5PPSVZJV-DFdczxGA.js} +3 -3
  10. package/dist/component/{channel-DlmuDpcv.js → channel-CTk2u27P.js} +2 -2
  11. package/dist/component/{chunk-2GRJ4B5K-Drdf-9Az.js → chunk-2GRJ4B5K-DLJBmRlE.js} +2 -2
  12. package/dist/component/{chunk-2Q5K7J3B-CG6mCJjr.js → chunk-2Q5K7J3B-Dn9FHNcv.js} +2 -2
  13. package/dist/component/{chunk-5RXB4S5H-DYJwqjr4.js → chunk-5RXB4S5H-C0lJsrjg.js} +5 -5
  14. package/dist/component/{chunk-5VM5RSS4-B21XfkBj.js → chunk-5VM5RSS4-DphP3gZj.js} +2 -2
  15. package/dist/component/{chunk-6Q2QTUOP-DZkWqf90.js → chunk-6Q2QTUOP-oYZ6WlsT.js} +2 -2
  16. package/dist/component/{chunk-GF5L2VYU-5hBEo1f5.js → chunk-GF5L2VYU-CX1jApqq.js} +6 -6
  17. package/dist/component/{chunk-JWPE2WC7-DAn-TcDC.js → chunk-JWPE2WC7-BsHiqT8c.js} +2 -2
  18. package/dist/component/{chunk-KBJHAD2P-CEMDhN2A.js → chunk-KBJHAD2P-JEN3NVHE.js} +2 -2
  19. package/dist/component/{chunk-RYQCIY6F-BWL1otLK.js → chunk-RYQCIY6F-BJlZTS0d.js} +2 -2
  20. package/dist/component/{chunk-XXDRQBXY-D0TWnqlD.js → chunk-XXDRQBXY-CftGkCaP.js} +2 -2
  21. package/dist/component/{classDiagram-JCYQIIEL-CjU-7xK0.js → classDiagram-JCYQIIEL-BEAw2s9m.js} +3 -3
  22. package/dist/component/{classDiagram-v2-OCEON4UE-CjU-7xK0.js → classDiagram-v2-OCEON4UE-BEAw2s9m.js} +3 -3
  23. package/dist/component/{cose-bilkent-JH36ORCC-MkPQhZKJ.js → cose-bilkent-JH36ORCC-5g5ZQ1kH.js} +2 -2
  24. package/dist/component/{cynefinDiagram-MW4NZA55-Wf-Eh_MR.js → cynefinDiagram-MW4NZA55-C0wLlDn3.js} +3 -3
  25. package/dist/component/{dagre-VZM6K2ZE-D1ND11ws.js → dagre-VZM6K2ZE-V9qiC6Cs.js} +3 -3
  26. package/dist/component/{diagram-7IWD3JNH-ChO63Ikp.js → diagram-7IWD3JNH-D-KPwOWp.js} +4 -4
  27. package/dist/component/{diagram-B4RE2ZJO-CFVIZBxd.js → diagram-B4RE2ZJO-CMiB6Lwu.js} +3 -3
  28. package/dist/component/{diagram-LBJQPF4R-BFErKt-H.js → diagram-LBJQPF4R-ve7EbpGW.js} +3 -3
  29. package/dist/component/{diagram-Q27KOJAE-3EA2fDKz.js → diagram-Q27KOJAE-DRINzJd4.js} +4 -4
  30. package/dist/component/{diagram-UB23O5K3-D914yr1r.js → diagram-UB23O5K3-CL0SSPI6.js} +3 -3
  31. package/dist/component/{ebnfDiagram-BXEA7PRR-BlRDglJm.js → ebnfDiagram-BXEA7PRR-BgU6lPC0.js} +4 -4
  32. package/dist/component/{erDiagram-JOGREHBK-BgHUzm41.js → erDiagram-JOGREHBK-BDuqW50a.js} +5 -5
  33. package/dist/component/{flowDiagram-UKHOOZJN-Cf42sXVK.js → flowDiagram-UKHOOZJN-KisN8EgK.js} +7 -7
  34. package/dist/component/{ganttDiagram-PKOTCBZU-Bqai8Nqw.js → ganttDiagram-PKOTCBZU-kZrnta4w.js} +3 -3
  35. package/dist/component/{gitGraphDiagram-DS77QQ5N-M6yX_E4b.js → gitGraphDiagram-DS77QQ5N-Dy1S71_C.js} +4 -4
  36. package/dist/component/{highlighted-body-OFNGDK62-C2rmuXAs.js → highlighted-body-OFNGDK62-ChNAP6R7.js} +2 -2
  37. package/dist/component/index.js +2 -2
  38. package/dist/component/{infoDiagram-6WML65LV-Bk4qDfY4.js → infoDiagram-6WML65LV-C3CmzQkI.js} +2 -2
  39. package/dist/component/{ishikawaDiagram-WSZJBQD7-CQ0-i0XP.js → ishikawaDiagram-WSZJBQD7-DBHVF-fV.js} +2 -2
  40. package/dist/component/{journeyDiagram-NVQOT4AX-CK9lX22d.js → journeyDiagram-NVQOT4AX-Cg3e2eDS.js} +5 -5
  41. package/dist/component/{kanban-definition-27J2QSJJ-CrIKfzfe.js → kanban-definition-27J2QSJJ-tIaMkhvn.js} +3 -3
  42. package/dist/component/{linear-CzN3Xd3g.js → linear-DQ23phHp.js} +2 -2
  43. package/dist/component/{mermaid-GHXKKRXX-B-ea5OKA.js → mermaid-GHXKKRXX-CssTT3y2.js} +33886 -33272
  44. package/dist/component/{mindmap-definition-FAOFIHXS-DUDsEObz.js → mindmap-definition-FAOFIHXS-oSuksV41.js} +4 -4
  45. package/dist/component/{pegDiagram-VL7TDLO6-DFJ-rOLH.js → pegDiagram-VL7TDLO6-GLxZEQlj.js} +4 -4
  46. package/dist/component/{pieDiagram-7S7Q4E2Y-OwliOUdN.js → pieDiagram-7S7Q4E2Y-4ghKg2jt.js} +4 -4
  47. package/dist/component/{quadrantDiagram-CIZ2JOQS-CLKxzqPi.js → quadrantDiagram-CIZ2JOQS-DOnM2yX5.js} +3 -3
  48. package/dist/component/{railroadDiagram-AXF67PYL-_jBOX7-D.js → railroadDiagram-AXF67PYL-DCf1AdeI.js} +4 -4
  49. package/dist/component/{requirementDiagram-LRYGKXZP-CxfMaDPH.js → requirementDiagram-LRYGKXZP-BgUTRz25.js} +4 -4
  50. package/dist/component/{sankeyDiagram-W5VNT64P-D-qOUzh7.js → sankeyDiagram-W5VNT64P-93-3TiEZ.js} +2 -2
  51. package/dist/component/{sequenceDiagram-SI44F4Z6-B57h29Ae.js → sequenceDiagram-SI44F4Z6-CjdXsQGo.js} +4 -4
  52. package/dist/component/{sizeCapture-X5ZJPWSS-DlIoKfk1.js → sizeCapture-X5ZJPWSS-BZcfJFgu.js} +2 -2
  53. package/dist/component/{stateDiagram-OKZ733FA-CNNoDNwB.js → stateDiagram-OKZ733FA-DqZxP_LE.js} +3 -3
  54. package/dist/component/{stateDiagram-v2-UEYNNEHI-xYjW9R-s.js → stateDiagram-v2-UEYNNEHI-bW3Xpzm_.js} +3 -3
  55. package/dist/component/{swimlanes-SLNWSIFB-Chjr6NCU.js → swimlanes-SLNWSIFB-BCid9HHX.js} +4 -4
  56. package/dist/component/{swimlanesDiagram-ULZ7WXOC-A9mWwnCX.js → swimlanesDiagram-ULZ7WXOC-CUXpjQTA.js} +3 -3
  57. package/dist/component/{timeline-definition-Z64GVDOM-DldyCd1l.js → timeline-definition-Z64GVDOM-Cl9JeVlC.js} +3 -3
  58. package/dist/component/{vennDiagram-T6HMQDX7-BGfiPWG2.js → vennDiagram-T6HMQDX7-A8wa9sfS.js} +2 -2
  59. package/dist/component/{wardleyDiagram-T6FBY63Y-Bzn9DJ27.js → wardleyDiagram-T6FBY63Y-CYjNVqXL.js} +3 -3
  60. package/dist/component/{xychartDiagram-ELKLHX3M-nMaNgT12.js → xychartDiagram-ELKLHX3M-CWTWyqQ8.js} +3 -3
  61. package/dist/components/ai-elements/markdown-repair-samples.d.ts +27 -0
  62. package/dist/components/embed/ChatTitleEditor.d.ts +17 -0
  63. package/dist/components/embed/ComposerContext.d.ts +7 -7
  64. package/dist/components/embed/EmbedAvatar.d.ts +1 -3
  65. package/dist/components/embed/EmbedHeader.d.ts +14 -2
  66. package/dist/components/embed/context-occupancy.d.ts +15 -0
  67. package/dist/components/embed/use-agent-identity.d.ts +1 -0
  68. package/dist/components/skills/EditSkillDialog.d.ts +8 -0
  69. package/dist/components/skills/SkillsListSurface.d.ts +3 -2
  70. package/dist/components/skills/skill-refusal-copy.d.ts +8 -0
  71. package/dist/embed/conversation-scroll.d.ts +18 -0
  72. package/dist/embed/copy.d.ts +0 -1
  73. package/dist/embed/voice-call-lines.d.ts +14 -5
  74. package/dist/i18n/messages/en.d.ts +20 -12
  75. package/dist/i18n/messages/surfaces/skills.d.ts +71 -3
  76. package/dist/i18n/messages/surfaces/usage.d.ts +12 -44
  77. package/dist/i18n/messages/surfaces/workspace.d.ts +7 -5
  78. package/dist/routes/chat/draft-updaters.d.ts +16 -0
  79. package/dist/stream/agent-deliverable-path.d.ts +1 -0
  80. package/dist/stream/belong-chat-transport.d.ts +1 -1
  81. package/dist/types/public.d.ts +11 -0
  82. package/package.json +1 -1
@@ -954,7 +954,7 @@ export declare const createApiClient: (baseUrl: string) => {
954
954
  runway?: "quick" | "normal" | "long" | undefined;
955
955
  } | undefined;
956
956
  runtime?: "fake" | "claude-agent-sdk" | "mastra" | "claude-managed" | undefined;
957
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | "openrouter" | "vertex" | undefined;
957
+ llmProvider?: "anthropic" | "openai" | "google" | "gateway" | "cerebras" | "openrouter" | "vertex" | undefined;
958
958
  llmModel?: string | undefined;
959
959
  fileIds?: string[] | undefined;
960
960
  clientMessageId?: string | undefined;
@@ -988,7 +988,7 @@ export declare const createApiClient: (baseUrl: string) => {
988
988
  runway?: "quick" | "normal" | "long" | undefined;
989
989
  } | undefined;
990
990
  runtime?: "fake" | "claude-agent-sdk" | "mastra" | "claude-managed" | undefined;
991
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | "openrouter" | "vertex" | undefined;
991
+ llmProvider?: "anthropic" | "openai" | "google" | "gateway" | "cerebras" | "openrouter" | "vertex" | undefined;
992
992
  llmModel?: string | undefined;
993
993
  fileIds?: string[] | undefined;
994
994
  clientMessageId?: string | undefined;
@@ -1021,7 +1021,7 @@ export declare const createApiClient: (baseUrl: string) => {
1021
1021
  runway?: "quick" | "normal" | "long" | undefined;
1022
1022
  } | undefined;
1023
1023
  runtime?: "fake" | "claude-agent-sdk" | "mastra" | "claude-managed" | undefined;
1024
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | "openrouter" | "vertex" | undefined;
1024
+ llmProvider?: "anthropic" | "openai" | "google" | "gateway" | "cerebras" | "openrouter" | "vertex" | undefined;
1025
1025
  llmModel?: string | undefined;
1026
1026
  fileIds?: string[] | undefined;
1027
1027
  clientMessageId?: string | undefined;
@@ -1054,7 +1054,7 @@ export declare const createApiClient: (baseUrl: string) => {
1054
1054
  runway?: "quick" | "normal" | "long" | undefined;
1055
1055
  } | undefined;
1056
1056
  runtime?: "fake" | "claude-agent-sdk" | "mastra" | "claude-managed" | undefined;
1057
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | "openrouter" | "vertex" | undefined;
1057
+ llmProvider?: "anthropic" | "openai" | "google" | "gateway" | "cerebras" | "openrouter" | "vertex" | undefined;
1058
1058
  llmModel?: string | undefined;
1059
1059
  fileIds?: string[] | undefined;
1060
1060
  clientMessageId?: string | undefined;
@@ -1087,7 +1087,7 @@ export declare const createApiClient: (baseUrl: string) => {
1087
1087
  runway?: "quick" | "normal" | "long" | undefined;
1088
1088
  } | undefined;
1089
1089
  runtime?: "fake" | "claude-agent-sdk" | "mastra" | "claude-managed" | undefined;
1090
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | "openrouter" | "vertex" | undefined;
1090
+ llmProvider?: "anthropic" | "openai" | "google" | "gateway" | "cerebras" | "openrouter" | "vertex" | undefined;
1091
1091
  llmModel?: string | undefined;
1092
1092
  fileIds?: string[] | undefined;
1093
1093
  clientMessageId?: string | undefined;
@@ -1120,7 +1120,7 @@ export declare const createApiClient: (baseUrl: string) => {
1120
1120
  runway?: "quick" | "normal" | "long" | undefined;
1121
1121
  } | undefined;
1122
1122
  runtime?: "fake" | "claude-agent-sdk" | "mastra" | "claude-managed" | undefined;
1123
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | "openrouter" | "vertex" | undefined;
1123
+ llmProvider?: "anthropic" | "openai" | "google" | "gateway" | "cerebras" | "openrouter" | "vertex" | undefined;
1124
1124
  llmModel?: string | undefined;
1125
1125
  fileIds?: string[] | undefined;
1126
1126
  clientMessageId?: string | undefined;
@@ -1153,7 +1153,7 @@ export declare const createApiClient: (baseUrl: string) => {
1153
1153
  runway?: "quick" | "normal" | "long" | undefined;
1154
1154
  } | undefined;
1155
1155
  runtime?: "fake" | "claude-agent-sdk" | "mastra" | "claude-managed" | undefined;
1156
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | "openrouter" | "vertex" | undefined;
1156
+ llmProvider?: "anthropic" | "openai" | "google" | "gateway" | "cerebras" | "openrouter" | "vertex" | undefined;
1157
1157
  llmModel?: string | undefined;
1158
1158
  fileIds?: string[] | undefined;
1159
1159
  clientMessageId?: string | undefined;
@@ -2668,6 +2668,29 @@ export declare const createApiClient: (baseUrl: string) => {
2668
2668
  previews: {
2669
2669
  mint: import('hono/client').ClientRequest<string, "/v1/previews/mint", {
2670
2670
  $post: {
2671
+ input: {
2672
+ json: {
2673
+ target: {
2674
+ kind: "artifact";
2675
+ artifactId: string;
2676
+ } | {
2677
+ kind: "file";
2678
+ fileId: string;
2679
+ } | {
2680
+ kind: "workspace";
2681
+ path: string;
2682
+ workspaceExternalId: string | null;
2683
+ };
2684
+ };
2685
+ };
2686
+ output: {
2687
+ error: {
2688
+ type: string;
2689
+ };
2690
+ };
2691
+ outputFormat: "json";
2692
+ status: 404;
2693
+ } | {
2671
2694
  input: {
2672
2695
  json: {
2673
2696
  target: {
@@ -4989,7 +5012,7 @@ export declare const createApiClient: (baseUrl: string) => {
4989
5012
  originatingSessionId?: string | undefined;
4990
5013
  workspaceExternalId?: string | undefined;
4991
5014
  runtime?: "fake" | "claude-agent-sdk" | "mastra" | "claude-managed" | undefined;
4992
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | "openrouter" | "vertex" | undefined;
5015
+ llmProvider?: "anthropic" | "openai" | "google" | "gateway" | "cerebras" | "openrouter" | "vertex" | undefined;
4993
5016
  llmModel?: string | undefined;
4994
5017
  };
4995
5018
  };
@@ -5036,7 +5059,7 @@ export declare const createApiClient: (baseUrl: string) => {
5036
5059
  originatingSessionId?: string | undefined;
5037
5060
  workspaceExternalId?: string | undefined;
5038
5061
  runtime?: "fake" | "claude-agent-sdk" | "mastra" | "claude-managed" | undefined;
5039
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | "openrouter" | "vertex" | undefined;
5062
+ llmProvider?: "anthropic" | "openai" | "google" | "gateway" | "cerebras" | "openrouter" | "vertex" | undefined;
5040
5063
  llmModel?: string | undefined;
5041
5064
  };
5042
5065
  };
@@ -5088,7 +5111,7 @@ export declare const createApiClient: (baseUrl: string) => {
5088
5111
  originatingSessionId?: string | undefined;
5089
5112
  workspaceExternalId?: string | undefined;
5090
5113
  runtime?: "fake" | "claude-agent-sdk" | "mastra" | "claude-managed" | undefined;
5091
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | "openrouter" | "vertex" | undefined;
5114
+ llmProvider?: "anthropic" | "openai" | "google" | "gateway" | "cerebras" | "openrouter" | "vertex" | undefined;
5092
5115
  llmModel?: string | undefined;
5093
5116
  };
5094
5117
  };
@@ -5134,7 +5157,7 @@ export declare const createApiClient: (baseUrl: string) => {
5134
5157
  originatingSessionId?: string | undefined;
5135
5158
  workspaceExternalId?: string | undefined;
5136
5159
  runtime?: "fake" | "claude-agent-sdk" | "mastra" | "claude-managed" | undefined;
5137
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | "openrouter" | "vertex" | undefined;
5160
+ llmProvider?: "anthropic" | "openai" | "google" | "gateway" | "cerebras" | "openrouter" | "vertex" | undefined;
5138
5161
  llmModel?: string | undefined;
5139
5162
  };
5140
5163
  };
@@ -5952,7 +5975,7 @@ export declare const createApiClient: (baseUrl: string) => {
5952
5975
  originatingSessionId?: string | undefined;
5953
5976
  workspaceExternalId?: string | undefined;
5954
5977
  runtime?: "fake" | "claude-agent-sdk" | "mastra" | "claude-managed" | undefined;
5955
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | "openrouter" | "vertex" | undefined;
5978
+ llmProvider?: "anthropic" | "openai" | "google" | "gateway" | "cerebras" | "openrouter" | "vertex" | undefined;
5956
5979
  llmModel?: string | undefined;
5957
5980
  };
5958
5981
  };
@@ -5999,7 +6022,7 @@ export declare const createApiClient: (baseUrl: string) => {
5999
6022
  originatingSessionId?: string | undefined;
6000
6023
  workspaceExternalId?: string | undefined;
6001
6024
  runtime?: "fake" | "claude-agent-sdk" | "mastra" | "claude-managed" | undefined;
6002
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | "openrouter" | "vertex" | undefined;
6025
+ llmProvider?: "anthropic" | "openai" | "google" | "gateway" | "cerebras" | "openrouter" | "vertex" | undefined;
6003
6026
  llmModel?: string | undefined;
6004
6027
  };
6005
6028
  };
@@ -6051,7 +6074,7 @@ export declare const createApiClient: (baseUrl: string) => {
6051
6074
  originatingSessionId?: string | undefined;
6052
6075
  workspaceExternalId?: string | undefined;
6053
6076
  runtime?: "fake" | "claude-agent-sdk" | "mastra" | "claude-managed" | undefined;
6054
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | "openrouter" | "vertex" | undefined;
6077
+ llmProvider?: "anthropic" | "openai" | "google" | "gateway" | "cerebras" | "openrouter" | "vertex" | undefined;
6055
6078
  llmModel?: string | undefined;
6056
6079
  };
6057
6080
  };
@@ -6097,7 +6120,7 @@ export declare const createApiClient: (baseUrl: string) => {
6097
6120
  originatingSessionId?: string | undefined;
6098
6121
  workspaceExternalId?: string | undefined;
6099
6122
  runtime?: "fake" | "claude-agent-sdk" | "mastra" | "claude-managed" | undefined;
6100
- llmProvider?: "anthropic" | "google" | "openai" | "cerebras" | "gateway" | "openrouter" | "vertex" | undefined;
6123
+ llmProvider?: "anthropic" | "openai" | "google" | "gateway" | "cerebras" | "openrouter" | "vertex" | undefined;
6101
6124
  llmModel?: string | undefined;
6102
6125
  };
6103
6126
  };
@@ -7644,18 +7667,18 @@ export declare const createApiClient: (baseUrl: string) => {
7644
7667
  };
7645
7668
  };
7646
7669
  outputFormat: "json";
7647
- status: 400;
7670
+ status: 422;
7648
7671
  } | {
7649
7672
  input: {};
7650
7673
  output: {
7651
- userSkillId: import('node_modules/@belong/cloud/src/platform/ids').UserSkillId;
7652
- name: string;
7653
- revision: number;
7654
- outcome: import('node_modules/@belong/cloud/src/features/skill-library/skill-library.service').SkillSaveOutcome;
7655
- hasScripts: boolean;
7674
+ error: {
7675
+ type: string;
7676
+ name: string;
7677
+ userSkillId: import('node_modules/@belong/cloud/src/platform/ids').UserSkillId;
7678
+ };
7656
7679
  };
7657
7680
  outputFormat: "json";
7658
- status: 200 | 201;
7681
+ status: 409;
7659
7682
  } | {
7660
7683
  input: {};
7661
7684
  output: {
@@ -7664,18 +7687,18 @@ export declare const createApiClient: (baseUrl: string) => {
7664
7687
  };
7665
7688
  };
7666
7689
  outputFormat: "json";
7667
- status: 422;
7690
+ status: 400;
7668
7691
  } | {
7669
7692
  input: {};
7670
7693
  output: {
7671
- error: {
7672
- type: string;
7673
- name: string;
7674
- userSkillId: import('node_modules/@belong/cloud/src/platform/ids').UserSkillId;
7675
- };
7694
+ userSkillId: import('node_modules/@belong/cloud/src/platform/ids').UserSkillId;
7695
+ name: string;
7696
+ revision: number;
7697
+ outcome: import('node_modules/@belong/cloud/src/features/skill-library/skill-library.service').SkillSaveOutcome;
7698
+ hasScripts: boolean;
7676
7699
  };
7677
7700
  outputFormat: "json";
7678
- status: 409;
7701
+ status: 200 | 201;
7679
7702
  };
7680
7703
  }>;
7681
7704
  };
@@ -7795,6 +7818,219 @@ export declare const createApiClient: (baseUrl: string) => {
7795
7818
  };
7796
7819
  };
7797
7820
  };
7821
+ } & {
7822
+ v1: {
7823
+ "skill-library": {
7824
+ ":userSkillId": {
7825
+ content: import('hono/client').ClientRequest<string, "/v1/skill-library/:userSkillId/content", {
7826
+ $get: {
7827
+ input: {
7828
+ param: {
7829
+ userSkillId: string;
7830
+ };
7831
+ };
7832
+ output: {
7833
+ readonly error: {
7834
+ readonly type: "not_found";
7835
+ };
7836
+ };
7837
+ outputFormat: "json";
7838
+ status: 404;
7839
+ } | {
7840
+ input: {
7841
+ param: {
7842
+ userSkillId: string;
7843
+ };
7844
+ };
7845
+ output: {
7846
+ userSkillId: import('node_modules/@belong/cloud/src/platform/ids').UserSkillId;
7847
+ name: string;
7848
+ description: string;
7849
+ skillMd: string;
7850
+ revision: number;
7851
+ enabled: boolean;
7852
+ hasScripts: boolean;
7853
+ files: string[];
7854
+ };
7855
+ outputFormat: "json";
7856
+ status: 200;
7857
+ };
7858
+ $put: {
7859
+ input: {
7860
+ param: {
7861
+ userSkillId: string;
7862
+ };
7863
+ } & {
7864
+ json: {
7865
+ skillMd: string;
7866
+ expectedRevision: number;
7867
+ };
7868
+ };
7869
+ output: {
7870
+ readonly error: {
7871
+ readonly type: "missing_scope";
7872
+ readonly requiredScope: "session:write";
7873
+ };
7874
+ };
7875
+ outputFormat: "json";
7876
+ status: 403;
7877
+ } | {
7878
+ input: {
7879
+ param: {
7880
+ userSkillId: string;
7881
+ };
7882
+ } & {
7883
+ json: {
7884
+ skillMd: string;
7885
+ expectedRevision: number;
7886
+ };
7887
+ };
7888
+ output: {
7889
+ readonly error: {
7890
+ readonly type: "not_found";
7891
+ };
7892
+ };
7893
+ outputFormat: "json";
7894
+ status: 404;
7895
+ } | {
7896
+ input: {
7897
+ param: {
7898
+ userSkillId: string;
7899
+ };
7900
+ } & {
7901
+ json: {
7902
+ skillMd: string;
7903
+ expectedRevision: number;
7904
+ };
7905
+ };
7906
+ output: {
7907
+ readonly error: {
7908
+ readonly type: "archive_too_large";
7909
+ readonly maxArchiveBytes: 10485760;
7910
+ };
7911
+ };
7912
+ outputFormat: "json";
7913
+ status: 413;
7914
+ } | {
7915
+ input: {
7916
+ param: {
7917
+ userSkillId: string;
7918
+ };
7919
+ } & {
7920
+ json: {
7921
+ skillMd: string;
7922
+ expectedRevision: number;
7923
+ };
7924
+ };
7925
+ output: {
7926
+ error: {
7927
+ type: string;
7928
+ reason: import('node_modules/@belong/cloud/src/features/skill-library/skill-archive').SkillArchiveRejectionType;
7929
+ };
7930
+ };
7931
+ outputFormat: "json";
7932
+ status: 422;
7933
+ } | {
7934
+ input: {
7935
+ param: {
7936
+ userSkillId: string;
7937
+ };
7938
+ } & {
7939
+ json: {
7940
+ skillMd: string;
7941
+ expectedRevision: number;
7942
+ };
7943
+ };
7944
+ output: {
7945
+ error: {
7946
+ type: string;
7947
+ name: string;
7948
+ reservedBy: import('node_modules/@belong/cloud/src/features/skill-library/skill-library.service').NameReservedBy;
7949
+ };
7950
+ };
7951
+ outputFormat: "json";
7952
+ status: 422;
7953
+ } | {
7954
+ input: {
7955
+ param: {
7956
+ userSkillId: string;
7957
+ };
7958
+ } & {
7959
+ json: {
7960
+ skillMd: string;
7961
+ expectedRevision: number;
7962
+ };
7963
+ };
7964
+ output: {
7965
+ error: {
7966
+ type: string;
7967
+ };
7968
+ };
7969
+ outputFormat: "json";
7970
+ status: 422;
7971
+ } | {
7972
+ input: {
7973
+ param: {
7974
+ userSkillId: string;
7975
+ };
7976
+ } & {
7977
+ json: {
7978
+ skillMd: string;
7979
+ expectedRevision: number;
7980
+ };
7981
+ };
7982
+ output: {
7983
+ error: {
7984
+ type: string;
7985
+ name: string;
7986
+ userSkillId: import('node_modules/@belong/cloud/src/platform/ids').UserSkillId;
7987
+ };
7988
+ };
7989
+ outputFormat: "json";
7990
+ status: 409;
7991
+ } | {
7992
+ input: {
7993
+ param: {
7994
+ userSkillId: string;
7995
+ };
7996
+ } & {
7997
+ json: {
7998
+ skillMd: string;
7999
+ expectedRevision: number;
8000
+ };
8001
+ };
8002
+ output: {
8003
+ userSkillId: import('node_modules/@belong/cloud/src/platform/ids').UserSkillId;
8004
+ name: string;
8005
+ revision: number;
8006
+ outcome: import('node_modules/@belong/cloud/src/features/skill-library/skill-library.service').SkillContentOutcome;
8007
+ };
8008
+ outputFormat: "json";
8009
+ status: 200;
8010
+ } | {
8011
+ input: {
8012
+ param: {
8013
+ userSkillId: string;
8014
+ };
8015
+ } & {
8016
+ json: {
8017
+ skillMd: string;
8018
+ expectedRevision: number;
8019
+ };
8020
+ };
8021
+ output: {
8022
+ error: {
8023
+ type: string;
8024
+ revision: number;
8025
+ };
8026
+ };
8027
+ outputFormat: "json";
8028
+ status: 409;
8029
+ };
8030
+ }>;
8031
+ };
8032
+ };
8033
+ };
7798
8034
  } & {
7799
8035
  v1: {
7800
8036
  connectors: import('hono/client').ClientRequest<string, "/v1/connectors", {
@@ -2,7 +2,15 @@ import { ApiClient } from './client.ts';
2
2
  export declare const deleteSessionRequest: (api: ApiClient, sessionId: string) => Promise<void>;
3
3
  export declare const useDeleteSession: () => import('@tanstack/react-query').UseMutationResult<void, Error, string, unknown>;
4
4
  export declare const renameSessionRequest: (api: ApiClient, sessionId: string, title: string) => Promise<void>;
5
+ /**
6
+ * A cached sessions list with one row renamed — the optimistic half of a
7
+ * rename. `unknown` in and out because it runs as a `setQueriesData` updater;
8
+ * anything that is not a sessions list comes back unchanged.
9
+ */
10
+ export declare const renameInSessionList: (data: unknown, sessionId: string, title: string) => unknown;
5
11
  export declare const useRenameSession: () => import('@tanstack/react-query').UseMutationResult<void, Error, {
6
12
  readonly sessionId: string;
7
13
  readonly title: string;
8
- }, unknown>;
14
+ }, {
15
+ snapshot: [readonly unknown[], unknown][];
16
+ }>;
@@ -15,6 +15,12 @@ export declare const queryKeys: {
15
15
  * `workspaceKey` is the scoped id, or "" when unconfigured.
16
16
  */
17
17
  sessionList: (workspaceKey: string, limit: number) => readonly ["belong", "sessions", "list", string, number];
18
+ /**
19
+ * Prefix of every `sessionList(...)` cache and of nothing else — for writes
20
+ * that must touch the LISTS only. `sessions` is too wide for that: it also
21
+ * prefixes the single-session and messages keys.
22
+ */
23
+ sessionLists: readonly ["belong", "sessions", "list"];
18
24
  /** Invalidation prefix for every skills-inventory read. */
19
25
  skills: readonly ["belong", "skills"];
20
26
  /**
@@ -41,6 +47,8 @@ export declare const queryKeys: {
41
47
  skillLibrary: readonly ["belong", "skill-library"];
42
48
  /** Workspace-scoped library list ("" unscoped, "__missing__" never fetched). */
43
49
  skillLibraryList: (workspaceKey: string) => readonly ["belong", "skill-library", "list", string];
50
+ /** One skill's instructions + file list. By id, not by workspace: the route checks the owner. */
51
+ skillLibraryContent: (userSkillId: string) => readonly ["belong", "skill-library", "content", string];
44
52
  /**
45
53
  * UNSCOPED deployment probe: written by every list resolution, read by the
46
54
  * rail. Whether the feature exists is a property of the CELL, not of a
@@ -72,6 +72,73 @@ export type DeleteSkillOutcome = {
72
72
  } | {
73
73
  readonly status: "error";
74
74
  };
75
+ /** One skill's instructions, and the paths of its other (read-only) files. */
76
+ export type SkillContent = {
77
+ readonly userSkillId: string;
78
+ readonly name: string;
79
+ readonly description: string;
80
+ readonly skillMd: string;
81
+ readonly revision: number;
82
+ readonly enabled: boolean;
83
+ readonly hasScripts: boolean;
84
+ /** Relative to the skill folder, sorted; empty for an instruction-only skill. */
85
+ readonly files: readonly string[];
86
+ };
87
+ type SkillContentResult = {
88
+ readonly status: "ready";
89
+ readonly content: SkillContent;
90
+ } | {
91
+ readonly status: "not_found";
92
+ } | {
93
+ readonly status: "feature_absent";
94
+ };
95
+ type UpdateSkillContentInput = {
96
+ readonly userSkillId: string;
97
+ readonly skillMd: string;
98
+ /** The revision the edited text was read at (optimistic concurrency). */
99
+ readonly expectedRevision: number;
100
+ };
101
+ type SavedSkillContent = {
102
+ readonly userSkillId: string;
103
+ readonly name: string;
104
+ readonly revision: number;
105
+ };
106
+ export type UpdateSkillContentOutcome = ({
107
+ readonly status: "updated";
108
+ } & SavedSkillContent)
109
+ /** Same id and on/off state, new name (the `name:` line changed). */
110
+ | ({
111
+ readonly status: "renamed";
112
+ } & SavedSkillContent)
113
+ /** Nothing written; the current name and revision. */
114
+ | ({
115
+ readonly status: "unchanged";
116
+ } & SavedSkillContent) | {
117
+ readonly status: "revision_stale";
118
+ readonly revision: number;
119
+ } | {
120
+ readonly status: "name_taken";
121
+ readonly name: string;
122
+ readonly userSkillId: string;
123
+ } | {
124
+ readonly status: "name_reserved";
125
+ readonly name: string;
126
+ readonly reservedBy: SkillNameReservedBy;
127
+ } | {
128
+ readonly status: "content_reserved";
129
+ } | {
130
+ readonly status: "invalid_skill_archive";
131
+ readonly reason: string;
132
+ } | {
133
+ readonly status: "archive_too_large";
134
+ readonly maxArchiveBytes: number;
135
+ } | {
136
+ readonly status: "not_found";
137
+ } | {
138
+ readonly status: "feature_absent";
139
+ } | {
140
+ readonly status: "error";
141
+ };
75
142
  export declare const listSkillLibraryRequest: (api: ApiClient, query: {
76
143
  readonly workspaceExternalId?: string;
77
144
  }, signal?: AbortSignal) => Promise<SkillLibraryListResult>;
@@ -97,4 +164,18 @@ export declare const useSetSkillEnabled: () => import('@tanstack/react-query').U
97
164
  readonly enabled: boolean;
98
165
  }, unknown>;
99
166
  export declare const useDeleteSkill: () => import('@tanstack/react-query').UseMutationResult<DeleteSkillOutcome, Error, string, unknown>;
167
+ /**
168
+ * Fresh on every open (`refetchOnMount: "always"`), and forgotten once the dialog
169
+ * closes (`gcTime: 0`), so a reopen never paints the text from before a save.
170
+ * The dialog keeps its OWN copy of what the user is editing, so a refetch here
171
+ * (an agent write invalidating the library) never replaces a draft.
172
+ */
173
+ export declare const useSkillContent: (userSkillId: string) => UseQueryResult<SkillContentResult>;
174
+ /**
175
+ * Edit a skill's instructions (a changed `name:` line renames it). ONE attempt,
176
+ * never retried: the server already applied a PUT whose response was lost, so a
177
+ * replay would come back `revision_stale` — the dialog's Reload handles that.
178
+ */
179
+ export declare const useUpdateSkillContent: () => import('@tanstack/react-query').UseMutationResult<UpdateSkillContentOutcome, Error, UpdateSkillContentInput, unknown>;
100
180
  export declare const skillLibraryDownloadUrl: (baseUrl: string, userSkillId: string) => string;
181
+ export {};
@@ -1,6 +1,6 @@
1
- import { g as p, r as u, d as n } from "./chunk-6Q2QTUOP-DZkWqf90.js";
2
- import { p as f } from "./chunk-JWPE2WC7-DAn-TcDC.js";
3
- import { _ as a, l as o } from "./mermaid-GHXKKRXX-B-ea5OKA.js";
1
+ import { g as p, r as u, d as n } from "./chunk-6Q2QTUOP-oYZ6WlsT.js";
2
+ import { p as f } from "./chunk-JWPE2WC7-BsHiqT8c.js";
3
+ import { _ as a, l as o } from "./mermaid-GHXKKRXX-CssTT3y2.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-bM1BoI0O.js.map
90
+ //# sourceMappingURL=abnfDiagram-N423BO3Z-BZFjrvGh.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-B-ea5OKA.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-CssTT3y2.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-DaSgre52.js.map
86
+ //# sourceMappingURL=arc-R371iLQK.js.map
@@ -1,5 +1,5 @@
1
- import { p as ke } from "./chunk-JWPE2WC7-DAn-TcDC.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-B-ea5OKA.js";
1
+ import { p as ke } from "./chunk-JWPE2WC7-BsHiqT8c.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-CssTT3y2.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-avMCXzQw.js.map
4784
+ //# sourceMappingURL=architectureDiagram-T3A2C74G-CcH5CU8G.js.map
@@ -1,7 +1,7 @@
1
- import { g as de } from "./chunk-5VM5RSS4-B21XfkBj.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-B-ea5OKA.js";
1
+ import { g as de } from "./chunk-5VM5RSS4-DphP3gZj.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-CssTT3y2.js";
3
3
  import { G as Ze } from "./graph-CWpEkm4G.js";
4
- import { c as qe } from "./channel-DlmuDpcv.js";
4
+ import { c as qe } from "./channel-CTk2u27P.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-Cg6EDrdt.js.map
2422
+ //# sourceMappingURL=blockDiagram-VBNYF7ZC-CO21oaME.js.map
@@ -1,5 +1,5 @@
1
- import { g as Oe, d as Re } from "./chunk-2GRJ4B5K-Drdf-9Az.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-B-ea5OKA.js";
1
+ import { g as Oe, d as Re } from "./chunk-2GRJ4B5K-DLJBmRlE.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-CssTT3y2.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-DhUs6wdK.js.map
1586
+ //# sourceMappingURL=c4Diagram-5PPSVZJV-DFdczxGA.js.map