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
@@ -0,0 +1,265 @@
1
+ import { t as Route } from "./agents-C9xlWK0Z.js";
2
+ import { a as StatusBadge, i as SectionCard, n as PageHeader, r as PageShell, t as EmptyState } from "./Page-LENulSXY.js";
3
+ import { t as AgentAvatar } from "./AgentAvatar-8gTAy_tP.js";
4
+ import { t as Button } from "./Button-Dsnw22OF.js";
5
+ import { useState } from "react";
6
+ import { useRouter } from "@tanstack/react-router";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ //#region src/routes/agents/index.tsx?tsr-split=component
9
+ function AgentsPage() {
10
+ const { agents, profiles, teams, modelGroups } = Route.useLoaderData();
11
+ const { all } = Route.useSearch();
12
+ const showAll = all === "1";
13
+ const router = useRouter();
14
+ async function archive(id) {
15
+ if (!confirm("archive this agent? (reversible)")) return;
16
+ await fetch(`/api/agents/${id}/archive`, { method: "POST" });
17
+ await router.invalidate();
18
+ }
19
+ async function unarchive(id) {
20
+ await fetch(`/api/agents/${id}/unarchive`, { method: "POST" });
21
+ await router.invalidate();
22
+ }
23
+ async function del(id) {
24
+ if (!confirm("permanently delete this agent and all its data?")) return;
25
+ const agent = agents.find((candidate) => candidate.id === id);
26
+ if (!agent) return;
27
+ const policyResponse = await fetch(`/api/teams/${encodeURIComponent(agent.teamId)}/policy`);
28
+ if (!policyResponse.ok) return;
29
+ const policy = await policyResponse.json();
30
+ await fetch(`/api/agents/${encodeURIComponent(id)}?expectedTeamRevision=${policy.teamPolicy.revision}`, { method: "DELETE" });
31
+ await router.invalidate();
32
+ }
33
+ return /* @__PURE__ */ jsxs(PageShell, {
34
+ size: "wide",
35
+ children: [
36
+ /* @__PURE__ */ jsx(PageHeader, {
37
+ eyebrow: "Workspace",
38
+ title: "Agents",
39
+ description: "Spawn, inspect, archive, and restore the agents that work across your teams.",
40
+ actions: /* @__PURE__ */ jsx(Button, {
41
+ variant: "ghost",
42
+ onClick: () => window.location.assign(showAll ? "/agents" : "/agents?all=1"),
43
+ children: showAll ? "Hide archived" : "Show archived"
44
+ })
45
+ }),
46
+ /* @__PURE__ */ jsx(SpawnForm, {
47
+ profiles,
48
+ teams,
49
+ modelGroups,
50
+ onSpawned: router.invalidate
51
+ }),
52
+ /* @__PURE__ */ jsx(SectionCard, {
53
+ title: showAll ? "All agents" : "Current agents",
54
+ description: showAll ? "Active and archived agents are shown together." : "Archived agents stay hidden until you choose to show them.",
55
+ children: agents.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
56
+ title: showAll ? "No agents yet" : "No current agents",
57
+ description: "Spawn an agent above to give a team its first working member."
58
+ }) : /* @__PURE__ */ jsx("div", {
59
+ className: "overflow-x-auto",
60
+ children: /* @__PURE__ */ jsxs("table", {
61
+ className: "min-w-[760px]",
62
+ children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
63
+ /* @__PURE__ */ jsx("th", { children: "ID" }),
64
+ /* @__PURE__ */ jsx("th", { children: "Name" }),
65
+ /* @__PURE__ */ jsx("th", { children: "Agent template" }),
66
+ /* @__PURE__ */ jsx("th", { children: "Status" }),
67
+ /* @__PURE__ */ jsx("th", { children: /* @__PURE__ */ jsx("span", {
68
+ className: "sr-only",
69
+ children: "Actions"
70
+ }) })
71
+ ] }) }), /* @__PURE__ */ jsx("tbody", { children: agents.map((a) => /* @__PURE__ */ jsxs("tr", { children: [
72
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("a", {
73
+ href: `/agents/${a.id}`,
74
+ title: a.id,
75
+ children: /* @__PURE__ */ jsxs("code", { children: [a.id.slice(0, 8), "…"] })
76
+ }) }),
77
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsxs("div", {
78
+ className: "flex items-center gap-2",
79
+ children: [/* @__PURE__ */ jsx(AgentAvatar, {
80
+ identity: a.identity,
81
+ size: 26
82
+ }), /* @__PURE__ */ jsxs("div", {
83
+ className: "leading-tight",
84
+ children: [/* @__PURE__ */ jsx("div", { children: a.name }), (a.identity?.creature || a.identity?.vibe) && /* @__PURE__ */ jsx("div", {
85
+ className: "muted text-[0.8em]",
86
+ children: [a.identity?.creature, a.identity?.vibe].filter(Boolean).join(" · ")
87
+ })]
88
+ })]
89
+ }) }),
90
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("code", { children: a.profileId }) }),
91
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(StatusBadge, {
92
+ variant: a.status === "archived" ? "warning" : "success",
93
+ children: a.status
94
+ }) }),
95
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsxs("div", {
96
+ className: "flex justify-end gap-1.5",
97
+ children: [a.status !== "archived" ? /* @__PURE__ */ jsx(Button, {
98
+ variant: "ghost",
99
+ onClick: () => archive(a.id),
100
+ children: "Archive"
101
+ }) : /* @__PURE__ */ jsx(Button, {
102
+ variant: "ghost",
103
+ onClick: () => unarchive(a.id),
104
+ children: "Restore"
105
+ }), /* @__PURE__ */ jsx(Button, {
106
+ variant: "danger",
107
+ onClick: () => del(a.id),
108
+ children: "Delete"
109
+ })]
110
+ }) })
111
+ ] }, a.id)) })]
112
+ })
113
+ })
114
+ })
115
+ ]
116
+ });
117
+ }
118
+ function SpawnForm({ profiles, teams, modelGroups, onSpawned }) {
119
+ const [profileId, setProfileId] = useState("");
120
+ const [name, setName] = useState("");
121
+ const [model, setModel] = useState("");
122
+ const [teamId, setTeamId] = useState(teams.find((g) => g.id === "default")?.id ?? "");
123
+ const [placement, setPlacement] = useState("profile_defaults");
124
+ const [submitting, setSubmitting] = useState(false);
125
+ const [err, setErr] = useState(null);
126
+ async function submit(e) {
127
+ e.preventDefault();
128
+ if (!profileId) {
129
+ setErr("profile is required");
130
+ return;
131
+ }
132
+ setSubmitting(true);
133
+ setErr(null);
134
+ try {
135
+ const body = { profile: profileId };
136
+ if (name) body.name = name;
137
+ if (model) body.model = model;
138
+ if (teamId) {
139
+ const policyResponse = await fetch(`/api/teams/${encodeURIComponent(teamId)}/policy`);
140
+ if (!policyResponse.ok) throw new Error("The selected Team policy is unavailable.");
141
+ const current = await policyResponse.json();
142
+ body.teamId = teamId;
143
+ body.teamExpectedRevision = current.teamPolicy.revision;
144
+ body.placement = placement;
145
+ }
146
+ const res = await fetch("/api/agents", {
147
+ method: "POST",
148
+ headers: { "content-type": "application/json" },
149
+ body: JSON.stringify(body)
150
+ });
151
+ if (!res.ok) {
152
+ const b = await res.json().catch(() => null);
153
+ throw new Error(b?.error ?? res.statusText);
154
+ }
155
+ await res.json();
156
+ setName("");
157
+ setModel("");
158
+ onSpawned();
159
+ } catch (e2) {
160
+ setErr(e2.message);
161
+ } finally {
162
+ setSubmitting(false);
163
+ }
164
+ }
165
+ return /* @__PURE__ */ jsx(SectionCard, {
166
+ title: "Spawn an agent",
167
+ description: "Skills come from the Agent template at spawn time. You can adjust an agent's skills later from its detail page.",
168
+ children: /* @__PURE__ */ jsxs("form", {
169
+ onSubmit: submit,
170
+ children: [
171
+ err && /* @__PURE__ */ jsx("div", {
172
+ className: "err",
173
+ children: err
174
+ }),
175
+ /* @__PURE__ */ jsxs("div", {
176
+ className: "grid gap-4 sm:grid-cols-2",
177
+ children: [
178
+ /* @__PURE__ */ jsxs("label", { children: ["Agent template", /* @__PURE__ */ jsxs("select", {
179
+ value: profileId,
180
+ onChange: (e) => setProfileId(e.target.value),
181
+ required: true,
182
+ children: [/* @__PURE__ */ jsx("option", {
183
+ value: "",
184
+ children: "Select a template"
185
+ }), profiles.map((p) => /* @__PURE__ */ jsx("option", {
186
+ value: p.id,
187
+ children: p.id
188
+ }, p.id))]
189
+ })] }),
190
+ /* @__PURE__ */ jsxs("label", { children: ["Name", /* @__PURE__ */ jsx("input", {
191
+ value: name,
192
+ onChange: (e) => setName(e.target.value)
193
+ })] }),
194
+ /* @__PURE__ */ jsxs("label", { children: ["Model override", modelGroups.length === 0 ? /* @__PURE__ */ jsx("input", {
195
+ value: "",
196
+ disabled: true,
197
+ placeholder: "Uses the template default — enable models in Config"
198
+ }) : /* @__PURE__ */ jsxs("select", {
199
+ value: model,
200
+ onChange: (e) => setModel(e.target.value),
201
+ children: [/* @__PURE__ */ jsx("option", {
202
+ value: "",
203
+ children: "Use the template default"
204
+ }), modelGroups.map((g) => /* @__PURE__ */ jsx("optgroup", {
205
+ label: g.provider,
206
+ children: g.models.map((m) => /* @__PURE__ */ jsx("option", {
207
+ value: `${g.provider}:${m}`,
208
+ children: `${g.provider}:${m}`
209
+ }, m))
210
+ }, g.provider))]
211
+ })] }),
212
+ /* @__PURE__ */ jsxs("label", { children: ["Team", teams.length === 0 ? /* @__PURE__ */ jsx("select", {
213
+ disabled: true,
214
+ children: /* @__PURE__ */ jsx("option", { children: "No teams — register one in Teams" })
215
+ }) : /* @__PURE__ */ jsx("select", {
216
+ value: teamId,
217
+ onChange: (e) => setTeamId(e.target.value),
218
+ children: teams.map((g) => /* @__PURE__ */ jsxs("option", {
219
+ value: g.id,
220
+ children: [
221
+ g.id,
222
+ " (",
223
+ g.name,
224
+ ")"
225
+ ]
226
+ }, g.id))
227
+ })] }),
228
+ /* @__PURE__ */ jsxs("label", {
229
+ className: "sm:col-span-2",
230
+ children: [
231
+ "Initial policy placement",
232
+ /* @__PURE__ */ jsxs("select", {
233
+ value: placement,
234
+ onChange: (e) => setPlacement(e.target.value),
235
+ children: [/* @__PURE__ */ jsx("option", {
236
+ value: "profile_defaults",
237
+ children: "Agent-template defaults"
238
+ }), /* @__PURE__ */ jsx("option", {
239
+ value: "isolated",
240
+ children: "Isolated"
241
+ })]
242
+ }),
243
+ /* @__PURE__ */ jsx("span", {
244
+ className: "muted mt-1 block text-xs",
245
+ children: "Submission uses the latest displayed Team revision. A concurrent policy change is shown as a conflict and is never overwritten."
246
+ })
247
+ ]
248
+ })
249
+ ]
250
+ }),
251
+ /* @__PURE__ */ jsx("div", {
252
+ className: "mt-4",
253
+ children: /* @__PURE__ */ jsx(Button, {
254
+ variant: "primary",
255
+ type: "submit",
256
+ disabled: submitting,
257
+ children: submitting ? "Spawning…" : "Spawn agent"
258
+ })
259
+ })
260
+ ]
261
+ })
262
+ });
263
+ }
264
+ //#endregion
265
+ export { AgentsPage as component };
@@ -1,8 +1,9 @@
1
- import { t as Route } from "./agents-B8kinIPW.js";
1
+ import { t as Route } from "./agents-BvttypqB.js";
2
+ import { n as PageHeader, r as PageShell } from "./Page-LENulSXY.js";
2
3
  import { t as Button } from "./Button-Dsnw22OF.js";
