bazilion 0.52.0 → 0.54.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 (210) hide show
  1. package/dist/cli.js +3 -3
  2. package/dist/cli.js.map +1 -1
  3. package/dist/daemon.js +296 -232
  4. package/dist/daemon.js.map +1 -1
  5. package/dist/web/client/assets/AddProviderDialog-CkwSq3C7.js +1 -0
  6. package/dist/web/client/assets/AgentTemplateParts-CEn_4qVs.js +1 -0
  7. package/dist/web/client/assets/Button-UiegBKOK.js +1 -0
  8. package/dist/web/client/assets/ConfigPage-CUbHBhzx.js +1 -0
  9. package/dist/web/client/assets/ConfirmDialog-VqBOFZEp.js +1 -0
  10. package/dist/web/client/assets/ConnectionsView-ByARMcWP.js +1 -0
  11. package/dist/web/client/assets/ManagePage-BJWZd1ts.js +1 -0
  12. package/dist/web/client/assets/SectionTabs-ViZKm3-B.js +1 -0
  13. package/dist/web/client/assets/Segmented-MYKKTuZO.js +1 -0
  14. package/dist/web/client/assets/SkillsParts-UvNK5SYP.js +1 -0
  15. package/dist/web/client/assets/SpawnTeamModal-DG5UbJNK.js +1 -0
  16. package/dist/web/client/assets/TeamForm-DGlxWv4e.js +1 -0
  17. package/dist/web/client/assets/TeamThread-mkwODO0S.js +1 -0
  18. package/dist/web/client/assets/UnsavedChangesGuard-BmdwLH99.js +1 -0
  19. package/dist/web/client/assets/_id-CvcxNmBH.js +1 -0
  20. package/dist/web/client/assets/_id-UyBk7gRl.js +1 -0
  21. package/dist/web/client/assets/access-C8d8vaQ6.js +1 -0
  22. package/dist/web/client/assets/agent-actions-BgE9fKHH.js +1 -0
  23. package/dist/web/client/assets/agents-CgtzqBpD.js +1 -0
  24. package/dist/web/client/assets/agents-D7W4BT8r.js +1 -0
  25. package/dist/web/client/assets/arrow-right-D0HKRb7U.js +1 -0
  26. package/dist/web/client/assets/attention-D9mQWoKt.js +1 -0
  27. package/dist/web/client/assets/bot-Bb--PFVU.js +1 -0
  28. package/dist/web/client/assets/chevron-right-bs0TUSl2.js +1 -0
  29. package/dist/web/client/assets/config-Dw6GWf38.js +1 -0
  30. package/dist/web/client/assets/createLucideIcon-DkniuEtD.js +1 -0
  31. package/dist/web/client/assets/download-C4t9l5wR.js +1 -0
  32. package/dist/web/client/assets/file-text-DzbjpYrV.js +1 -0
  33. package/dist/web/client/assets/images-DSYgPKM7.js +1 -0
  34. package/dist/web/client/assets/index-YW0gXPfk.js +14 -0
  35. package/dist/web/client/assets/key-round-BpK4-E3T.js +1 -0
  36. package/dist/web/client/assets/list-checks-JNXcmws9.js +1 -0
  37. package/dist/web/client/assets/login-DcQJk5-U.js +1 -0
  38. package/dist/web/client/assets/manage-SRGSx8n2.js +1 -0
  39. package/dist/web/client/assets/mcp-BUWu4TvS.js +1 -0
  40. package/dist/web/client/assets/message-square-DM2MP9vF.js +1 -0
  41. package/dist/web/client/assets/network-BJ4iPjQO.js +1 -0
  42. package/dist/web/client/assets/parts-LZxl9Gvc.js +41 -0
  43. package/dist/web/client/assets/plus-CLGNN5QX.js +1 -0
  44. package/dist/web/client/assets/routes-BxIIyGho.js +85 -0
  45. package/dist/web/client/assets/skills-C7DzIwFJ.js +1 -0
  46. package/dist/web/client/assets/square-terminal-Dmm6cV-G.js +1 -0
  47. package/dist/web/client/assets/style-CA2GAk9b.js +7 -0
  48. package/dist/web/client/assets/styles-C3CDSGAr.css +2 -0
  49. package/dist/web/client/assets/system-zQ0NnQML.js +1 -0
  50. package/dist/web/client/assets/teams-BEIJHObN.js +1 -0
  51. package/dist/web/client/assets/teams-DlOc7Ods.js +1 -0
  52. package/dist/web/client/assets/telegram-DKHq5DpE.js +1 -0
  53. package/dist/web/client/assets/tools-BKIpLaiC.js +1 -0
  54. package/dist/web/client/assets/use-resource-CQaIZbpy.js +1 -0
  55. package/dist/web/client/assets/users-round-BJrym3FG.js +1 -0
  56. package/dist/web/client/assets/welcome-CyS4Hrd-.js +1 -0
  57. package/dist/web/client/assets/wrench-GbE1M1RJ.js +1 -0
  58. package/dist/web/server/assets/{AddProviderDialog-Tn4AskPm.js → AddProviderDialog-Nc5mc_P6.js} +106 -8
  59. package/dist/web/server/assets/AgentTemplateParts-DZK_r3nQ.js +266 -0
  60. package/dist/web/server/assets/{ConfigPage-DqDUujmt.js → ConfigPage-CxzL-gTm.js} +2 -2
  61. package/dist/web/server/assets/{ConfirmDialog-DfaJ--A6.js → ConfirmDialog-4xeCXKHe.js} +1 -2
  62. package/dist/web/server/assets/{ConnectionsView-DAG-zNBz.js → ConnectionsView-B02FjNsM.js} +9 -9
  63. package/dist/web/server/assets/ManagePage-BfCWE8Lj.js +29 -0
  64. package/dist/web/server/assets/ModelMenu-D-hTgYOO.js +278 -0
  65. package/dist/web/server/assets/{Rail-BIC_4ptO.js → Rail-3gbidhyv.js} +17 -110
  66. package/dist/web/server/assets/{SectionTabs-BGsrf-UQ.js → SectionTabs-CWQ5orUW.js} +9 -2
  67. package/dist/web/server/assets/SkillsParts-D58l8voo.js +199 -0
  68. package/dist/web/server/assets/SpawnDialog-MJWwppgC.js +1648 -0
  69. package/dist/web/server/assets/SpawnTeamModal-RjzAeX_Q.js +124 -0
  70. package/dist/web/server/assets/TeamForm-DdOgIMiV.js +138 -0
  71. package/dist/web/server/assets/{TeamThread-DuLlGDcw.js → TeamThread-D-PvO3fu.js} +9 -9
  72. package/dist/web/server/assets/{UnsavedChangesGuard-DrOvPV14.js → UnsavedChangesGuard-Bb5frygQ.js} +1 -1
  73. package/dist/web/server/assets/{_id-TVruGcOd.js → _id-BKzOw78O.js} +11 -3
  74. package/dist/web/server/assets/_id-BPjVkcNb.js +396 -0
  75. package/dist/web/server/assets/_id-BUfy-GwH.js +16 -0
  76. package/dist/web/server/assets/{_id-yN0z7VqE.js → _id-C1_l6oSR.js} +257 -207
  77. package/dist/web/server/assets/{_id-DJnYgisy.js → _id-CHvYQhWt.js} +8 -4
  78. package/dist/web/server/assets/_id-De3Bm0SG.js +39 -0
  79. package/dist/web/server/assets/_tanstack-start-manifest_v-CR3jm1nY.js +256 -0
  80. package/dist/web/server/assets/access-CNfvQ3NB.js +295 -0
  81. package/dist/web/server/assets/{access-GMGed5O8.js → access-Cm_izIIC.js} +2 -2
  82. package/dist/web/server/assets/{access-C_pupPks.js → access-WWspT0v4.js} +2 -1
  83. package/dist/web/server/assets/agent-actions-COnfW5AU.js +20 -0
  84. package/dist/web/server/assets/agents-C7UmTjfO.js +13 -0
  85. package/dist/web/server/assets/{agents-BnWgFo6o.js → agents-CRtMfKqX.js} +9 -6
  86. package/dist/web/server/assets/agents-D0hfGIMK.js +134 -0
  87. package/dist/web/server/assets/agents-DQowl6Ly.js +31 -0
  88. package/dist/web/server/assets/agents-DzpqlIuJ.js +12 -0
  89. package/dist/web/server/assets/agents-NOkh61dV.js +323 -0
  90. package/dist/web/server/assets/attention-CRvxt22X.js +232 -0
  91. package/dist/web/server/assets/{attention-Cr7puThv.js → attention-CgWhXjX7.js} +4 -1
  92. package/dist/web/server/assets/{attention-DS3O9UmJ.js → attention-Cx9ZWPOO.js} +4 -2
  93. package/dist/web/server/assets/{config-DjTGA4iZ.js → config-B5CS8juO.js} +2 -2
  94. package/dist/web/server/assets/{config-Q7livfa3.js → config-D117117T.js} +51 -102
  95. package/dist/web/server/assets/createSsrRpc-CwTd0zrB.js +72 -0
  96. package/dist/web/server/assets/{login-VV10kZBl.js → login-IF0Gbsuq.js} +36 -2
  97. package/dist/web/server/assets/{login-JoIjlcmu.js → login-va4EtvA8.js} +34 -45
  98. package/dist/web/server/assets/manage-Ce6cI4eW.js +240 -0
  99. package/dist/web/server/assets/{mcp-ZARSOxZW.js → mcp-Bm9U6x7N.js} +2 -2
  100. package/dist/web/server/assets/mcp-C96PBxpb.js +376 -0
  101. package/dist/web/server/assets/page-title-CwcbXMhx.js +95 -0
  102. package/dist/web/server/assets/{router-Dh2-IvLL.js → router-8Iq19GOz.js} +366 -203
  103. package/dist/web/server/assets/{routes-C9NawqcV.js → routes-BLo-fWbQ.js} +2681 -1667
  104. package/dist/web/server/assets/{routes-CDskMy5C.js → routes-BXvYYFrN.js} +2 -2
  105. package/dist/web/server/assets/routes-Kwam6JmS.js +89 -0
  106. package/dist/web/server/assets/{skills-StN15QhC.js → skills-BqCnA-74.js} +2 -2
  107. package/dist/web/server/assets/skills-DSezIdDc.js +157 -0
  108. package/dist/web/server/assets/{skills-h5aHa7Q8.js → skills-DWzlT_hC.js} +9 -1
  109. package/dist/web/server/assets/{style-GYDODk2F.js → style-C2hIPY_Y.js} +2 -2
  110. package/dist/web/server/assets/{system-Dl-1RhoP.js → system-CcLCmkIC.js} +2 -2
  111. package/dist/web/server/assets/{system-DtswhLW6.js → system-D3th6n2E.js} +4 -2
  112. package/dist/web/server/assets/system-E0VePdzO.js +145 -0
  113. package/dist/web/server/assets/{teams-BxnvFTyn.js → teams-70u1XQTr.js} +1 -3
  114. package/dist/web/server/assets/{teams-YrmyutM4.js → teams-BopOP4x7.js} +8 -1
  115. package/dist/web/server/assets/teams-CQVV18D3.js +216 -0
  116. package/dist/web/server/assets/teams-CdCmBJIj.js +174 -0
  117. package/dist/web/server/assets/{teams-5PMGvHuM.js → teams-DScFp8mK.js} +2 -2
  118. package/dist/web/server/assets/{teams-CbIPKf99.js → teams-DxA-vnzY.js} +4 -2
  119. package/dist/web/server/assets/telegram-DJ8s_91Y.js +1057 -0
  120. package/dist/web/server/assets/{telegram-Cv0D4gyz.js → telegram-DR7xijeS.js} +2 -2
  121. package/dist/web/server/assets/{tools-ioJcPzMW.js → tools-CsH9DI-4.js} +2 -2
  122. package/dist/web/server/assets/{tools-OfD22R-C.js → tools-V6kezUpL.js} +55 -218
  123. package/dist/web/server/assets/{use-resource-DVzK0toP.js → use-resource-CjcJwn7F.js} +1 -1
  124. package/dist/web/server/assets/{welcome-jxmpE_Jb.js → welcome-BpmcD-ia.js} +2 -2
  125. package/dist/web/server/assets/{welcome-FFEbrNT1.js → welcome-Ya8TkL4v.js} +10 -10
  126. package/dist/web/server/server.js +19 -19
  127. package/dist/worker.js +17 -0
  128. package/dist/worker.js.map +1 -1
  129. package/package.json +1 -1
  130. package/dist/web/client/assets/AddProviderDialog-BiGLKnu2.js +0 -1
  131. package/dist/web/client/assets/ConfigPage-DvBzy2MN.js +0 -1
  132. package/dist/web/client/assets/ConfirmDialog-CiZ5tk9R.js +0 -1
  133. package/dist/web/client/assets/ConnectionsView-Czkpm2JY.js +0 -1
  134. package/dist/web/client/assets/Dialog-s_kPtI-W.js +0 -1
  135. package/dist/web/client/assets/ModelMenu-BfUPoRjV.js +0 -1
  136. package/dist/web/client/assets/SectionTabs-DENNb6Nw.js +0 -1
  137. package/dist/web/client/assets/Segmented-Dh77vmpp.js +0 -1
  138. package/dist/web/client/assets/SkillFindings-Xng11qqx.js +0 -1
  139. package/dist/web/client/assets/SkillsPicker-hI3YXvib.js +0 -1
  140. package/dist/web/client/assets/SpawnDialog-CKWFQ6jk.js +0 -1
  141. package/dist/web/client/assets/Tabs-f6bHvCGn.js +0 -1
  142. package/dist/web/client/assets/TeamForm-kda1HYZG.js +0 -1
  143. package/dist/web/client/assets/TeamThread-2rm1JGSk.js +0 -1
  144. package/dist/web/client/assets/UnsavedChangesGuard-nx6dv2Yw.js +0 -1
  145. package/dist/web/client/assets/_id-B72mIpcE.js +0 -1
  146. package/dist/web/client/assets/_id-Bzavnza1.js +0 -1
  147. package/dist/web/client/assets/access-Yw9jODuk.js +0 -1
  148. package/dist/web/client/assets/agents-C9xoyL7o.js +0 -1
  149. package/dist/web/client/assets/agents-TviG16wx.js +0 -1
  150. package/dist/web/client/assets/api-HC_YzjBy.js +0 -1
  151. package/dist/web/client/assets/arrow-right-Gm_FDWJ_.js +0 -1
  152. package/dist/web/client/assets/attention-DmURtlJm.js +0 -1
  153. package/dist/web/client/assets/check-BjgKoGvU.js +0 -1
  154. package/dist/web/client/assets/chevron-right-CUZiA2aG.js +0 -1
  155. package/dist/web/client/assets/config-UZz_mjO5.js +0 -1
  156. package/dist/web/client/assets/createLucideIcon-C6gOo8sD.js +0 -1
  157. package/dist/web/client/assets/dist-BWppw70N.js +0 -41
  158. package/dist/web/client/assets/dist-D2dwY7MR.js +0 -1
  159. package/dist/web/client/assets/entities-xVoB-p2j.js +0 -1
  160. package/dist/web/client/assets/index-Df1oUtAP.js +0 -14
  161. package/dist/web/client/assets/link-Cbztlp_R.js +0 -1
  162. package/dist/web/client/assets/login-CPfdaqsV.js +0 -1
  163. package/dist/web/client/assets/mcp-FlYnNon0.js +0 -1
  164. package/dist/web/client/assets/model-facts-DoB6QD5y.js +0 -1
  165. package/dist/web/client/assets/parts-tIDBNsYA.js +0 -1
  166. package/dist/web/client/assets/plus-CWrKMtvA.js +0 -1
  167. package/dist/web/client/assets/routes-BZaWCoQj.js +0 -76
  168. package/dist/web/client/assets/save-f9O-CQia.js +0 -1
  169. package/dist/web/client/assets/skills-C7yDPC8s.js +0 -1
  170. package/dist/web/client/assets/style-DDuTFJUu.js +0 -7
  171. package/dist/web/client/assets/styles-BviXU81u.css +0 -2
  172. package/dist/web/client/assets/system-CL3Kz36L.js +0 -1
  173. package/dist/web/client/assets/teams-CQTEF5gV.js +0 -1
  174. package/dist/web/client/assets/teams-DQ7SqVyF.js +0 -1
  175. package/dist/web/client/assets/telegram-BLgxtGhZ.js +0 -1
  176. package/dist/web/client/assets/tools-pOQyGVYo.js +0 -1
  177. package/dist/web/client/assets/use-resource-C3MBZJop.js +0 -1
  178. package/dist/web/client/assets/welcome-Hr6JpMef.js +0 -1
  179. package/dist/web/client/assets/wrench-6BEIqKDn.js +0 -1
  180. package/dist/web/server/assets/Dialog-aup_yJv5.js +0 -85
  181. package/dist/web/server/assets/ModelMenu-DUY9aHkE.js +0 -138
  182. package/dist/web/server/assets/SkillFindings-BdATze1A.js +0 -46
  183. package/dist/web/server/assets/SkillsPicker-DlqEfRWh.js +0 -67
  184. package/dist/web/server/assets/SpawnDialog-D_SMPCG_.js +0 -132
  185. package/dist/web/server/assets/Tabs-BhF41MfQ.js +0 -20
  186. package/dist/web/server/assets/TeamForm-ilBaeLI4.js +0 -96
  187. package/dist/web/server/assets/_id-BsZcsabI.js +0 -383
  188. package/dist/web/server/assets/_id-D8Kj0F30.js +0 -18
  189. package/dist/web/server/assets/_id-QYifTM9w.js +0 -28
  190. package/dist/web/server/assets/_tanstack-start-manifest_v-D6zrzUC7.js +0 -223
  191. package/dist/web/server/assets/access-DKOpcHIJ.js +0 -232
  192. package/dist/web/server/assets/agents-B6OR3x99.js +0 -327
  193. package/dist/web/server/assets/agents-B7642eRO.js +0 -130
  194. package/dist/web/server/assets/agents-BJ-_oC2e.js +0 -14
  195. package/dist/web/server/assets/agents-CjV0w-Zy.js +0 -12
  196. package/dist/web/server/assets/agents-Dy_Q-9lG.js +0 -27
  197. package/dist/web/server/assets/attention-CLP4HYBz.js +0 -216
  198. package/dist/web/server/assets/createSsrRpc-GCCF14VW.js +0 -169
  199. package/dist/web/server/assets/entities-Dn2xzKIw.js +0 -16
  200. package/dist/web/server/assets/mcp-BI-FD-JI.js +0 -250
  201. package/dist/web/server/assets/model-facts-mrfrWQne.js +0 -136
  202. package/dist/web/server/assets/parts-B31PJkhi.js +0 -190
  203. package/dist/web/server/assets/routes-BJIJWCIE.js +0 -16
  204. package/dist/web/server/assets/skills-BqLq3ZXq.js +0 -275
  205. package/dist/web/server/assets/system-BtRA2HUs.js +0 -138
  206. package/dist/web/server/assets/teams-COaU0wN9.js +0 -108
  207. package/dist/web/server/assets/teams-Ca8W4mvl.js +0 -88
  208. package/dist/web/server/assets/telegram-Yx8nm6Ei.js +0 -984
  209. package/dist/web/server/assets/utils-C_uf36nf.js +0 -8
  210. package/dist/web/server/assets/workspace-DaitCM0t.js +0 -651
