bazilion 0.52.0 → 0.53.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 (191) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/cli.js.map +1 -1
  3. package/dist/web/client/assets/AddProviderDialog-CO_uijWF.js +1 -0
  4. package/dist/web/client/assets/AgentTemplateParts-Dl35c-Ux.js +1 -0
  5. package/dist/web/client/assets/ConfigPage-DiQiJXP6.js +1 -0
  6. package/dist/web/client/assets/ConfirmDialog-BVytx3kN.js +1 -0
  7. package/dist/web/client/assets/ConnectionsView-DDrBaiLg.js +1 -0
  8. package/dist/web/client/assets/Dialog-BTDzv3J5.js +1 -0
  9. package/dist/web/client/assets/ManagePage-xlePXXx5.js +1 -0
  10. package/dist/web/client/assets/SectionTabs-BMiRKFfb.js +1 -0
  11. package/dist/web/client/assets/Segmented-Co4n2C5X.js +1 -0
  12. package/dist/web/client/assets/SpawnDialog-ejwXnyxy.js +1 -0
  13. package/dist/web/client/assets/SpawnTeamModal-Cp-nAvIC.js +1 -0
  14. package/dist/web/client/assets/TeamForm-Cz9uDVvb.js +1 -0
  15. package/dist/web/client/assets/TeamThread-D8xqE_gb.js +1 -0
  16. package/dist/web/client/assets/UnsavedChangesGuard-DmT4nBQU.js +1 -0
  17. package/dist/web/client/assets/_id-DEQxwq2v.js +1 -0
  18. package/dist/web/client/assets/_id-DSRgpxEc.js +1 -0
  19. package/dist/web/client/assets/access-34_ShgHU.js +1 -0
  20. package/dist/web/client/assets/agent-actions--EO4yJ4Q.js +1 -0
  21. package/dist/web/client/assets/agents-C87yBHaR.js +1 -0
  22. package/dist/web/client/assets/agents-DvCSl1Ro.js +1 -0
  23. package/dist/web/client/assets/api-CoLs57oO.js +1 -0
  24. package/dist/web/client/assets/arrow-right-BhTWtC9z.js +1 -0
  25. package/dist/web/client/assets/attention-CteEeRvX.js +1 -0
  26. package/dist/web/client/assets/chevron-right-BqOIX9UM.js +1 -0
  27. package/dist/web/client/assets/config-XJuQeEP4.js +1 -0
  28. package/dist/web/client/assets/createLucideIcon-dN8ooBD1.js +1 -0
  29. package/dist/web/client/assets/download-Dj-1ltZb.js +1 -0
  30. package/dist/web/client/assets/file-text-DiP-LaEg.js +1 -0
  31. package/dist/web/client/assets/form-Bvr_f9lR.js +1 -0
  32. package/dist/web/client/assets/images-BKjyhYUc.js +1 -0
  33. package/dist/web/client/assets/index-J_Uqj4md.js +54 -0
  34. package/dist/web/client/assets/key-round-QpqZklz6.js +1 -0
  35. package/dist/web/client/assets/list-checks-BeyG5SVQ.js +1 -0
  36. package/dist/web/client/assets/login-076Bc601.js +1 -0
  37. package/dist/web/client/assets/manage-CsrV2hhK.js +1 -0
  38. package/dist/web/client/assets/mcp-8N0BqZ0G.js +1 -0
  39. package/dist/web/client/assets/message-square-DnpSOYv4.js +1 -0
  40. package/dist/web/client/assets/network-BC7rNaOC.js +1 -0
  41. package/dist/web/client/assets/parts-B0JBolvG.js +1 -0
  42. package/dist/web/client/assets/plus-DZ3KVo7E.js +1 -0
  43. package/dist/web/client/assets/routes-3HkZZOOe.js +76 -0
  44. package/dist/web/client/assets/skills-DiaqZRXT.js +1 -0
  45. package/dist/web/client/assets/square-terminal-hQZ6pexU.js +1 -0
  46. package/dist/web/client/assets/style-BtcFIkOS.js +7 -0
  47. package/dist/web/client/assets/styles-C7Ztw15K.css +2 -0
  48. package/dist/web/client/assets/system-YWlJ8ogO.js +1 -0
  49. package/dist/web/client/assets/teams-DQwceMvk.js +1 -0
  50. package/dist/web/client/assets/teams-DTC3plIH.js +1 -0
  51. package/dist/web/client/assets/telegram-D4wINntt.js +1 -0
  52. package/dist/web/client/assets/tools-CZeQ9pDx.js +1 -0
  53. package/dist/web/client/assets/use-resource-BaTkTGvG.js +1 -0
  54. package/dist/web/client/assets/welcome-CnxP_RCk.js +1 -0
  55. package/dist/web/client/assets/wrench-BrwBswfo.js +1 -0
  56. package/dist/web/server/assets/{AddProviderDialog-Tn4AskPm.js → AddProviderDialog-Di5crZUB.js} +105 -4
  57. package/dist/web/server/assets/AgentTemplateParts-Cqy7kSzx.js +269 -0
  58. package/dist/web/server/assets/{ConfigPage-DqDUujmt.js → ConfigPage-oXM3wyOU.js} +2 -2
  59. package/dist/web/server/assets/{ConnectionsView-DAG-zNBz.js → ConnectionsView-DZrLoNoW.js} +3 -3
  60. package/dist/web/server/assets/ManagePage-0LKHEcT_.js +29 -0
  61. package/dist/web/server/assets/{ModelMenu-DUY9aHkE.js → ModelMenu-BAZeARx6.js} +3 -3
  62. package/dist/web/server/assets/{Rail-BIC_4ptO.js → Rail-7JU6ly2O.js} +14 -104
  63. package/dist/web/server/assets/{SectionTabs-BGsrf-UQ.js → SectionTabs-CWQ5orUW.js} +9 -2
  64. package/dist/web/server/assets/{SpawnDialog-D_SMPCG_.js → SpawnDialog-CYkwzETs.js} +49 -57
  65. package/dist/web/server/assets/SpawnTeamModal-CCe6P82H.js +127 -0
  66. package/dist/web/server/assets/TeamForm-BzQmdhVi.js +141 -0
  67. package/dist/web/server/assets/{TeamThread-DuLlGDcw.js → TeamThread-SyQpUvz5.js} +1 -1
  68. package/dist/web/server/assets/_id-AcyGvFrE.js +400 -0
  69. package/dist/web/server/assets/{_id-DJnYgisy.js → _id-BGTgqsWm.js} +8 -4
  70. package/dist/web/server/assets/{_id-TVruGcOd.js → _id-BKzOw78O.js} +11 -3
  71. package/dist/web/server/assets/{_id-yN0z7VqE.js → _id-DPGzfmjG.js} +255 -203
  72. package/dist/web/server/assets/_id-DXm9W55C.js +16 -0
  73. package/dist/web/server/assets/_id-DojvxRZn.js +39 -0
  74. package/dist/web/server/assets/_tanstack-start-manifest_v-D7RvKGRH.js +285 -0
  75. package/dist/web/server/assets/{access-GMGed5O8.js → access-BJe-NduL.js} +2 -2
  76. package/dist/web/server/assets/access-CKSW7MFH.js +297 -0
  77. package/dist/web/server/assets/{access-C_pupPks.js → access-WWspT0v4.js} +2 -1
  78. package/dist/web/server/assets/agent-actions-CUDMCG0F.js +20 -0
  79. package/dist/web/server/assets/agents-1sjSvp5p.js +12 -0
  80. package/dist/web/server/assets/{agents-BnWgFo6o.js → agents-6d9WxbYF.js} +9 -6
  81. package/dist/web/server/assets/agents-DKVGUwD1.js +31 -0
  82. package/dist/web/server/assets/agents-DUI4Yjtg.js +13 -0
  83. package/dist/web/server/assets/agents-DsHeRaLq.js +327 -0
  84. package/dist/web/server/assets/agents-DtLDoZ_u.js +136 -0
  85. package/dist/web/server/assets/{attention-Cr7puThv.js → attention-B6sSDR_4.js} +2 -1
  86. package/dist/web/server/assets/{attention-DS3O9UmJ.js → attention-DefKwvgm.js} +2 -2
  87. package/dist/web/server/assets/attention-johfkM0_.js +203 -0
  88. package/dist/web/server/assets/{config-Q7livfa3.js → config-Clz57LuN.js} +33 -82
  89. package/dist/web/server/assets/{config-DjTGA4iZ.js → config-DYAaaE9Z.js} +2 -2
  90. package/dist/web/server/assets/{createSsrRpc-GCCF14VW.js → createSsrRpc-BijMHgqE.js} +1 -45
  91. package/dist/web/server/assets/form-BRQAsKKq.js +319 -0
  92. package/dist/web/server/assets/manage-Ppyi3Y5y.js +230 -0
  93. package/dist/web/server/assets/mcp-Ce6O8Qs2.js +378 -0
  94. package/dist/web/server/assets/{mcp-ZARSOxZW.js → mcp-DB38leWS.js} +2 -2
  95. package/dist/web/server/assets/parts-mabERIJZ.js +380 -0
  96. package/dist/web/server/assets/{router-Dh2-IvLL.js → router-C97bwlXi.js} +35 -30
  97. package/dist/web/server/assets/{routes-C9NawqcV.js → routes-C4aGqXfr.js} +52 -8
  98. package/dist/web/server/assets/{routes-CDskMy5C.js → routes-DuOShl4q.js} +1 -1
  99. package/dist/web/server/assets/{routes-BJIJWCIE.js → routes-IHMVKpDK.js} +2 -2
  100. package/dist/web/server/assets/{skills-StN15QhC.js → skills-B7sg0QKS.js} +2 -2
  101. package/dist/web/server/assets/{skills-h5aHa7Q8.js → skills-DWzlT_hC.js} +9 -1
  102. package/dist/web/server/assets/skills-hfTSwqsG.js +353 -0
  103. package/dist/web/server/assets/{style-GYDODk2F.js → style-BR7ufS6Z.js} +1 -1
  104. package/dist/web/server/assets/system-CNQpt3JB.js +145 -0
  105. package/dist/web/server/assets/{system-DtswhLW6.js → system-D3th6n2E.js} +4 -2
  106. package/dist/web/server/assets/{system-Dl-1RhoP.js → system-DaP0ol67.js} +2 -2
  107. package/dist/web/server/assets/{teams-CbIPKf99.js → teams-4cEZ4_rw.js} +4 -2
  108. package/dist/web/server/assets/{teams-BxnvFTyn.js → teams-70u1XQTr.js} +1 -3
  109. package/dist/web/server/assets/teams-BKHe67f3.js +176 -0
  110. package/dist/web/server/assets/{teams-YrmyutM4.js → teams-BopOP4x7.js} +8 -1
  111. package/dist/web/server/assets/teams-C3xwTz8-.js +219 -0
  112. package/dist/web/server/assets/{teams-5PMGvHuM.js → teams-CuKE5iAK.js} +2 -2
  113. package/dist/web/server/assets/{telegram-Cv0D4gyz.js → telegram-BnQADwnj.js} +2 -2
  114. package/dist/web/server/assets/telegram-BpmK-HHV.js +1059 -0
  115. package/dist/web/server/assets/{tools-ioJcPzMW.js → tools-BQeWn7Tj.js} +2 -2
  116. package/dist/web/server/assets/{tools-OfD22R-C.js → tools-CURTfG2q.js} +56 -217
  117. package/dist/web/server/assets/{welcome-FFEbrNT1.js → welcome-OiZCAIHZ.js} +3 -4
  118. package/dist/web/server/assets/{welcome-jxmpE_Jb.js → welcome-SNsE49JO.js} +2 -2
  119. package/dist/web/server/server.js +20 -20
  120. package/package.json +1 -1
  121. package/dist/web/client/assets/AddProviderDialog-BiGLKnu2.js +0 -1
  122. package/dist/web/client/assets/ConfigPage-DvBzy2MN.js +0 -1
  123. package/dist/web/client/assets/ConfirmDialog-CiZ5tk9R.js +0 -1
  124. package/dist/web/client/assets/ConnectionsView-Czkpm2JY.js +0 -1
  125. package/dist/web/client/assets/Dialog-s_kPtI-W.js +0 -1
  126. package/dist/web/client/assets/ModelMenu-BfUPoRjV.js +0 -1
  127. package/dist/web/client/assets/SectionTabs-DENNb6Nw.js +0 -1
  128. package/dist/web/client/assets/Segmented-Dh77vmpp.js +0 -1
  129. package/dist/web/client/assets/SkillFindings-Xng11qqx.js +0 -1
  130. package/dist/web/client/assets/SkillsPicker-hI3YXvib.js +0 -1
  131. package/dist/web/client/assets/SpawnDialog-CKWFQ6jk.js +0 -1
  132. package/dist/web/client/assets/Tabs-f6bHvCGn.js +0 -1
  133. package/dist/web/client/assets/TeamForm-kda1HYZG.js +0 -1
  134. package/dist/web/client/assets/TeamThread-2rm1JGSk.js +0 -1
  135. package/dist/web/client/assets/UnsavedChangesGuard-nx6dv2Yw.js +0 -1
  136. package/dist/web/client/assets/_id-B72mIpcE.js +0 -1
  137. package/dist/web/client/assets/_id-Bzavnza1.js +0 -1
  138. package/dist/web/client/assets/access-Yw9jODuk.js +0 -1
  139. package/dist/web/client/assets/agents-C9xoyL7o.js +0 -1
  140. package/dist/web/client/assets/agents-TviG16wx.js +0 -1
  141. package/dist/web/client/assets/api-HC_YzjBy.js +0 -1
  142. package/dist/web/client/assets/arrow-right-Gm_FDWJ_.js +0 -1
  143. package/dist/web/client/assets/attention-DmURtlJm.js +0 -1
  144. package/dist/web/client/assets/check-BjgKoGvU.js +0 -1
  145. package/dist/web/client/assets/chevron-right-CUZiA2aG.js +0 -1
  146. package/dist/web/client/assets/config-UZz_mjO5.js +0 -1
  147. package/dist/web/client/assets/createLucideIcon-C6gOo8sD.js +0 -1
  148. package/dist/web/client/assets/dist-BWppw70N.js +0 -41
  149. package/dist/web/client/assets/dist-D2dwY7MR.js +0 -1
  150. package/dist/web/client/assets/index-Df1oUtAP.js +0 -14
  151. package/dist/web/client/assets/link-Cbztlp_R.js +0 -1
  152. package/dist/web/client/assets/login-CPfdaqsV.js +0 -1
  153. package/dist/web/client/assets/mcp-FlYnNon0.js +0 -1
  154. package/dist/web/client/assets/parts-tIDBNsYA.js +0 -1
  155. package/dist/web/client/assets/plus-CWrKMtvA.js +0 -1
  156. package/dist/web/client/assets/routes-BZaWCoQj.js +0 -76
  157. package/dist/web/client/assets/save-f9O-CQia.js +0 -1
  158. package/dist/web/client/assets/skills-C7yDPC8s.js +0 -1
  159. package/dist/web/client/assets/style-DDuTFJUu.js +0 -7
  160. package/dist/web/client/assets/styles-BviXU81u.css +0 -2
  161. package/dist/web/client/assets/system-CL3Kz36L.js +0 -1
  162. package/dist/web/client/assets/teams-CQTEF5gV.js +0 -1
  163. package/dist/web/client/assets/teams-DQ7SqVyF.js +0 -1
  164. package/dist/web/client/assets/telegram-BLgxtGhZ.js +0 -1
  165. package/dist/web/client/assets/tools-pOQyGVYo.js +0 -1
  166. package/dist/web/client/assets/use-resource-C3MBZJop.js +0 -1
  167. package/dist/web/client/assets/welcome-Hr6JpMef.js +0 -1
  168. package/dist/web/client/assets/wrench-6BEIqKDn.js +0 -1
  169. package/dist/web/server/assets/SkillFindings-BdATze1A.js +0 -46
  170. package/dist/web/server/assets/SkillsPicker-DlqEfRWh.js +0 -67
  171. package/dist/web/server/assets/Tabs-BhF41MfQ.js +0 -20
  172. package/dist/web/server/assets/TeamForm-ilBaeLI4.js +0 -96
  173. package/dist/web/server/assets/_id-BsZcsabI.js +0 -383
  174. package/dist/web/server/assets/_id-D8Kj0F30.js +0 -18
  175. package/dist/web/server/assets/_id-QYifTM9w.js +0 -28
  176. package/dist/web/server/assets/_tanstack-start-manifest_v-D6zrzUC7.js +0 -223
  177. package/dist/web/server/assets/access-DKOpcHIJ.js +0 -232
  178. package/dist/web/server/assets/agents-B6OR3x99.js +0 -327
  179. package/dist/web/server/assets/agents-B7642eRO.js +0 -130
  180. package/dist/web/server/assets/agents-BJ-_oC2e.js +0 -14
  181. package/dist/web/server/assets/agents-CjV0w-Zy.js +0 -12
  182. package/dist/web/server/assets/agents-Dy_Q-9lG.js +0 -27
  183. package/dist/web/server/assets/attention-CLP4HYBz.js +0 -216
  184. package/dist/web/server/assets/mcp-BI-FD-JI.js +0 -250
  185. package/dist/web/server/assets/parts-B31PJkhi.js +0 -190
  186. package/dist/web/server/assets/skills-BqLq3ZXq.js +0 -275
  187. package/dist/web/server/assets/system-BtRA2HUs.js +0 -138
  188. package/dist/web/server/assets/teams-COaU0wN9.js +0 -108
  189. package/dist/web/server/assets/teams-Ca8W4mvl.js +0 -88
  190. package/dist/web/server/assets/telegram-Yx8nm6Ei.js +0 -984
  191. /package/dist/web/server/assets/{telegram-CGol0CKX2.js → telegram-CGol0CKX.js} +0 -0