3
- import { t as DEFAULT_PROFILE_COMMUNICATION } from "./team-policy-Csvc5EDd.js";
4
+ import { t as DEFAULT_PROFILE_COMMUNICATION } from "./team-policy-vPG01onj.js";
4
5
  import { t as ProfileCommunicationEditor } from "./ProfileCommunicationEditor-C2RU-2QB.js";
5
- import { t as TemplatesTabs } from "./TemplatesTabs-zf4YhStd.js";
6
+ import { t as TemplatesTabs } from "./TemplatesTabs-CcRxZhJe.js";
6
7
  import { useState } from "react";
7
8
  import { useRouter } from "@tanstack/react-router";
8
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -20,56 +21,62 @@ function ProfilesPage() {
20
21
  }
21
22
  await router.invalidate();
22
23
  }
23
- return /* @__PURE__ */ jsxs("div", { children: [
24
- /* @__PURE__ */ jsx(TemplatesTabs, {}),
25
- /* @__PURE__ */ jsx("h1", { children: "agent templates" }),
26
- /* @__PURE__ */ jsx("p", {
27
- className: "muted",
28
- children: "An agent template is a spawn template — SOUL/IDENTITY templates, a default model, a skills policy. Agents choose a Team at spawn time, independent of their Agent template."
29
- }),
30
- /* @__PURE__ */ jsx(CreateProfileForm, {
31
- modelGroups,
32
- skills,
33
- templates,
34
- onCreated: () => router.invalidate()
35
- }),
36
- /* @__PURE__ */ jsxs("table", { children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
37
- /* @__PURE__ */ jsx("th", { children: "id" }),
38
- /* @__PURE__ */ jsx("th", { children: "name" }),
39
- /* @__PURE__ */ jsx("th", { children: "model" }),
40
- /* @__PURE__ */ jsx("th", { children: "agents" }),
41
- /* @__PURE__ */ jsx("th", { children: "skills" }),
42
- /* @__PURE__ */ jsx("th", {})
43
- ] }) }), /* @__PURE__ */ jsxs("tbody", { children: [profiles.length === 0 && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
44
- colSpan: 6,
45
- className: "muted",
46
- children: "no agent templates yet"
47
- }) }), profiles.map((p) => {
48
- const skillsLabel = p.skillsMode === "all" ? "all" : p.defaultSkills.length === 0 ? "—" : p.defaultSkills.join(", ");
49
- return /* @__PURE__ */ jsxs("tr", { children: [
50
- /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("a", {
51
- href: `/templates/agents/${p.id}`,
52
- children: /* @__PURE__ */ jsx("code", { children: p.id })
53
- }) }),
54
- /* @__PURE__ */ jsx("td", { children: p.name }),
55
- /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("code", { children: p.defaultModel }) }),
56
- /* @__PURE__ */ jsx("td", { children: p.agentCount }),
57
- /* @__PURE__ */ jsx("td", {
58
- className: "text-xs text-mocha-light",
59
- children: skillsLabel
60
- }),
61
- /* @__PURE__ */ jsx("td", { children: p.agentCount === 0 ? /* @__PURE__ */ jsx(Button, {
62
- variant: "danger",
63
- onClick: () => del(p.id),
64
- children: "delete"
65
- }) : /* @__PURE__ */ jsx("span", {
24
+ return /* @__PURE__ */ jsxs(PageShell, {
25
+ size: "wide",
26
+ children: [
27
+ /* @__PURE__ */ jsx(PageHeader, {
28
+ eyebrow: "Templates",
29
+ title: "Agent templates",
30
+ description: "Define reusable identity, model, skills, and communication defaults for newly spawned agents."
31
+ }),
32
+ /* @__PURE__ */ jsx(TemplatesTabs, {}),
33
+ /* @__PURE__ */ jsx(CreateProfileForm, {
34
+ modelGroups,
35
+ skills,
36
+ templates,
37
+ onCreated: () => router.invalidate()
38
+ }),
39
+ /* @__PURE__ */ jsx("div", {
40
+ className: "overflow-x-auto",
41
+ children: /* @__PURE__ */ jsxs("table", { children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
42
+ /* @__PURE__ */ jsx("th", { children: "id" }),
43
+ /* @__PURE__ */ jsx("th", { children: "name" }),
44
+ /* @__PURE__ */ jsx("th", { children: "model" }),
45
+ /* @__PURE__ */ jsx("th", { children: "agents" }),
46
+ /* @__PURE__ */ jsx("th", { children: "skills" }),
47
+ /* @__PURE__ */ jsx("th", {})
48
+ ] }) }), /* @__PURE__ */ jsxs("tbody", { children: [profiles.length === 0 && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
49
+ colSpan: 6,
66
50
  className: "muted",
67
- title: `${p.agentCount} agent(s) use this profile`,
68
- children: "in use"
69
- }) })
70
- ] }, p.id);
71
- })] })] })
72
- ] });
51
+ children: "no agent templates yet"
52
+ }) }), profiles.map((p) => {
53
+ const skillsLabel = p.skillsMode === "all" ? "all" : p.defaultSkills.length === 0 ? "—" : p.defaultSkills.join(", ");
54
+ return /* @__PURE__ */ jsxs("tr", { children: [
55
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("a", {
56
+ href: `/templates/agents/${p.id}`,
57
+ children: /* @__PURE__ */ jsx("code", { children: p.id })
58
+ }) }),
59
+ /* @__PURE__ */ jsx("td", { children: p.name }),
60
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("code", { children: p.defaultModel }) }),
61
+ /* @__PURE__ */ jsx("td", { children: p.agentCount }),
62
+ /* @__PURE__ */ jsx("td", {
63
+ className: "text-xs text-mocha-light",
64
+ children: skillsLabel
65
+ }),
66
+ /* @__PURE__ */ jsx("td", { children: p.agentCount === 0 ? /* @__PURE__ */ jsx(Button, {
67
+ variant: "danger",
68
+ onClick: () => del(p.id),
69
+ children: "delete"
70
+ }) : /* @__PURE__ */ jsx("span", {
71
+ className: "muted",
72
+ title: `${p.agentCount} agent(s) use this profile`,
73
+ children: "in use"
74
+ }) })
75
+ ] }, p.id);
76
+ })] })] })
77
+ })
78
+ ]
79
+ });
73
80
  }
