bazilion 0.9.0 → 0.10.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 (187) hide show
  1. package/dist/cli.js +9 -15
  2. package/dist/cli.js.map +1 -1
  3. package/dist/daemon.js +22 -75
  4. package/dist/daemon.js.map +1 -1
  5. package/dist/web/client/assets/AgentTabs-B3hq5a3e.js +1 -0
  6. package/dist/web/client/assets/ConfigPage-BCwfgyjD.js +1 -0
  7. package/dist/web/client/assets/FieldRow-avAFLgYW.js +1 -0
  8. package/dist/web/client/assets/Page-CwNuDhWz.js +1 -0
  9. package/dist/web/client/assets/ProductionTeamPolicyEditor-CiQ-VVDo.js +7 -0
  10. package/dist/web/client/assets/{ProfileCommunicationEditor-D1OZ8WE5.js → ProfileCommunicationEditor-D84F5yfr.js} +1 -1
  11. package/dist/web/client/assets/SectionTabs-DZzy01az.js +1 -0
  12. package/dist/web/client/assets/TeamTabs-Btoe_FAE.js +1 -0
  13. package/dist/web/client/assets/TemplatesTabs-CAYY03F5.js +1 -0
  14. package/dist/web/client/assets/_id-BeauECmk.js +1 -0
  15. package/dist/web/client/assets/_id-BqU2BodK.js +1 -0
  16. package/dist/web/client/assets/_id-CKtoio3t.js +1 -0
  17. package/dist/web/client/assets/_id-Q98Of6k9.js +1 -0
  18. package/dist/web/client/assets/activity-DXN_N85w.js +1 -0
  19. package/dist/web/client/assets/agents-C5Xsdge1.js +1 -0
  20. package/dist/web/client/assets/agents-Cgxo4H5G.js +1 -0
  21. package/dist/web/client/assets/approvals-BnG7fbw-.js +1 -0
  22. package/dist/web/client/assets/chevron-down-BhcBspw3.js +1 -0
  23. package/dist/web/client/assets/config-xw4NyrXF.js +3 -0
  24. package/dist/web/client/assets/context-D2V1Oi4z.js +1 -0
  25. package/dist/web/client/assets/inbox-DK6hWCMp.js +1 -0
  26. package/dist/web/client/assets/index-VdURSoM4.js +12 -0
  27. package/dist/web/client/assets/login-CvptUoMR.js +1 -0
  28. package/dist/web/client/assets/mcp-BDFM_sW-.js +1 -0
  29. package/dist/web/client/assets/members-BJvph_TR.js +1 -0
  30. package/dist/web/client/assets/memory-DRytqZCD.js +1 -0
  31. package/dist/web/client/assets/plus-C9ee3SIO.js +1 -0
  32. package/dist/web/client/assets/policy-CGP50OtQ.js +1 -0
  33. package/dist/web/client/assets/preload-helper-mNuBjNXU.js +1 -0
  34. package/dist/web/client/assets/react-3W8R1pOO.js +1 -0
  35. package/dist/web/client/assets/routes-DJnWYvC9.js +1 -0
  36. package/dist/web/client/assets/services-DHheiv7L.js +1 -0
  37. package/dist/web/client/assets/skills-DmsitluU.js +1 -0
  38. package/dist/web/client/assets/styles-B5eQAwLP.css +2 -0
  39. package/dist/web/client/assets/team-policy-D0jpnn2b.js +1 -0
  40. package/dist/web/client/assets/teams-BdC4gthq.js +1 -0
  41. package/dist/web/client/assets/teams-CbxSaorm.js +1 -0
  42. package/dist/web/client/assets/telegram-D61G_alO.js +1 -0
  43. package/dist/web/client/assets/tokens-CjRplDrJ.js +1 -0
  44. package/dist/web/client/assets/triggers-MLzTm_DM.js +1 -0
  45. package/dist/web/client/assets/welcome-wBfX9dAd.js +1 -0
  46. package/dist/web/client/assets/{wire-constants-BY9Q9Z7d.js → wire-constants-BxfyUMXB.js} +2 -2
  47. package/dist/web/server/assets/{AgentTabs-BOjTN7QF.js → AgentTabs-DoMDJBXH.js} +10 -7
  48. package/dist/web/server/assets/{ChatPane-Dh3qxzdb.js → ChatPane-eUY_dga3.js} +15 -8
  49. package/dist/web/server/assets/ConfigPage-BKlh5vOU.js +68 -0
  50. package/dist/web/server/assets/{FieldRow-DwyqycWI.js → FieldRow-B4eTegH9.js} +5 -5
  51. package/dist/web/server/assets/Page-LENulSXY.js +111 -0
  52. package/dist/web/server/assets/{ProductionTeamPolicyEditor-Bke5doyl.js → ProductionTeamPolicyEditor-Y4mzFFvR.js} +4 -4
  53. package/dist/web/server/assets/SectionTabs-BJTPr5nU.js +8 -0
  54. package/dist/web/server/assets/{Sidebar-CGmtCnYU.js → Sidebar-O_CH1-JD.js} +228 -117
  55. package/dist/web/server/assets/{TeamTabs-BPxDBfqy.js → TeamTabs-zZzbP1t_.js} +9 -8
  56. package/dist/web/server/assets/{TemplatesTabs-zf4YhStd.js → TemplatesTabs-CcRxZhJe.js} +5 -4
  57. package/dist/web/server/assets/{_id-fpFQ9_Ya.js → _id-BhOB8Umi.js} +1 -1
  58. package/dist/web/server/assets/{_id-CCHA0gdR.js → _id-C3HY4lWg.js} +7 -10
  59. package/dist/web/server/assets/{_id-B6g9wmPR.js → _id-ClN9hY2x.js} +22 -28
  60. package/dist/web/server/assets/{_id-B04VaQlh.js → _id-CwyGjJeP.js} +2 -2
  61. package/dist/web/server/assets/{_id-_nFwi9gD.js → _id-D27T85mU.js} +1 -1
  62. package/dist/web/server/assets/{_id-5lLzLwcv.js → _id-D3Ap7zZA.js} +142 -144
  63. package/dist/web/server/assets/{_id-ButXHnRH.js → _id-DinTp_7X.js} +2 -2
  64. package/dist/web/server/assets/{_id-DdC9wpNN.js → _id-Dj1yZ3zJ.js} +2 -2
  65. package/dist/web/server/assets/{_id-DkFgCIb-.js → _id-DkYodSkG.js} +2 -2
  66. package/dist/web/server/assets/{_id-CUWgTqMS.js → _id-IzadFZV9.js} +1 -1
  67. package/dist/web/server/assets/{_id-C4AOhstq.js → _id-LrvXU4Nr.js} +6 -5
  68. package/dist/web/server/assets/{_id-DJkzwHjM.js → _id-tB47Vsfp.js} +1 -1
  69. package/dist/web/server/assets/{_tanstack-start-manifest_v-Div-TukY.js → _tanstack-start-manifest_v-D09Xu_6u.js} +95 -50
  70. package/dist/web/server/assets/{activity-C2ZKg1Q9.js → activity-BCI4mfNS.js} +28 -30
  71. package/dist/web/server/assets/{activity-DedraoFj.js → activity-D9SMqBhy.js} +2 -2
  72. package/dist/web/server/assets/{activity-GPx8NCeB.js → activity-DohitgwW.js} +1 -1
  73. package/dist/web/server/assets/{agents-BR2qXlXF.js → agents-BPKOshR5.js} +1 -1
  74. package/dist/web/server/assets/{agents-LHowEI6S.js → agents-BY74v7fM.js} +1 -1
  75. package/dist/web/server/assets/{agents-B8kinIPW.js → agents-BvttypqB.js} +2 -2
  76. package/dist/web/server/assets/{agents-Bp1nsVs2.js → agents-C9xlWK0Z.js} +2 -2
  77. package/dist/web/server/assets/agents-CgZMHj80.js +265 -0
  78. package/dist/web/server/assets/{agents-CUQmWhTp.js → agents-DZuFEj0D.js} +59 -77
  79. package/dist/web/server/assets/{approvals-VPc0YpLN.js → approvals-BGU-XGIO.js} +1 -1
  80. package/dist/web/server/assets/{approvals-Dw2LJoSA.js → approvals-CWcFHlor.js} +2 -2
  81. package/dist/web/server/assets/{approvals-DHgARzd8.js → approvals-DCaVw1Mz.js} +116 -78
  82. package/dist/web/server/assets/{auth-l-Vf8wlu.js → auth-byfSx6Ja.js} +1 -1
  83. package/dist/web/server/assets/{config-CHaCv89D.js → config-BDCJdtj2.js} +1 -1
  84. package/dist/web/server/assets/{config-BvKctDOX.js → config-D2LAsud2.js} +28 -49
  85. package/dist/web/server/assets/{config-QvHaxGlP.js → config-TeIoyYYc.js} +2 -2
  86. package/dist/web/server/assets/{context-5lrf2ame.js → context-B-XDf6Ym.js} +1 -1
  87. package/dist/web/server/assets/{context-D3Egm-vY.js → context-BXGo5Vfi.js} +2 -2
  88. package/dist/web/server/assets/context-DrkrIWun.js +47 -0
  89. package/dist/web/server/assets/{createServerRpc-CeKECg65.js → createServerRpc-pU-IQV2Y.js} +1 -1
  90. package/dist/web/server/assets/{createSsrRpc-ZBGxhl8t.js → createSsrRpc-DFsIAfFd.js} +1 -1
  91. package/dist/web/server/assets/{empty-plugin-adapters-DKUlnwwl.js → empty-plugin-adapters-Cq4--YW-.js} +1 -1
  92. package/dist/web/server/assets/{inbox-CkiSvD14.js → inbox-B3-TRsNI.js} +1 -1
  93. package/dist/web/server/assets/{inbox-Bxb3W04M.js → inbox-BardsGyy.js} +2 -2
  94. package/dist/web/server/assets/inbox-CUIyf9MT.js +131 -0
  95. package/dist/web/server/assets/login-Bx5LEyGP.js +118 -0
  96. package/dist/web/server/assets/login-CmWvxfTK.js +136 -0
  97. package/dist/web/server/assets/{mcp-BsFKEoXt.js → mcp-2pwT9HU8.js} +1 -1
  98. package/dist/web/server/assets/{mcp-BU_kKENi.js → mcp-BJjLIdP0.js} +105 -112
  99. package/dist/web/server/assets/{mcp-CKqwG4mt.js → mcp-DIWTogHM.js} +2 -2
  100. package/dist/web/server/assets/members-CCv17cjQ.js +46 -0
  101. package/dist/web/server/assets/{members-DlGBKZNl.js → members-CW5aBe81.js} +1 -1
  102. package/dist/web/server/assets/{members-ksELRsyk.js → members-VdPwD6CE.js} +2 -2
  103. package/dist/web/server/assets/{memory-CO0jKGzJ.js → memory-Dngc13Nw.js} +1 -1
  104. package/dist/web/server/assets/memory-a8Kz57Kh.js +287 -0
  105. package/dist/web/server/assets/{memory-B5moRnnp.js → memory-pZ4pZT7p.js} +2 -2
  106. package/dist/web/server/assets/{policy-Dxs78_GO.js → policy-Bb-vEgqg.js} +1 -1
  107. package/dist/web/server/assets/{policy-Dr55y-Mh.js → policy-BcGELcc9.js} +16 -22
  108. package/dist/web/server/assets/{policy-DNcGZLOB.js → policy-C30AeFIb.js} +2 -2
  109. package/dist/web/server/assets/{router-_izWQUeG.js → router-DIdp8ZNt.js} +100 -111
  110. package/dist/web/server/assets/{routes-BrTOoeth.js → routes-CXz4hTAr.js} +2 -2
  111. package/dist/web/server/assets/{routes-BSSKp3Rv.js → routes-Jb0zjKav.js} +16 -13
  112. package/dist/web/server/assets/{routes-DOj6ljcm.js → routes-lIclH9Br.js} +2 -2
  113. package/dist/web/server/assets/services-B9yBWDX0.js +79 -0
  114. package/dist/web/server/assets/{services-Pv_V88VA.js → services-C4szdhPx.js} +2 -2
  115. package/dist/web/server/assets/{services-DhRiNeq0.js → services-wG8I06oS.js} +1 -1
  116. package/dist/web/server/assets/skills-BZdqiDig.js +358 -0
  117. package/dist/web/server/assets/{skills-l2cyQ3zS.js → skills-C-UgkuCW.js} +2 -2
  118. package/dist/web/server/assets/{skills-CFIWVg32.js → skills-a9VSWHWq.js} +1 -1
  119. package/dist/web/server/assets/{start-DlHq0RaQ.js → start-WH8WzTL_.js} +1 -1
  120. package/dist/web/server/assets/{team-policy-Csvc5EDd.js → team-policy-vPG01onj.js} +3 -3
  121. package/dist/web/server/assets/{teams-B9O-WDH5.js → teams-CpQ0YgWf.js} +38 -34
  122. package/dist/web/server/assets/{teams-35Oprf6e.js → teams-DEpQR2QA.js} +2 -2
  123. package/dist/web/server/assets/{teams-DFkN7ic7.js → teams-DqfrEoH6.js} +1 -1
  124. package/dist/web/server/assets/{teams-B5IF65p2.js → teams-MjqgsmC3.js} +1 -1
  125. package/dist/web/server/assets/{teams-DH1CvWmT.js → teams-OIkHuxy1.js} +2 -2
  126. package/dist/web/server/assets/teams-jBtvnk59.js +193 -0
  127. package/dist/web/server/assets/{telegram-C9sQFwWj.js → telegram-7ub--6xz.js} +39 -51
  128. package/dist/web/server/assets/{telegram-mTnJCOmn.js → telegram-Bazhmpr4.js} +2 -2
  129. package/dist/web/server/assets/{telegram-BdaUIjvs.js → telegram-DNgCWebD.js} +1 -1
  130. package/dist/web/server/assets/{tokens-DdpnfV_Y.js → tokens-BnwFbV7T.js} +2 -2
  131. package/dist/web/server/assets/{tokens-BCz3PSoT.js → tokens-DPDMSN5O.js} +1 -1
  132. package/dist/web/server/assets/tokens-yyTSfBSN.js +186 -0
  133. package/dist/web/server/assets/{triggers-BzJG1nN5.js → triggers-BMpHsGIr.js} +5 -4
  134. package/dist/web/server/assets/{triggers-BcH_6PW1.js → triggers-C_0y6QV9.js} +1 -1
  135. package/dist/web/server/assets/{triggers-BcTTwMfy.js → triggers-Ca57_qym.js} +2 -2
  136. package/dist/web/server/assets/{welcome-CDGE2Sdk.js → welcome-IYHGurWx.js} +21 -13
  137. package/dist/web/server/server.js +82 -73
  138. package/dist/worker.js +5 -18
  139. package/dist/worker.js.map +1 -1
  140. package/package.json +4 -3
  141. package/dist/web/client/assets/AgentTabs-DioGqUVR.js +0 -1
  142. package/dist/web/client/assets/ConfigTabs-pY-V0Rie.js +0 -1
  143. package/dist/web/client/assets/FieldRow-DmwAFfbF.js +0 -1
  144. package/dist/web/client/assets/ProductionTeamPolicyEditor-1a5jQqUB.js +0 -7
  145. package/dist/web/client/assets/TeamTabs-BViZ4sti.js +0 -1
  146. package/dist/web/client/assets/TemplatesTabs-DVcY9pMD.js +0 -1
  147. package/dist/web/client/assets/_id-8P7brhGy.js +0 -1
  148. package/dist/web/client/assets/_id-C3o3MHq8.js +0 -1
  149. package/dist/web/client/assets/_id-DGRrSF1e.js +0 -1
  150. package/dist/web/client/assets/_id-KnJe-aW9.js +0 -1
  151. package/dist/web/client/assets/activity-WWvJSo4t.js +0 -1
  152. package/dist/web/client/assets/agents-C32T1voV.js +0 -1
  153. package/dist/web/client/assets/agents-nH4m4gZ1.js +0 -1
  154. package/dist/web/client/assets/approvals-l8jIZjqz.js +0 -1
  155. package/dist/web/client/assets/config-C7wvi1nR.js +0 -3
  156. package/dist/web/client/assets/context-BEGWE3RC.js +0 -1
  157. package/dist/web/client/assets/inbox--4aBaAgG.js +0 -1
  158. package/dist/web/client/assets/index-BCXoh1c8.js +0 -12
  159. package/dist/web/client/assets/login-Bk2wwIHQ.js +0 -1
  160. package/dist/web/client/assets/mcp-vM7xgh9e.js +0 -1
  161. package/dist/web/client/assets/members-cPKfnrSL.js +0 -1
  162. package/dist/web/client/assets/memory-BOcsaemD.js +0 -1
  163. package/dist/web/client/assets/policy-BGLCJYvS.js +0 -1
  164. package/dist/web/client/assets/preload-helper-eOOCz1Fu.js +0 -1
  165. package/dist/web/client/assets/routes-DnrP3dwv.js +0 -1
  166. package/dist/web/client/assets/services-C2_O3ifw.js +0 -1
  167. package/dist/web/client/assets/skills-B__fLZjx.js +0 -1
  168. package/dist/web/client/assets/styles-Dn24-ZvP.css +0 -2
  169. package/dist/web/client/assets/team-policy-BdX340m4.js +0 -1
  170. package/dist/web/client/assets/teams-DZMB4_iw.js +0 -1
  171. package/dist/web/client/assets/teams-rpaYKNIb.js +0 -1
  172. package/dist/web/client/assets/telegram-B1O4Ko0V.js +0 -1
  173. package/dist/web/client/assets/tokens-D7FH9VgA.js +0 -1
  174. package/dist/web/client/assets/triggers-3PLy2_Fo.js +0 -1
  175. package/dist/web/client/assets/welcome-B-QQobzq.js +0 -1
  176. package/dist/web/server/assets/ConfigTabs-CyuxzesF.js +0 -41
  177. package/dist/web/server/assets/agents-DU9Hqs58.js +0 -249
  178. package/dist/web/server/assets/context-CEr4-xiA.js +0 -49
  179. package/dist/web/server/assets/inbox-DU27iHv_.js +0 -133
  180. package/dist/web/server/assets/login-CNznncgA.js +0 -58
  181. package/dist/web/server/assets/login-CQybKk7Y.js +0 -74
  182. package/dist/web/server/assets/members-40DxRdVj.js +0 -48
  183. package/dist/web/server/assets/memory-CiTl4cN9.js +0 -289
  184. package/dist/web/server/assets/services-CHe4ihJk.js +0 -94
  185. package/dist/web/server/assets/skills-D89ND2kR.js +0 -321
  186. package/dist/web/server/assets/teams-zcm9XaQU.js +0 -174
  187. package/dist/web/server/assets/tokens-CkKqrtk-.js +0 -193