@@ -1,14 +0,0 @@
1
- import { n as createServerFn } from "../server.js";
2
- import { t as createSsrRpc } from "./createSsrRpc-GCCF14VW.js";
3
- import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
4
- //#region src/routes/agents/index.tsx
5
- var $$splitComponentImporter = () => import("./agents-B7642eRO.js");
6
- var fetchAgents = createServerFn({ method: "GET" }).validator((data) => data).handler(createSsrRpc("f715bab0037380aa3db7e237e7cf1e74168c363f48a960bb1ddfa5560de3a74e"));
7
- var Route = createFileRoute("/agents/")({
8
- validateSearch: (search) => ({ all: search.all === 1 ? 1 : void 0 }),
9
- loaderDeps: ({ search }) => ({ all: search.all === 1 }),
10
- loader: ({ deps }) => fetchAgents({ data: { all: deps.all } }),
11
- component: lazyRouteComponent($$splitComponentImporter, "component")
12
- });
13
- //#endregion
14
- export { Route as t };
@@ -1,12 +0,0 @@
1
- import { n as createServerFn } from "../server.js";
2
- import { t as createSsrRpc } from "./createSsrRpc-GCCF14VW.js";
3
- import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
4
- //#region src/routes/templates/agents/index.tsx
5
- var $$splitComponentImporter = () => import("./agents-B6OR3x99.js");
6
- var fetchProfiles = createServerFn({ method: "GET" }).handler(createSsrRpc("bc31355f2be9889a616d03c35062d483ea77c3f967af9432d721626a81078ef3"));
7
- var Route = createFileRoute("/templates/agents/")({
8
- loader: () => fetchProfiles(),
9
- component: lazyRouteComponent($$splitComponentImporter, "component")
10
- });
11
- //#endregion
12
- export { Route as t };
@@ -1,27 +0,0 @@
1
- import { n as createServerFn } from "../server.js";
2
- import { t as MODELS_PATH } from "./ModelMenu-DUY9aHkE.js";
3
- import { t as createServerRpc } from "./createServerRpc-B7Yr1K8i.js";
4
- import { n as daemonClient } from "./daemon-client-B_ZRIIrT.js";
5
- //#region src/routes/templates/agents/index.tsx?tss-serverfn-split
6
- var fetchProfiles_createServerFn_handler = createServerRpc({
7
- id: "bc31355f2be9889a616d03c35062d483ea77c3f967af9432d721626a81078ef3",
8
- name: "fetchProfiles",
9
- filename: "src/routes/templates/agents/index.tsx"
10
- }, (opts) => fetchProfiles.__executeServer(opts));
11
- var fetchProfiles = createServerFn({ method: "GET" }).handler(fetchProfiles_createServerFn_handler, async () => {
12
- const client = daemonClient();
13
- const [profiles, models, skills, templates] = await Promise.all([
14
- client.get("/api/profiles"),
15
- client.get(MODELS_PATH),
16
- client.get("/api/skills"),
17
- client.get("/api/profiles/_/templates")
18
- ]);
19
- return {
20
- profiles,
21
- chatModels: models.chat,
22
- skills,
23
- templates
24
- };
25
- });
26
- //#endregion
27
- export { fetchProfiles_createServerFn_handler };
@@ -1,216 +0,0 @@
1
- import { C as api, T as errorMessage, u as Button } from "./workspace-DaitCM0t.js";
2
- import { a as PageHeader, c as Stat, i as ItemRow, l as StatusBadge, n as EmptyState, o as PageShell, r as ItemList, s as SectionCard } from "./createSsrRpc-GCCF14VW.js";
3
- import { t as Route } from "./attention-DS3O9UmJ.js";
4
- import { useState } from "react";
5
- import { Link } from "@tanstack/react-router";
6
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
7
- //#region src/routes/attention/index.tsx?tsr-split=component
8
- var LIST_PATH = "/api/attention?state=all&limit=200";
9
- var SUMMARY_PATH = "/api/attention/summary";
10
- var SEVERITY_BADGE = {
11
- action_required: "warning",
12
- error: "danger",
13
- warning: "info"
14
- };
15
- function AttentionCenter() {
16
- const initial = Route.useLoaderData();
17
- const [list, setList] = useState(initial.list);
18
- const [summary, setSummary] = useState(initial.summary);
19
- const [state, setState] = useState("open");
20
- const [kind, setKind] = useState("all");
21
- const [severity, setSeverity] = useState("all");
22
- const [busy, setBusy] = useState(null);
23
- const [notice, setNotice] = useState(null);
24
- const visible = list.items.filter((item) => (state === "all" || (state === "open" ? item.acknowledgedAt === null : item.acknowledgedAt !== null)) && (kind === "all" || item.kind === kind) && (severity === "all" || item.severity === severity));
25
- const degradedKinds = [...new Set([...list.degraded, ...summary.degraded].map((entry) => entry.kind))];
26
- async function refresh() {
27
- const [nextList, nextSummary] = await Promise.all([api(LIST_PATH), api(SUMMARY_PATH)]);
28
- setList(nextList);
29
- setSummary(nextSummary);
30
- }
31
- async function run(key, request) {
32
- setBusy(key);
33
- setNotice(null);
34
- try {
35
- setNotice(await request());
36
- } catch (cause) {
37
- setNotice(errorMessage(cause));
38
- } finally {
39
- await refresh().catch(() => {});
40
- setBusy(null);
41
- }
42
- }
43
- const acknowledge = (item, value) => run(item.key, async () => {
44
- const path = `/api/attention/${encodeURIComponent(item.key)}`;
45
- await api(value ? `${path}/acknowledge` : `${path}/acknowledgement`, { method: value ? "POST" : "DELETE" });
46
- return null;
47
- });
48
- const acknowledgeAll = () => run("all", async () => {
49
- const { acknowledged } = await api("/api/attention/acknowledge-all", { method: "POST" });
50
- return `Acknowledged ${acknowledged} informational item(s). Lesson proposals and paused queues stay open.`;
51
- });
52
- return /* @__PURE__ */ jsxs(PageShell, {
53
- size: "wide",
54
- children: [
55
- /* @__PURE__ */ jsx(PageHeader, {
56
- eyebrow: "Operations",
57
- title: "Attention",
58
- description: "Decisions waiting for you and failures worth a look. Act on an item at its source; acknowledge informational ones here.",
59
- actions: /* @__PURE__ */ jsx(Button, {
60
- variant: "ghost",
61
- disabled: busy !== null,
62
- onClick: () => void acknowledgeAll(),
63
- children: "Acknowledge all informational items"
64
- })
65
- }),
66
- /* @__PURE__ */ jsxs("div", {
67
- className: "grid gap-3 sm:grid-cols-3",
68
- children: [
69
- /* @__PURE__ */ jsx(Stat, {
70
- label: "Open",
71
- value: summary.openTotal
72
- }),
73
- /* @__PURE__ */ jsx(Stat, {
74
- label: "Action required",
75
- value: summary.bySeverity.action_required
76
- }),
77
- /* @__PURE__ */ jsx(Stat, {
78
- label: "Errors and warnings",
79
- value: summary.bySeverity.error + summary.bySeverity.warning
80
- })
81
- ]
82
- }),
83
- degradedKinds.length > 0 && /* @__PURE__ */ jsxs("div", {
84
- role: "alert",
85
- className: "rounded-lg border border-danger/40 bg-danger/10 p-4 text-sm",
86
- children: [
87
- /* @__PURE__ */ jsx("strong", { children: "Partial results." }),
88
- " ",
89
- degradedKinds.join(", "),
90
- " could not be loaded."
91
- ]
92
- }),
93
- notice && /* @__PURE__ */ jsx("p", {
94
- role: "status",
95
- className: "rounded-lg bg-muted px-4 py-3 text-sm",
96
- children: notice
97
- }),
98
- /* @__PURE__ */ jsx(SectionCard, {
99
- title: "Queue",
100
- description: `${visible.length} matching item${visible.length === 1 ? "" : "s"}`,
101
- actions: /* @__PURE__ */ jsxs("div", {
102
- className: "flex flex-wrap gap-2",
103
- children: [
104
- /* @__PURE__ */ jsxs("select", {
105
- "aria-label": "Queue state",
106
- value: state,
107
- onChange: (event) => setState(event.target.value),
108
- children: [
109
- /* @__PURE__ */ jsx("option", {
110
- value: "open",
111
- children: "Open"
112
- }),
113
- /* @__PURE__ */ jsx("option", {
114
- value: "acknowledged",
115
- children: "History"
116
- }),
117
- /* @__PURE__ */ jsx("option", {
118
- value: "all",
119
- children: "All"
120
- })
121
- ]
122
- }),
123
- /* @__PURE__ */ jsxs("select", {
124
- "aria-label": "Severity",
125
- value: severity,
126
- onChange: (event) => setSeverity(event.target.value),
127
- children: [
128
- /* @__PURE__ */ jsx("option", {
129
- value: "all",
130
- children: "All severities"
131
- }),
132
- /* @__PURE__ */ jsx("option", {
133
- value: "action_required",
134
- children: "Action required"
135
- }),
136
- /* @__PURE__ */ jsx("option", {
137
- value: "error",
138
- children: "Errors"
139
- }),
140
- /* @__PURE__ */ jsx("option", {
141
- value: "warning",
142
- children: "Warnings"
143
- })
144
- ]
145
- }),
146
- /* @__PURE__ */ jsxs("select", {
147
- "aria-label": "Kind",
148
- value: kind,
149
- onChange: (event) => setKind(event.target.value),
150
- children: [
151
- /* @__PURE__ */ jsx("option", {
152
- value: "all",
153
- children: "All kinds"
154
- }),
155
- /* @__PURE__ */ jsx("option", {
156
- value: "lesson_proposal",
157
- children: "Lessons"
158
- }),
159
- /* @__PURE__ */ jsx("option", {
160
- value: "review_failure",
161
- children: "Review failures"
162
- }),
163
- /* @__PURE__ */ jsx("option", {
164
- value: "trigger_failure",
165
- children: "Trigger failures"
166
- }),
167
- /* @__PURE__ */ jsx("option", {
168
- value: "agent_loop_break",
169
- children: "Loop breaks"
170
- }),
171
- /* @__PURE__ */ jsx("option", {
172
- value: "queue_interrupted",
173
- children: "Paused queues"
174
- })
175
- ]
176
- })
177
- ]
178
- }),
179
- children: visible.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
180
- title: state === "open" ? "Nothing needs attention" : "No matching history",
181
- description: "Items come from learning reviews, triggers, follow-up queues and loop breaks."
182
- }) : /* @__PURE__ */ jsx(ItemList, { children: visible.map((item) => /* @__PURE__ */ jsx(ItemRow, {
183
- title: item.title,
184
- meta: /* @__PURE__ */ jsxs(Fragment$1, { children: [
185
- /* @__PURE__ */ jsx(StatusBadge, {
186
- variant: SEVERITY_BADGE[item.severity],
187
- children: item.severity.replace("_", " ")
188
- }),
189
- /* @__PURE__ */ jsx("span", { children: item.kind.replaceAll("_", " ") }),
190
- /* @__PURE__ */ jsx("span", { children: [item.agentName, item.teamName].filter(Boolean).join(" · ") || "System" }),
191
- /* @__PURE__ */ jsx("time", {
192
- dateTime: new Date(item.occurredAt).toISOString(),
193
- children: new Date(item.occurredAt).toLocaleString()
194
- })
195
- ] }),
196
- actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Link, {
197
- to: item.href,
198
- className: "btn-primary",
199
- children: item.kind === "lesson_proposal" ? "Review lesson" : "Inspect source"
200
- }), item.acknowledgeable && /* @__PURE__ */ jsx(Button, {
201
- variant: "ghost",
202
- disabled: busy === item.key,
203
- onClick: () => void acknowledge(item, item.acknowledgedAt === null),
204
- children: item.acknowledgedAt === null ? "Acknowledge" : "Restore to open"
205
- })] }),
206
- children: /* @__PURE__ */ jsx("p", {
207
- className: "mb-0 mt-1 text-sm text-muted-foreground",
208
- children: item.diagnostic
209
- })
210
- }, item.key)) })
211
- })
212
- ]
213
- });
214
- }
215
- //#endregion
216
- export { AttentionCenter as component };
@@ -1,250 +0,0 @@
1
- import { C as api, T as errorMessage, u as Button } from "./workspace-DaitCM0t.js";
2
- import { t as ConfirmDialog } from "./ConfirmDialog-DfaJ--A6.js";
3
- import { i as ItemRow, l as StatusBadge, r as ItemList, s as SectionCard } from "./createSsrRpc-GCCF14VW.js";
4
- import { t as Route } from "./mcp-ZARSOxZW.js";
5
- import { t as ConfigPage } from "./ConfigPage-DqDUujmt.js";
6
- import { useState } from "react";
7
- import { useRouter } from "@tanstack/react-router";
8
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
- //#region src/routes/config/mcp.tsx?tsr-split=component
10
- var serverPath = (id) => `/api/mcp-servers/${encodeURIComponent(id)}`;
11
- function McpPage() {
12
- const { servers } = Route.useLoaderData();
13
- const router = useRouter();
14
- const [error, setError] = useState(null);
15
- const [tests, setTests] = useState({});
16
- const [busyId, setBusyId] = useState(null);
17
- const [deleteTarget, setDeleteTarget] = useState(null);
18
- async function toggle(server) {
19
- setBusyId(server.id);
20
- setError(null);
21
- try {
22
- await api(serverPath(server.id), {
23
- method: "PATCH",
24
- body: { enabled: !server.enabled }
25
- });
26
- await router.invalidate();
27
- } catch (cause) {
28
- setError(errorMessage(cause));
29
- } finally {
30
- setBusyId(null);
31
- }
32
- }
33
- async function test(id) {
34
- setTests((current) => ({
35
- ...current,
36
- [id]: {
37
- kind: "pending",
38
- message: "Connecting…"
39
- }
40
- }));
41
- let result;
42
- try {
43
- const body = await api(`${serverPath(id)}/test`, { method: "POST" });
44
- const tools = body.tools ?? [];
45
- result = body.ok ? {
46
- kind: "success",
47
- message: `${tools.length} tools: ${tools.map((tool) => tool.name).join(", ")}`
48
- } : {
49
- kind: "error",
50
- message: body.error ?? "Test failed"
51
- };
52
- } catch (cause) {
53
- result = {
54
- kind: "error",
55
- message: errorMessage(cause)
56
- };
57
- }
58
- setTests((current) => ({
59
- ...current,
60
- [id]: result
61
- }));
62
- }
63
- return /* @__PURE__ */ jsxs(ConfigPage, {
64
- title: "MCP servers",
65
- description: /* @__PURE__ */ jsxs(Fragment$1, { children: [
66
- "Tools from these Model Context Protocol servers are offered to every agent turn as",
67
- " ",
68
- /* @__PURE__ */ jsx("code", {
69
- className: "font-mono",
70
- children: "mcp__<server>__<tool>"
71
- }),
72
- ". A stdio server runs as a daemon child process with the configured provider keys and secrets, never Bazilion's own credentials; a Streamable HTTP server can use a bearer token."
73
- ] }),
74
- children: [
75
- /* @__PURE__ */ jsx(AddServerForm, { onAdded: () => router.invalidate() }),
76
- error && /* @__PURE__ */ jsx("p", {
77
- role: "alert",
78
- className: "err",
79
- children: error
80
- }),
81
- /* @__PURE__ */ jsx(SectionCard, {
82
- title: "Servers",
83
- children: servers.length === 0 ? /* @__PURE__ */ jsx("p", {
84
- className: "muted",
85
- children: "No MCP servers yet; add one above."
86
- }) : /* @__PURE__ */ jsx(ItemList, { children: servers.map((server) => {
87
- const result = tests[server.id];
88
- return /* @__PURE__ */ jsx(ItemRow, {
89
- title: server.name,
90
- meta: /* @__PURE__ */ jsxs(Fragment$1, { children: [
91
- /* @__PURE__ */ jsx(StatusBadge, {
92
- variant: server.enabled ? "success" : "neutral",
93
- children: server.enabled ? "enabled" : "disabled"
94
- }),
95
- /* @__PURE__ */ jsx("span", { children: server.transport }),
96
- server.hasAuthToken && /* @__PURE__ */ jsx("span", { children: "bearer token" }),
97
- /* @__PURE__ */ jsx("code", {
98
- className: "break-all",
99
- children: server.transport === "stdio" ? `${server.command ?? ""} ${server.args.join(" ")}`.trim() : server.url
100
- })
101
- ] }),
102
- actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [
103
- /* @__PURE__ */ jsx(Button, {
104
- variant: "ghost",
105
- onClick: () => void test(server.id),
106
- children: "Test"
107
- }),
108
- /* @__PURE__ */ jsx(Button, {
109
- variant: "ghost",
110
- disabled: busyId === server.id,
111
- onClick: () => void toggle(server),
112
- children: busyId === server.id ? "Working…" : server.enabled ? "Disable" : "Enable"
113
- }),
114
- /* @__PURE__ */ jsx(Button, {
115
- variant: "danger",
116
- disabled: busyId === server.id,
117
- onClick: () => setDeleteTarget(server),
118
- children: "Delete"
119
- })
120
- ] }),
121
- children: result && /* @__PURE__ */ jsx("p", {
122
- role: result.kind === "error" ? "alert" : "status",
123
- className: `mb-0 mt-2 break-words text-xs ${result.kind === "error" ? "text-danger" : result.kind === "success" ? "text-success" : "text-muted-foreground"}`,
124
- children: result.message
125
- })
126
- }, server.id);
127
- }) })
128
- }),
129
- /* @__PURE__ */ jsx(ConfirmDialog, {
130
- open: deleteTarget !== null,
131
- title: `Delete MCP server ${deleteTarget?.name ?? ""}?`,
132
- description: /* @__PURE__ */ jsx("p", { children: "This removes the server and its stored bearer token, closes its connection and removes its tools from later Agent turns." }),
133
- confirmLabel: "Delete MCP server",
134
- onConfirm: async () => {
135
- if (!deleteTarget) return;
136
- await api(serverPath(deleteTarget.id), { method: "DELETE" });
137
- await router.invalidate();
138
- },
139
- onOpenChange: (open) => {
140
- if (!open) setDeleteTarget(null);
141
- }
142
- })
143
- ]
144
- });
145
- }
146
- function AddServerForm({ onAdded }) {
147
- const [name, setName] = useState("");
148
- const [transport, setTransport] = useState("stdio");
149
- const [command, setCommand] = useState("");
150
- const [args, setArgs] = useState("");
151
- const [url, setUrl] = useState("");
152
- const [token, setToken] = useState("");
153
- const [error, setError] = useState(null);
154
- const [busy, setBusy] = useState(false);
155
- async function add(event) {
156
- event.preventDefault();
157
- setError(null);
158
- setBusy(true);
159
- try {
160
- await api("/api/mcp-servers", { body: {
161
- name,
162
- transport,
163
- command: transport === "stdio" ? command : null,
164
- args: transport === "stdio" ? args.split(" ").filter(Boolean) : [],
165
- url: transport === "stdio" ? null : url,
166
- authToken: token || void 0
167
- } });
168
- setName("");
169
- setCommand("");
170
- setArgs("");
171
- setUrl("");
172
- setToken("");
173
- await onAdded();
174
- } catch (cause) {
175
- setError(errorMessage(cause));
176
- } finally {
177
- setBusy(false);
178
- }
179
- }
180
- return /* @__PURE__ */ jsx(SectionCard, {
181
- title: "Add a server",
182
- children: /* @__PURE__ */ jsxs("form", {
183
- onSubmit: (event) => void add(event),
184
- children: [
185
- /* @__PURE__ */ jsxs("div", {
186
- className: "grid gap-x-3 sm:grid-cols-[minmax(0,1fr)_12rem]",
187
- children: [/* @__PURE__ */ jsxs("label", { children: ["Name", /* @__PURE__ */ jsx("input", {
188
- type: "text",
189
- value: name,
190
- onChange: (event) => setName(event.target.value),
191
- required: true,
192
- placeholder: "playwright",
193
- pattern: "[a-zA-Z0-9_]+"
194
- })] }), /* @__PURE__ */ jsxs("label", { children: ["Transport", /* @__PURE__ */ jsxs("select", {
195
- value: transport,
196
- onChange: (event) => setTransport(event.target.value),
197
- children: [/* @__PURE__ */ jsx("option", {
198
- value: "stdio",
199
- children: "stdio"
200
- }), /* @__PURE__ */ jsx("option", {
201
- value: "http",
202
- children: "http"
203
- })]
204
- })] })]
205
- }),
206
- transport === "stdio" ? /* @__PURE__ */ jsxs("div", {
207
- className: "grid gap-x-3 sm:grid-cols-[12rem_minmax(0,1fr)]",
208
- children: [/* @__PURE__ */ jsxs("label", { children: ["Command", /* @__PURE__ */ jsx("input", {
209
- type: "text",
210
- value: command,
211
- onChange: (event) => setCommand(event.target.value),
212
- placeholder: "npx"
213
- })] }), /* @__PURE__ */ jsxs("label", { children: ["Args (space-separated)", /* @__PURE__ */ jsx("input", {
214
- type: "text",
215
- value: args,
216
- onChange: (event) => setArgs(event.target.value),
217
- placeholder: "-y @modelcontextprotocol/server-filesystem /srv/data"
218
- })] })]
219
- }) : /* @__PURE__ */ jsxs("div", {
220
- className: "grid gap-x-3 sm:grid-cols-[minmax(0,1fr)_14rem]",
221
- children: [/* @__PURE__ */ jsxs("label", { children: ["URL", /* @__PURE__ */ jsx("input", {
222
- type: "url",
223
- value: url,
224
- onChange: (event) => setUrl(event.target.value),
225
- placeholder: "https://mcp.example.com/mcp"
226
- })] }), /* @__PURE__ */ jsxs("label", { children: ["Bearer token (optional)", /* @__PURE__ */ jsx("input", {
227
- type: "password",
228
- value: token,
229
- onChange: (event) => setToken(event.target.value),
230
- autoComplete: "off"
231
- })] })]
232
- }),
233
- /* @__PURE__ */ jsx(Button, {
234
- variant: "primary",
235
- type: "submit",
236
- disabled: busy,
237
- className: "mt-2",
238
- children: busy ? "Adding…" : "Add server"
239
- }),
240
- error && /* @__PURE__ */ jsx("p", {
241
- role: "alert",
242
- className: "mt-2 text-sm text-danger",
243
- children: error
244
- })
245
- ]
246
- })
247
- });
248
- }
249
- //#endregion
250
- export { McpPage as component };