bazilion 0.52.0 → 0.53.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 (191) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/cli.js.map +1 -1
  3. package/dist/web/client/assets/AddProviderDialog-CO_uijWF.js +1 -0
  4. package/dist/web/client/assets/AgentTemplateParts-Dl35c-Ux.js +1 -0
  5. package/dist/web/client/assets/ConfigPage-DiQiJXP6.js +1 -0
  6. package/dist/web/client/assets/ConfirmDialog-BVytx3kN.js +1 -0
  7. package/dist/web/client/assets/ConnectionsView-DDrBaiLg.js +1 -0
  8. package/dist/web/client/assets/Dialog-BTDzv3J5.js +1 -0
  9. package/dist/web/client/assets/ManagePage-xlePXXx5.js +1 -0
  10. package/dist/web/client/assets/SectionTabs-BMiRKFfb.js +1 -0
  11. package/dist/web/client/assets/Segmented-Co4n2C5X.js +1 -0
  12. package/dist/web/client/assets/SpawnDialog-ejwXnyxy.js +1 -0
  13. package/dist/web/client/assets/SpawnTeamModal-Cp-nAvIC.js +1 -0
  14. package/dist/web/client/assets/TeamForm-Cz9uDVvb.js +1 -0
  15. package/dist/web/client/assets/TeamThread-D8xqE_gb.js +1 -0
  16. package/dist/web/client/assets/UnsavedChangesGuard-DmT4nBQU.js +1 -0
  17. package/dist/web/client/assets/_id-DEQxwq2v.js +1 -0
  18. package/dist/web/client/assets/_id-DSRgpxEc.js +1 -0
  19. package/dist/web/client/assets/access-34_ShgHU.js +1 -0
  20. package/dist/web/client/assets/agent-actions--EO4yJ4Q.js +1 -0
  21. package/dist/web/client/assets/agents-C87yBHaR.js +1 -0
  22. package/dist/web/client/assets/agents-DvCSl1Ro.js +1 -0
  23. package/dist/web/client/assets/api-CoLs57oO.js +1 -0
  24. package/dist/web/client/assets/arrow-right-BhTWtC9z.js +1 -0
  25. package/dist/web/client/assets/attention-CteEeRvX.js +1 -0
  26. package/dist/web/client/assets/chevron-right-BqOIX9UM.js +1 -0
  27. package/dist/web/client/assets/config-XJuQeEP4.js +1 -0
  28. package/dist/web/client/assets/createLucideIcon-dN8ooBD1.js +1 -0
  29. package/dist/web/client/assets/download-Dj-1ltZb.js +1 -0
  30. package/dist/web/client/assets/file-text-DiP-LaEg.js +1 -0
  31. package/dist/web/client/assets/form-Bvr_f9lR.js +1 -0
  32. package/dist/web/client/assets/images-BKjyhYUc.js +1 -0
  33. package/dist/web/client/assets/index-J_Uqj4md.js +54 -0
  34. package/dist/web/client/assets/key-round-QpqZklz6.js +1 -0
  35. package/dist/web/client/assets/list-checks-BeyG5SVQ.js +1 -0
  36. package/dist/web/client/assets/login-076Bc601.js +1 -0
  37. package/dist/web/client/assets/manage-CsrV2hhK.js +1 -0
  38. package/dist/web/client/assets/mcp-8N0BqZ0G.js +1 -0
  39. package/dist/web/client/assets/message-square-DnpSOYv4.js +1 -0
  40. package/dist/web/client/assets/network-BC7rNaOC.js +1 -0
  41. package/dist/web/client/assets/parts-B0JBolvG.js +1 -0
  42. package/dist/web/client/assets/plus-DZ3KVo7E.js +1 -0
  43. package/dist/web/client/assets/routes-3HkZZOOe.js +76 -0
  44. package/dist/web/client/assets/skills-DiaqZRXT.js +1 -0
  45. package/dist/web/client/assets/square-terminal-hQZ6pexU.js +1 -0
  46. package/dist/web/client/assets/style-BtcFIkOS.js +7 -0
  47. package/dist/web/client/assets/styles-C7Ztw15K.css +2 -0
  48. package/dist/web/client/assets/system-YWlJ8ogO.js +1 -0
  49. package/dist/web/client/assets/teams-DQwceMvk.js +1 -0
  50. package/dist/web/client/assets/teams-DTC3plIH.js +1 -0
  51. package/dist/web/client/assets/telegram-D4wINntt.js +1 -0
  52. package/dist/web/client/assets/tools-CZeQ9pDx.js +1 -0
  53. package/dist/web/client/assets/use-resource-BaTkTGvG.js +1 -0
  54. package/dist/web/client/assets/welcome-CnxP_RCk.js +1 -0
  55. package/dist/web/client/assets/wrench-BrwBswfo.js +1 -0
  56. package/dist/web/server/assets/{AddProviderDialog-Tn4AskPm.js → AddProviderDialog-Di5crZUB.js} +105 -4
  57. package/dist/web/server/assets/AgentTemplateParts-Cqy7kSzx.js +269 -0
  58. package/dist/web/server/assets/{ConfigPage-DqDUujmt.js → ConfigPage-oXM3wyOU.js} +2 -2
  59. package/dist/web/server/assets/{ConnectionsView-DAG-zNBz.js → ConnectionsView-DZrLoNoW.js} +3 -3
  60. package/dist/web/server/assets/ManagePage-0LKHEcT_.js +29 -0
  61. package/dist/web/server/assets/{ModelMenu-DUY9aHkE.js → ModelMenu-BAZeARx6.js} +3 -3
  62. package/dist/web/server/assets/{Rail-BIC_4ptO.js → Rail-7JU6ly2O.js} +14 -104
  63. package/dist/web/server/assets/{SectionTabs-BGsrf-UQ.js → SectionTabs-CWQ5orUW.js} +9 -2
  64. package/dist/web/server/assets/{SpawnDialog-D_SMPCG_.js → SpawnDialog-CYkwzETs.js} +49 -57
  65. package/dist/web/server/assets/SpawnTeamModal-CCe6P82H.js +127 -0
  66. package/dist/web/server/assets/TeamForm-BzQmdhVi.js +141 -0
  67. package/dist/web/server/assets/{TeamThread-DuLlGDcw.js → TeamThread-SyQpUvz5.js} +1 -1
  68. package/dist/web/server/assets/_id-AcyGvFrE.js +400 -0
  69. package/dist/web/server/assets/{_id-DJnYgisy.js → _id-BGTgqsWm.js} +8 -4
  70. package/dist/web/server/assets/{_id-TVruGcOd.js → _id-BKzOw78O.js} +11 -3
  71. package/dist/web/server/assets/{_id-yN0z7VqE.js → _id-DPGzfmjG.js} +255 -203
  72. package/dist/web/server/assets/_id-DXm9W55C.js +16 -0
  73. package/dist/web/server/assets/_id-DojvxRZn.js +39 -0
  74. package/dist/web/server/assets/_tanstack-start-manifest_v-D7RvKGRH.js +285 -0
  75. package/dist/web/server/assets/{access-GMGed5O8.js → access-BJe-NduL.js} +2 -2
  76. package/dist/web/server/assets/access-CKSW7MFH.js +297 -0
  77. package/dist/web/server/assets/{access-C_pupPks.js → access-WWspT0v4.js} +2 -1
  78. package/dist/web/server/assets/agent-actions-CUDMCG0F.js +20 -0
  79. package/dist/web/server/assets/agents-1sjSvp5p.js +12 -0
  80. package/dist/web/server/assets/{agents-BnWgFo6o.js → agents-6d9WxbYF.js} +9 -6
  81. package/dist/web/server/assets/agents-DKVGUwD1.js +31 -0
  82. package/dist/web/server/assets/agents-DUI4Yjtg.js +13 -0
  83. package/dist/web/server/assets/agents-DsHeRaLq.js +327 -0
  84. package/dist/web/server/assets/agents-DtLDoZ_u.js +136 -0
  85. package/dist/web/server/assets/{attention-Cr7puThv.js → attention-B6sSDR_4.js} +2 -1
  86. package/dist/web/server/assets/{attention-DS3O9UmJ.js → attention-DefKwvgm.js} +2 -2
  87. package/dist/web/server/assets/attention-johfkM0_.js +203 -0
  88. package/dist/web/server/assets/{config-Q7livfa3.js → config-Clz57LuN.js} +33 -82
  89. package/dist/web/server/assets/{config-DjTGA4iZ.js → config-DYAaaE9Z.js} +2 -2
  90. package/dist/web/server/assets/{createSsrRpc-GCCF14VW.js → createSsrRpc-BijMHgqE.js} +1 -45
  91. package/dist/web/server/assets/form-BRQAsKKq.js +319 -0
  92. package/dist/web/server/assets/manage-Ppyi3Y5y.js +230 -0
  93. package/dist/web/server/assets/mcp-Ce6O8Qs2.js +378 -0
  94. package/dist/web/server/assets/{mcp-ZARSOxZW.js → mcp-DB38leWS.js} +2 -2
  95. package/dist/web/server/assets/parts-mabERIJZ.js +380 -0
  96. package/dist/web/server/assets/{router-Dh2-IvLL.js → router-C97bwlXi.js} +35 -30
  97. package/dist/web/server/assets/{routes-C9NawqcV.js → routes-C4aGqXfr.js} +52 -8
  98. package/dist/web/server/assets/{routes-CDskMy5C.js → routes-DuOShl4q.js} +1 -1
  99. package/dist/web/server/assets/{routes-BJIJWCIE.js → routes-IHMVKpDK.js} +2 -2
  100. package/dist/web/server/assets/{skills-StN15QhC.js → skills-B7sg0QKS.js} +2 -2
  101. package/dist/web/server/assets/{skills-h5aHa7Q8.js → skills-DWzlT_hC.js} +9 -1
  102. package/dist/web/server/assets/skills-hfTSwqsG.js +353 -0
  103. package/dist/web/server/assets/{style-GYDODk2F.js → style-BR7ufS6Z.js} +1 -1
  104. package/dist/web/server/assets/system-CNQpt3JB.js +145 -0
  105. package/dist/web/server/assets/{system-DtswhLW6.js → system-D3th6n2E.js} +4 -2
  106. package/dist/web/server/assets/{system-Dl-1RhoP.js → system-DaP0ol67.js} +2 -2
  107. package/dist/web/server/assets/{teams-CbIPKf99.js → teams-4cEZ4_rw.js} +4 -2
  108. package/dist/web/server/assets/{teams-BxnvFTyn.js → teams-70u1XQTr.js} +1 -3
  109. package/dist/web/server/assets/teams-BKHe67f3.js +176 -0
  110. package/dist/web/server/assets/{teams-YrmyutM4.js → teams-BopOP4x7.js} +8 -1
  111. package/dist/web/server/assets/teams-C3xwTz8-.js +219 -0
  112. package/dist/web/server/assets/{teams-5PMGvHuM.js → teams-CuKE5iAK.js} +2 -2
  113. package/dist/web/server/assets/{telegram-Cv0D4gyz.js → telegram-BnQADwnj.js} +2 -2
  114. package/dist/web/server/assets/telegram-BpmK-HHV.js +1059 -0
  115. package/dist/web/server/assets/{tools-ioJcPzMW.js → tools-BQeWn7Tj.js} +2 -2
  116. package/dist/web/server/assets/{tools-OfD22R-C.js → tools-CURTfG2q.js} +56 -217
  117. package/dist/web/server/assets/{welcome-FFEbrNT1.js → welcome-OiZCAIHZ.js} +3 -4
  118. package/dist/web/server/assets/{welcome-jxmpE_Jb.js → welcome-SNsE49JO.js} +2 -2
  119. package/dist/web/server/server.js +20 -20
  120. package/package.json +1 -1
  121. package/dist/web/client/assets/AddProviderDialog-BiGLKnu2.js +0 -1
  122. package/dist/web/client/assets/ConfigPage-DvBzy2MN.js +0 -1
  123. package/dist/web/client/assets/ConfirmDialog-CiZ5tk9R.js +0 -1
  124. package/dist/web/client/assets/ConnectionsView-Czkpm2JY.js +0 -1
  125. package/dist/web/client/assets/Dialog-s_kPtI-W.js +0 -1
  126. package/dist/web/client/assets/ModelMenu-BfUPoRjV.js +0 -1
  127. package/dist/web/client/assets/SectionTabs-DENNb6Nw.js +0 -1
  128. package/dist/web/client/assets/Segmented-Dh77vmpp.js +0 -1
  129. package/dist/web/client/assets/SkillFindings-Xng11qqx.js +0 -1
  130. package/dist/web/client/assets/SkillsPicker-hI3YXvib.js +0 -1
  131. package/dist/web/client/assets/SpawnDialog-CKWFQ6jk.js +0 -1
  132. package/dist/web/client/assets/Tabs-f6bHvCGn.js +0 -1
  133. package/dist/web/client/assets/TeamForm-kda1HYZG.js +0 -1
  134. package/dist/web/client/assets/TeamThread-2rm1JGSk.js +0 -1
  135. package/dist/web/client/assets/UnsavedChangesGuard-nx6dv2Yw.js +0 -1
  136. package/dist/web/client/assets/_id-B72mIpcE.js +0 -1
  137. package/dist/web/client/assets/_id-Bzavnza1.js +0 -1
  138. package/dist/web/client/assets/access-Yw9jODuk.js +0 -1
  139. package/dist/web/client/assets/agents-C9xoyL7o.js +0 -1
  140. package/dist/web/client/assets/agents-TviG16wx.js +0 -1
  141. package/dist/web/client/assets/api-HC_YzjBy.js +0 -1
  142. package/dist/web/client/assets/arrow-right-Gm_FDWJ_.js +0 -1
  143. package/dist/web/client/assets/attention-DmURtlJm.js +0 -1
  144. package/dist/web/client/assets/check-BjgKoGvU.js +0 -1
  145. package/dist/web/client/assets/chevron-right-CUZiA2aG.js +0 -1
  146. package/dist/web/client/assets/config-UZz_mjO5.js +0 -1
  147. package/dist/web/client/assets/createLucideIcon-C6gOo8sD.js +0 -1
  148. package/dist/web/client/assets/dist-BWppw70N.js +0 -41
  149. package/dist/web/client/assets/dist-D2dwY7MR.js +0 -1
  150. package/dist/web/client/assets/index-Df1oUtAP.js +0 -14
  151. package/dist/web/client/assets/link-Cbztlp_R.js +0 -1
  152. package/dist/web/client/assets/login-CPfdaqsV.js +0 -1
  153. package/dist/web/client/assets/mcp-FlYnNon0.js +0 -1
  154. package/dist/web/client/assets/parts-tIDBNsYA.js +0 -1
  155. package/dist/web/client/assets/plus-CWrKMtvA.js +0 -1
  156. package/dist/web/client/assets/routes-BZaWCoQj.js +0 -76
  157. package/dist/web/client/assets/save-f9O-CQia.js +0 -1
  158. package/dist/web/client/assets/skills-C7yDPC8s.js +0 -1
  159. package/dist/web/client/assets/style-DDuTFJUu.js +0 -7
  160. package/dist/web/client/assets/styles-BviXU81u.css +0 -2
  161. package/dist/web/client/assets/system-CL3Kz36L.js +0 -1
  162. package/dist/web/client/assets/teams-CQTEF5gV.js +0 -1
  163. package/dist/web/client/assets/teams-DQ7SqVyF.js +0 -1
  164. package/dist/web/client/assets/telegram-BLgxtGhZ.js +0 -1
  165. package/dist/web/client/assets/tools-pOQyGVYo.js +0 -1
  166. package/dist/web/client/assets/use-resource-C3MBZJop.js +0 -1
  167. package/dist/web/client/assets/welcome-Hr6JpMef.js +0 -1
  168. package/dist/web/client/assets/wrench-6BEIqKDn.js +0 -1
  169. package/dist/web/server/assets/SkillFindings-BdATze1A.js +0 -46
  170. package/dist/web/server/assets/SkillsPicker-DlqEfRWh.js +0 -67
  171. package/dist/web/server/assets/Tabs-BhF41MfQ.js +0 -20
  172. package/dist/web/server/assets/TeamForm-ilBaeLI4.js +0 -96
  173. package/dist/web/server/assets/_id-BsZcsabI.js +0 -383
  174. package/dist/web/server/assets/_id-D8Kj0F30.js +0 -18
  175. package/dist/web/server/assets/_id-QYifTM9w.js +0 -28
  176. package/dist/web/server/assets/_tanstack-start-manifest_v-D6zrzUC7.js +0 -223
  177. package/dist/web/server/assets/access-DKOpcHIJ.js +0 -232
  178. package/dist/web/server/assets/agents-B6OR3x99.js +0 -327
  179. package/dist/web/server/assets/agents-B7642eRO.js +0 -130
  180. package/dist/web/server/assets/agents-BJ-_oC2e.js +0 -14
  181. package/dist/web/server/assets/agents-CjV0w-Zy.js +0 -12
  182. package/dist/web/server/assets/agents-Dy_Q-9lG.js +0 -27
  183. package/dist/web/server/assets/attention-CLP4HYBz.js +0 -216
  184. package/dist/web/server/assets/mcp-BI-FD-JI.js +0 -250
  185. package/dist/web/server/assets/parts-B31PJkhi.js +0 -190
  186. package/dist/web/server/assets/skills-BqLq3ZXq.js +0 -275
  187. package/dist/web/server/assets/system-BtRA2HUs.js +0 -138
  188. package/dist/web/server/assets/teams-COaU0wN9.js +0 -108
  189. package/dist/web/server/assets/teams-Ca8W4mvl.js +0 -88
  190. package/dist/web/server/assets/telegram-Yx8nm6Ei.js +0 -984
  191. /package/dist/web/server/assets/{telegram-CGol0CKX2.js → telegram-CGol0CKX.js} +0 -0
