bazilion 0.9.0 → 0.11.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 (189) hide show
  1. package/dist/cli.js +1257 -150
  2. package/dist/cli.js.map +1 -1
  3. package/dist/daemon.js +3049 -471
  4. package/dist/daemon.js.map +1 -1
  5. package/dist/migrations/0001_init.sql +20 -0
  6. package/dist/web/client/assets/AgentTabs-B3hq5a3e.js +1 -0
  7. package/dist/web/client/assets/ConfigPage-BCwfgyjD.js +1 -0
  8. package/dist/web/client/assets/FieldRow-avAFLgYW.js +1 -0
  9. package/dist/web/client/assets/Page-CwNuDhWz.js +1 -0
  10. package/dist/web/client/assets/ProductionTeamPolicyEditor-B6dbpuYy.js +7 -0
  11. package/dist/web/client/assets/{ProfileCommunicationEditor-D1OZ8WE5.js → ProfileCommunicationEditor-Bf8UvmZT.js} +1 -1
  12. package/dist/web/client/assets/SectionTabs-DZzy01az.js +1 -0
  13. package/dist/web/client/assets/TeamTabs-sQBHChtd.js +1 -0
  14. package/dist/web/client/assets/TemplatesTabs-DPsuwsWB.js +1 -0
  15. package/dist/web/client/assets/_id-C9rkCclz.js +1 -0
  16. package/dist/web/client/assets/_id-D65IzC8H.js +1 -0
  17. package/dist/web/client/assets/_id-DE4IY5bL.js +1 -0
  18. package/dist/web/client/assets/_id-DYASsGQ8.js +1 -0
  19. package/dist/web/client/assets/activity-C7o6-xHg.js +1 -0
  20. package/dist/web/client/assets/agents-UroO4d25.js +1 -0
  21. package/dist/web/client/assets/agents-h8yWXQ2H.js +1 -0
  22. package/dist/web/client/assets/approvals-DKhF0YLC.js +1 -0
  23. package/dist/web/client/assets/chevron-down-BK6NPMMP.js +1 -0
  24. package/dist/web/client/assets/config-q8JDresK.js +3 -0
  25. package/dist/web/client/assets/context-CBucAoi6.js +1 -0
  26. package/dist/web/client/assets/inbox-BwoRikj1.js +1 -0
  27. package/dist/web/client/assets/index-DUXAevpZ.js +12 -0
  28. package/dist/web/client/assets/login-CNAV9Wer.js +1 -0
  29. package/dist/web/client/assets/mcp-BKdEFwHO.js +1 -0
  30. package/dist/web/client/assets/members-BDqZQh26.js +1 -0
  31. package/dist/web/client/assets/memory-DVdEVr6L.js +1 -0
  32. package/dist/web/client/assets/plus-b4yFXP0O.js +1 -0
  33. package/dist/web/client/assets/policy-DdDctqvg.js +1 -0
  34. package/dist/web/client/assets/preload-helper-mNuBjNXU.js +1 -0
  35. package/dist/web/client/assets/react-3W8R1pOO.js +1 -0
  36. package/dist/web/client/assets/routes-BEfALSZv.js +1 -0
  37. package/dist/web/client/assets/services-DZP2ybzb.js +1 -0
  38. package/dist/web/client/assets/skills-DoeIjITs.js +1 -0
  39. package/dist/web/client/assets/styles-BYM0UGdF.css +2 -0
  40. package/dist/web/client/assets/team-policy-D0jpnn2b.js +1 -0
  41. package/dist/web/client/assets/teams-DlHRnrQw.js +1 -0
  42. package/dist/web/client/assets/teams-W3j-UoJ9.js +1 -0
  43. package/dist/web/client/assets/telegram-2OdeGv4E.js +1 -0
  44. package/dist/web/client/assets/tokens-MuBfmgue.js +1 -0
  45. package/dist/web/client/assets/triggers-CX7RMQFQ.js +1 -0
  46. package/dist/web/client/assets/welcome-CvNr5IMi.js +1 -0
  47. package/dist/web/client/assets/wire-constants-BhVKOCQa.js +74 -0
  48. package/dist/web/server/assets/{AgentTabs-BOjTN7QF.js → AgentTabs-DoMDJBXH.js} +10 -7
  49. package/dist/web/server/assets/{ChatPane-Dh3qxzdb.js → ChatPane-Ba5wTsVk.js} +340 -44
  50. package/dist/web/server/assets/ConfigPage-BKlh5vOU.js +68 -0
  51. package/dist/web/server/assets/{FieldRow-DwyqycWI.js → FieldRow-B4eTegH9.js} +5 -5
  52. package/dist/web/server/assets/Page-LENulSXY.js +111 -0
  53. package/dist/web/server/assets/{ProductionTeamPolicyEditor-Bke5doyl.js → ProductionTeamPolicyEditor-Y4mzFFvR.js} +4 -4
  54. package/dist/web/server/assets/SectionTabs-BJTPr5nU.js +8 -0
  55. package/dist/web/server/assets/{Sidebar-CGmtCnYU.js → Sidebar-DsRVCszF.js} +229 -118
  56. package/dist/web/server/assets/{TeamTabs-BPxDBfqy.js → TeamTabs-zZzbP1t_.js} +9 -8
  57. package/dist/web/server/assets/{TemplatesTabs-zf4YhStd.js → TemplatesTabs-CcRxZhJe.js} +5 -4
  58. package/dist/web/server/assets/{_id-fpFQ9_Ya.js → _id-BhOB8Umi.js} +1 -1
  59. package/dist/web/server/assets/{_id-CCHA0gdR.js → _id-C3HY4lWg.js} +7 -10
  60. package/dist/web/server/assets/{_id-B6g9wmPR.js → _id-Cg7x6q3g.js} +22 -28
  61. package/dist/web/server/assets/{_id-B04VaQlh.js → _id-CwyGjJeP.js} +2 -2
  62. package/dist/web/server/assets/{_id-_nFwi9gD.js → _id-D27T85mU.js} +1 -1
  63. package/dist/web/server/assets/{_id-5lLzLwcv.js → _id-D3Ap7zZA.js} +142 -144
  64. package/dist/web/server/assets/{_id-ButXHnRH.js → _id-DinTp_7X.js} +2 -2
  65. package/dist/web/server/assets/{_id-DdC9wpNN.js → _id-Dj1yZ3zJ.js} +2 -2
  66. package/dist/web/server/assets/{_id-DkFgCIb-.js → _id-DqON-59C.js} +2 -2
  67. package/dist/web/server/assets/{_id-CUWgTqMS.js → _id-IzadFZV9.js} +1 -1
  68. package/dist/web/server/assets/{_id-C4AOhstq.js → _id-LrvXU4Nr.js} +6 -5
  69. package/dist/web/server/assets/{_id-DJkzwHjM.js → _id-tB47Vsfp.js} +1 -1
  70. package/dist/web/server/assets/{_tanstack-start-manifest_v-Div-TukY.js → _tanstack-start-manifest_v-BXauUXg6.js} +96 -51
  71. package/dist/web/server/assets/{activity-C2ZKg1Q9.js → activity-BCI4mfNS.js} +28 -30
  72. package/dist/web/server/assets/{activity-DedraoFj.js → activity-D9SMqBhy.js} +2 -2
  73. package/dist/web/server/assets/{activity-GPx8NCeB.js → activity-DohitgwW.js} +1 -1
  74. package/dist/web/server/assets/{agents-BR2qXlXF.js → agents-BPKOshR5.js} +1 -1
  75. package/dist/web/server/assets/{agents-LHowEI6S.js → agents-BY74v7fM.js} +1 -1
  76. package/dist/web/server/assets/{agents-B8kinIPW.js → agents-BvttypqB.js} +2 -2
  77. package/dist/web/server/assets/{agents-Bp1nsVs2.js → agents-C9xlWK0Z.js} +2 -2
  78. package/dist/web/server/assets/agents-CgZMHj80.js +265 -0
  79. package/dist/web/server/assets/{agents-CUQmWhTp.js → agents-DZuFEj0D.js} +59 -77
  80. package/dist/web/server/assets/{approvals-VPc0YpLN.js → approvals-BGU-XGIO.js} +1 -1
  81. package/dist/web/server/assets/{approvals-Dw2LJoSA.js → approvals-CWcFHlor.js} +2 -2
  82. package/dist/web/server/assets/{approvals-DHgARzd8.js → approvals-DCaVw1Mz.js} +116 -78
  83. package/dist/web/server/assets/{auth-l-Vf8wlu.js → auth-byfSx6Ja.js} +1 -1
  84. package/dist/web/server/assets/{config-CHaCv89D.js → config-BDCJdtj2.js} +1 -1
  85. package/dist/web/server/assets/{config-BvKctDOX.js → config-D2LAsud2.js} +28 -49
  86. package/dist/web/server/assets/{config-QvHaxGlP.js → config-TeIoyYYc.js} +2 -2
  87. package/dist/web/server/assets/{context-5lrf2ame.js → context-B-XDf6Ym.js} +1 -1
  88. package/dist/web/server/assets/{context-D3Egm-vY.js → context-BXGo5Vfi.js} +2 -2
  89. package/dist/web/server/assets/context-DrkrIWun.js +47 -0
  90. package/dist/web/server/assets/{createServerRpc-CeKECg65.js → createServerRpc-pU-IQV2Y.js} +1 -1
  91. package/dist/web/server/assets/{createSsrRpc-ZBGxhl8t.js → createSsrRpc-DFsIAfFd.js} +1 -1
  92. package/dist/web/server/assets/{empty-plugin-adapters-DKUlnwwl.js → empty-plugin-adapters-Cq4--YW-.js} +1 -1
  93. package/dist/web/server/assets/{inbox-CkiSvD14.js → inbox-B3-TRsNI.js} +1 -1
  94. package/dist/web/server/assets/{inbox-Bxb3W04M.js → inbox-BardsGyy.js} +2 -2
  95. package/dist/web/server/assets/inbox-CUIyf9MT.js +131 -0
  96. package/dist/web/server/assets/login-Bx5LEyGP.js +118 -0
  97. package/dist/web/server/assets/login-CmWvxfTK.js +136 -0
  98. package/dist/web/server/assets/{mcp-BsFKEoXt.js → mcp-2pwT9HU8.js} +1 -1
  99. package/dist/web/server/assets/{mcp-BU_kKENi.js → mcp-BJjLIdP0.js} +105 -112
  100. package/dist/web/server/assets/{mcp-CKqwG4mt.js → mcp-DIWTogHM.js} +2 -2
  101. package/dist/web/server/assets/members-CCv17cjQ.js +46 -0
  102. package/dist/web/server/assets/{members-DlGBKZNl.js → members-CW5aBe81.js} +1 -1
  103. package/dist/web/server/assets/{members-ksELRsyk.js → members-VdPwD6CE.js} +2 -2
  104. package/dist/web/server/assets/{memory-CO0jKGzJ.js → memory-Dngc13Nw.js} +1 -1
  105. package/dist/web/server/assets/memory-a8Kz57Kh.js +287 -0
  106. package/dist/web/server/assets/{memory-B5moRnnp.js → memory-pZ4pZT7p.js} +2 -2
  107. package/dist/web/server/assets/{policy-Dxs78_GO.js → policy-Bb-vEgqg.js} +1 -1
  108. package/dist/web/server/assets/{policy-Dr55y-Mh.js → policy-BcGELcc9.js} +16 -22
  109. package/dist/web/server/assets/{policy-DNcGZLOB.js → policy-C30AeFIb.js} +2 -2
  110. package/dist/web/server/assets/{router-_izWQUeG.js → router-C5_NjTsP.js} +100 -111
  111. package/dist/web/server/assets/{routes-BSSKp3Rv.js → routes-B6cMLIPk.js} +16 -13
  112. package/dist/web/server/assets/{routes-BrTOoeth.js → routes-BrA-U_Hm.js} +2 -2
  113. package/dist/web/server/assets/{routes-DOj6ljcm.js → routes-C19CMLZt.js} +2 -2
  114. package/dist/web/server/assets/services-B9yBWDX0.js +79 -0
  115. package/dist/web/server/assets/{services-Pv_V88VA.js → services-C4szdhPx.js} +2 -2
  116. package/dist/web/server/assets/{services-DhRiNeq0.js → services-wG8I06oS.js} +1 -1
  117. package/dist/web/server/assets/skills-BZdqiDig.js +358 -0
  118. package/dist/web/server/assets/{skills-l2cyQ3zS.js → skills-C-UgkuCW.js} +2 -2
  119. package/dist/web/server/assets/{skills-CFIWVg32.js → skills-a9VSWHWq.js} +1 -1
  120. package/dist/web/server/assets/{start-DlHq0RaQ.js → start-WH8WzTL_.js} +1 -1
  121. package/dist/web/server/assets/{team-policy-Csvc5EDd.js → team-policy-vPG01onj.js} +3 -3
  122. package/dist/web/server/assets/{teams-B9O-WDH5.js → teams-CpQ0YgWf.js} +38 -34
  123. package/dist/web/server/assets/{teams-35Oprf6e.js → teams-DEpQR2QA.js} +2 -2
  124. package/dist/web/server/assets/{teams-DFkN7ic7.js → teams-DqfrEoH6.js} +1 -1
  125. package/dist/web/server/assets/{teams-B5IF65p2.js → teams-MjqgsmC3.js} +1 -1
  126. package/dist/web/server/assets/{teams-DH1CvWmT.js → teams-OIkHuxy1.js} +2 -2
  127. package/dist/web/server/assets/teams-jBtvnk59.js +193 -0
  128. package/dist/web/server/assets/{telegram-C9sQFwWj.js → telegram-CBF8SJzB.js} +36 -71
  129. package/dist/web/server/assets/{telegram-BdaUIjvs.js → telegram-DNgCWebD.js} +1 -1
  130. package/dist/web/server/assets/{telegram-mTnJCOmn.js → telegram-XwyKSEtj.js} +2 -2
  131. package/dist/web/server/assets/{tokens-DdpnfV_Y.js → tokens-BnwFbV7T.js} +2 -2
  132. package/dist/web/server/assets/{tokens-BCz3PSoT.js → tokens-DPDMSN5O.js} +1 -1
  133. package/dist/web/server/assets/tokens-yyTSfBSN.js +186 -0
  134. package/dist/web/server/assets/{triggers-BcTTwMfy.js → triggers-CBl4yMyw.js} +2 -2
  135. package/dist/web/server/assets/{triggers-BcH_6PW1.js → triggers-D79NoSXk.js} +4 -3
  136. package/dist/web/server/assets/{triggers-BzJG1nN5.js → triggers-_3rdhwSN.js} +31 -6
  137. package/dist/web/server/assets/{welcome-CDGE2Sdk.js → welcome-IYHGurWx.js} +21 -13
  138. package/dist/web/server/server.js +82 -73
  139. package/dist/worker.js +1614 -153
  140. package/dist/worker.js.map +1 -1
  141. package/package.json +5 -3
  142. package/dist/web/client/assets/AgentTabs-DioGqUVR.js +0 -1
  143. package/dist/web/client/assets/ConfigTabs-pY-V0Rie.js +0 -1
  144. package/dist/web/client/assets/FieldRow-DmwAFfbF.js +0 -1
  145. package/dist/web/client/assets/ProductionTeamPolicyEditor-1a5jQqUB.js +0 -7
  146. package/dist/web/client/assets/TeamTabs-BViZ4sti.js +0 -1
  147. package/dist/web/client/assets/TemplatesTabs-DVcY9pMD.js +0 -1
  148. package/dist/web/client/assets/_id-8P7brhGy.js +0 -1
  149. package/dist/web/client/assets/_id-C3o3MHq8.js +0 -1
  150. package/dist/web/client/assets/_id-DGRrSF1e.js +0 -1
  151. package/dist/web/client/assets/_id-KnJe-aW9.js +0 -1
  152. package/dist/web/client/assets/activity-WWvJSo4t.js +0 -1
  153. package/dist/web/client/assets/agents-C32T1voV.js +0 -1
  154. package/dist/web/client/assets/agents-nH4m4gZ1.js +0 -1
  155. package/dist/web/client/assets/approvals-l8jIZjqz.js +0 -1
  156. package/dist/web/client/assets/config-C7wvi1nR.js +0 -3
  157. package/dist/web/client/assets/context-BEGWE3RC.js +0 -1
  158. package/dist/web/client/assets/inbox--4aBaAgG.js +0 -1
  159. package/dist/web/client/assets/index-BCXoh1c8.js +0 -12
  160. package/dist/web/client/assets/login-Bk2wwIHQ.js +0 -1
  161. package/dist/web/client/assets/mcp-vM7xgh9e.js +0 -1
  162. package/dist/web/client/assets/members-cPKfnrSL.js +0 -1
  163. package/dist/web/client/assets/memory-BOcsaemD.js +0 -1
  164. package/dist/web/client/assets/policy-BGLCJYvS.js +0 -1
  165. package/dist/web/client/assets/preload-helper-eOOCz1Fu.js +0 -1
  166. package/dist/web/client/assets/routes-DnrP3dwv.js +0 -1
  167. package/dist/web/client/assets/services-C2_O3ifw.js +0 -1
  168. package/dist/web/client/assets/skills-B__fLZjx.js +0 -1
  169. package/dist/web/client/assets/styles-Dn24-ZvP.css +0 -2
  170. package/dist/web/client/assets/team-policy-BdX340m4.js +0 -1
  171. package/dist/web/client/assets/teams-DZMB4_iw.js +0 -1
  172. package/dist/web/client/assets/teams-rpaYKNIb.js +0 -1
  173. package/dist/web/client/assets/telegram-B1O4Ko0V.js +0 -1
  174. package/dist/web/client/assets/tokens-D7FH9VgA.js +0 -1
  175. package/dist/web/client/assets/triggers-3PLy2_Fo.js +0 -1
  176. package/dist/web/client/assets/welcome-B-QQobzq.js +0 -1
  177. package/dist/web/client/assets/wire-constants-BY9Q9Z7d.js +0 -74
  178. package/dist/web/server/assets/ConfigTabs-CyuxzesF.js +0 -41
  179. package/dist/web/server/assets/agents-DU9Hqs58.js +0 -249
  180. package/dist/web/server/assets/context-CEr4-xiA.js +0 -49
  181. package/dist/web/server/assets/inbox-DU27iHv_.js +0 -133
  182. package/dist/web/server/assets/login-CNznncgA.js +0 -58
  183. package/dist/web/server/assets/login-CQybKk7Y.js +0 -74
  184. package/dist/web/server/assets/members-40DxRdVj.js +0 -48
  185. package/dist/web/server/assets/memory-CiTl4cN9.js +0 -289
  186. package/dist/web/server/assets/services-CHe4ihJk.js +0 -94
  187. package/dist/web/server/assets/skills-D89ND2kR.js +0 -321
  188. package/dist/web/server/assets/teams-zcm9XaQU.js +0 -174
  189. package/dist/web/server/assets/tokens-CkKqrtk-.js +0 -193
