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,249 +0,0 @@
1
- import { t as Route } from "./agents-Bp1nsVs2.js";
2
- import { t as AgentAvatar } from "./AgentAvatar-8gTAy_tP.js";
3
- import { useState } from "react";
4
- import { useRouter } from "@tanstack/react-router";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
- //#region src/routes/agents/index.tsx?tsr-split=component
7
- function AgentsPage() {
8
- const { agents, profiles, teams, modelGroups } = Route.useLoaderData();
9
- const { all } = Route.useSearch();
10
- const showAll = all === "1";
11
- const router = useRouter();
12
- async function archive(id) {
13
- if (!confirm("archive this agent? (reversible)")) return;
14
- await fetch(`/api/agents/${id}/archive`, { method: "POST" });
15
- await router.invalidate();
16
- }
17
- async function unarchive(id) {
18
- await fetch(`/api/agents/${id}/unarchive`, { method: "POST" });
19
- await router.invalidate();
20
- }
21
- async function del(id) {
22
- if (!confirm("permanently delete this agent and all its data?")) return;
23
- const agent = agents.find((candidate) => candidate.id === id);
24
- if (!agent) return;
25
- const policyResponse = await fetch(`/api/teams/${encodeURIComponent(agent.teamId)}/policy`);
26
- if (!policyResponse.ok) return;
27
- const policy = await policyResponse.json();
28
- await fetch(`/api/agents/${encodeURIComponent(id)}?expectedTeamRevision=${policy.teamPolicy.revision}`, { method: "DELETE" });
29
- await router.invalidate();
30
- }
31
- return /* @__PURE__ */ jsxs("div", { children: [
32
- /* @__PURE__ */ jsx("h1", { children: "agents" }),
33
- /* @__PURE__ */ jsx(SpawnForm, {
34
- profiles,
35
- teams,
36
- modelGroups,
37
- onSpawned: router.invalidate
38
- }),
39
- /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("a", {
40
- href: showAll ? "/agents" : "/agents?all=1",
41
- children: showAll ? "hide archived" : "show archived"
42
- }) }),
43
- /* @__PURE__ */ jsxs("table", { children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
44
- /* @__PURE__ */ jsx("th", { children: "id" }),
45
- /* @__PURE__ */ jsx("th", { children: "name" }),
46
- /* @__PURE__ */ jsx("th", { children: "profile" }),
47
- /* @__PURE__ */ jsx("th", { children: "status" }),
48
- /* @__PURE__ */ jsx("th", {})
49
- ] }) }), /* @__PURE__ */ jsxs("tbody", { children: [agents.length === 0 && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
50
- colSpan: 5,
51
- className: "muted",
52
- children: "no agents yet"
53
- }) }), agents.map((a) => /* @__PURE__ */ jsxs("tr", { children: [
54
- /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("a", {
55
- href: `/agents/${a.id}`,
56
- title: a.id,
57
- children: /* @__PURE__ */ jsxs("code", { children: [a.id.slice(0, 8), "…"] })
58
- }) }),
59
- /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsxs("div", {
60
- className: "flex items-center gap-2",
61
- children: [/* @__PURE__ */ jsx(AgentAvatar, {
62
- identity: a.identity,
63
- size: 26
64
- }), /* @__PURE__ */ jsxs("div", {
65
- className: "leading-tight",
66
- children: [/* @__PURE__ */ jsx("div", { children: a.name }), (a.identity?.creature || a.identity?.vibe) && /* @__PURE__ */ jsx("div", {
67
- className: "muted text-[0.8em]",
68
- children: [a.identity?.creature, a.identity?.vibe].filter(Boolean).join(" · ")
69
- })]
70
- })]
71
- }) }),
72
- /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("code", { children: a.profileId }) }),
73
- /* @__PURE__ */ jsx("td", { children: a.status }),
74
- /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsxs("div", {
75
- className: "flex gap-1.5",
76
- children: [a.status !== "archived" ? /* @__PURE__ */ jsx("button", {
77
- type: "button",
78
- className: "ghost-btn",
79
- onClick: () => archive(a.id),
80
- children: "archive"
81
- }) : /* @__PURE__ */ jsx("button", {
82
- type: "button",
83
- className: "ghost-btn",
84
- onClick: () => unarchive(a.id),
85
- children: "unarchive"
86
- }), /* @__PURE__ */ jsx("button", {
87
- type: "button",
88
- className: "ghost-btn",
89
- style: { color: "var(--color-rose-baziu)" },
90
- onClick: () => del(a.id),
91
- children: "delete"
92
- })]
93
- }) })
94
- ] }, a.id))] })] })
95
- ] });
96
- }
97
- function SpawnForm({ profiles, teams, modelGroups, onSpawned }) {
98
- const [profileId, setProfileId] = useState("");
99
- const [name, setName] = useState("");
100
- const [model, setModel] = useState("");
101
- const [teamId, setTeamId] = useState(teams.find((g) => g.id === "default")?.id ?? "");
102
- const [placement, setPlacement] = useState("profile_defaults");
103
- const [submitting, setSubmitting] = useState(false);
104
- const [err, setErr] = useState(null);
105
- async function submit(e) {
106
- e.preventDefault();
107
- if (!profileId) {
108
- setErr("profile is required");
109
- return;
110
- }
111
- setSubmitting(true);
112
- setErr(null);
113
- try {
114
- const body = { profile: profileId };
115
- if (name) body.name = name;
116
- if (model) body.model = model;
117
- if (teamId) {
118
- const policyResponse = await fetch(`/api/teams/${encodeURIComponent(teamId)}/policy`);
119
- if (!policyResponse.ok) throw new Error("The selected Team policy is unavailable.");
120
- const current = await policyResponse.json();
121
- body.teamId = teamId;
122
- body.teamExpectedRevision = current.teamPolicy.revision;
123
- body.placement = placement;
124
- }
125
- const res = await fetch("/api/agents", {
126
- method: "POST",
127
- headers: { "content-type": "application/json" },
128
- body: JSON.stringify(body)
129
- });
130
- if (!res.ok) {
131
- const b = await res.json().catch(() => null);
132
- throw new Error(b?.error ?? res.statusText);
133
- }
134
- await res.json();
135
- setName("");
136
- setModel("");
137
- onSpawned();
138
- } catch (e2) {
139
- setErr(e2.message);
140
- } finally {
141
- setSubmitting(false);
142
- }
143
- }
144
- return /* @__PURE__ */ jsxs("form", {
145
- className: "card",
146
- onSubmit: submit,
147
- children: [
148
- /* @__PURE__ */ jsx("h3", { children: "spawn agent" }),
149
- err && /* @__PURE__ */ jsx("div", {
150
- className: "err",
151
- children: err
152
- }),
153
- /* @__PURE__ */ jsx("p", {
154
- className: "muted my-2 text-[0.85em]",
155
- children: "Skills come from the profile's defaults at spawn time. Tweak per-agent skills after the fact from the agent detail page."
156
- }),
157
- /* @__PURE__ */ jsxs("div", {
158
- className: "flex gap-4",
159
- children: [/* @__PURE__ */ jsxs("label", {
160
- className: "flex-1",
161
- children: ["profile", /* @__PURE__ */ jsxs("select", {
162
- value: profileId,
163
- onChange: (e) => setProfileId(e.target.value),
164
- required: true,
165
- children: [/* @__PURE__ */ jsx("option", {
166
- value: "",
167
- children: "--"
168
- }), profiles.map((p) => /* @__PURE__ */ jsx("option", {
169
- value: p.id,
170
- children: p.id
171
- }, p.id))]
172
- })]
173
- }), /* @__PURE__ */ jsxs("label", {
174
- className: "flex-1",
175
- children: ["name", /* @__PURE__ */ jsx("input", {
176
- value: name,
177
- onChange: (e) => setName(e.target.value)
178
- })]
179
- })]
180
- }),
181
- /* @__PURE__ */ jsxs("label", { children: ["model override", modelGroups.length === 0 ? /* @__PURE__ */ jsx("input", {
182
- value: "",
183
- disabled: true,
184
- placeholder: "(uses profile default — enable models on /config)"
185
- }) : /* @__PURE__ */ jsxs("select", {
186
- value: model,
187
- onChange: (e) => setModel(e.target.value),
188
- children: [/* @__PURE__ */ jsx("option", {
189
- value: "",
190
- children: "(uses profile default)"
191
- }), modelGroups.map((g) => /* @__PURE__ */ jsx("optgroup", {
192
- label: g.provider,
193
- children: g.models.map((m) => /* @__PURE__ */ jsx("option", {
194
- value: `${g.provider}:${m}`,
195
- children: `${g.provider}:${m}`
196
- }, m))
197
- }, g.provider))]
198
- })] }),
199
- /* @__PURE__ */ jsxs("label", { children: ["team", teams.length === 0 ? /* @__PURE__ */ jsx("select", {
200
- disabled: true,
201
- children: /* @__PURE__ */ jsx("option", { children: "(no teams — register one on /teams)" })
202
- }) : /* @__PURE__ */ jsx("select", {
203
- value: teamId,
204
- onChange: (e) => setTeamId(e.target.value),
205
- children: teams.map((g) => /* @__PURE__ */ jsxs("option", {
206
- value: g.id,
207
- children: [
208
- g.id,
209
- " (",
210
- g.name,
211
- ")"
212
- ]
213
- }, g.id))
214
- })] }),
215
- /* @__PURE__ */ jsxs("label", { children: [
216
- "initial policy placement",
217
- /* @__PURE__ */ jsxs("select", {
218
- value: placement,
219
- onChange: (e) => setPlacement(e.target.value),
220
- children: [
221
- /* @__PURE__ */ jsx("option", {
222
- value: "profile_defaults",
223
- children: "agent-template defaults"
224
- }),
225
- /* @__PURE__ */ jsx("option", {
226
- value: "isolated",
227
- children: "isolated"
228
- }),
229
- /* @__PURE__ */ jsx("option", {
230
- value: "open",
231
- children: "open to current members and boundaries"
232
- })
233
- ]
234
- }),
235
- /* @__PURE__ */ jsx("span", {
236
- className: "muted mt-1 block text-xs",
237
- children: "Submit uses the latest displayed Team revision; a concurrent policy change is shown as a conflict and never overwritten."
238
- })
239
- ] }),
240
- /* @__PURE__ */ jsx("button", {
241
- type: "submit",
242
- disabled: submitting,
243
- children: submitting ? "spawning…" : "spawn"
244
- })
245
- ]
246
- });
247
- }
248
- //#endregion
249
- export { AgentsPage as component };
@@ -1,49 +0,0 @@
1
- import { t as Route } from "./context-D3Egm-vY.js";
2
- import { t as TeamTabs } from "./TeamTabs-BPxDBfqy.js";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- //#region src/routes/teams/$id/context.tsx?tsr-split=component
5
- function ContextPage() {
6
- const team = Route.useLoaderData();
7
- return /* @__PURE__ */ jsxs("div", {
8
- className: "mx-auto max-w-5xl px-6 py-8",
9
- children: [
10
- /* @__PURE__ */ jsx("h1", { children: "team context" }),
11
- /* @__PURE__ */ jsx("p", {
12
- className: "muted",
13
- children: "Workspace, operator context, and integrations owned by this Team."
14
- }),
15
- /* @__PURE__ */ jsx(TeamTabs, { teamId: team.id }),
16
- /* @__PURE__ */ jsxs("section", {
17
- className: "card",
18
- children: [/* @__PURE__ */ jsxs("dl", {
19
- className: "grid gap-4 sm:grid-cols-2",
20
- children: [
21
- /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
22
- className: "muted",
23
- children: "workspace path"
24
- }), /* @__PURE__ */ jsx("dd", { children: /* @__PURE__ */ jsx("code", { children: team.path }) })] }),
25
- /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
26
- className: "muted",
27
- children: "Telegram topic format"
28
- }), /* @__PURE__ */ jsx("dd", { children: /* @__PURE__ */ jsx("code", { children: team.telegramTopicNameFormat ?? "built-in naming" }) })] }),
29
- /* @__PURE__ */ jsxs("div", {
30
- className: "sm:col-span-2",
31
- children: [/* @__PURE__ */ jsx("dt", {
32
- className: "muted",
33
- children: "USER.md"
34
- }), /* @__PURE__ */ jsx("dd", {
35
- className: "mt-2 whitespace-pre-wrap rounded-md border border-frost bg-ivory p-3 text-sm",
36
- children: team.userMd || "No operator context configured."
37
- })]
38
- })
39
- ]
40
- }), /* @__PURE__ */ jsx("p", {
41
- className: "mt-4 text-sm text-mocha",
42
- children: "Edit USER.md and Telegram naming from Overview during this transition. This route is the canonical context projection."
43
- })]
44
- })
45
- ]
46
- });
47
- }
48
- //#endregion
49
- export { ContextPage as component };
@@ -1,133 +0,0 @@
1
- import { t as Route } from "./inbox-Bxb3W04M.js";
2
- import { t as AgentTabs } from "./AgentTabs-BOjTN7QF.js";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- //#region src/routes/agents/$id/inbox.tsx?tsr-split=component
5
- function decodeText(payload) {
6
- try {
7
- const obj = JSON.parse(payload);
8
- if (typeof obj.text === "string") return obj.text;
9
- } catch {}
10
- return payload;
11
- }
12
- function InboxPage() {
13
- const { resolved, messages, unreadCount, selected, agentNames } = Route.useLoaderData();
14
- const unreadOnly = Route.useSearch().unread === "1";
15
- const misaddressed = Boolean(selected && selected.toAgentId !== resolved.agent.id);
16
- function agentLabel(aid) {
17
- const name = agentNames[aid];
18
- return name ? `${name} (${aid.slice(0, 8)})` : aid.slice(0, 8);
19
- }
20
- return /* @__PURE__ */ jsxs("main", {
21
- className: "mx-auto max-w-5xl px-6 py-8",
22
- children: [
23
- /* @__PURE__ */ jsx("h1", {
24
- className: "font-serif text-3xl text-foreground mb-1",
25
- children: resolved.agent.name
26
- }),
27
- /* @__PURE__ */ jsxs("p", {
28
- className: "text-xs text-muted-foreground mb-6",
29
- children: [
30
- /* @__PURE__ */ jsxs("code", {
31
- className: "font-mono",
32
- children: [resolved.agent.id.slice(0, 8), "…"]
33
- }),
34
- " · unread: ",
35
- unreadCount
36
- ]
37
- }),
38
- /* @__PURE__ */ jsx(AgentTabs, {
39
- agentId: resolved.agent.id,
40
- active: "inbox",
41
- archived: resolved.agent.status === "archived"
42
- }),
43
- /* @__PURE__ */ jsxs("div", {
44
- className: "grid grid-cols-1 md:grid-cols-[360px_1fr] gap-6",
45
- children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("div", {
46
- className: "flex gap-1 border-b mb-3",
47
- children: [/* @__PURE__ */ jsx("a", {
48
- href: `/agents/${resolved.agent.id}/inbox`,
49
- className: `px-3 py-1.5 text-sm border-b-2 -mb-px ${!unreadOnly ? "border-primary text-primary font-semibold" : "border-transparent text-muted-foreground"}`,
50
- children: "all"
51
- }), /* @__PURE__ */ jsx("a", {
52
- href: `/agents/${resolved.agent.id}/inbox?unread=1`,
53
- className: `px-3 py-1.5 text-sm border-b-2 -mb-px ${unreadOnly ? "border-primary text-primary font-semibold" : "border-transparent text-muted-foreground"}`,
54
- children: "unread"
55
- })]
56
- }), /* @__PURE__ */ jsx("div", {
57
- className: "rounded-lg border bg-card max-h-[640px] overflow-y-auto",
58
- children: messages.length === 0 ? /* @__PURE__ */ jsx("div", {
59
- className: "p-6 text-center text-muted-foreground italic",
60
- children: unreadOnly ? "no unread messages" : "inbox empty"
61
- }) : messages.map((m) => {
62
- const text = decodeText(m.payload);
63
- const preview = text.length > 80 ? `${text.slice(0, 80)}…` : text;
64
- const when = new Date(m.createdAt).toLocaleString();
65
- const isActive = selected?.id === m.id;
66
- const isUnread = m.readAt === null;
67
- const qs = unreadOnly ? `?unread=1&id=${m.id}` : `?id=${m.id}`;
68
- return /* @__PURE__ */ jsxs("a", {
69
- href: `/agents/${resolved.agent.id}/inbox${qs}`,
70
- className: `block border-b last:border-0 px-3 py-2 text-sm hover:bg-accent/30 ${isActive ? "bg-accent/40" : ""} ${isUnread ? "font-medium" : ""}`,
71
- children: [/* @__PURE__ */ jsxs("div", {
72
- className: "flex justify-between text-xs text-muted-foreground",
73
- children: [/* @__PURE__ */ jsxs("span", {
74
- className: "font-mono",
75
- children: [
76
- isUnread && /* @__PURE__ */ jsx("span", { className: "inline-block w-1.5 h-1.5 rounded-full bg-primary mr-1.5 align-middle" }),
77
- "from ",
78
- agentLabel(m.fromAgentId)
79
- ]
80
- }), /* @__PURE__ */ jsx("span", {
81
- className: "font-mono",
82
- children: when
83
- })]
84
- }), /* @__PURE__ */ jsx("div", {
85
- className: "text-foreground mt-0.5 truncate",
86
- children: preview
87
- })]
88
- }, m.id);
89
- })
90
- })] }), /* @__PURE__ */ jsxs("div", { children: [
91
- selected && !misaddressed && /* @__PURE__ */ jsxs("div", {
92
- className: "rounded-lg border bg-card p-5 mb-4",
93
- children: [/* @__PURE__ */ jsxs("div", {
94
- className: "font-mono text-xs text-muted-foreground mb-2 space-y-0.5",
95
- children: [
96
- /* @__PURE__ */ jsxs("div", { children: ["id: ", /* @__PURE__ */ jsx("code", { children: selected.id })] }),
97
- /* @__PURE__ */ jsxs("div", { children: ["from: ", /* @__PURE__ */ jsx("code", { children: agentLabel(selected.fromAgentId) })] }),
98
- /* @__PURE__ */ jsxs("div", { children: ["received: ", new Date(selected.createdAt).toLocaleString()] }),
99
- /* @__PURE__ */ jsxs("div", { children: [
100
- "read:",
101
- " ",
102
- selected.readAt ? new Date(selected.readAt).toLocaleString() : "(unread)"
103
- ] }),
104
- selected.replyTo && /* @__PURE__ */ jsxs("div", { children: ["reply to: ", /* @__PURE__ */ jsx("code", { children: selected.replyTo })] })
105
- ]
106
- }), /* @__PURE__ */ jsx("div", {
107
- className: "border-t pt-3 font-mono text-sm whitespace-pre-wrap break-words",
108
- children: decodeText(selected.payload)
109
- })]
110
- }),
111
- misaddressed && /* @__PURE__ */ jsx("div", {
112
- className: "rounded-lg border bg-card p-5 mb-4 text-muted-foreground",
113
- children: "message is not addressed to this agent"
114
- }),
115
- /* @__PURE__ */ jsxs("p", {
116
- className: "text-xs text-muted-foreground",
117
- children: [
118
- "Agents exchange messages automatically via their",
119
- " ",
120
- /* @__PURE__ */ jsx("code", {
121
- className: "font-mono",
122
- children: "send_message"
123
- }),
124
- " tool. An idle recipient's scheduler tick drains unread mail."
125
- ]
126
- })
127
- ] })]
128
- })
129
- ]
130
- });
131
- }
132
- //#endregion
133
- export { InboxPage as component };
@@ -1,58 +0,0 @@
1
- import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- //#region src/components/PawIcon.tsx
4
- function PawIcon({ className }) {
5
- return /* @__PURE__ */ jsxs("svg", {
6
- viewBox: "0 0 24 24",
7
- fill: "currentColor",
8
- className,
9
- "aria-hidden": "true",
10
- children: [
11
- /* @__PURE__ */ jsx("ellipse", {
12
- cx: "7",
13
- cy: "5",
14
- rx: "2.2",
15
- ry: "2.8"
16
- }),
17
- /* @__PURE__ */ jsx("ellipse", {
18
- cx: "17",
19
- cy: "5",
20
- rx: "2.2",
21
- ry: "2.8"
22
- }),
23
- /* @__PURE__ */ jsx("ellipse", {
24
- cx: "3.5",
25
- cy: "11",
26
- rx: "2",
27
- ry: "2.5"
28
- }),
29
- /* @__PURE__ */ jsx("ellipse", {
30
- cx: "20.5",
31
- cy: "11",
32
- rx: "2",
33
- ry: "2.5"
34
- }),
35
- /* @__PURE__ */ jsx("path", { d: "M12 22c-4.5 0-7.5-3-7.5-6 0-3 2.5-5.5 4.5-7a4 4 0 0 1 6 0c2 1.5 4.5 4 4.5 7 0 3-3 6-7.5 6z" })
36
- ]
37
- });
38
- }
39
- //#endregion
40
- //#region src/components/BaziuLogo.tsx
41
- function BaziuLogo({ className }) {
42
- return /* @__PURE__ */ jsx("img", {
43
- src: "/baziu.svg",
44
- alt: "",
45
- "aria-hidden": "true",
46
- draggable: false,
47
- className
48
- });
49
- }
50
- //#endregion
51
- //#region src/routes/login.tsx
52
- var $$splitComponentImporter = () => import("./login-CQybKk7Y.js");
53
- var Route = createFileRoute("/login")({
54
- validateSearch: (search) => ({ error: search.error === "1" ? "1" : void 0 }),
55
- component: lazyRouteComponent($$splitComponentImporter, "component")
56
- });
57
- //#endregion
58
- export { BaziuLogo as n, PawIcon as r, Route as t };
@@ -1,74 +0,0 @@
1
- import { n as BaziuLogo, r as PawIcon, t as Route } from "./login-CNznncgA.js";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- //#region src/routes/login.tsx?tsr-split=component
4
- function LoginPage() {
5
- const { error } = Route.useSearch();
6
- return /* @__PURE__ */ jsxs("main", {
7
- className: "relative flex min-h-dvh items-center justify-center bg-cream",
8
- children: [
9
- /* @__PURE__ */ jsx("div", {
10
- "aria-hidden": "true",
11
- className: "pointer-events-none absolute inset-0",
12
- style: { background: "radial-gradient(circle at 20% 15%, rgba(74,124,155,0.12), transparent 55%), radial-gradient(circle at 80% 85%, rgba(196,135,138,0.10), transparent 55%)" }
13
- }),
14
- /* @__PURE__ */ jsxs("div", {
15
- className: "relative w-full max-w-sm rounded-[16px] border border-frost bg-snow p-8 text-center shadow-baziu-md",
16
- children: [
17
- /* @__PURE__ */ jsx(BaziuLogo, { className: "mx-auto mb-3 h-16 w-16" }),
18
- /* @__PURE__ */ jsx("h1", {
19
- className: "font-display text-[2rem] tracking-tight text-charcoal",
20
- children: "bazilion"
21
- }),
22
- error && /* @__PURE__ */ jsx("div", {
23
- className: "err mt-4",
24
- children: "invalid token"
25
- }),
26
- /* @__PURE__ */ jsxs("form", {
27
- method: "POST",
28
- action: "/api/login",
29
- className: "mt-6 text-left",
30
- children: [
31
- /* @__PURE__ */ jsx("label", {
32
- htmlFor: "token",
33
- className: "block text-[0.85em] font-medium text-mocha",
34
- children: "Token"
35
- }),
36
- /* @__PURE__ */ jsx("input", {
37
- type: "password",
38
- id: "token",
39
- name: "token",
40
- autoFocus: true,
41
- required: true,
42
- placeholder: "paste from auth.json",
43
- className: "mb-5"
44
- }),
45
- /* @__PURE__ */ jsx("button", {
46
- type: "submit",
47
- className: "w-full",
48
- children: "log in"
49
- })
50
- ]
51
- }),
52
- /* @__PURE__ */ jsxs("p", {
53
- className: "mt-5 text-[0.78em] leading-relaxed text-mocha-light",
54
- children: [
55
- "Your token is in ",
56
- /* @__PURE__ */ jsx("code", { children: "~/.bazilion/auth.json" }),
57
- /* @__PURE__ */ jsx("br", {}),
58
- "created on first ",
59
- /* @__PURE__ */ jsx("code", { children: "bazilion dashboard" }),
60
- " or ",
61
- /* @__PURE__ */ jsx("code", { children: "bazilion serve" })
62
- ]
63
- })
64
- ]
65
- }),
66
- /* @__PURE__ */ jsxs("footer", {
67
- className: "absolute bottom-4 left-0 right-0 text-center text-[0.78em] text-fawn",
68
- children: ["dedicated to Baziu", /* @__PURE__ */ jsx(PawIcon, { className: "ml-1 inline-block h-3 w-3 align-[-1px] opacity-40" })]
69
- })
70
- ]
71
- });
72
- }
73
- //#endregion
74
- export { LoginPage as component };
@@ -1,48 +0,0 @@
1
- import { t as Route } from "./members-ksELRsyk.js";
2
- import { t as TeamTabs } from "./TeamTabs-BPxDBfqy.js";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- //#region src/routes/teams/$id/members.tsx?tsr-split=component
5
- function TeamMembersPage() {
6
- const detail = Route.useLoaderData();
7
- const { id } = Route.useParams();
8
- return /* @__PURE__ */ jsxs("div", {
9
- className: "mx-auto max-w-5xl px-6 py-8",
10
- children: [
11
- /* @__PURE__ */ jsx("h1", { children: "team members" }),
12
- /* @__PURE__ */ jsxs("p", {
13
- className: "muted",
14
- children: [/* @__PURE__ */ jsx("code", { children: "agents.team_id" }), " is the only live-membership authority."]
15
- }),
16
- /* @__PURE__ */ jsx(TeamTabs, { teamId: id }),
17
- /* @__PURE__ */ jsx("div", {
18
- className: "overflow-x-auto rounded-md border border-frost",
19
- children: /* @__PURE__ */ jsxs("table", {
20
- className: "w-full",
21
- children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
22
- /* @__PURE__ */ jsx("th", { children: "agent" }),
23
- /* @__PURE__ */ jsx("th", { children: "status" }),
24
- /* @__PURE__ */ jsx("th", { children: "agent template" }),
25
- /* @__PURE__ */ jsx("th", { children: "source slot" })
26
- ] }) }), /* @__PURE__ */ jsxs("tbody", { children: [detail.members.map((agent) => {
27
- const binding = detail.bindings.find((item) => item.agentId === agent.id);
28
- return /* @__PURE__ */ jsxs("tr", { children: [
29
- /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("a", {
30
- href: `/agents/${agent.id}`,
31
- children: agent.name
32
- }) }),
33
- /* @__PURE__ */ jsx("td", { children: agent.status }),
34
- /* @__PURE__ */ jsx("td", { children: agent.profileId }),
35
- /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("code", { children: binding?.sourceSlotId ?? "live-only" }) })
36
- ] }, agent.id);
37
- }), detail.members.length === 0 && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
38
- colSpan: 4,
39
- className: "muted",
40
- children: "No agents belong to this team."
41
- }) })] })]
42
- })
43
- })
44
- ]
45
- });
46
- }
47
- //#endregion
48
- export { TeamMembersPage as component };