@@ -1,13 +1,18 @@
1
1
  import { C as api, T as errorMessage, u as Button } from "./workspace-DaitCM0t.js";
2
- import { a as endpointLabel, d as templateDocument, f as templateInput, i as edgeKey, l as sameDocument, n as OUTSIDE, o as hasEdge, r as defaultPosition, t as TeamPolicyMatrix, u as setEdge } from "./style-GYDODk2F.js";
2
+ import { a as endpointLabel, d as templateDocument, f as templateInput, i as edgeKey, l as sameDocument, n as OUTSIDE, o as hasEdge, r as defaultPosition, t as TeamPolicyMatrix, u as setEdge } from "./style-BR7ufS6Z.js";
3
3
  import { t as ConfirmDialog } from "./ConfirmDialog-DfaJ--A6.js";
4
+ import { t as Segmented } from "./Segmented-3ZLdqa5U.js";
4
5
  import { t as UnsavedChangesGuard } from "./UnsavedChangesGuard-DrOvPV14.js";
5
- import { o as PageShell } from "./createSsrRpc-GCCF14VW.js";
6
- import { t as Route } from "./_id-DJnYgisy.js";
7
- import { n as SectionTabs, r as TEMPLATE_TABS } from "./SectionTabs-BGsrf-UQ.js";
6
+ import { _ as RowMenu, g as Notice } from "./parts-mabERIJZ.js";
7
+ import { c as SwitchRow, l as TextField, s as SelectField } from "./form-BRQAsKKq.js";
8
+ import { s as count } from "./manage-Ppyi3Y5y.js";
9
+ import { t as SpawnTeamModal } from "./SpawnTeamModal-CCe6P82H.js";
10
+ import { t as Route } from "./_id-BGTgqsWm.js";
11
+ import { t as ManagePage } from "./ManagePage-0LKHEcT_.js";
8
12
  import { useEffect, useMemo, useState } from "react";