@@ -1,94 +0,0 @@
1
- import { t as Route } from "./services-Pv_V88VA.js";
2
- import { t as ConfigTabs } from "./ConfigTabs-CyuxzesF.js";
3
- import { t as FieldRow } from "./FieldRow-DwyqycWI.js";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
- //#region src/routes/config/services.tsx?tsr-split=component
6
- var UNGROUPED_LABEL = "Other";
7
- /**
8
- * Bucket services into teams while preserving the order each team first
9
- * appears in the daemon's SERVICES list. Cards without a `team` field land
10
- * in an "Other" bucket at the end.
11
- */
12
- function groupServices(services) {
13
- const buckets = /* @__PURE__ */ new Map();
14
- for (const s of services) {
15
- const key = s.team ?? UNGROUPED_LABEL;
16
- const bucket = buckets.get(key) ?? [];
17
- bucket.push(s);
18
- buckets.set(key, bucket);
19
- }
20
- const entries = Array.from(buckets, ([team, items]) => ({
21
- team,
22
- items
23
- }));
24
- if (entries.length > 1) entries.sort((a, b) => {
25
- if (a.team === UNGROUPED_LABEL) return 1;
26
- if (b.team === UNGROUPED_LABEL) return -1;
27
- return 0;
28
- });
29
- return entries;
30
- }
31
- function ServicesPage() {
32
- const { services } = Route.useLoaderData();
33
- const grouped = groupServices(services);
34
- return /* @__PURE__ */ jsxs("main", {
35
- className: "mx-auto max-w-5xl px-6 py-8",
36
- children: [
37
- /* @__PURE__ */ jsx("h1", {
38
- className: "font-serif text-3xl text-foreground mb-2",
39
- children: "config"
40
- }),
41
- /* @__PURE__ */ jsx(ConfigTabs, { active: "services" }),
42
- /* @__PURE__ */ jsxs("p", {
43
- className: "text-muted-foreground text-sm mb-6",
44
- children: [
45
- "Configuration for non-LLM integrations — web search, crawlers, and similar. Fields marked as secrets are encrypted in the ",
46
- /* @__PURE__ */ jsx("code", {
47
- className: "font-mono",
48
- children: "secrets"
49
- }),
50
- " ",
51
- "table; plaintext URLs and IDs live in the ",
52
- /* @__PURE__ */ jsx("code", {
53
- className: "font-mono",
54
- children: "config"
55
- }),
56
- " ",
57
- "table."
58
- ]
59
- }),
60
- services.length === 0 && /* @__PURE__ */ jsx("p", {
61
- className: "text-muted-foreground italic",
62
- children: "(no services registered)"
63
- }),
64
- grouped.map(({ team, items }) => /* @__PURE__ */ jsxs("section", {
65
- className: "mb-6",
66
- children: [/* @__PURE__ */ jsx("h2", {
67
- className: "mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",
68
- children: team
69
- }), items.map((s) => /* @__PURE__ */ jsxs("section", {
70
- className: "rounded-lg border bg-card p-5 mb-3",
71
- children: [
72
- /* @__PURE__ */ jsxs("header", {
73
- className: "flex items-center gap-2 mb-3",
74
- children: [/* @__PURE__ */ jsx("span", {
75
- className: "font-mono font-semibold",
76
- children: s.id
77
- }), /* @__PURE__ */ jsxs("span", {
78
- className: "text-muted-foreground text-sm",
79
- children: ["· ", s.displayName]
80
- })]
81
- }),
82
- s.hint && /* @__PURE__ */ jsx("p", {
83
- className: "text-xs text-muted-foreground mb-2",
84
- children: s.hint
85
- }),
86
- s.fields.map((f) => /* @__PURE__ */ jsx(FieldRow, { field: f }, f.envVar))
87
- ]
88
- }, s.id))]
89
- }, team))
90
- ]
91
- });
92
- }
93
- //#endregion
94
- export { ServicesPage as component };
@@ -1,321 +0,0 @@
1
- import { t as Route } from "./skills-l2cyQ3zS.js";
2
- import { useRef, useState } from "react";
3
- import { useRouter } from "@tanstack/react-router";
4
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
- //#region src/routes/skills/index.tsx?tsr-split=component
6
- function SkillsPage() {
7
- const skills = Route.useLoaderData();
8
- const router = useRouter();
9
- async function remove(name) {
10
- if (!confirm(`remove skill "${name}"? this deletes the directory on disk.`)) return;
11
- const res = await fetch(`/api/skills/${encodeURIComponent(name)}`, { method: "DELETE" });
12
- if (!res.ok && res.status !== 204) {
13
- alert(res.statusText);
14
- return;
15
- }
16
- await router.invalidate();
17
- }
18
- return /* @__PURE__ */ jsxs("div", { children: [
19
- /* @__PURE__ */ jsx("h1", { children: "skills" }),
20
- /* @__PURE__ */ jsx(ImportCard, { onImported: () => router.invalidate() }),
21
- /* @__PURE__ */ jsxs("table", { children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
22
- /* @__PURE__ */ jsx("th", { children: "name" }),
23
- /* @__PURE__ */ jsx("th", { children: "description" }),
24
- /* @__PURE__ */ jsx("th", { children: "scan" }),
25
- /* @__PURE__ */ jsx("th", { children: "source" }),
26
- /* @__PURE__ */ jsx("th", {})
27
- ] }) }), /* @__PURE__ */ jsxs("tbody", { children: [skills.length === 0 && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
28
- colSpan: 5,
29
- className: "muted",
30
- children: "no skills installed yet"
31
- }) }), skills.map((s) => /* @__PURE__ */ jsxs("tr", { children: [
32
- /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("code", { children: s.name }) }),
33
- /* @__PURE__ */ jsx("td", { children: s.parseError ? /* @__PURE__ */ jsxs("span", {
34
- className: "text-[#9B3D3D]",
35
- children: ["parse error: ", s.parseError]
36
- }) : s.description }),
37
- /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(FindingSummary, { findings: s.scanFindings ?? [] }) }),
38
- /* @__PURE__ */ jsxs("td", {
39
- className: "text-[0.78em] text-mocha-light",
40
- children: [/* @__PURE__ */ jsx("span", {
41
- className: "font-mono",
42
- children: s.source ?? "(unknown)"
43
- }), s.importedAt && /* @__PURE__ */ jsx("div", {
44
- className: "font-mono",
45
- children: new Date(s.importedAt).toLocaleDateString()
46
- })]
47
- }),
48
- /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("button", {
49
- type: "button",
50
- className: "ghost-btn",
51
- onClick: () => remove(s.name),
52
- children: "remove"
53
- }) })
54
- ] }, s.name))] })] })
55
- ] });
56
- }
57
- function ImportCard({ onImported }) {
58
- const [tab, setTab] = useState("openclaw");
59
- const [path, setPath] = useState("");
60
- const [force, setForce] = useState(false);
61
- const [zipFile, setZipFile] = useState(null);
62
- const [dragOver, setDragOver] = useState(false);
63
- const [err, setErr] = useState(null);
64
- const [findings, setFindings] = useState([]);
65
- const [submitting, setSubmitting] = useState(false);
66
- const fileInput = useRef(null);
67
- async function submit(e) {
68
- e.preventDefault();
69
- setErr(null);
70
- setFindings([]);
71
- setSubmitting(true);
72
- try {
73
- let res;
74
- if (tab === "zip") {
75
- if (!zipFile) {
76
- setErr("choose a .zip file first");
77
- setSubmitting(false);
78
- return;
79
- }
80
- const fd = new FormData();
81
- fd.set("file", zipFile);
82
- if (force) fd.set("force", "true");
83
- res = await fetch("/api/skills/import", {
84
- method: "POST",
85
- body: fd
86
- });
87
- } else {
88
- let source;
89
- if (tab === "openclaw") source = "openclaw";
90
- else {
91
- source = path.trim();
92
- if (!source) {
93
- setErr("fill in the server path");
94
- setSubmitting(false);
95
- return;
96
- }
97
- }
98
- res = await fetch("/api/skills/import", {
99
- method: "POST",
100
- headers: { "content-type": "application/json" },
101
- body: JSON.stringify({
102
- source,
103
- force
104
- })
105
- });
106
- }
107
- if (!res.ok) {
108
- const e2 = await res.json().catch(() => null);
109
- setFindings(e2?.findings ?? []);
110
- throw new Error(e2?.error ?? `${res.status} ${res.statusText}`);
111
- }
112
- setFindings(flattenImportFindings((await res.json().catch(() => null))?.findings));
113
- setPath("");
114
- setZipFile(null);
115
- onImported();
116
- } catch (e2) {
117
- setErr(e2.message);
118
- } finally {
119
- setSubmitting(false);
120
- }
121
- }
122
- function onFileChange(e) {
123
- setZipFile(e.target.files?.[0] ?? null);
124
- }
125
- function onDrop(e) {
126
- e.preventDefault();
127
- setDragOver(false);
128
- const files = e.dataTransfer?.files;
129
- if (!files || files.length === 0) return;
130
- const f = files[0];
131
- if (!f) return;
132
- if (!/\.zip$/i.test(f.name)) {
133
- setErr("only .zip archives are supported");
134
- return;
135
- }
136
- setZipFile(f);
137
- if (fileInput.current) {
138
- const dt = new DataTransfer();
139
- dt.items.add(f);
140
- fileInput.current.files = dt.files;
141
- }
142
- }
143
- return /* @__PURE__ */ jsxs("section", {
144
- className: "card",
145
- children: [
146
- /* @__PURE__ */ jsx("h3", {
147
- className: "mb-1",
148
- children: "import skills"
149
- }),
150
- /* @__PURE__ */ jsxs("p", {
151
- className: "muted mb-3 text-[0.88em]",
152
- children: [
153
- "pick a source. Each skill's ",
154
- /* @__PURE__ */ jsx("code", { children: "SKILL.md" }),
155
- " body is injected into the system prompt of any agent it's attached to."
156
- ]
157
- }),
158
- /* @__PURE__ */ jsx("div", {
159
- role: "tablist",
160
- className: "mb-4 inline-flex gap-0 rounded-md border border-frost bg-ivory p-1",
161
- children: [
162
- {
163
- id: "openclaw",
164
- label: "OpenClaw"
165
- },
166
- {
167
- id: "path",
168
- label: "server directory"
169
- },
170
- {
171
- id: "zip",
172
- label: "upload zip"
173
- }
174
- ].map((it) => /* @__PURE__ */ jsx("button", {
175
- type: "button",
176
- role: "tab",
177
- "aria-selected": tab === it.id,
178
- onClick: () => {
179
- setTab(it.id);
180
- setErr(null);
181
- },
182
- className: `unstyled cursor-pointer rounded-sm border-none bg-transparent px-3 py-1.5 text-[0.88em] font-medium transition-colors ${tab === it.id ? "bg-snow text-sapphire-deep shadow-baziu-sm" : "text-mocha hover:text-sapphire"}`,
183
- children: it.label
184
- }, it.id))
185
- }),
186
- err && /* @__PURE__ */ jsx("div", {
187
- className: "err",
188
- children: err
189
- }),
190
- findings.length > 0 && /* @__PURE__ */ jsxs("div", {
191
- className: "mb-3 rounded-md border border-[#D7A3A3] bg-[#FFF7F5] p-3 text-[0.86em] text-[#7C2D2D]",
192
- children: [/* @__PURE__ */ jsx("div", {
193
- className: "mb-1 font-semibold",
194
- children: "scan findings"
195
- }), /* @__PURE__ */ jsx(FindingList, { findings })]
196
- }),
197
- /* @__PURE__ */ jsxs("form", {
198
- onSubmit: submit,
199
- children: [
200
- tab === "openclaw" && /* @__PURE__ */ jsxs("p", {
201
- className: "text-[0.92em] text-mocha",
202
- children: [
203
- "One-click import of every skill found in ",
204
- /* @__PURE__ */ jsx("code", { children: "~/.openclaw/skills" }),
205
- " on the server."
206
- ]
207
- }),
208
- tab === "path" && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("p", {
209
- className: "text-[0.92em] text-mocha",
210
- children: [
211
- "Import from an absolute path on the server — either a single skill folder (contains ",
212
- /* @__PURE__ */ jsx("code", { children: "SKILL.md" }),
213
- ") or a parent folder holding many skill subfolders."
214
- ]
215
- }), /* @__PURE__ */ jsxs("label", { children: ["server path", /* @__PURE__ */ jsx("input", {
216
- value: path,
217
- onChange: (e) => setPath(e.target.value),
218
- placeholder: "/home/you/my-skills",
219
- required: true
220
- })] })] }),
221
- tab === "zip" && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("p", {
222
- className: "text-[0.92em] text-mocha",
223
- children: [
224
- "Upload a ",
225
- /* @__PURE__ */ jsx("code", { children: ".zip" }),
226
- " archive whose top level contains one folder per skill — the folder name becomes the skill name."
227
- ]
228
- }), /* @__PURE__ */ jsxs("label", {
229
- onDragOver: (e) => {
230
- e.preventDefault();
231
- setDragOver(true);
232
- },
233
- onDragLeave: () => setDragOver(false),
234
- onDrop,
235
- className: `block cursor-pointer rounded-md border-2 border-dashed p-6 text-center transition-colors ${dragOver ? "border-sapphire bg-sapphire-glow text-sapphire-deep" : zipFile ? "border-solid border-sapphire-light bg-snow text-chocolate" : "border-frost bg-ivory text-mocha-light hover:border-sapphire hover:bg-sapphire-glow hover:text-sapphire-deep"}`,
236
- children: [/* @__PURE__ */ jsx("input", {
237
- ref: fileInput,
238
- type: "file",
239
- accept: ".zip,application/zip",
240
- onChange: onFileChange,
241
- className: "absolute h-px w-px overflow-hidden opacity-0"
242
- }), zipFile ? /* @__PURE__ */ jsx("span", {
243
- className: "block break-all font-mono text-[0.85em] text-sapphire-deep",
244
- children: zipFile.name
245
- }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
246
- className: "block text-[0.95em] font-medium text-mocha",
247
- children: "click to choose a .zip file"
248
- }), /* @__PURE__ */ jsx("span", {
249
- className: "text-[0.82em]",
250
- children: "or drag & drop here"
251
- })] })]
252
- })] }),
253
- /* @__PURE__ */ jsxs("div", {
254
- className: "mt-3 flex flex-wrap items-center gap-3",
255
- children: [/* @__PURE__ */ jsx("button", {
256
- type: "submit",
257
- disabled: submitting,
258
- children: submitting ? "importing…" : tab === "zip" ? "upload & import" : tab === "openclaw" ? "import from OpenClaw" : "import"
259
- }), /* @__PURE__ */ jsxs("label", {
260
- className: "m-0 inline-flex cursor-pointer items-center text-[0.88em] text-mocha",
261
- children: [
262
- /* @__PURE__ */ jsx("input", {
263
- type: "checkbox",
264
- checked: force,
265
- onChange: (e) => setForce(e.target.checked)
266
- }),
267
- "overwrite existing",
268
- /* @__PURE__ */ jsx("span", {
269
- className: "ml-1 text-mocha-light",
270
- children: "/ confirm scan findings"
271
- })
272
- ]
273
- })]
274
- })
275
- ]
276
- })
277
- ]
278
- });
279
- }
280
- function FindingSummary({ findings }) {
281
- if (findings.length === 0) return /* @__PURE__ */ jsx("span", {
282
- className: "text-mocha-light",
283
- children: "clean"
284
- });
285
- return /* @__PURE__ */ jsxs("details", {
286
- className: "text-[0.82em]",
287
- children: [/* @__PURE__ */ jsxs("summary", {
288
- className: findings.some((f) => f.severity === "danger") ? "cursor-pointer text-[#9B3D3D]" : "cursor-pointer text-mocha",
289
- children: [
290
- findings.length,
291
- " finding",
292
- findings.length === 1 ? "" : "s"
293
- ]
294
- }), /* @__PURE__ */ jsx(FindingList, { findings })]
295
- });
296
- }
297
- function FindingList({ findings }) {
298
- return /* @__PURE__ */ jsx("ul", {
299
- className: "m-0 list-disc pl-4",
300
- children: findings.map((f, i) => /* @__PURE__ */ jsxs("li", { children: [
301
- /* @__PURE__ */ jsx("span", {
302
- className: "font-mono",
303
- children: f.severity
304
- }),
305
- ": ",
306
- f.code,
307
- f.line ? ` line ${f.line}` : "",
308
- " - ",
309
- f.message
310
- ] }, `${f.code}-${f.line ?? 0}-${i}`))
311
- });
312
- }
313
- function flattenImportFindings(findings) {
314
- if (!findings) return [];
315
- return Object.entries(findings).flatMap(([name, items]) => items.map((item) => ({
316
- ...item,
317
- message: `${name}: ${item.message}`
318
- })));
319
- }
320
- //#endregion
321
- export { SkillsPage as component };
@@ -1,174 +0,0 @@
1
- import { t as Route } from "./teams-35Oprf6e.js";
2
- import { useState } from "react";
3
- import { useRouter } from "@tanstack/react-router";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
- //#region src/routes/teams/index.tsx?tsr-split=component
6
- function TeamsPage() {
7
- const { teams, memberCounts, policies, readiness } = Route.useLoaderData();
8
- const router = useRouter();
9
- async function remove(id) {
10
- if (!confirm("remove this team registration?")) return;
11
- const revision = policies[id]?.revision;
12
- if (!revision) return;
13
- const res = await fetch(`/api/teams/${encodeURIComponent(id)}?expectedTeamPolicyRevision=${revision}`, { method: "DELETE" });
14
- if (!res.ok && res.status !== 204) {
15
- alert(res.statusText);
16
- return;
17
- }
18
- await router.invalidate();
19
- }
20
- return /* @__PURE__ */ jsxs("div", { children: [
21
- /* @__PURE__ */ jsx("h1", { children: "teams" }),
22
- /* @__PURE__ */ jsx("p", {
23
- className: "muted",
24
- children: "A Team owns one workspace, one live membership roster, and exactly one effective policy. Every agent belongs to exactly one Team."
25
- }),
26
- /* @__PURE__ */ jsxs("aside", {
27
- className: "card",
28
- "aria-label": "TeamPolicy enforcement readiness",
29
- children: [
30
- /* @__PURE__ */ jsx("strong", { children: readiness.enforcementActive ? "Team Policy enforcement is active." : "Team Policy enforcement is currently off." }),
31
- " ",
32
- /* @__PURE__ */ jsxs("span", {
33
- className: "muted",
34
- children: [
35
- "Management contract v",
36
- readiness.contractVersion,
37
- " is release-ready. Set",
38
- " ",
39
- /* @__PURE__ */ jsx("code", { children: "BAZILION_TEAM_POLICY_ENFORCEMENT=on" }),
40
- " and restart the daemon to enforce it."
41
- ]
42
- })
43
- ]
44
- }),
45
- /* @__PURE__ */ jsx(RegisterTeamForm, { onRegistered: () => router.invalidate() }),
46
- /* @__PURE__ */ jsx("div", {
47
- className: "overflow-x-auto",
48
- children: /* @__PURE__ */ jsxs("table", { children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
49
- /* @__PURE__ */ jsx("th", { children: "id" }),
50
- /* @__PURE__ */ jsx("th", { children: "name" }),
51
- /* @__PURE__ */ jsx("th", { children: "members" }),
52
- /* @__PURE__ */ jsx("th", { children: "policy" }),
53
- /* @__PURE__ */ jsx("th", { children: "baseline" }),
54
- /* @__PURE__ */ jsx("th", {})
55
- ] }) }), /* @__PURE__ */ jsxs("tbody", { children: [teams.length === 0 && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
56
- colSpan: 6,
57
- className: "muted",
58
- children: "no teams registered"
59
- }) }), teams.map((g) => {
60
- const count = memberCounts[g.id] ?? 0;
61
- const policy = policies[g.id];
62
- return /* @__PURE__ */ jsxs("tr", { children: [
63
- /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("code", { children: g.id }) }),
64
- /* @__PURE__ */ jsx("td", { children: g.name }),
65
- /* @__PURE__ */ jsx("td", { children: count }),
66
- /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("a", {
67
- href: `/teams/${g.id}/policy`,
68
- children: policy ? `r${policy.revision} · ${policy.edges} edges` : "unavailable"
69
- }) }),
70
- /* @__PURE__ */ jsx("td", { children: policy?.baseline ?? "none" }),
71
- /* @__PURE__ */ jsx("td", { children: count === 0 ? /* @__PURE__ */ jsx("button", {
72
- type: "button",
73
- className: "ghost-btn",
74
- onClick: () => remove(g.id),
75
- children: "remove"
76
- }) : /* @__PURE__ */ jsx("span", {
77
- className: "muted",
78
- title: `${count} agent(s) belong to this team`,
79
- children: "in use"
80
- }) })
81
- ] }, g.id);
82
- })] })] })
83
- })
84
- ] });
85
- }
86
- function RegisterTeamForm({ onRegistered }) {
87
- const [id, setId] = useState("");
88
- const [name, setName] = useState("");
89
- const [link, setLink] = useState("");
90
- const [err, setErr] = useState(null);
91
- const [submitting, setSubmitting] = useState(false);
92
- async function submit(e) {
93
- e.preventDefault();
94
- setErr(null);
95
- if (!id.trim()) {
96
- setErr("id is required");
97
- return;
98
- }
99
- setSubmitting(true);
100
- try {
101
- const res = await fetch("/api/teams", {
102
- method: "POST",
103
- headers: { "content-type": "application/json" },
104
- body: JSON.stringify({
105
- id: id.trim(),
106
- name: name.trim() || void 0,
107
- link: link.trim() || void 0
108
- })
109
- });
110
- if (!res.ok) {
111
- const e2 = await res.json().catch(() => null);
112
- throw new Error(e2?.error ?? res.statusText);
113
- }
114
- setId("");
115
- setName("");
116
- setLink("");
117
- onRegistered();
118
- } catch (e2) {
119
- setErr(e2.message);
120
- } finally {
121
- setSubmitting(false);
122
- }
123
- }
124
- return /* @__PURE__ */ jsxs("form", {
125
- className: "card",
126
- onSubmit: submit,
127
- children: [
128
- /* @__PURE__ */ jsx("h3", { children: "register team" }),
129
- err && /* @__PURE__ */ jsx("div", {
130
- className: "err",
131
- children: err
132
- }),
133
- /* @__PURE__ */ jsxs("p", {
134
- className: "muted",
135
- children: [
136
- "Teams always live under ",
137
- /* @__PURE__ */ jsx("code", { children: "~/.bazilion/teams/<slug>/" }),
138
- ". Leave the link target blank to create a fresh directory; supply an absolute path to materialize the slot as a symlink to your existing project tree instead."
139
- ]
140
- }),
141
- /* @__PURE__ */ jsxs("div", {
142
- className: "flex gap-4",
143
- children: [/* @__PURE__ */ jsxs("label", {
144
- className: "flex-1",
145
- children: ["id (slug)", /* @__PURE__ */ jsx("input", {
146
- value: id,
147
- onChange: (e) => setId(e.target.value),
148
- required: true,
149
- placeholder: "myproject"
150
- })]
151
- }), /* @__PURE__ */ jsxs("label", {
152
- className: "flex-1",
153
- children: ["name", /* @__PURE__ */ jsx("input", {
154
- value: name,
155
- onChange: (e) => setName(e.target.value),
156
- placeholder: "My Project"
157
- })]
158
- })]
159
- }),
160
- /* @__PURE__ */ jsxs("label", { children: ["link target (optional, absolute path)", /* @__PURE__ */ jsx("input", {
161
- value: link,
162
- onChange: (e) => setLink(e.target.value),
163
- placeholder: "/home/user/projects/myproject"
164
- })] }),
165
- /* @__PURE__ */ jsx("button", {
166
- type: "submit",
167
- disabled: submitting,
168
- children: submitting ? "registering…" : "register"
169
- })
170
- ]
171
- });
172
- }
173
- //#endregion
174
- export { TeamsPage as component };