bazilion 0.13.0 → 0.14.0

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 (163) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/cli.js.map +1 -1
  3. package/dist/daemon.js +25 -5
  4. package/dist/daemon.js.map +1 -1
  5. package/dist/web/client/assets/AgentTabs-BcmmwYJc.js +1 -0
  6. package/dist/web/client/assets/ConfigPage-BCLp-FUC.js +1 -0
  7. package/dist/web/client/assets/ConfirmDialog-CyL9A20V.js +1 -0
  8. package/dist/web/client/assets/FieldRow-D6REbYUa.js +1 -0
  9. package/dist/web/client/assets/Page-NV96O47A.js +1 -0
  10. package/dist/web/client/assets/ProductionTeamPolicyEditor-DBKnOezm.js +7 -0
  11. package/dist/web/client/assets/{ProfileCommunicationEditor-BcSf2Hao.js → ProfileCommunicationEditor-4RK2laqO.js} +1 -1
  12. package/dist/web/client/assets/SectionTabs-4kCQXuFY.js +1 -0
  13. package/dist/web/client/assets/TeamTabs-CdtNEqt4.js +1 -0
  14. package/dist/web/client/assets/{TemplatesTabs-CyDVzrOl.js → TemplatesTabs-CZyss2Y0.js} +1 -1
  15. package/dist/web/client/assets/UnsavedChangesGuard-CEoK-ZcN.js +1 -0
  16. package/dist/web/client/assets/_id-4ZS-w_Aj.js +1 -0
  17. package/dist/web/client/assets/{_id-DWTMH7Eb.js → _id-DIqtdQij.js} +1 -1
  18. package/dist/web/client/assets/_id-DbcC2E7F.js +1 -0
  19. package/dist/web/client/assets/_id-f_r5M0p3.js +1 -0
  20. package/dist/web/client/assets/activity-CB9Ufth-.js +1 -0
  21. package/dist/web/client/assets/agents-D-JGXVg9.js +1 -0
  22. package/dist/web/client/assets/agents-DS2XafoA.js +1 -0
  23. package/dist/web/client/assets/approvals-Cke_mrJv.js +1 -0
  24. package/dist/web/client/assets/attention-PYwRM2wC.js +1 -0
  25. package/dist/web/client/assets/chevron-right-BG4OeFRQ.js +1 -0
  26. package/dist/web/client/assets/config-DF9Gqmfa.js +3 -0
  27. package/dist/web/client/assets/{inbox-D2NypLee.js → inbox-DC_HdOfI.js} +1 -1
  28. package/dist/web/client/assets/index-Cp6UHWr2.js +52 -0
  29. package/dist/web/client/assets/learning-BfrQ4YZY.js +1 -0
  30. package/dist/web/client/assets/login-D4n3AcBR.js +1 -0
  31. package/dist/web/client/assets/mcp-CnjQc_JJ.js +1 -0
  32. package/dist/web/client/assets/members-wxsVTJdW.js +1 -0
  33. package/dist/web/client/assets/memory-Du60O3pE.js +1 -0
  34. package/dist/web/client/assets/{policy-CHM95pMU.js → policy-BOfnkJsL.js} +1 -1
  35. package/dist/web/client/assets/{preload-helper-mNuBjNXU.js → preload-helper-bztXdkDj.js} +1 -1
  36. package/dist/web/client/assets/routes-B9CuhzUW.js +1 -0
  37. package/dist/web/client/assets/services-DyvqJqM2.js +1 -0
  38. package/dist/web/client/assets/skills-DQo7ioW7.js +1 -0
  39. package/dist/web/client/assets/styles-B5vcgXln.css +2 -0
  40. package/dist/web/client/assets/{teams-Dm_huGxn.js → teams-DPggy97H.js} +1 -1
  41. package/dist/web/client/assets/teams-DdawcfNR.js +1 -0
  42. package/dist/web/client/assets/telegram-DcTeDpP5.js +1 -0
  43. package/dist/web/client/assets/tokens-CIEKwZXc.js +1 -0
  44. package/dist/web/client/assets/triggers-Bc2RrUPm.js +1 -0
  45. package/dist/web/client/assets/utils-B6KiDbIe.js +1 -0
  46. package/dist/web/client/assets/welcome-DlhNXUIa.js +1 -0
  47. package/dist/web/client/assets/wire-constants-BzdHSc6A.js +74 -0
  48. package/dist/web/client/assets/x-DAXGIe_Q.js +1 -0
  49. package/dist/web/server/assets/{AgentTabs-aXdsiiMp.js → AgentTabs-Dq8hDM2Q.js} +9 -2
  50. package/dist/web/server/assets/{ChatPane-Ba5wTsVk.js → ChatPane-CgSe7tsy.js} +81 -43
  51. package/dist/web/server/assets/{ConfigPage-BKlh5vOU.js → ConfigPage-CiQ-gxmJ.js} +3 -2
  52. package/dist/web/server/assets/ConfirmDialog-C-MPYYSU.js +99 -0
  53. package/dist/web/server/assets/FieldRow-DCOF07kl.js +160 -0
  54. package/dist/web/server/assets/{Page-LENulSXY.js → Page-Bz-ydB8j.js} +4 -10
  55. package/dist/web/server/assets/{ProductionTeamPolicyEditor-Y4mzFFvR.js → ProductionTeamPolicyEditor-DQSdP7Yx.js} +140 -123
  56. package/dist/web/server/assets/{SectionTabs-BJTPr5nU.js → SectionTabs-B2Yw81XN.js} +2 -2
  57. package/dist/web/server/assets/{Sidebar-DsRVCszF.js → Sidebar-DKyk7oIo.js} +563 -283
  58. package/dist/web/server/assets/{TeamTabs-zZzbP1t_.js → TeamTabs-Co3n2exj.js} +2 -6
  59. package/dist/web/server/assets/{TemplatesTabs-CcRxZhJe.js → TemplatesTabs-B0fA361R.js} +1 -1
  60. package/dist/web/server/assets/UnsavedChangesGuard-CiStXyBI.js +40 -0
  61. package/dist/web/server/assets/{_id-xTD_6ApX.js → _id-BAA9KJBU.js} +1 -1
  62. package/dist/web/server/assets/{_id-BQ2zoMiR.js → _id-BM5m2FLT.js} +4 -4
  63. package/dist/web/server/assets/{_id-BENqNBfK.js → _id-BYKpT2Tu.js} +1 -2
  64. package/dist/web/server/assets/{_id-BreRHYV2.js → _id-BeKhPKw3.js} +350 -185
  65. package/dist/web/server/assets/{_id-CPIXIqyO.js → _id-BqWTB8Wl.js} +188 -86
  66. package/dist/web/server/assets/{_id-DkrNqqTw.js → _id-BwvCtzlD.js} +1 -1
  67. package/dist/web/server/assets/{_id-BZWunvy7.js → _id-DYU6uIBx.js} +0 -1
  68. package/dist/web/server/assets/{_id-BFELaMIN.js → _id-ndxFHx0t.js} +75 -71
  69. package/dist/web/server/assets/{_id-CvYqVJPU.js → _id-sNu5aXZt.js} +2 -1
  70. package/dist/web/server/assets/{_tanstack-start-manifest_v-COkJjXt_.js → _tanstack-start-manifest_v-C-OiOZeM.js} +110 -87
  71. package/dist/web/server/assets/{activity-B6N1T_5N.js → activity-BWv1goK6.js} +3 -3
  72. package/dist/web/server/assets/{activity-BazZNfvf.js → activity-LjpblbDL.js} +1 -1
  73. package/dist/web/server/assets/{agents-BpSeOA30.js → agents-BDFGrU3o.js} +1 -1
  74. package/dist/web/server/assets/{agents-DY630p6x.js → agents-CJk4pxKu.js} +1 -1
  75. package/dist/web/server/assets/{agents-wSYNPuyK.js → agents-CYw1xHoY.js} +138 -16
  76. package/dist/web/server/assets/{agents-DfoLnTyD.js → agents-DfNKc_Q7.js} +52 -8
  77. package/dist/web/server/assets/{approvals-BkUGmYU9.js → approvals-7JOoBchn.js} +1 -1
  78. package/dist/web/server/assets/{approvals-BYajNOdE.js → approvals-Bz123liE.js} +59 -21
  79. package/dist/web/server/assets/{attention-Bw_wiiqI.js → attention-B35JvhOL.js} +1 -1
  80. package/dist/web/server/assets/{attention-Z3bGuxOD.js → attention-C1pPWSXw.js} +3 -3
  81. package/dist/web/server/assets/{config-wYtIhkRm.js → config-BlMkHStx.js} +1 -1
  82. package/dist/web/server/assets/config-ExacOzHX.js +958 -0
  83. package/dist/web/server/assets/{inbox-DTTfSuGU.js → inbox-RweGCV3D.js} +3 -3
  84. package/dist/web/server/assets/{inbox-0iiSg-Y1.js → inbox-cu3jLzNP.js} +1 -1
  85. package/dist/web/server/assets/{learning-DpyLNVe8.js → learning-BaKM6qaw.js} +1 -1
  86. package/dist/web/server/assets/{learning-fG8316uc.js → learning-CbtNlqYo.js} +76 -23
  87. package/dist/web/server/assets/{login-D_GDeTrB.js → login-BNj3U6ok.js} +21 -11
  88. package/dist/web/server/assets/{login-CrFVVUaE.js → login-Be8eP4Jp.js} +2 -2
  89. package/dist/web/server/assets/{mcp-BQtp2T87.js → mcp-B0goWO8Q.js} +1 -1
  90. package/dist/web/server/assets/mcp-CiBs8unU.js +332 -0
  91. package/dist/web/server/assets/members-DHYTVgwb.js +100 -0
  92. package/dist/web/server/assets/{members-DXu2oAS_.js → members-DiYtr-zm.js} +1 -1
  93. package/dist/web/server/assets/{memory-C6fX_FKI.js → memory-CkXUgf5s.js} +150 -48
  94. package/dist/web/server/assets/{memory-Iq2M0-Yc.js → memory-DTFEmfF3.js} +1 -1
  95. package/dist/web/server/assets/{policy-D7kj3Cy7.js → policy-BddK4xom.js} +1 -1
  96. package/dist/web/server/assets/{policy-Bg6u-rTq.js → policy-Bvvav8fh.js} +4 -4
  97. package/dist/web/server/assets/{router-D-6TzLRZ.js → router-pjH2t8Rl.js} +345 -172
  98. package/dist/web/server/assets/{routes-CiPfEldd.js → routes-BgHisAxH.js} +22 -5
  99. package/dist/web/server/assets/{routes-CNRzy79H.js → routes-COtkyZG1.js} +1 -1
  100. package/dist/web/server/assets/{routes-D933ngZS.js → routes-DAU2g7Uz.js} +1 -1
  101. package/dist/web/server/assets/services-ClyGBU7W.js +83 -0
  102. package/dist/web/server/assets/{services-OB4LAr2A.js → services-DgoU1udp.js} +1 -1
  103. package/dist/web/server/assets/{skills-Babb9jsQ.js → skills-CYih9TJw.js} +47 -6
  104. package/dist/web/server/assets/{skills-D5DQL8bM.js → skills-Dw3cI3si.js} +1 -1
  105. package/dist/web/server/assets/{start-uKQNK6if.js → start-D4Wq9iTa.js} +1 -1
  106. package/dist/web/server/assets/{teams-Dz6ZEMRo.js → teams-BJuoNOTB.js} +1 -1
  107. package/dist/web/server/assets/{teams-Bk6ZT0MD.js → teams-DF3RViAg.js} +3 -3
  108. package/dist/web/server/assets/{teams-DqC4wZxu.js → teams-DFnuc660.js} +1 -1
  109. package/dist/web/server/assets/{teams-Cc2Czynq.js → teams-TV6nbEN_.js} +101 -10
  110. package/dist/web/server/assets/{telegram-J4T0XhwQ.js → telegram-DbOFpTFm.js} +1 -1
  111. package/dist/web/server/assets/{telegram-DUbDIVGX.js → telegram-Dj4Wwhd6.js} +147 -47
  112. package/dist/web/server/assets/{tokens-CJM_0NDa.js → tokens-DDwtO15P.js} +88 -19
  113. package/dist/web/server/assets/{tokens-DO5BzNOn.js → tokens-_2hptHP6.js} +1 -1
  114. package/dist/web/server/assets/{triggers-BdBx-HwR.js → triggers-BvjYNmmY.js} +1 -1
  115. package/dist/web/server/assets/triggers-CHk9O3rU.js +367 -0
  116. package/dist/web/server/assets/utils-C_uf36nf.js +8 -0
  117. package/dist/web/server/assets/{welcome-DDB11L5j.js → welcome-B8nchXdF.js} +9 -8
  118. package/dist/web/server/server.js +5 -9
  119. package/package.json +3 -3
  120. package/dist/web/client/assets/AgentTabs-R6gSjIj3.js +0 -1
  121. package/dist/web/client/assets/ConfigPage-BCwfgyjD.js +0 -1
  122. package/dist/web/client/assets/FieldRow-avAFLgYW.js +0 -1
  123. package/dist/web/client/assets/Page-CwNuDhWz.js +0 -1
  124. package/dist/web/client/assets/ProductionTeamPolicyEditor-DdpYInwV.js +0 -7
  125. package/dist/web/client/assets/SectionTabs-DZzy01az.js +0 -1
  126. package/dist/web/client/assets/TeamTabs-Bk89JfN7.js +0 -1
  127. package/dist/web/client/assets/_id-CAJTTnee.js +0 -1
  128. package/dist/web/client/assets/_id-CN6jPaBu.js +0 -1
  129. package/dist/web/client/assets/_id-DGwJqqDc.js +0 -1
  130. package/dist/web/client/assets/activity-DK_M0-bn.js +0 -1
  131. package/dist/web/client/assets/agents-B-i5pASm.js +0 -1
  132. package/dist/web/client/assets/agents-n8U7qNxw.js +0 -1
  133. package/dist/web/client/assets/approvals-CmVxCy0Z.js +0 -1
  134. package/dist/web/client/assets/attention-F0lUQCWE.js +0 -1
  135. package/dist/web/client/assets/chevron-down-OndG7r1U.js +0 -1
  136. package/dist/web/client/assets/config-DuApZ9xS.js +0 -3
  137. package/dist/web/client/assets/context-C1sMnW6K.js +0 -1
  138. package/dist/web/client/assets/index-B3vdrEEg.js +0 -12
  139. package/dist/web/client/assets/learning-zYDCfVxT.js +0 -1
  140. package/dist/web/client/assets/login-B1Un51Zx.js +0 -1
  141. package/dist/web/client/assets/mcp-DSVmJBdv.js +0 -1
  142. package/dist/web/client/assets/members-Pl7hXJcN.js +0 -1
  143. package/dist/web/client/assets/memory-Co3BEaAq.js +0 -1
  144. package/dist/web/client/assets/plus-Dor-_wmL.js +0 -1
  145. package/dist/web/client/assets/routes-D29qjwG0.js +0 -1
  146. package/dist/web/client/assets/services-CCQ_6YWQ.js +0 -1
  147. package/dist/web/client/assets/skills-3xAIvzvP.js +0 -1
  148. package/dist/web/client/assets/styles-D6RPN7RK.css +0 -2
  149. package/dist/web/client/assets/teams-UGLyjHYj.js +0 -1
  150. package/dist/web/client/assets/telegram-3KvrJVO6.js +0 -1
  151. package/dist/web/client/assets/tokens-DUSFmV5_.js +0 -1
  152. package/dist/web/client/assets/triggers-DlQ2KF1h.js +0 -1
  153. package/dist/web/client/assets/welcome-DkP8qzK1.js +0 -1
  154. package/dist/web/client/assets/wire-constants-BhVKOCQa.js +0 -74
  155. package/dist/web/server/assets/FieldRow-B4eTegH9.js +0 -94
  156. package/dist/web/server/assets/config-DGzM28F_.js +0 -554
  157. package/dist/web/server/assets/context-BkDDwbby.js +0 -12
  158. package/dist/web/server/assets/context-DMc0KyHh.js +0 -12
  159. package/dist/web/server/assets/context-poimKI7w.js +0 -47
  160. package/dist/web/server/assets/mcp-DlgXUcAS.js +0 -261
  161. package/dist/web/server/assets/members-CteHKPSF.js +0 -46
  162. package/dist/web/server/assets/services-DJRA1A0-.js +0 -79
  163. package/dist/web/server/assets/triggers-B87fycBl.js +0 -216