13
+ import { useNavigate, useRouter } from "@tanstack/react-router";
9
14
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
10
- import { Bot, CircleAlert, Globe2, ListTree, Plus, Save, ShieldAlert, TableProperties, X } from "lucide-react";
15
+ import { Bot, CircleAlert, Globe2, Plus, ShieldAlert } from "lucide-react";
11
16
  import { Background, BackgroundVariant, Controls, Handle, MarkerType, MiniMap, Position, ReactFlow, useNodesState } from "@xyflow/react";
12
17
  //#region src/components/team-policy/TeamPolicyFlow.tsx
13
18
  function AgentNode({ data, selected }) {
@@ -36,16 +41,16 @@ function AgentNode({ data, selected }) {
36
41
  children: data.member.name
37
42
  }), /* @__PURE__ */ jsx("span", {
38
43
  className: "mt-0.5 flex items-center gap-1.5 truncate text-[0.68rem] text-mocha-light",
39
- children: "slot"
44
+ children: data.subtitle
40
45
  })]
41
46
  }),
42
47
  data.isolated && /* @__PURE__ */ jsx(ShieldAlert, {
43
48
  className: "h-4 w-4 flex-none text-[#a56568]",
44
- "aria-label": "No allow edges"
49
+ "aria-label": "No connections"
45
50
  }),