74
81
  function CreateProfileForm({ modelGroups, skills, templates, onCreated }) {
75
82
  const [tab, setTab] = useState("basics");
@@ -84,8 +91,6 @@ function CreateProfileForm({ modelGroups, skills, templates, onCreated }) {
84
91
  const [enableAgents, setEnableAgents] = useState(true);
85
92
  const [toolsTpl, setToolsTpl] = useState(templates.tools);
86
93
  const [enableTools, setEnableTools] = useState(true);
87
- const [heartbeatTpl, setHeartbeatTpl] = useState(templates.heartbeat);
88
- const [enableHeartbeat, setEnableHeartbeat] = useState(false);
89
94
  function setTemplateEnabled(key, setter, on) {
90
95
  setter(on);
91
96
  if (!on && tab === key) setTab("basics");
@@ -127,7 +132,6 @@ function CreateProfileForm({ modelGroups, skills, templates, onCreated }) {
127
132
  bootstrap: enableBootstrap ? bootstrap : null,
128
133
  agents: enableAgents ? agentsTpl : null,
129
134
  tools: enableTools ? toolsTpl : null,
130
- heartbeat: enableHeartbeat ? heartbeatTpl : null,
131
135
  communicationDefaults: communication
132
136
  };
133
137
  const res = await fetch("/api/profiles", {
@@ -147,8 +151,6 @@ function CreateProfileForm({ modelGroups, skills, templates, onCreated }) {
147
151
  setEnableAgents(true);
148
152
  setToolsTpl(templates.tools);
149
153
  setEnableTools(true);
150
- setHeartbeatTpl(templates.heartbeat);
151
- setEnableHeartbeat(false);
152
154
  setPicked(/* @__PURE__ */ new Set());
153
155
  setSkillsMode("all");
154
156
  setCommunication(DEFAULT_PROFILE_COMMUNICATION);
@@ -198,11 +200,6 @@ function CreateProfileForm({ modelGroups, skills, templates, onCreated }) {
198
200
  label: "TOOLS",
199
201
  disabled: !enableTools
200
202
  },
201
- {
202
- id: "heartbeat",
203
- label: "HEARTBEAT",
204
- disabled: !enableHeartbeat
205
- },
206
203
  {
207
204
  id: "skills",
208
205
  label: "skills"
@@ -266,14 +263,6 @@ function CreateProfileForm({ modelGroups, skills, templates, onCreated }) {
266
263
  checked: enableTools,
267
264
  onChange: (e) => setTemplateEnabled("tools", setEnableTools, e.target.checked)
268
265
  }), "TOOLS.md"]
269
- }),
270
- /* @__PURE__ */ jsxs("label", {
271
- className: "inline-flex cursor-pointer items-center gap-1.5",
272
- children: [/* @__PURE__ */ jsx("input", {
273
- type: "checkbox",
274
- checked: enableHeartbeat,
275
- onChange: (e) => setTemplateEnabled("heartbeat", setEnableHeartbeat, e.target.checked)
276
- }), "HEARTBEAT.md"]
277
266
  })
278
267
  ]
279
268
  }),