@@ -1,6 +1,6 @@
1
- import { t as Route } from "./inbox-0iiSg-Y1.js";
2
- import { r as PageShell } from "./Page-LENulSXY.js";
3
- import { t as AgentTabs } from "./AgentTabs-aXdsiiMp.js";
1
+ import { t as Route } from "./inbox-cu3jLzNP.js";
2
+ import { r as PageShell } from "./Page-Bz-ydB8j.js";
3
+ import { t as AgentTabs } from "./AgentTabs-Dq8hDM2Q.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/routes/agents/$id/inbox.tsx?tsr-split=component
6
6
  function decodeText(payload) {
@@ -2,7 +2,7 @@ import { n as createServerFn } from "../server.js";
2
2
  import { t as createSsrRpc } from "./createSsrRpc-6LHNEsSK.js";
3
3
  import { createFileRoute, lazyRouteComponent, redirect } from "@tanstack/react-router";
4
4
  //#region src/routes/agents/$id/inbox.tsx
5
- var $$splitComponentImporter = () => import("./inbox-DTTfSuGU.js");
5
+ var $$splitComponentImporter = () => import("./inbox-RweGCV3D.js");
6
6
  var fetchInbox = createServerFn({ method: "POST" }).validator((d) => d).handler(createSsrRpc("2cd8c6ec40e2e2d9518b5f127a518ecd83a2222d85665cc61d5144bcf59ed4fb"));
7
7
  var Route = createFileRoute("/agents/$id/inbox")({
8
8
  validateSearch: (s) => ({
@@ -2,7 +2,7 @@ import { n as createServerFn } from "../server.js";
2
2
  import { t as createSsrRpc } from "./createSsrRpc-6LHNEsSK.js";
3
3
  import { createFileRoute, lazyRouteComponent, redirect } from "@tanstack/react-router";
4
4
  //#region src/routes/agents/$id/learning.tsx
5
- var $$splitComponentImporter = () => import("./learning-fG8316uc.js");
5
+ var $$splitComponentImporter = () => import("./learning-CbtNlqYo.js");
6
6
  var fetchLearning = createServerFn({ method: "POST" }).validator((data) => data).handler(createSsrRpc("fcdd0f08b635c7c501caa840d01d1376ace6683e26cc5ac7dead28d7870f98b9"));
7
7
  var Route = createFileRoute("/agents/$id/learning")({
8
8
  loader: async ({ params }) => {
@@ -1,7 +1,8 @@
1
- import { t as Route } from "./learning-DpyLNVe8.js";
2
- import { r as PageShell } from "./Page-LENulSXY.js";
3
- import { t as AgentTabs } from "./AgentTabs-aXdsiiMp.js";
1
+ import { t as Route } from "./learning-BaKM6qaw.js";
2
+ import { r as PageShell } from "./Page-Bz-ydB8j.js";
3
+ import { t as AgentTabs } from "./AgentTabs-Dq8hDM2Q.js";
4
4
  import { t as Button } from "./Button-Dsnw22OF.js";
5
+ import { t as ConfirmDialog } from "./ConfirmDialog-C-MPYYSU.js";
5
6
  import { useState } from "react";
6
7
  import { useRouter } from "@tanstack/react-router";
7
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -11,7 +12,7 @@ function LearningPage() {
11
12
  const router = useRouter();
12
13
  const [error, setError] = useState(null);
13
14
  const [busy, setBusy] = useState(false);
14
- async function request(path, method, body) {
15
+ async function request(path, method, body, throwOnError = false) {
15
16
  setError(null);
16
17
  setBusy(true);
17
18
  try {
@@ -26,7 +27,9 @@ function LearningPage() {
26
27
  }
27
28
  await router.invalidate();
28
29
  } catch (cause) {
29
- setError(cause instanceof Error ? cause.message : String(cause));
30
+ const failure = cause instanceof Error ? cause : new Error(String(cause));
31
+ setError(failure.message);
32
+ if (throwOnError) throw failure;
30
33
  } finally {
31
34
  setBusy(false);
32
35
  }
@@ -43,6 +46,7 @@ function LearningPage() {
43
46
  archived: resolved.agent.status === "archived"
44
47
  }),
45
48
  error && /* @__PURE__ */ jsxs("p", {
49
+ role: "alert",
46
50
  className: "mb-4 rounded border border-red-300 bg-red-50 p-3 text-sm text-red-800",
47
51
  children: [error, ". Refresh before retrying if another operator changed this proposal."]
48
52
  }),
@@ -56,7 +60,8 @@ function LearningPage() {
56
60
  /* @__PURE__ */ jsxs("p", {
57
61
  className: "mb-4 text-sm text-muted-foreground",
58
62
  children: [
59
- "Reviews inspect at most 8 successful user turns and 40,000 characters. They use ",
63
+ "Reviews inspect at most 8 successful user turns and 40,000 characters. They use",
64
+ " ",
60
65
  config.model ?? "the Agent model",
61
66
  " at ",
62
67
  config.reasoningLevel,
@@ -159,7 +164,7 @@ function ReviewConfigForm({ agentId, config, disabled, onError, onSaved }) {
159
164
  className: "text-sm",
160
165
  children: [
161
166
  /* @__PURE__ */ jsx("span", {
162
- className: "block mb-1",
167
+ className: "mb-1 block",
163
168
  children: "Periodic review"
164
169
  }),
165
170
  /* @__PURE__ */ jsx("input", {
@@ -167,13 +172,14 @@ function ReviewConfigForm({ agentId, config, disabled, onError, onSaved }) {
167
172
  checked: enabled,
168
173
  onChange: (event) => setEnabled(event.target.checked)
169
174
  }),
170
- " enabled"
175
+ " ",
176
+ "enabled"
171
177
  ]
172
178
  }),
173
179
  /* @__PURE__ */ jsxs("label", {
174
180
  className: "text-sm",
175
181
  children: [/* @__PURE__ */ jsx("span", {
176
- className: "block mb-1",
182
+ className: "mb-1 block",
177
183
  children: "Every turns"
178
184
  }), /* @__PURE__ */ jsx("input", {
179
185
  type: "number",
@@ -186,7 +192,7 @@ function ReviewConfigForm({ agentId, config, disabled, onError, onSaved }) {
186
192
  /* @__PURE__ */ jsxs("label", {
187
193
  className: "text-sm",
188
194
  children: [/* @__PURE__ */ jsx("span", {
189
- className: "block mb-1",
195
+ className: "mb-1 block",
190
196
  children: "Model override"
191
197
  }), /* @__PURE__ */ jsx("input", {
192
198
  value: model,
@@ -197,7 +203,7 @@ function ReviewConfigForm({ agentId, config, disabled, onError, onSaved }) {
197
203
  /* @__PURE__ */ jsxs("label", {
198
204
  className: "text-sm",
199
205
  children: [/* @__PURE__ */ jsx("span", {
200
- className: "block mb-1",
206
+ className: "mb-1 block",
201
207
  children: "Reasoning"
202
208
  }), /* @__PURE__ */ jsxs("select", {
203
209
  value: reasoning,
@@ -224,7 +230,29 @@ function ReviewConfigForm({ agentId, config, disabled, onError, onSaved }) {
224
230
  function ProposalCard({ proposal, agentId, busy, act }) {
225
231
  const [text, setText] = useState(proposal.text);
226
232
  const [scope, setScope] = useState(proposal.scope);
233
+ const [confirmAction, setConfirmAction] = useState(null);
227
234
  const base = `/api/agents/${encodeURIComponent(agentId)}/lesson-proposals/${encodeURIComponent(proposal.id)}`;
235
+ const textId = `lesson-proposal-${proposal.id}-text`;
236
+ const scopeId = `lesson-proposal-${proposal.id}-scope`;
237
+ const summary = proposal.text.length > 54 ? `${proposal.text.slice(0, 51)}…` : proposal.text;
238
+ const confirmation = confirmAction === "reject" ? {
239
+ title: `Reject “${summary}”?`,
240
+ confirmLabel: "Reject proposal",
241
+ description: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("p", { children: "This permanently marks the saved proposal as rejected. It will never change the Agent’s prompts or Team memory, while its text and evidence remain in review history for audit." }), /* @__PURE__ */ jsx("p", {
242
+ className: "mt-2",
243
+ children: "Any edits not saved first will be discarded. A rejected proposal cannot be edited or approved later."
244
+ })] })
245
+ } : {
246
+ title: `Revoke “${summary}”?`,
247
+ confirmLabel: "Revoke lesson",
248
+ description: proposal.scope === "shared" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("p", { children: "This removes the applied lesson note from Team memory, so it will no longer appear in Team-memory search." }), /* @__PURE__ */ jsx("p", {
249
+ className: "mt-2",
250
+ children: "The proposal and its original approval remain in review history for audit. This cannot be undone here."
251
+ })] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("p", { children: "This removes the approved lesson from the Agent’s future prompts. It does not rewrite past conversations." }), /* @__PURE__ */ jsx("p", {
252
+ className: "mt-2",
253
+ children: "The proposal and its original approval remain in review history for audit. This cannot be undone here."
254
+ })] })
255
+ };
228
256
  return /* @__PURE__ */ jsxs("article", {
229
257
  className: "rounded-lg border bg-card p-4",
230
258
  children: [
@@ -236,14 +264,25 @@ function ProposalCard({ proposal, agentId, busy, act }) {
236
264
  })]
237
265
  }),
238
266
  proposal.status === "pending" ? /* @__PURE__ */ jsxs(Fragment, { children: [
267
+ /* @__PURE__ */ jsx("label", {
268
+ htmlFor: textId,
269
+ className: "mb-1 block text-sm font-medium",
270
+ children: "Proposed lesson"
271
+ }),
239
272
  /* @__PURE__ */ jsx("textarea", {
273
+ id: textId,
240
274
  className: "w-full",
241
275
  rows: 3,
242
276
  value: text,
243
277
  onChange: (event) => setText(event.target.value)
244
278
  }),
279
+ /* @__PURE__ */ jsx("label", {
280
+ htmlFor: scopeId,
281
+ className: "mb-1 mt-3 block text-sm font-medium",
282
+ children: "Apply approved lesson to"
283
+ }),
245
284
  /* @__PURE__ */ jsxs("select", {
246
- className: "mt-2",
285
+ id: scopeId,
247
286
  value: scope,
248
287
  onChange: (event) => setScope(event.target.value),
249
288
  children: [/* @__PURE__ */ jsx("option", {
@@ -276,7 +315,7 @@ function ProposalCard({ proposal, agentId, busy, act }) {
276
315
  /* @__PURE__ */ jsx(Button, {
277
316
  variant: "danger",
278
317
  disabled: busy,
279
- onClick: () => act(`${base}/reject`, "POST", { version: proposal.version }),
318
+ onClick: () => setConfirmAction("reject"),
280
319
  children: "Reject"
281
320
  })
282
321
  ]
@@ -286,24 +325,38 @@ function ProposalCard({ proposal, agentId, busy, act }) {
286
325
  children: /* @__PURE__ */ jsx(Button, {
287
326
  variant: "danger",
288
327
  disabled: busy,
289
- onClick: () => act(`${base}/revoke`, "POST", { version: proposal.version }),
328
+ onClick: () => setConfirmAction("revoke"),
290
329
  children: "Revoke"
291
330
  })
292
331
  })] }),
293
332
  /* @__PURE__ */ jsxs("div", {
294
333
  className: "mt-3 text-xs text-muted-foreground",
295
- children: ["Evidence: ", proposal.evidence.length === 0 ? "none" : /* @__PURE__ */ jsx("ul", {
296
- className: "mt-1 list-disc pl-5",
297
- children: proposal.evidence.map((item) => /* @__PURE__ */ jsxs("li", { children: [/* @__PURE__ */ jsxs("code", { children: [
298
- item.sessionId,
299
- ":",
300
- item.entryOrdinal
301
- ] }), item.excerpt ? ` — ${item.excerpt}` : " — excerpt unavailable"] }, `${item.sessionId}:${item.entryOrdinal}`))
302
- })]
334
+ children: [
335
+ "Evidence:",
336
+ " ",
337
+ proposal.evidence.length === 0 ? "none" : /* @__PURE__ */ jsx("ul", {
338
+ className: "mt-1 list-disc pl-5",
339
+ children: proposal.evidence.map((item) => /* @__PURE__ */ jsxs("li", { children: [/* @__PURE__ */ jsxs("code", { children: [
340
+ item.sessionId,
341
+ ":",
342
+ item.entryOrdinal
343
+ ] }), item.excerpt ? ` — ${item.excerpt}` : " — excerpt unavailable"] }, `${item.sessionId}:${item.entryOrdinal}`))
344
+ })
345
+ ]
303
346
  }),
304
- scope === "shared" && /* @__PURE__ */ jsx("p", {
347
+ proposal.status === "pending" && scope === "shared" && /* @__PURE__ */ jsx("p", {
305
348
  className: "mt-1 text-xs text-muted-foreground",
306
349
  children: "Shared lessons become searchable Team memory. Stable facts about the human belong in Team USER.md instead."
350
+ }),
351
+ confirmAction && /* @__PURE__ */ jsx(ConfirmDialog, {
352
+ open: true,
353
+ title: confirmation.title,
354
+ description: confirmation.description,
355
+ confirmLabel: confirmation.confirmLabel,
356
+ onOpenChange: (open) => {
357
+ if (!open) setConfirmAction(null);
358
+ },
359
+ onConfirm: () => act(`${base}/${confirmAction}`, "POST", { version: proposal.version }, true)
307
360
  })
308
361
  ]
309
362
  });
@@ -1,4 +1,4 @@
1
- import { i as BaziuLogo, n as ThemeToggle, r as PawIcon, t as Route } from "./login-CrFVVUaE.js";
1
+ import { i as BaziuLogo, n as ThemeToggle, r as PawIcon, t as Route } from "./login-Be8eP4Jp.js";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { KeyRound, MessageSquareText, UsersRound } from "lucide-react";
4
4
  //#region src/routes/login.tsx?tsr-split=component
@@ -66,15 +66,26 @@ function LoginPage() {
66
66
  }),
67
67
  /* @__PURE__ */ jsx("h2", {
68
68
  className: "font-display text-3xl text-charcoal",
69
- children: "Welcome back"
69
+ children: "Open Bazilion"
70
70
  }),
71
71
  /* @__PURE__ */ jsx("p", {
72
72
  className: "mt-2 text-sm leading-6 text-mocha-light",
73
- children: "Use a named device token minted locally by your Bazilion CLI."
73
+ children: "Use the fresh-install credential once, then a named device token for future sign-ins."
74
74
  }),
75
- error && /* @__PURE__ */ jsx("div", {
75
+ error === "token" && /* @__PURE__ */ jsxs("div", {
76
76
  className: "err mt-5",
77
- children: "That token was not accepted."
77
+ role: "alert",
78
+ children: [
79
+ "That credential was not accepted. On first run, use the bootstrap token from",
80
+ " ",
81
+ /* @__PURE__ */ jsx("code", { children: "auth.json" }),
82
+ "; afterward, use a named device token."
83
+ ]
84
+ }),
85
+ error === "origin" && /* @__PURE__ */ jsx("div", {
86
+ className: "err mt-5",
87
+ role: "alert",
88
+ children: "Bazilion blocked the sign-in request because its browser origin was hidden. Reload this page and try again from the configured Bazilion address."
78
89
  }),
79
90
  /* @__PURE__ */ jsxs("form", {
80
91
  method: "POST",
@@ -105,19 +116,18 @@ function LoginPage() {
105
116
  /* @__PURE__ */ jsxs("p", {
106
117
  className: "mt-5 rounded-xl bg-ivory px-3 py-2.5 text-[0.78em] leading-relaxed text-mocha-light",
107
118
  children: [
108
- "On the server, run ",
109
- /* @__PURE__ */ jsx("code", { children: "bazilion token create browser" }),
110
- ". The bootstrap token in",
111
- " ",
119
+ "Fresh install? Paste the bootstrap token from ",
112
120
  /* @__PURE__ */ jsx("code", { children: "auth.json" }),
113
- " is intentionally rejected here."
121
+ "; it is accepted only until provider setup is complete and is exchanged for a bounded session. For later sign-ins, run ",
122
+ /* @__PURE__ */ jsx("code", { children: "bazilion token create browser" }),
123
+ " on the server."
114
124
  ]
115
125
  })
116
126
  ]
117
127
  })]
118
128
  }),
119
129
  /* @__PURE__ */ jsxs("footer", {
120
- className: "absolute bottom-4 left-0 right-0 text-center text-[0.75em] text-fawn",
130
+ className: "absolute bottom-4 left-0 right-0 text-center text-xs text-mocha-light",
121
131
  children: ["dedicated to Baziu", /* @__PURE__ */ jsx(PawIcon, { className: "ml-1 inline-block h-3 w-3 align-[-1px] opacity-40" })]
122
132
  })
123
133
  ]
@@ -109,9 +109,9 @@ function ThemeToggle() {
109
109
  }
110
110
  //#endregion
111
111
  //#region src/routes/login.tsx
112
- var $$splitComponentImporter = () => import("./login-D_GDeTrB.js");
112
+ var $$splitComponentImporter = () => import("./login-BNj3U6ok.js");
113
113
  var Route = createFileRoute("/login")({
114
- validateSearch: (search) => ({ error: search.error === "1" ? "1" : void 0 }),
114
+ validateSearch: (search) => ({ error: search.error === "token" || search.error === "origin" ? search.error : void 0 }),
115
115
  component: lazyRouteComponent($$splitComponentImporter, "component")
116
116
  });
117
117
  //#endregion
@@ -2,7 +2,7 @@ import { n as createServerFn } from "../server.js";
2
2
  import { t as createSsrRpc } from "./createSsrRpc-6LHNEsSK.js";
3
3
  import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
4
4
  //#region src/routes/config/mcp.tsx
5
- var $$splitComponentImporter = () => import("./mcp-DlgXUcAS.js");
5
+ var $$splitComponentImporter = () => import("./mcp-CiBs8unU.js");
6
6
  var fetchServers = createServerFn({ method: "GET" }).handler(createSsrRpc("278849457893891c3d22806d15e11a0a42cc3630b30e9e62b74cf2d3b982ded7"));
7
7
  var Route = createFileRoute("/config/mcp")({
8
8
  loader: () => fetchServers(),
@@ -0,0 +1,332 @@
1
+ import { t as Route } from "./mcp-B0goWO8Q.js";
2
+ import { t as Button } from "./Button-Dsnw22OF.js";
3
+ import { t as ConfirmDialog } from "./ConfirmDialog-C-MPYYSU.js";
4
+ import { t as ConfigPage } from "./ConfigPage-CiQ-gxmJ.js";
5
+ import { useState } from "react";
6
+ import { useRouter } from "@tanstack/react-router";
7
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
+ //#region src/routes/config/mcp.tsx?tsr-split=component
9
+ var TRANSPORTS = [
10
+ "stdio",
11
+ "http",
12
+ "sse"
13
+ ];
14
+ function McpPage() {
15
+ const { servers } = Route.useLoaderData();
16
+ const router = useRouter();
17
+ const [name, setName] = useState("");
18
+ const [transport, setTransport] = useState("stdio");
19
+ const [command, setCommand] = useState("");
20
+ const [argsStr, setArgsStr] = useState("");
21
+ const [url, setUrl] = useState("");
22
+ const [token, setToken] = useState("");
23
+ const [err, setErr] = useState(null);
24
+ const [busy, setBusy] = useState(false);
25
+ const [testResult, setTestResult] = useState({});
26
+ const [actionBusy, setActionBusy] = useState(null);
27
+ const [deleteTarget, setDeleteTarget] = useState(null);
28
+ async function add(e) {
29
+ e.preventDefault();
30
+ setErr(null);
31
+ setBusy(true);
32
+ try {
33
+ const body = {
34
+ name,
35
+ transport,
36
+ command: transport === "stdio" ? command : null,
37
+ args: transport === "stdio" ? argsStr.split(" ").filter(Boolean) : [],
38
+ url: transport === "stdio" ? null : url,
39
+ authToken: token || void 0
40
+ };
41
+ const res = await fetch("/api/mcp-servers", {
42
+ method: "POST",
43
+ headers: { "content-type": "application/json" },
44
+ body: JSON.stringify(body)
45
+ });
46
+ if (!res.ok) {
47
+ const j = await res.json().catch(() => ({}));
48
+ throw new Error(j.error ?? `${res.status} ${res.statusText}`);
49
+ }
50
+ setName("");
51
+ setCommand("");
52
+ setArgsStr("");
53
+ setUrl("");
54
+ setToken("");
55
+ await router.invalidate();
56
+ } catch (e) {
57
+ setErr(e.message);
58
+ } finally {
59
+ setBusy(false);
60
+ }
61
+ }
62
+ async function toggle(s) {
63
+ setActionBusy(s.id);
64
+ setErr(null);
65
+ try {
66
+ const response = await fetch(`/api/mcp-servers/${encodeURIComponent(s.id)}`, {
67
+ method: "PATCH",
68
+ headers: { "content-type": "application/json" },
69
+ body: JSON.stringify({ enabled: !s.enabled })
70
+ });
71
+ if (!response.ok) {
72
+ const body = await response.json().catch(() => null);
73
+ throw new Error(body?.error ?? `Could not ${s.enabled ? "disable" : "enable"} server`);
74
+ }
75
+ await router.invalidate();
76
+ } catch (error) {
77
+ setErr(error instanceof Error ? error.message : String(error));
78
+ } finally {
79
+ setActionBusy(null);
80
+ }
81
+ }
82
+ async function remove(id) {
83
+ const response = await fetch(`/api/mcp-servers/${encodeURIComponent(id)}`, { method: "DELETE" });
84
+ if (!response.ok && response.status !== 204) {
85
+ const body = await response.json().catch(() => null);
86
+ throw new Error(body?.error ?? "Could not delete MCP server");
87
+ }
88
+ await router.invalidate();
89
+ }
90
+ async function test(id) {
91
+ setTestResult((r) => ({
92
+ ...r,
93
+ [id]: {
94
+ kind: "pending",
95
+ message: "Connecting…"
96
+ }
97
+ }));
98
+ try {
99
+ const res = await fetch(`/api/mcp-servers/${encodeURIComponent(id)}/test`, { method: "POST" });
100
+ const j = await res.json().catch(() => ({}));
101
+ setTestResult((r) => ({
102
+ ...r,
103
+ [id]: res.ok && j.ok ? {
104
+ kind: "success",
105
+ message: `${j.tools?.length ?? 0} tools: ${(j.tools ?? []).map((t) => t.name).join(", ")}`
106
+ } : {
107
+ kind: "error",
108
+ message: j.error ?? `Test failed (${res.status})`
109
+ }
110
+ }));
111
+ } catch (error) {
112
+ setTestResult((r) => ({
113
+ ...r,
114
+ [id]: {
115
+ kind: "error",
116
+ message: error instanceof Error ? error.message : String(error)
117
+ }
118
+ }));
119
+ }
120
+ }
121
+ return /* @__PURE__ */ jsxs(ConfigPage, {
122
+ active: "mcp",
123
+ title: "MCP servers",
124
+ description: /* @__PURE__ */ jsxs(Fragment, { children: [
125
+ "Expose tools from local or remote Model Context Protocol servers to every agent under the ",
126
+ /* @__PURE__ */ jsx("code", {
127
+ className: "font-mono",
128
+ children: "mcp__<server>__<tool>"
129
+ }),
130
+ " namespace. Local stdio servers inherit configured secrets; HTTP and SSE servers can use a bearer token."
131
+ ] }),
132
+ children: [
133
+ /* @__PURE__ */ jsxs("section", {
134
+ className: "rounded-lg border bg-card p-5",
135
+ children: [/* @__PURE__ */ jsx("h3", {
136
+ className: "font-serif text-xl mb-3",
137
+ children: "Add a server"
138
+ }), /* @__PURE__ */ jsxs("form", {
139
+ onSubmit: add,
140
+ className: "space-y-3",
141
+ children: [
142
+ /* @__PURE__ */ jsxs("div", {
143
+ className: "flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-end",
144
+ children: [/* @__PURE__ */ jsxs("label", {
145
+ className: "w-full text-sm sm:w-auto",
146
+ children: ["Name", /* @__PURE__ */ jsx("input", {
147
+ type: "text",
148
+ value: name,
149
+ onChange: (e) => setName(e.target.value),
150
+ required: true,
151
+ placeholder: "playwright",
152
+ pattern: "[a-zA-Z0-9_]+",
153
+ className: "mt-1 block w-full rounded-md border bg-background px-3 py-2 text-sm sm:w-48"
154
+ })]
155
+ }), /* @__PURE__ */ jsxs("label", {
156
+ className: "w-full text-sm sm:w-auto",
157
+ children: ["Transport", /* @__PURE__ */ jsx("select", {
158
+ value: transport,
159
+ onChange: (e) => setTransport(e.target.value),
160
+ className: "mt-1 block w-full rounded-md border bg-background px-3 py-2 text-sm",
161
+ children: TRANSPORTS.map((t) => /* @__PURE__ */ jsx("option", {
162
+ value: t,
163
+ children: t
164
+ }, t))
165
+ })]
166
+ })]
167
+ }),
168
+ transport === "stdio" ? /* @__PURE__ */ jsxs("div", {
169
+ className: "flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-end",
170
+ children: [/* @__PURE__ */ jsxs("label", {
171
+ className: "w-full text-sm sm:w-auto",
172
+ children: ["Command", /* @__PURE__ */ jsx("input", {
173
+ type: "text",
174
+ value: command,
175
+ onChange: (e) => setCommand(e.target.value),
176
+ placeholder: "npx",
177
+ className: "mt-1 block w-full rounded-md border bg-background px-3 py-2 text-sm sm:w-48"
178
+ })]
179
+ }), /* @__PURE__ */ jsxs("label", {
180
+ className: "w-full min-w-0 text-sm sm:flex-1",
181
+ children: ["Args (space-separated)", /* @__PURE__ */ jsx("input", {
182
+ type: "text",
183
+ value: argsStr,
184
+ onChange: (e) => setArgsStr(e.target.value),
185
+ placeholder: "-y @modelcontextprotocol/server-filesystem /tmp",
186
+ className: "block mt-1 rounded-md border bg-background px-3 py-2 text-sm w-full"
187
+ })]
188
+ })]
189
+ }) : /* @__PURE__ */ jsxs("div", {
190
+ className: "flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-end",
191
+ children: [/* @__PURE__ */ jsxs("label", {
192
+ className: "w-full min-w-0 text-sm sm:flex-1",
193
+ children: ["URL", /* @__PURE__ */ jsx("input", {
194
+ type: "url",
195
+ value: url,
196
+ onChange: (e) => setUrl(e.target.value),
197
+ placeholder: "https://mcp.example.com/sse",
198
+ className: "block mt-1 rounded-md border bg-background px-3 py-2 text-sm w-full"
199
+ })]
200
+ }), /* @__PURE__ */ jsxs("label", {
201
+ className: "w-full text-sm sm:w-auto",
202
+ children: ["Bearer token (optional)", /* @__PURE__ */ jsx("input", {
203
+ type: "password",
204
+ value: token,
205
+ onChange: (e) => setToken(e.target.value),
206
+ autoComplete: "off",
207
+ className: "mt-1 block w-full rounded-md border bg-background px-3 py-2 text-sm sm:w-56"
208
+ })]
209
+ })]
210
+ }),
211
+ /* @__PURE__ */ jsx(Button, {
212
+ variant: "primary",
213
+ type: "submit",
214
+ disabled: busy,
215
+ className: "w-full sm:w-auto",
216
+ children: busy ? "adding…" : "add server"
217
+ }),
218
+ err && /* @__PURE__ */ jsx("p", {
219
+ role: "alert",
220
+ className: "text-sm text-danger",
221
+ children: err
222
+ })
223
+ ]
224
+ })]
225
+ }),
226
+ /* @__PURE__ */ jsx("div", {
227
+ className: "overflow-x-auto",
228
+ children: /* @__PURE__ */ jsxs("table", {
229
+ className: "w-full min-w-[720px] text-sm",
230
+ children: [/* @__PURE__ */ jsx("thead", {
231
+ className: "text-left text-muted-foreground border-b",
232
+ children: /* @__PURE__ */ jsxs("tr", { children: [
233
+ /* @__PURE__ */ jsx("th", {
234
+ className: "py-2",
235
+ children: "name"
236
+ }),
237
+ /* @__PURE__ */ jsx("th", { children: "transport" }),
238
+ /* @__PURE__ */ jsx("th", { children: "target" }),
239
+ /* @__PURE__ */ jsx("th", { children: "state" }),
240
+ /* @__PURE__ */ jsx("th", {})
241
+ ] })
242
+ }), /* @__PURE__ */ jsxs("tbody", { children: [servers.length === 0 && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
243
+ colSpan: 5,
244
+ className: "py-6 text-center text-muted-foreground italic",
245
+ children: "no MCP servers yet — add one above"
246
+ }) }), servers.map((s) => {
247
+ const result = testResult[s.id];
248
+ return /* @__PURE__ */ jsxs("tr", {
249
+ className: "border-b last:border-0 align-top",
250
+ children: [
251
+ /* @__PURE__ */ jsxs("td", {
252
+ className: "py-2",
253
+ children: [s.name, s.hasAuthToken && /* @__PURE__ */ jsx("span", {
254
+ className: "ml-2 text-[0.7em] uppercase tracking-wide text-muted-foreground",
255
+ children: "auth"
256
+ })]
257
+ }),
258
+ /* @__PURE__ */ jsx("td", { children: s.transport }),
259
+ /* @__PURE__ */ jsx("td", {
260
+ className: "font-mono text-xs break-all",
261
+ children: s.transport === "stdio" ? `${s.command ?? ""} ${s.args.join(" ")}`.trim() : s.url
262
+ }),
263
+ /* @__PURE__ */ jsx("td", { children: s.enabled ? /* @__PURE__ */ jsx("span", {
264
+ className: "text-success",
265
+ children: "enabled"
266
+ }) : /* @__PURE__ */ jsx("span", {
267
+ className: "text-muted-foreground",
268
+ children: "disabled"
269
+ }) }),
270
+ /* @__PURE__ */ jsxs("td", {
271
+ className: "whitespace-nowrap",
272
+ children: [/* @__PURE__ */ jsxs("div", {
273
+ className: "flex gap-2",
274
+ children: [
275
+ /* @__PURE__ */ jsx(Button, {
276
+ variant: "ghost",
277
+ className: "text-xs",
278
+ onClick: () => void test(s.id),
279
+ children: "test"
280
+ }),
281
+ /* @__PURE__ */ jsx(Button, {
282
+ variant: "ghost",
283
+ className: "text-xs",
284
+ disabled: actionBusy === s.id,
285
+ onClick: () => void toggle(s),
286
+ children: actionBusy === s.id ? "working…" : s.enabled ? "disable" : "enable"
287
+ }),
288
+ /* @__PURE__ */ jsx(Button, {
289
+ variant: "danger",
290
+ className: "text-xs",
291
+ disabled: actionBusy === s.id,
292
+ onClick: () => {
293
+ setErr(null);
294
+ setDeleteTarget(s);
295
+ },
296
+ children: "delete"
297
+ })
298
+ ]
299
+ }), result && /* @__PURE__ */ jsx("p", {
300
+ role: result.kind === "error" ? "alert" : "status",
301
+ className: `mt-2 max-w-72 whitespace-normal break-words text-xs ${result.kind === "error" ? "text-danger" : result.kind === "success" ? "text-success" : "text-muted-foreground"}`,
302
+ children: result.message
303
+ })]
304
+ })
305
+ ]
306
+ }, s.id);
307
+ })] })]
308
+ })
309
+ }),
310
+ /* @__PURE__ */ jsx(ConfirmDialog, {
311
+ open: deleteTarget !== null,
312
+ title: `Delete MCP server ${deleteTarget?.name ?? ""}?`,
313
+ description: /* @__PURE__ */ jsx("p", { children: "This permanently removes the server configuration and its stored bearer token, closes the current connection, and removes its tools from future Agent turns. Reconnecting requires adding the server and credential again." }),
314
+ confirmLabel: "delete MCP server",
315
+ onConfirm: async () => {
316
+ if (!deleteTarget) return;
317
+ try {
318
+ await remove(deleteTarget.id);
319
+ } catch (error) {
320
+ setErr(error instanceof Error ? error.message : String(error));
321
+ throw error;
322
+ }
323
+ },
324
+ onOpenChange: (open) => {
325
+ if (!open) setDeleteTarget(null);
326
+ }
327
+ })
328
+ ]
329
+ });
330
+ }
331
+ //#endregion
332
+ export { McpPage as component };