46
51
  data.incomplete && /* @__PURE__ */ jsx(CircleAlert, {
47
52
  className: "h-4 w-4 flex-none text-warning",
48
- "aria-label": "Incomplete slot"
53
+ "aria-label": "No template"
49
54
  })
50
55
  ]
51
56
  }),
@@ -88,7 +93,8 @@ var NODE_TYPES = {
88
93
  agent: AgentNode,
89
94
  outside: OutsideNode
90
95
  };
91
- function TeamPolicyFlow({ document, selectedId, incompleteKeys, onSelect, onConnect, onRemoveEdge, onMoveMember, onOpenMember }) {
96
+ var NO_NAMES = {};
97
+ function TeamPolicyFlow({ document, selectedId, incompleteKeys, templateNames = NO_NAMES, onSelect, onConnect, onRemoveEdge, onMoveMember, onOpenMember }) {
92
98
  const computedNodes = useMemo(() => {
93
99
  return [{
94
100
  id: OUTSIDE,
@@ -111,10 +117,11 @@ function TeamPolicyFlow({ document, selectedId, incompleteKeys, onSelect, onConn
111
117
  position: member.position,
112
118
  data: {
113
119
  member,
120
+ subtitle: templateNames[member.profileId] ?? "No template",
114
121
  isolated,
115
122
  incomplete
116
123
  },
117
- ariaLabel: `${member.name}${isolated ? ", no allow edges" : ""}${incomplete ? ", incomplete" : ""}`,
124
+ ariaLabel: `${member.name}${isolated ? ", no connections" : ""}${incomplete ? ", no template" : ""}`,
118
125
  selected: selectedId === member.key,
119
126
  deletable: false
120
127
  };
@@ -122,7 +129,8 @@ function TeamPolicyFlow({ document, selectedId, incompleteKeys, onSelect, onConn
122
129
  }, [
123
130
  document,
124
131
  incompleteKeys,
125
- selectedId
132
+ selectedId,
133
+ templateNames
126
134
  ]);
127
135
  const [nodes, setNodes, onNodesChange] = useNodesState(computedNodes);
128
136
  useEffect(() => {
@@ -214,11 +222,11 @@ function TeamPolicyFlow({ document, selectedId, incompleteKeys, onSelect, onConn
214
222
  //#endregion
215
223
  //#region src/components/team-policy/TeamPolicyEditor.tsx
216
224
  var MODE_HELP = {
217
- open: "Members message each other freely; edges only matter for messages to and from other teams.",
218
- restricted: "Members message each other only along allow edges."
225
+ open: "Members message each other freely; connections only matter for messages to and from other Teams.",
226
+ restricted: "Members message each other only along connections."
219
227
  };
220
- /** A Team template's roster and allow edges, as a flow or a matrix. */
221
- function TeamPolicyEditor({ template, profiles }) {
228
+ /** A Team template's roster and connections, as a flow or a matrix. */
229
+ function TeamPolicyEditor({ template, profiles, onSaved, onDirtyChange }) {
222
230
  const [server, setServer] = useState(() => templateDocument(template));
223
231
  const [draft, setDraft] = useState(server);
224
232
  const [view, setView] = useState("flow");
@@ -227,7 +235,9 @@ function TeamPolicyEditor({ template, profiles }) {
227
235
  const [notice, setNotice] = useState(null);
228
236
  const [confirmDiscard, setConfirmDiscard] = useState(false);
229
237
  const dirty = !sameDocument(server, draft);
238
+ useEffect(() => onDirtyChange?.(dirty), [dirty, onDirtyChange]);
230
239
  const incomplete = useMemo(() => new Set(draft.members.filter((member) => !profiles.some((profile) => profile.id === member.profileId)).map((member) => member.key)), [draft.members, profiles]);
240
+ const templateNames = useMemo(() => Object.fromEntries(profiles.map((profile) => [profile.id, `${profile.name || profile.id} template`])), [profiles]);
231
241
  const toggle = (from, to, allowed) => setDraft((current) => setEdge(current, from, to, allowed));
232
242
  const save = async () => {
233
243
  setSaving(true);
@@ -240,9 +250,16 @@ function TeamPolicyEditor({ template, profiles }) {
240
250
  setServer(saved);
241
251
  setDraft(saved);
242
252
  setSelectedId(null);
243
- setNotice("Saved.");
253
+ setNotice({
254
+ text: "Saved.",
255
+ ok: true
256
+ });
257
+ await onSaved?.();
244
258
  } catch (error) {
245
- setNotice(errorMessage(error));
259
+ setNotice({
260
+ text: errorMessage(error),
261
+ ok: false
262
+ });
246
263
  } finally {
247
264
  setSaving(false);
248
265
  }
@@ -253,87 +270,77 @@ function TeamPolicyEditor({ template, profiles }) {
253
270
  subject: "Team template draft"
254
271
  }),
255
272
  /* @__PURE__ */ jsxs("section", {
256
- className: "overflow-hidden rounded-lg border border-frost bg-snow",
257
- "aria-label": "Team policy editor",
273
+ className: "min-w-0 overflow-hidden rounded-2xl border border-border bg-card shadow-baziu-sm",
274
+ "aria-label": "Roster and connections",
258
275
  children: [
259
276
  /* @__PURE__ */ jsxs("header", {
260
- className: "flex flex-wrap items-center gap-2 border-b border-frost bg-cream p-3",
277
+ className: "flex flex-wrap items-end gap-x-3 gap-y-3 border-b border-border px-4 py-4 sm:px-5",
261
278
  children: [
262
- /* @__PURE__ */ jsxs("div", {
263
- className: "mr-auto min-w-0",
264
- children: [/* @__PURE__ */ jsxs("label", {
265
- className: "m-0 text-xs",
266
- children: ["Template name", /* @__PURE__ */ jsx("input", {
267
- value: draft.name,
268
- onChange: (event) => {
269
- const name = event.target.value;
270
- setDraft((current) => ({
271
- ...current,
272
- name
273
- }));
274
- }
275
- })]
276
- }), /* @__PURE__ */ jsx("p", {
277
- className: "muted m-0 text-xs",
278
- children: MODE_HELP[draft.mode]
279
- })]
280
- }),
281
- /* @__PURE__ */ jsx("fieldset", {
282
- className: "m-0 flex min-w-0 rounded-md border border-frost bg-ivory p-0.5",
283
- "aria-label": "Policy mode",
284
- children: ["open", "restricted"].map((mode) => /* @__PURE__ */ jsx(Toggle, {
285
- active: draft.mode === mode,
286
- label: mode === "open" ? "Open" : "Restricted",
287
- onClick: () => setDraft((current) => ({
279
+ /* @__PURE__ */ jsx("div", {
280
+ className: "min-w-0 flex-1 basis-60",
281
+ children: /* @__PURE__ */ jsx(TextField, {
282
+ label: "Name",
283
+ value: draft.name,
284
+ disabled: saving,
285
+ className: "max-w-none",
286
+ onChange: (name) => setDraft((current) => ({
288
287
  ...current,
289
- mode
288
+ name
290
289
  }))
291
- }, mode))
290
+ })
292
291
  }),
293
- /* @__PURE__ */ jsxs("fieldset", {
294
- className: "m-0 flex min-w-0 rounded-md border border-frost bg-ivory p-0.5",
295
- "aria-label": "Editor view",
296
- children: [/* @__PURE__ */ jsx(Toggle, {
297
- active: view === "flow",
298
- label: "Flow",
299
- icon: /* @__PURE__ */ jsx(ListTree, { className: "h-4 w-4" }),
300
- onClick: () => setView("flow")
301
- }), /* @__PURE__ */ jsx(Toggle, {
302
- active: view === "matrix",
303
- label: "Matrix",
304
- icon: /* @__PURE__ */ jsx(TableProperties, { className: "h-4 w-4" }),
305
- onClick: () => setView("matrix")
292
+ /* @__PURE__ */ jsxs("div", {
293
+ className: "grid gap-1.5",
294
+ children: [/* @__PURE__ */ jsx("span", {
295
+ className: "text-sm font-semibold text-foreground",
296
+ children: "Messaging"
297
+ }), /* @__PURE__ */ jsx(Segmented, {
298
+ label: "Messaging",
299
+ value: draft.mode,
300
+ onChange: (mode) => setDraft((current) => ({
301
+ ...current,
302
+ mode
303
+ })),
304
+ options: [{
305
+ id: "open",
306
+ label: "Open"
307
+ }, {
308
+ id: "restricted",
309
+ label: "Restricted"
310
+ }]
306
311
  })]
307
312
  }),
308
- /* @__PURE__ */ jsx(Button, {
309
- variant: "ghost",
310
- disabled: !dirty || saving,
311
- onClick: () => setConfirmDiscard(true),
312
- children: "Discard"
313
+ /* @__PURE__ */ jsxs("div", {
314
+ className: "grid gap-1.5",
315
+ children: [/* @__PURE__ */ jsx("span", {
316
+ className: "text-sm font-semibold text-foreground",
317
+ children: "View"
318
+ }), /* @__PURE__ */ jsx(Segmented, {
319
+ label: "View",
320
+ value: view,
321
+ onChange: setView,
322
+ options: [{
323
+ id: "flow",
324
+ label: "Flow"
325
+ }, {
326
+ id: "matrix",
327
+ label: "Matrix"
328
+ }]
329
+ })]
313
330
  }),
314
- /* @__PURE__ */ jsxs(Button, {
315
- variant: "primary",
316
- disabled: !dirty || saving,
317
- onClick: save,
318
- children: [
319
- /* @__PURE__ */ jsx(Save, { className: "h-4 w-4" }),
320
- " ",
321
- saving ? "Saving…" : "Save"
322
- ]
331
+ /* @__PURE__ */ jsx("p", {
332
+ className: "m-0 basis-full text-sm text-muted-foreground",
333
+ children: MODE_HELP[draft.mode]
323
334
  })
324
335
  ]
325
336
  }),
326
- notice && /* @__PURE__ */ jsx("div", {
327
- role: "status",
328
- className: "border-b border-frost bg-ivory px-4 py-2 text-sm",
329
- children: notice
330
- }),
331
337
  /* @__PURE__ */ jsxs("div", {
332
338
  className: "grid min-h-[620px] grid-cols-1 lg:grid-cols-[minmax(0,1fr)_280px]",
333
339
  children: [/* @__PURE__ */ jsx("div", {
334
340
  className: "min-h-[480px] overflow-hidden",
335
341
  children: view === "flow" ? /* @__PURE__ */ jsx(TeamPolicyFlow, {
336
342
  document: draft,
343
+ templateNames,
337
344
  selectedId,
338
345
  incompleteKeys: incomplete,
339
346
  onSelect: setSelectedId,
@@ -354,7 +361,7 @@ function TeamPolicyEditor({ template, profiles }) {
354
361
  onToggle: toggle
355
362
  })
356
363
  }), /* @__PURE__ */ jsx("aside", {
357
- className: "border-t border-frost p-4 lg:border-l lg:border-t-0",
364
+ className: "border-t border-border p-4 lg:border-l lg:border-t-0",
358
365
  children: /* @__PURE__ */ jsx(Inspector, {
359
366
  document: draft,
360
367
  selectedId,
@@ -364,14 +371,36 @@ function TeamPolicyEditor({ template, profiles }) {
364
371
  onToggle: toggle
365
372
  })
366
373
  })]
374
+ }),
375
+ /* @__PURE__ */ jsxs("footer", {
376
+ className: "flex flex-wrap items-center gap-x-4 gap-y-2 border-t border-border px-4 py-4 sm:px-5",
377
+ children: [
378
+ /* @__PURE__ */ jsx(Button, {
379
+ variant: "primary",
380
+ disabled: !dirty || saving,
381
+ onClick: () => void save(),
382
+ children: saving ? "Saving…" : "Save"
383
+ }),
384
+ dirty && /* @__PURE__ */ jsx(Button, {
385
+ variant: "ghost",
386
+ disabled: saving,
387
+ onClick: () => setConfirmDiscard(true),
388
+ children: "Discard changes"
389
+ }),
390
+ /* @__PURE__ */ jsx("p", {
391
+ role: "status",
392
+ className: `m-0 min-w-0 flex-1 basis-56 text-sm font-medium ${notice && !notice.ok ? "text-warning" : dirty ? "text-warning" : notice ? "text-success" : "text-muted-foreground"}`,
393
+ children: notice && !notice.ok ? `Nothing was saved: ${notice.text}` : dirty ? "Not saved yet." : notice ? "Saved. Teams spawned from now on get this roster." : "Teams already spawned keep their own Agents and connections."
394
+ })
395
+ ]
367
396
  })
368
397
  ]
369
398
  }),
370
399
  /* @__PURE__ */ jsx(ConfirmDialog, {
371
400
  open: confirmDiscard,
372
- title: "Discard this Team template draft?",
373
- description: /* @__PURE__ */ jsx("p", { children: "This discards every unsaved change. The saved template stays as it is." }),
374
- confirmLabel: "discard draft",
401
+ title: "Discard your changes to this template?",
402
+ description: /* @__PURE__ */ jsx("p", { children: "The saved roster and connections stay as they are." }),
403
+ confirmLabel: "Discard changes",
375
404
  onConfirm: () => {
376
405
  setDraft(server);
377
406
  setSelectedId(null);
@@ -381,15 +410,6 @@ function TeamPolicyEditor({ template, profiles }) {
381
410
  })
382
411
  ] });
383
412
  }
384
- function Toggle({ active, label, icon, onClick }) {
385
- return /* @__PURE__ */ jsxs("button", {
386
- type: "button",
387
- "aria-pressed": active,
388
- onClick,
389
- className: `flex items-center gap-1 rounded px-2 py-1 text-xs ${active ? "bg-snow text-sapphire shadow-sm" : "text-mocha"}`,
390
- children: [icon, label]
391
- });
392
- }
393
413
  function Inspector({ document, selectedId, profiles, onDraft, onSelect, onToggle }) {
394
414
  const actors = [...document.members.map((member) => member.key), OUTSIDE];
395
415
  const edge = document.edges.find((item) => edgeKey(item.from, item.to) === selectedId);
@@ -403,55 +423,57 @@ function Inspector({ document, selectedId, profiles, onDraft, onSelect, onToggle
403
423
  } : item)
404
424
  }));
405
425
  if (edge) return /* @__PURE__ */ jsxs("div", {
406
- className: "space-y-3",
426
+ className: "grid gap-3",
407
427
  children: [
408
- /* @__PURE__ */ jsx("p", {
409
- className: "text-xs font-semibold uppercase text-mocha-light",
410
- children: "Allow edge"
428
+ /* @__PURE__ */ jsx("h3", {
429
+ className: "m-0 font-body text-sm font-semibold text-foreground",
430
+ children: "Connection"
411
431
  }),
412
432
  /* @__PURE__ */ jsxs("p", {
413
- className: "text-sm",
433
+ className: "m-0 text-sm",
414
434
  children: [
415
435
  endpointLabel(document, edge.from),
416
- " → ",
417
- endpointLabel(document, edge.to)
436
+ " may message ",
437
+ endpointLabel(document, edge.to),
438
+ "."
418
439
  ]
419
440
  }),
420
- /* @__PURE__ */ jsxs(Button, {
441
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, {
421
442
  variant: "danger",
422
443
  onClick: () => {
423
444
  onToggle(edge.from, edge.to, false);
424
445
  onSelect(null);
425
446
  },
426
- children: [/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), " Remove edge"]
427
- })
447
+ children: "Remove connection"
448
+ }) })
428
449
  ]
429
450
  });
430
451
  if (!selected) return /* @__PURE__ */ jsxs("div", {
431
- className: "space-y-4",
452
+ className: "grid gap-4",
432
453
  children: [
433
- /* @__PURE__ */ jsxs("div", { children: [
434
- /* @__PURE__ */ jsx("p", {
435
- className: "text-xs font-semibold uppercase text-mocha-light",
436
- children: "Summary"
437
- }),
438
- /* @__PURE__ */ jsxs("p", {
439
- className: "muted text-xs",
454
+ /* @__PURE__ */ jsxs("div", {
455
+ className: "grid gap-1",
456
+ children: [/* @__PURE__ */ jsxs("h3", {
457
+ className: "m-0 font-body text-sm font-semibold text-foreground",
440
458
  children: [
441
- document.members.length,
442
- " slots · ",
443
- document.edges.length,
444
- " allow edges"
459
+ document.members.length === 1 ? "1 Agent" : `${document.members.length} Agents`,
460
+ " ·",
461
+ " ",
462
+ document.edges.length === 1 ? "1 connection" : `${document.edges.length} connections`
445
463
  ]
464
+ }), /* @__PURE__ */ jsx("p", {
465
+ className: "m-0 text-sm text-muted-foreground",
466
+ children: "Select an Agent to choose who it may message, or drag from one Agent's dot to another. A message to another Team needs a connection to Other teams here, and one from Other teams in that Team."
467
+ })]
468
+ }),
469
+ /* @__PURE__ */ jsxs("div", { children: [
470
+ /* @__PURE__ */ jsx("label", {
471
+ htmlFor: "team-template-user-md",
472
+ className: "m-0 text-sm font-semibold text-foreground",
473
+ children: "USER.md"
446
474
  }),
447
- /* @__PURE__ */ jsx("p", {
448
- className: "muted mt-2 text-xs",
449
- children: "Select a node to edit who it may message. Drag from one node's handle to another to add an edge. Other teams need an edge to Other teams in the sender's Team and one from Other teams in the recipient's Team."
450
- })
451
- ] }),
452
- /* @__PURE__ */ jsxs("label", {
453
- className: "text-xs",
454
- children: ["USER.md for spawned Teams", /* @__PURE__ */ jsx("textarea", {
475
+ /* @__PURE__ */ jsx("textarea", {
476
+ id: "team-template-user-md",
455
477
  rows: 6,
456
478
  value: document.userMd ?? "",
457
479
  onChange: (event) => {
@@ -461,10 +483,14 @@ function Inspector({ document, selectedId, profiles, onDraft, onSelect, onToggle
461
483
  userMd: userMd || null
462
484
  }));
463
485
  },
464
- className: "font-mono text-[0.85em]"
465
- })]
466
- }),
467
- /* @__PURE__ */ jsxs(Button, {
486
+ className: "mt-1.5 font-mono text-[0.85em]"
487
+ }),
488
+ /* @__PURE__ */ jsx("span", {
489
+ className: "mt-1 block text-xs text-muted-foreground",
490
+ children: "What every Agent of a Team spawned from it knows about you."
491
+ })
492
+ ] }),
493
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(Button, {
468
494
  variant: "ghost",
469
495
  onClick: () => onDraft((current) => ({
470
496
  ...current,
@@ -475,60 +501,58 @@ function Inspector({ document, selectedId, profiles, onDraft, onSelect, onToggle
475
501
  position: defaultPosition(current.members.length)
476
502
  }]
477
503
  })),
478
- children: [/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4" }), " Add slot"]
479
- })
504
+ children: [/* @__PURE__ */ jsx(Plus, {
505
+ className: "size-4",
506
+ "aria-hidden": "true"
507
+ }), " Add an Agent"]
508
+ }) })
480
509
  ]
481
510
  });
511
+ const known = member && profiles.some((profile) => profile.id === member.profileId);
482
512
  return /* @__PURE__ */ jsxs("div", {
483
- className: "space-y-4",
513
+ className: "grid gap-4",
484
514
  children: [
485
- /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
486
- className: "text-xs font-semibold uppercase text-mocha-light",
487
- children: member ? "Slot" : "Boundary"
488
- }), /* @__PURE__ */ jsx("h3", {
489
- className: "mt-1 text-base",
490
- children: endpointLabel(document, selected)
491
- })] }),
492
- member && /* @__PURE__ */ jsxs("div", {
493
- className: "space-y-2",
494
- children: [/* @__PURE__ */ jsxs("label", {
495
- className: "text-xs",
496
- children: ["Agent name", /* @__PURE__ */ jsx("input", {
497
- value: member.name,
498
- onChange: (event) => updateMember({ name: event.target.value })
499
- })]
500
- }), /* @__PURE__ */ jsxs("label", {
501
- className: "text-xs",
502
- children: ["Agent template", /* @__PURE__ */ jsxs("select", {
503
- value: member.profileId,
504
- onChange: (event) => updateMember({ profileId: event.target.value }),
505
- children: [!profiles.some((profile) => profile.id === member.profileId) && /* @__PURE__ */ jsx("option", {
506
- value: member.profileId,
507
- children: member.profileId || "Select a template"
508
- }), profiles.map((profile) => /* @__PURE__ */ jsx("option", {
509
- value: profile.id,
510
- children: profile.name
511
- }, profile.id))]
512
- })]
513
- })]
515
+ /* @__PURE__ */ jsx("h3", {
516
+ className: "m-0 font-body text-sm font-semibold text-foreground",
517
+ children: member ? member.name || "Agent" : "Other teams"
514
518
  }),
515
- /* @__PURE__ */ jsxs("div", {
516
- className: "space-y-2",
517
- children: [/* @__PURE__ */ jsx("p", {
518
- className: "text-xs font-semibold",
519
- children: "May send to"
520
- }), actors.filter((target) => target !== selected).map((target) => {
521
- const allowed = hasEdge(document, selected, target);
522
- return /* @__PURE__ */ jsxs("button", {
523
- type: "button",
524
- "aria-pressed": allowed,
525
- onClick: () => onToggle(selected, target, !allowed),
526
- className: "flex w-full items-center justify-between rounded border border-frost p-2 text-xs",
527
- children: [/* @__PURE__ */ jsx("span", { children: endpointLabel(document, target) }), allowed ? "Allowed" : "Not allowed"]
528
- }, target);
529
- })]
519
+ member && /* @__PURE__ */ jsxs(Fragment$1, { children: [
520
+ /* @__PURE__ */ jsx(TextField, {
521
+ label: "Name",
522
+ value: member.name,
523
+ className: "max-w-none",
524
+ onChange: (name) => updateMember({ name })
525
+ }),
526
+ /* @__PURE__ */ jsx(SelectField, {
527
+ label: "Template",
528
+ value: member.profileId,
529
+ className: "max-w-none",
530
+ options: [...known ? [] : [{
531
+ value: member.profileId,
532
+ label: member.profileId || "Choose a template"
533
+ }], ...profiles.map((profile) => ({
534
+ value: profile.id,
535
+ label: profile.name || profile.id
536
+ }))],
537
+ onChange: (profileId) => updateMember({ profileId })
538
+ }),
539
+ !known && /* @__PURE__ */ jsx(Notice, {
540
+ tone: "warning",
541
+ children: "Choose a template: an Agent cannot be spawned without one."
542
+ })
543
+ ] }),
544
+ /* @__PURE__ */ jsxs("fieldset", {
545
+ className: "m-0 grid min-w-0 gap-3 border-0 p-0",
546
+ children: [/* @__PURE__ */ jsx("legend", {
547
+ className: "mb-2 p-0 text-sm font-semibold text-foreground",
548
+ children: "May message"
549
+ }), actors.filter((target) => target !== selected).map((target) => /* @__PURE__ */ jsx(SwitchRow, {
550
+ label: endpointLabel(document, target),
551
+ checked: hasEdge(document, selected, target),
552
+ onChange: (allowed) => onToggle(selected, target, allowed)
553
+ }, target))]
530
554
  }),
531
- member && /* @__PURE__ */ jsxs(Button, {
555
+ member && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, {
532
556
  variant: "danger",
533
557
  onClick: () => {
534
558
  onDraft((current) => ({
@@ -538,49 +562,77 @@ function Inspector({ document, selectedId, profiles, onDraft, onSelect, onToggle
538
562
  }));
539
563
  onSelect(null);
540
564
  },
541
- children: [/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), " Remove slot and its edges"]
542
- })
565
+ children: "Remove this Agent"
566
+ }) })
543
567
  ]
544
568
  });
545
569
  }
546
570
  //#endregion
547
571
  //#region src/routes/templates/teams/$id/index.tsx?tsr-split=component
548
572
  function TeamTemplatePage() {
549
- const { template, profiles } = Route.useLoaderData();
550
- const [confirmDelete, setConfirmDelete] = useState(false);
551
- return /* @__PURE__ */ jsxs(PageShell, {
552
- size: "wide",
573
+ const { template, profiles, teams } = Route.useLoaderData();
574
+ const navigate = useNavigate();
575
+ const router = useRouter();
576
+ const [spawning, setSpawning] = useState(false);
577
+ const [deleting, setDeleting] = useState(false);
578
+ const [unsaved, setUnsaved] = useState(false);
579
+ return /* @__PURE__ */ jsxs(ManagePage, {
580
+ title: template.name,
581
+ description: `A roster of ${count(template.slots.length, "Agent")} and ${count(template.edges.length, "connection")}. Spawning it creates them in a new Team or one that exists; Teams already spawned keep their own.`,
582
+ actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
583
+ variant: "primary",
584
+ disabled: template.slots.length === 0 || unsaved,
585
+ "aria-describedby": unsaved ? "spawn-needs-save" : void 0,
586
+ onClick: () => setSpawning(true),
587
+ children: "Spawn this Team"
588
+ }), /* @__PURE__ */ jsx(RowMenu, {
589
+ label: `More for ${template.name}`,
590
+ items: [{
591
+ label: "Delete template…",
592
+ danger: true,
593
+ onSelect: () => setDeleting(true)
594
+ }]
595
+ })] }),
553
596
  children: [
554
- /* @__PURE__ */ jsx(SectionTabs, {
555
- label: "Template kinds",
556
- base: "/templates",
557
- tabs: TEMPLATE_TABS
558
- }),
559
- /* @__PURE__ */ jsxs("div", {
560
- className: "flex flex-wrap items-center justify-between gap-2",
561
- children: [/* @__PURE__ */ jsx("a", {
562
- href: "/templates/teams",
563
- children: "← Team templates"
564
- }), /* @__PURE__ */ jsx(Button, {
565
- variant: "danger",
566
- onClick: () => setConfirmDelete(true),
567
- children: "Delete template"
568
- })]
597
+ unsaved && /* @__PURE__ */ jsx("p", {
598
+ id: "spawn-needs-save",
599
+ className: "m-0 text-sm font-medium text-warning",
600
+ children: "Save the roster to spawn it as it is on screen."
569
601
  }),
570
602
  /* @__PURE__ */ jsx(TeamPolicyEditor, {
571
603
  template,
572
- profiles
604
+ profiles,
605
+ onSaved: () => router.invalidate({ sync: true }),
606
+ onDirtyChange: setUnsaved
607
+ }),
608
+ spawning && /* @__PURE__ */ jsx(SpawnTeamModal, {
609
+ template,
610
+ teams,
611
+ onClose: () => setSpawning(false),
612
+ onSpawned: (slug) => {
613
+ setSpawning(false);
614
+ navigate({
615
+ to: "/",
616
+ search: {
617
+ team: slug,
618
+ panel: "team"
619
+ }
620
+ });
621
+ }
573
622
  }),
574
623
  /* @__PURE__ */ jsx(ConfirmDialog, {
575
- open: confirmDelete,
576
- title: `Delete Team template ${template.name}?`,
577
- description: /* @__PURE__ */ jsx("p", { children: "Teams already spawned from it keep their Agents and edges." }),
624
+ open: deleting,
625
+ onOpenChange: setDeleting,
626
+ title: `Delete the ${template.name} Team template?`,
627
+ description: /* @__PURE__ */ jsx("p", {
628
+ className: "m-0",
629
+ children: "Teams already spawned from it keep their Agents and connections."
630
+ }),
578
631
  confirmLabel: "Delete template",
579
632
  onConfirm: async () => {
580
633
  await api(`/api/team-templates/${encodeURIComponent(template.id)}`, { method: "DELETE" });
581
- window.location.assign("/templates/teams");
582
- },
583
- onOpenChange: setConfirmDelete
634
+ await navigate({ to: "/templates/teams" });
635
+ }
584
636
  })
585
637
  ]
586
638
  });
@@ -0,0 +1,16 @@
1
+ import { n as createServerFn } from "../server.js";
2
+ import { t as createSsrRpc } from "./createSsrRpc-BijMHgqE.js";
3
+ import { createFileRoute, lazyRouteComponent, redirect } from "@tanstack/react-router";
4
+ //#region src/routes/templates/agents/$id/index.tsx
5
+ var $$splitComponentImporter = () => import("./_id-AcyGvFrE.js");
6
+ var fetchTemplate = createServerFn({ method: "GET" }).validator((data) => data).handler(createSsrRpc("a3ce4c3b27c4c69828cf8a81d1f5312a9f8e2c82de6c7e6e2846eb5c2fc322ea"));
7
+ var Route = createFileRoute("/templates/agents/$id/")({
8
+ loader: async ({ params }) => {
9
+ const data = await fetchTemplate({ data: { id: params.id } });
10
+ if (!data) throw redirect({ to: "/templates/agents" });
11
+ return data;
12
+ },
13
+ component: lazyRouteComponent($$splitComponentImporter, "component")
14
+ });
15
+ //#endregion
16
+ export { Route as t };