@@ -1,289 +0,0 @@
1
- import { t as Route } from "./memory-B5moRnnp.js";
2
- import { t as TeamTabs } from "./TeamTabs-BPxDBfqy.js";
3
- import { useEffect, useRef, useState } from "react";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
- //#region src/routes/teams/$id/memory.tsx?tsr-split=component
6
- function encodeKey(key) {
7
- return key.split("/").map(encodeURIComponent).join("/");
8
- }
9
- function MemoryPage() {
10
- const { team, memberCount, entries: initialEntries } = Route.useLoaderData();
11
- const teamId = team.id;
12
- const [rows, setRows] = useState(() => initialEntries.map((e) => ({
13
- key: e.key,
14
- preview: e.content.slice(0, 80)
15
- })));
16
- const [isSearch, setIsSearch] = useState(false);
17
- const [query, setQuery] = useState("");
18
- const [selectedKey, setSelectedKey] = useState(null);
19
- const [mode, setMode] = useState("none");
20
- const [keyInput, setKeyInput] = useState("");
21
- const [content, setContent] = useState("");
22
- const [status, setStatus] = useState(null);
23
- const searchTimer = useRef(null);
24
- async function loadList(q) {
25
- try {
26
- const url = q.trim().length > 0 ? `/api/teams/${encodeURIComponent(teamId)}/memory/search?q=${encodeURIComponent(q)}&limit=50` : `/api/teams/${encodeURIComponent(teamId)}/memory`;
27
- const res = await fetch(url);
28
- if (!res.ok) {
29
- const body = await res.json().catch(() => null);
30
- throw new Error(body?.error ?? res.statusText);
31
- }
32
- const data = await res.json();
33
- if (q.trim().length > 0) {
34
- setRows(data.map((h) => ({
35
- key: h.key,
36
- preview: h.snippet,
37
- score: h.score
38
- })));
39
- setIsSearch(true);
40
- } else {
41
- setRows(data.map((e) => ({
42
- key: e.key,
43
- preview: e.content.slice(0, 80)
44
- })));
45
- setIsSearch(false);
46
- }
47
- } catch (err) {
48
- setStatus({
49
- msg: `error: ${err.message}`,
50
- kind: "error"
51
- });
52
- }
53
- }
54
- useEffect(() => {
55
- if (searchTimer.current) clearTimeout(searchTimer.current);
56
- searchTimer.current = setTimeout(() => {
57
- loadList(query);
58
- }, 200);
59
- return () => {
60
- if (searchTimer.current) clearTimeout(searchTimer.current);
61
- };
62
- }, [query]);
63
- async function openEntry(key) {
64
- setSelectedKey(key);
65
- setMode("edit");
66
- setStatus({
67
- msg: "loading…",
68
- kind: "info"
69
- });
70
- try {
71
- const res = await fetch(`/api/teams/${encodeURIComponent(teamId)}/memory/${encodeKey(key)}`);
72
- if (!res.ok) {
73
- const body = await res.json().catch(() => null);
74
- throw new Error(body?.error ?? res.statusText);
75
- }
76
- const entry = await res.json();
77
- setKeyInput(entry.key);
78
- setContent(entry.content ?? "");
79
- setStatus({
80
- msg: `loaded ${entry.key}`,
81
- kind: "info"
82
- });
83
- } catch (err) {
84
- setStatus({
85
- msg: `error: ${err.message}`,
86
- kind: "error"
87
- });
88
- }
89
- }
90
- function newEntry() {
91
- setSelectedKey(null);
92
- setMode("new");
93
- setKeyInput("");
94
- setContent("");
95
- setStatus({
96
- msg: "new entry — type a key and content, then save",
97
- kind: "info"
98
- });
99
- }
100
- async function save() {
101
- const key = keyInput.trim();
102
- if (!key) {
103
- setStatus({
104
- msg: "key is required",
105
- kind: "error"
106
- });
107
- return;
108
- }
109
- try {
110
- const res = await fetch(`/api/teams/${encodeURIComponent(teamId)}/memory/${encodeKey(key)}`, {
111
- method: "PUT",
112
- headers: { "content-type": "application/json" },
113
- body: JSON.stringify({ content })
114
- });
115
- if (!res.ok) {
116
- const body = await res.json().catch(() => null);
117
- throw new Error(body?.error ?? res.statusText);
118
- }
119
- setSelectedKey(key);
120
- setMode("edit");
121
- setStatus({
122
- msg: "saved",
123
- kind: "info"
124
- });
125
- await loadList(query);
126
- } catch (err) {
127
- setStatus({
128
- msg: `error: ${err.message}`,
129
- kind: "error"
130
- });
131
- }
132
- }
133
- async function del() {
134
- if (!selectedKey) return;
135
- if (!confirm(`delete ${selectedKey}?`)) return;
136
- try {
137
- const res = await fetch(`/api/teams/${encodeURIComponent(teamId)}/memory/${encodeKey(selectedKey)}`, { method: "DELETE" });
138
- if (!res.ok && res.status !== 204) {
139
- const body = await res.json().catch(() => null);
140
- throw new Error(body?.error ?? res.statusText);
141
- }
142
- setSelectedKey(null);
143
- setMode("none");
144
- setKeyInput("");
145
- setContent("");
146
- setStatus({
147
- msg: "deleted",
148
- kind: "info"
149
- });
150
- await loadList(query);
151
- } catch (err) {
152
- setStatus({
153
- msg: `error: ${err.message}`,
154
- kind: "error"
155
- });
156
- }
157
- }
158
- const canSave = mode !== "none" && keyInput.trim().length > 0;
159
- const canDelete = mode === "edit" && selectedKey !== null;
160
- return /* @__PURE__ */ jsxs("main", {
161
- className: "mx-auto max-w-5xl px-6 py-8",
162
- children: [
163
- /* @__PURE__ */ jsxs("header", {
164
- className: "mb-6",
165
- children: [/* @__PURE__ */ jsxs("h1", {
166
- className: "font-serif text-3xl text-foreground",
167
- children: [
168
- team.name,
169
- " ",
170
- /* @__PURE__ */ jsx("span", {
171
- className: "text-muted-foreground text-base",
172
- children: "/ shared memory"
173
- })
174
- ]
175
- }), /* @__PURE__ */ jsxs("p", {
176
- className: "text-muted-foreground text-sm mt-1",
177
- children: [
178
- "BM25-indexed markdown notes shared by every agent in",
179
- " ",
180
- /* @__PURE__ */ jsx("a", {
181
- href: `/teams/${encodeURIComponent(team.id)}`,
182
- className: "font-mono underline",
183
- children: team.id
184
- }),
185
- " ",
186
- "(",
187
- memberCount,
188
- " member",
189
- memberCount === 1 ? "" : "s",
190
- "). Anything written here is visible to every member; per-agent notes belong in the agent's own",
191
- " ",
192
- /* @__PURE__ */ jsx("code", {
193
- className: "font-mono",
194
- children: "IDENTITY.md"
195
- }),
196
- " via ",
197
- /* @__PURE__ */ jsx("code", { children: "home_write" }),
198
- "."
199
- ]
200
- })]
201
- }),
202
- /* @__PURE__ */ jsx(TeamTabs, { teamId: team.id }),
203
- /* @__PURE__ */ jsxs("div", {
204
- className: "grid grid-cols-1 gap-6 lg:grid-cols-[320px_1fr]",
205
- children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("div", {
206
- className: "overflow-hidden rounded-[16px] border border-frost bg-snow",
207
- children: [/* @__PURE__ */ jsx("div", {
208
- className: "border-b border-frost p-2",
209
- children: /* @__PURE__ */ jsx("input", {
210
- type: "text",
211
- placeholder: "search (BM25)...",
212
- autoComplete: "off",
213
- value: query,
214
- onChange: (e) => setQuery(e.target.value)
215
- })
216
- }), /* @__PURE__ */ jsx("div", {
217
- className: "max-h-[520px] overflow-y-auto",
218
- children: rows.length === 0 ? /* @__PURE__ */ jsx("div", {
219
- className: "p-8 text-center text-mocha-light",
220
- children: "no entries"
221
- }) : rows.map((r) => {
222
- return /* @__PURE__ */ jsxs("button", {
223
- type: "button",
224
- onClick: () => openEntry(r.key),
225
- className: `unstyled block w-full cursor-pointer border-b border-frost/50 px-3.5 py-2 text-left font-mono text-[0.84em] transition-colors last:border-b-0 hover:bg-sapphire-glow ${r.key === selectedKey ? "bg-sapphire-glow font-medium text-sapphire-deep" : ""}`,
226
- children: [
227
- isSearch && r.score !== void 0 && /* @__PURE__ */ jsx("span", {
228
- className: "float-right text-[0.75em] text-sapphire",
229
- children: r.score.toFixed(2)
230
- }),
231
- r.key,
232
- r.preview && /* @__PURE__ */ jsx("span", {
233
- className: "mt-1 block text-[0.9em] font-normal text-mocha-light",
234
- children: r.preview
235
- })
236
- ]
237
- }, r.key);
238
- })
239
- })]
240
- }), /* @__PURE__ */ jsx("button", {
241
- type: "button",
242
- className: "ghost-btn mt-3 w-full",
243
- onClick: newEntry,
244
- children: "+ new entry"
245
- })] }), /* @__PURE__ */ jsxs("div", { children: [
246
- /* @__PURE__ */ jsx("div", {
247
- className: "mb-3 flex items-center gap-2",
248
- children: /* @__PURE__ */ jsx("input", {
249
- type: "text",
250
- placeholder: "key (e.g. prefs/hiking.md)",
251
- value: keyInput,
252
- onChange: (e) => setKeyInput(e.target.value),
253
- disabled: mode !== "new",
254
- className: "flex-1 font-mono"
255
- })
256
- }),
257
- /* @__PURE__ */ jsx("textarea", {
258
- placeholder: "select an entry on the left, or create a new one.",
259
- value: content,
260
- onChange: (e) => setContent(e.target.value),
261
- className: "min-h-[360px] w-full font-mono text-[0.9em] leading-[1.55]"
262
- }),
263
- /* @__PURE__ */ jsxs("div", {
264
- className: "mt-3 flex gap-2",
265
- children: [/* @__PURE__ */ jsx("button", {
266
- type: "button",
267
- className: "btn-primary",
268
- onClick: save,
269
- disabled: !canSave,
270
- children: "save"
271
- }), /* @__PURE__ */ jsx("button", {
272
- type: "button",
273
- className: "ghost-btn",
274
- onClick: del,
275
- disabled: !canDelete,
276
- children: "delete"
277
- })]
278
- }),
279
- status && /* @__PURE__ */ jsx("p", {
280
- className: `mt-2 text-[0.9em] ${status.kind === "error" ? "text-[#9B3D3D]" : "text-mocha-light"}`,
281
- children: status.msg
282
- })
283
- ] })]
284
- })
285
- ]
286
- });
287
- }
288
- //#endregion
289
- export { MemoryPage as component };
@@ -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 };