@@ -362,13 +351,6 @@ function CreateProfileForm({ modelGroups, skills, templates, onCreated }) {
362
351
  onChange: setToolsTpl,
363
352
  rows: 14
364
353
  }),
365
- tab === "heartbeat" && /* @__PURE__ */ jsx(TemplateTab, {
366
- label: "HEARTBEAT.md",
367
- hint: "Optional checklist run on scheduled wake-ups. Pair with an interval/cron trigger.",
368
- value: heartbeatTpl,
369
- onChange: setHeartbeatTpl,
370
- rows: 12
371
- }),
372
354
  tab === "skills" && /* @__PURE__ */ jsxs("div", { children: [
373
355
  /* @__PURE__ */ jsx("p", {
374
356
  className: "muted my-2",
@@ -1,5 +1,5 @@
1
1
  import { t as createServerFn } from "../server.js";
2
- import { t as createServerRpc } from "./createServerRpc-CeKECg65.js";
2
+ import { t as createServerRpc } from "./createServerRpc-pU-IQV2Y.js";
3
3
  import { n as daemonClient } from "./daemon-client-2NRMzlTr.js";
4
4
  //#region src/routes/approvals/index.tsx?tss-serverfn-split
5
5
  var loadApprovals_createServerFn_handler = createServerRpc({
@@ -1,9 +1,9 @@
1
1
  import { t as createServerFn } from "../server.js";
2
- import { t as createSsrRpc } from "./createSsrRpc-ZBGxhl8t.js";
2
+ import { t as createSsrRpc } from "./createSsrRpc-DFsIAfFd.js";
3
3
  import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
4
4
  //#region src/routes/approvals/index.tsx
5
5
  var $$splitErrorComponentImporter = () => import("./approvals-CbFXFvG8.js");
6
- var $$splitComponentImporter = () => import("./approvals-DHgARzd8.js");
6
+ var $$splitComponentImporter = () => import("./approvals-DCaVw1Mz.js");
7
7
  var loadApprovals = createServerFn({ method: "GET" }).handler(createSsrRpc("816fcbc7b3c7f2952660d3a2c8f49bb0c91084627a284c185b333b1d418fadf8"));
8
8
  var Route = createFileRoute("/approvals/")({
9
9
  loader: () => loadApprovals(),