@@ -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,169 +0,0 @@
1
- import { i as getServerFnById, r as TSS_SERVER_FUNCTION } from "../server.js";
2
- import { t as cn } from "./utils-C_uf36nf.js";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- //#region src/components/Page.tsx
5
- var PAGE_SIZE_CLASS = {
6
- narrow: "max-w-3xl",
7
- default: "max-w-5xl",
8
- wide: "max-w-[1500px]"
9
- };
10
- function PageShell({ size = "default", className, ...props }) {
11
- return /* @__PURE__ */ jsx("div", {
12
- className: cn("mx-auto min-w-0 w-full space-y-6", PAGE_SIZE_CLASS[size], className),
13
- ...props
14
- });
15
- }
16
- function PageHeader({ eyebrow, title, description, actions, className, ...props }) {
17
- return /* @__PURE__ */ jsxs("header", {
18
- className: cn("flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between", className),
19
- ...props,
20
- children: [/* @__PURE__ */ jsxs("div", {
21
- className: "min-w-0",
22
- children: [
23
- eyebrow && /* @__PURE__ */ jsx("div", {
24
- className: "mb-1 text-xs font-semibold uppercase tracking-[0.12em] text-primary",
25
- children: eyebrow
26
- }),
27
- title && /* @__PURE__ */ jsx("h1", {
28
- className: "m-0 font-display text-3xl leading-tight text-foreground sm:text-[2.1rem]",
29
- children: title
30
- }),
31
- description && /* @__PURE__ */ jsx("div", {
32
- className: "mt-2 max-w-3xl text-sm leading-6 text-muted-foreground",
33
- children: description
34
- })
35
- ]
36
- }), actions && /* @__PURE__ */ jsx("div", {
37
- className: "flex shrink-0 flex-wrap items-center gap-2",
38
- children: actions
39
- })]
40
- });
41
- }
42
- function SectionCard({ title, description, actions, children, className, ...props }) {
43
- const hasHeader = title || description || actions;
44
- return /* @__PURE__ */ jsxs("section", {
45
- className: cn("min-w-0 rounded-2xl border border-border bg-card p-5 text-card-foreground shadow-baziu-sm sm:p-6", className),
46
- ...props,
47
- children: [hasHeader && /* @__PURE__ */ jsxs("div", {
48
- className: "flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",
49
- children: [/* @__PURE__ */ jsxs("div", {
50
- className: "min-w-0",
51
- children: [title && /* @__PURE__ */ jsx("h2", {
52
- className: "m-0 font-body text-base font-semibold text-foreground",
53
- children: title
54
- }), description && /* @__PURE__ */ jsx("div", {
55
- className: "mt-1 text-sm leading-6 text-muted-foreground",
56
- children: description
57
- })]
58
- }), actions && /* @__PURE__ */ jsx("div", {
59
- className: "flex shrink-0 flex-wrap items-center gap-2",
60
- children: actions
61
- })]
62
- }), children && /* @__PURE__ */ jsx("div", {
63
- className: cn(hasHeader && "mt-5"),
64
- children
65
- })]
66
- });
67
- }
68
- function EmptyState({ title, description, icon, actions, className, ...props }) {
69
- return /* @__PURE__ */ jsxs("div", {
70
- className: cn("flex min-h-40 flex-col items-center justify-center rounded-2xl border border-dashed border-border bg-muted/30 px-6 py-10 text-center", className),
71
- ...props,
72
- children: [
73
- icon && /* @__PURE__ */ jsx("div", {
74
- className: "mb-3 flex size-10 items-center justify-center rounded-full bg-accent text-accent-foreground",
75
- children: icon
76
- }),
77
- /* @__PURE__ */ jsx("h2", {
78
- className: "m-0 font-body text-base font-semibold text-foreground",
79
- children: title
80
- }),
81
- description && /* @__PURE__ */ jsx("div", {
82
- className: "mt-1 max-w-lg text-sm leading-6 text-muted-foreground",
83
- children: description
84
- }),
85
- actions && /* @__PURE__ */ jsx("div", {
86
- className: "mt-4 flex flex-wrap items-center justify-center gap-2",
87
- children: actions
88
- })
89
- ]
90
- });
91
- }
92
- var STATUS_BADGE_CLASS = {
93
- neutral: "border-border bg-muted text-muted-foreground",
94
- info: "border-primary/20 bg-accent text-accent-foreground",
95
- success: "border-success/25 bg-success/10 text-success",
96
- warning: "border-warning/25 bg-warning/10 text-warning",
97
- danger: "border-danger/25 bg-danger/10 text-danger"
98
- };
99
- function StatusBadge({ variant = "neutral", className, ...props }) {
100
- return /* @__PURE__ */ jsx("span", {
101
- className: cn("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-semibold leading-5", STATUS_BADGE_CLASS[variant], className),
102
- ...props
103
- });
104
- }
105
- /** The one list layout: a row per item that stacks on narrow screens. */
106
- function ItemList({ children, className }) {
107
- return /* @__PURE__ */ jsx("ul", {
108
- className: cn("m-0 list-none divide-y divide-border overflow-hidden rounded-xl border border-border bg-card p-0", className),
109
- children
110
- });
111
- }
112
- function ItemRow({ title, meta, actions, children, className }) {
113
- return /* @__PURE__ */ jsxs("li", {
114
- className: cn("flex min-w-0 flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center sm:justify-between", className),
115
- children: [/* @__PURE__ */ jsxs("div", {
116
- className: "min-w-0 flex-1",
117
- children: [
118
- /* @__PURE__ */ jsx("div", {
119
- className: "min-w-0 break-words font-medium text-foreground",
120
- children: title
121
- }),
122
- meta && /* @__PURE__ */ jsx("div", {
123
- className: "mt-1 flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",
124
- children: meta
125
- }),
126
- children
127
- ]
128
- }), actions && /* @__PURE__ */ jsx("div", {
129
- className: "flex shrink-0 flex-wrap items-center gap-2",
130
- children: actions
131
- })]
132
- });
133
- }
134
- /** A labelled number tile. */
135
- function Stat({ label, value, detail }) {
136
- return /* @__PURE__ */ jsxs("div", {
137
- className: "min-w-0 rounded-2xl border border-border bg-card p-4 shadow-baziu-sm",
138
- children: [
139
- /* @__PURE__ */ jsx("div", {
140
- className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground",
141
- children: label
142
- }),
143
- /* @__PURE__ */ jsx("div", {
144
- className: "mt-1 text-2xl font-semibold text-foreground",
145
- children: value
146
- }),
147
- detail && /* @__PURE__ */ jsx("div", {
148
- className: "mt-0.5 text-xs leading-5 text-muted-foreground",
149
- children: detail
150
- })
151
- ]
152
- });
153
- }
154
- //#endregion
155
- //#region ../../node_modules/.pnpm/@tanstack+start-server-core@1.169.17/node_modules/@tanstack/start-server-core/dist/esm/createSsrRpc.js
156
- var createSsrRpc = (functionId) => {
157
- const url = "/_serverFn/" + functionId;
158
- const serverFnMeta = { id: functionId };
159
- const fn = async (...args) => {
160
- return (await getServerFnById(functionId, { origin: "server" }))(...args);
161
- };
162
- return Object.assign(fn, {
163
- url,
164
- serverFnMeta,
165
- [TSS_SERVER_FUNCTION]: true
166
- });
167
- };
168
- //#endregion
169
- export { PageHeader as a, Stat as c, ItemRow as i, StatusBadge as l, EmptyState as n, PageShell as o, ItemList as r, SectionCard as s, createSsrRpc as t };
@@ -1,16 +0,0 @@
1
- //#region ../../packages/api-types/src/entities.ts
2
- /** The Team and the Profile first-run setup creates. */
3
- var DEFAULT_TEAM_ID = "default";
4
- var DEFAULT_PROFILE_ID = "default";
5
- /** Edge endpoint standing for every Agent in other Teams. */
6
- var OUTSIDE_TEAM = "outside";
7
- var REASONING_LEVELS = [
8
- "off",
9
- "minimal",
10
- "low",
11
- "medium",
12
- "high",
13
- "xhigh"
14
- ];
15
- //#endregion
16
- export { REASONING_LEVELS as i, DEFAULT_TEAM_ID as n, OUTSIDE_TEAM as r, DEFAULT_PROFILE_ID as t };
@@ -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 };