bazilion 0.8.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.
- package/README.md +47 -5
- package/dist/cli.js +1190 -640
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +5165 -1598
- package/dist/daemon.js.map +1 -1
- package/dist/migrations/0001_init.sql +318 -88
- package/dist/web/client/assets/AgentTabs-B3hq5a3e.js +1 -0
- package/dist/web/client/assets/ConfigPage-BCwfgyjD.js +1 -0
- package/dist/web/client/assets/FieldRow-avAFLgYW.js +1 -0
- package/dist/web/client/assets/Page-CwNuDhWz.js +1 -0
- package/dist/web/client/assets/ProductionTeamPolicyEditor-CiQ-VVDo.js +7 -0
- package/dist/web/client/assets/ProductionTeamPolicyEditor-DLioOiRN.css +1 -0
- package/dist/web/client/assets/ProfileCommunicationEditor-D84F5yfr.js +1 -0
- package/dist/web/client/assets/RecoveryState-QfMSuwy3.js +1 -0
- package/dist/web/client/assets/SectionTabs-DZzy01az.js +1 -0
- package/dist/web/client/assets/TeamTabs-Btoe_FAE.js +1 -0
- package/dist/web/client/assets/TemplatesTabs-CAYY03F5.js +1 -0
- package/dist/web/client/assets/_id-BeauECmk.js +1 -0
- package/dist/web/client/assets/_id-BqU2BodK.js +1 -0
- package/dist/web/client/assets/_id-CKtoio3t.js +1 -0
- package/dist/web/client/assets/_id-DGyKURCp.js +1 -0
- package/dist/web/client/assets/_id-Q98Of6k9.js +1 -0
- package/dist/web/client/assets/activity-DJuhhQCb.js +1 -0
- package/dist/web/client/assets/activity-DXN_N85w.js +1 -0
- package/dist/web/client/assets/agents-C5Xsdge1.js +1 -0
- package/dist/web/client/assets/agents-Cgxo4H5G.js +1 -0
- package/dist/web/client/assets/approvals-BnG7fbw-.js +1 -0
- package/dist/web/client/assets/approvals-DGi0PSx8.js +1 -0
- package/dist/web/client/assets/chevron-down-BhcBspw3.js +1 -0
- package/dist/web/client/assets/config-xw4NyrXF.js +3 -0
- package/dist/web/client/assets/context-D2V1Oi4z.js +1 -0
- package/dist/web/client/assets/inbox-DK6hWCMp.js +1 -0
- package/dist/web/client/assets/index-VdURSoM4.js +12 -0
- package/dist/web/client/assets/login-CvptUoMR.js +1 -0
- package/dist/web/client/assets/mcp-BDFM_sW-.js +1 -0
- package/dist/web/client/assets/members-BJvph_TR.js +1 -0
- package/dist/web/client/assets/memory-DRytqZCD.js +1 -0
- package/dist/web/client/assets/plus-C9ee3SIO.js +1 -0
- package/dist/web/client/assets/policy-CGP50OtQ.js +1 -0
- package/dist/web/client/assets/policy-K4hIbbIN.js +1 -0
- package/dist/web/client/assets/preload-helper-mNuBjNXU.js +1 -0
- package/dist/web/client/assets/react-3W8R1pOO.js +1 -0
- package/dist/web/client/assets/routes-DJnWYvC9.js +1 -0
- package/dist/web/client/assets/services-DHheiv7L.js +1 -0
- package/dist/web/client/assets/skills-DmsitluU.js +1 -0
- package/dist/web/client/assets/styles-B5eQAwLP.css +2 -0
- package/dist/web/client/assets/team-policy-D0jpnn2b.js +1 -0
- package/dist/web/client/assets/teams-BdC4gthq.js +1 -0
- package/dist/web/client/assets/teams-CSNyLz3l.js +1 -0
- package/dist/web/client/assets/teams-CbxSaorm.js +1 -0
- package/dist/web/client/assets/telegram-D61G_alO.js +1 -0
- package/dist/web/client/assets/tokens-CjRplDrJ.js +1 -0
- package/dist/web/client/assets/triggers-MLzTm_DM.js +1 -0
- package/dist/web/client/assets/welcome-wBfX9dAd.js +1 -0
- package/dist/web/client/assets/{ChatPane-DzEgOEqS.js → wire-constants-BxfyUMXB.js} +4 -4
- package/dist/web/server/assets/{AgentTabs-BOjTN7QF.js → AgentTabs-DoMDJBXH.js} +10 -7
- package/dist/web/server/assets/{ChatPane-BvpswYvF.js → ChatPane-eUY_dga3.js} +38 -20
- package/dist/web/server/assets/ConfigPage-BKlh5vOU.js +68 -0
- package/dist/web/server/assets/{FieldRow-DwyqycWI.js → FieldRow-B4eTegH9.js} +5 -5
- package/dist/web/server/assets/Page-LENulSXY.js +111 -0
- package/dist/web/server/assets/ProductionTeamPolicyEditor-Y4mzFFvR.js +1009 -0
- package/dist/web/server/assets/ProfileCommunicationEditor-C2RU-2QB.js +107 -0
- package/dist/web/server/assets/RecoveryState-B2SG-mrY.js +37 -0
- package/dist/web/server/assets/SectionTabs-BJTPr5nU.js +8 -0
- package/dist/web/server/assets/Sidebar-O_CH1-JD.js +964 -0
- package/dist/web/server/assets/TeamTabs-zZzbP1t_.js +51 -0
- package/dist/web/server/assets/{TemplatesTabs---7h5GYa.js → TemplatesTabs-CcRxZhJe.js} +9 -8
- package/dist/web/server/assets/_id-A8Xiv6Lc.js +11 -0
- package/dist/web/server/assets/{_id-Sjw0zhA6.js → _id-BhOB8Umi.js} +5 -5
- package/dist/web/server/assets/{_id-DDixKEud.js → _id-C3HY4lWg.js} +77 -20
- package/dist/web/server/assets/{_id-BdRiQb2H.js → _id-ClN9hY2x.js} +132 -39
- package/dist/web/server/assets/{_id-BqnDy_Ca.js → _id-CwyGjJeP.js} +7 -6
- package/dist/web/server/assets/{_id-D8duqgd5.js → _id-D27T85mU.js} +6 -5
- package/dist/web/server/assets/_id-D3Ap7zZA.js +377 -0
- package/dist/web/server/assets/_id-DinTp_7X.js +14 -0
- package/dist/web/server/assets/{_id-CnQflrRv.js → _id-Dj1yZ3zJ.js} +6 -6
- package/dist/web/server/assets/{_id-DUIrFV3G.js → _id-DkYodSkG.js} +10 -2
- package/dist/web/server/assets/{_id-D_Ew11ED.js → _id-IzadFZV9.js} +9 -9
- package/dist/web/server/assets/_id-LrvXU4Nr.js +45 -0
- package/dist/web/server/assets/_id-tB47Vsfp.js +42 -0
- package/dist/web/server/assets/_tanstack-start-manifest_v-D09Xu_6u.js +286 -0
- package/dist/web/server/assets/activity-BCI4mfNS.js +168 -0
- package/dist/web/server/assets/activity-CGCf8BQf.js +11 -0
- package/dist/web/server/assets/activity-D9SMqBhy.js +14 -0
- package/dist/web/server/assets/activity-DohitgwW.js +12 -0
- package/dist/web/server/assets/{agents-k5QURC4I.js → agents-BPKOshR5.js} +5 -5
- package/dist/web/server/assets/{profiles-C6a3RKgu.js → agents-BY74v7fM.js} +5 -5
- package/dist/web/server/assets/{profiles-CZ5NkmVw.js → agents-BvttypqB.js} +5 -5
- package/dist/web/server/assets/{agents-ChcAJUI5.js → agents-C9xlWK0Z.js} +2 -2
- package/dist/web/server/assets/agents-CgZMHj80.js +265 -0
- package/dist/web/server/assets/{profiles-LxcC_L6n.js → agents-DZuFEj0D.js} +87 -79
- package/dist/web/server/assets/approvals-BGU-XGIO.js +12 -0
- package/dist/web/server/assets/approvals-CWcFHlor.js +14 -0
- package/dist/web/server/assets/approvals-CbFXFvG8.js +11 -0
- package/dist/web/server/assets/approvals-DCaVw1Mz.js +280 -0
- package/dist/web/server/assets/{auth-DzRAMwVt.js → auth-byfSx6Ja.js} +6 -2
- package/dist/web/server/assets/{config-CHaCv89D.js → config-BDCJdtj2.js} +1 -1
- package/dist/web/server/assets/{config-CdVjqjin.js → config-D2LAsud2.js} +31 -52
- package/dist/web/server/assets/{config-Bq3o924J.js → config-TeIoyYYc.js} +2 -2
- package/dist/web/server/assets/context-B-XDf6Ym.js +12 -0
- package/dist/web/server/assets/context-BXGo5Vfi.js +12 -0
- package/dist/web/server/assets/context-DrkrIWun.js +47 -0
- package/dist/web/server/assets/{createServerRpc-CeKECg65.js → createServerRpc-pU-IQV2Y.js} +1 -1
- package/dist/web/server/assets/{createSsrRpc-ZBGxhl8t.js → createSsrRpc-DFsIAfFd.js} +1 -1
- package/dist/web/server/assets/{empty-plugin-adapters-DKUlnwwl.js → empty-plugin-adapters-Cq4--YW-.js} +1 -1
- package/dist/web/server/assets/{inbox-CkiSvD14.js → inbox-B3-TRsNI.js} +1 -1
- package/dist/web/server/assets/{inbox-Bxb3W04M.js → inbox-BardsGyy.js} +2 -2
- package/dist/web/server/assets/inbox-CUIyf9MT.js +131 -0
- package/dist/web/server/assets/login-Bx5LEyGP.js +118 -0
- package/dist/web/server/assets/login-CmWvxfTK.js +136 -0
- package/dist/web/server/assets/{mcp-BsFKEoXt.js → mcp-2pwT9HU8.js} +1 -1
- package/dist/web/server/assets/{mcp-BU_kKENi.js → mcp-BJjLIdP0.js} +105 -112
- package/dist/web/server/assets/{mcp-CKqwG4mt.js → mcp-DIWTogHM.js} +2 -2
- package/dist/web/server/assets/members-CCv17cjQ.js +46 -0
- package/dist/web/server/assets/members-CW5aBe81.js +12 -0
- package/dist/web/server/assets/members-VdPwD6CE.js +12 -0
- package/dist/web/server/assets/{memory-BaYnfm7K.js → memory-Dngc13Nw.js} +9 -9
- package/dist/web/server/assets/{memory-CQaqWnyM.js → memory-a8Kz57Kh.js} +22 -19
- package/dist/web/server/assets/{memory-Ns2-Z31p.js → memory-pZ4pZT7p.js} +6 -6
- package/dist/web/server/assets/policy-BYVXqsan.js +11 -0
- package/dist/web/server/assets/policy-Bb-vEgqg.js +40 -0
- package/dist/web/server/assets/policy-BcGELcc9.js +490 -0
- package/dist/web/server/assets/policy-C30AeFIb.js +21 -0
- package/dist/web/server/assets/router-DIdp8ZNt.js +504 -0
- package/dist/web/server/assets/{routes-C61gBiXa.js → routes-CXz4hTAr.js} +6 -6
- package/dist/web/server/assets/{routes-Ce2VWrU9.js → routes-Jb0zjKav.js} +16 -13
- package/dist/web/server/assets/{routes-V9URcp1v.js → routes-lIclH9Br.js} +2 -2
- package/dist/web/server/assets/services-B9yBWDX0.js +79 -0
- package/dist/web/server/assets/{services-Ccc5s2bS.js → services-C4szdhPx.js} +4 -4
- package/dist/web/server/assets/{services-DhRiNeq0.js → services-wG8I06oS.js} +1 -1
- package/dist/web/server/assets/skills-BZdqiDig.js +358 -0
- package/dist/web/server/assets/{skills-l2cyQ3zS.js → skills-C-UgkuCW.js} +2 -2
- package/dist/web/server/assets/{skills-CFIWVg32.js → skills-a9VSWHWq.js} +1 -1
- package/dist/web/server/assets/{start-CYDpZ6cb.js → start-WH8WzTL_.js} +1 -1
- package/dist/web/server/assets/team-policy-vPG01onj.js +180 -0
- package/dist/web/server/assets/teams-3im0oQnS.js +11 -0
- package/dist/web/server/assets/teams-CpQ0YgWf.js +112 -0
- package/dist/web/server/assets/teams-DEpQR2QA.js +14 -0
- package/dist/web/server/assets/teams-DqfrEoH6.js +36 -0
- package/dist/web/server/assets/teams-MjqgsmC3.js +12 -0
- package/dist/web/server/assets/teams-OIkHuxy1.js +12 -0
- package/dist/web/server/assets/teams-jBtvnk59.js +193 -0
- package/dist/web/server/assets/{telegram-DfAddLdv.js → telegram-7ub--6xz.js} +44 -56
- package/dist/web/server/assets/{telegram-T3l9KtiE.js → telegram-Bazhmpr4.js} +2 -2
- package/dist/web/server/assets/{telegram-BdaUIjvs.js → telegram-DNgCWebD.js} +1 -1
- package/dist/web/server/assets/{tokens-DdpnfV_Y.js → tokens-BnwFbV7T.js} +2 -2
- package/dist/web/server/assets/{tokens-BCz3PSoT.js → tokens-DPDMSN5O.js} +1 -1
- package/dist/web/server/assets/tokens-yyTSfBSN.js +186 -0
- package/dist/web/server/assets/{triggers-BzJG1nN5.js → triggers-BMpHsGIr.js} +5 -4
- package/dist/web/server/assets/{triggers-BcH_6PW1.js → triggers-C_0y6QV9.js} +1 -1
- package/dist/web/server/assets/{triggers-BcTTwMfy.js → triggers-Ca57_qym.js} +2 -2
- package/dist/web/server/assets/{welcome-CP4CZ9B6.js → welcome-IYHGurWx.js} +23 -15
- package/dist/web/server/assets/{wire-constants-Deb4NxBb.js → wire-constants-C8nBJcU3.js} +3 -3
- package/dist/web/server/server.js +126 -95
- package/dist/worker.js +185 -146
- package/dist/worker.js.map +1 -1
- package/package.json +8 -7
- package/dist/migrations/0002_profile_groups.sql +0 -38
- package/dist/migrations/0003_agent_telegram.sql +0 -40
- package/dist/migrations/0004_agent_mirror_mode.sql +0 -17
- package/dist/migrations/0005_group_topic_name_format.sql +0 -15
- package/dist/migrations/0006_telegram_acl.sql +0 -18
- package/dist/migrations/0007_mcp_servers.sql +0 -30
- package/dist/migrations/0008_seed_user_md.sql +0 -39
- package/dist/web/client/assets/AgentTabs-DioGqUVR.js +0 -1
- package/dist/web/client/assets/ConfigTabs-pY-V0Rie.js +0 -1
- package/dist/web/client/assets/FieldRow-CNKma5LE.js +0 -1
- package/dist/web/client/assets/MembersEditor-C6UpqDdV.js +0 -1
- package/dist/web/client/assets/SpawnTeamModal-BEkNCKXm.js +0 -1
- package/dist/web/client/assets/TemplatesTabs-UM04RMO9.js +0 -1
- package/dist/web/client/assets/_id-BNJapCT4.js +0 -1
- package/dist/web/client/assets/_id-CjGoV8Mr.js +0 -1
- package/dist/web/client/assets/_id-DehuCHUw.js +0 -1
- package/dist/web/client/assets/_id-Dz9fjcCM.js +0 -1
- package/dist/web/client/assets/agents-M6omAXcZ.js +0 -1
- package/dist/web/client/assets/config-DIuEc5bm.js +0 -3
- package/dist/web/client/assets/groups-DpE2d2zZ.js +0 -1
- package/dist/web/client/assets/inbox-BPnLsRNf.js +0 -1
- package/dist/web/client/assets/index-MAJuXnie.js +0 -12
- package/dist/web/client/assets/login-CawJX16E.js +0 -1
- package/dist/web/client/assets/mcp-DIrh9-v_.js +0 -1
- package/dist/web/client/assets/memory-BpHbdKsd.js +0 -1
- package/dist/web/client/assets/preload-helper-CvnapA2_.js +0 -1
- package/dist/web/client/assets/profile-groups-ByoKak0c.js +0 -1
- package/dist/web/client/assets/profiles-BEjv8LGo.js +0 -1
- package/dist/web/client/assets/routes-D2COHy7v.js +0 -1
- package/dist/web/client/assets/services-D212jSK_.js +0 -1
- package/dist/web/client/assets/skills-Da0MURjY.js +0 -1
- package/dist/web/client/assets/styles-BgE5bCHA.css +0 -2
- package/dist/web/client/assets/telegram-Czh2MdVm.js +0 -1
- package/dist/web/client/assets/tokens-E_JvO5JN.js +0 -1
- package/dist/web/client/assets/triggers-BBRZQOm7.js +0 -1
- package/dist/web/client/assets/welcome-Dn-zvmBE.js +0 -1
- package/dist/web/client/assets/wire-constants-BkT5-597.js +0 -1
- package/dist/web/server/assets/ConfigTabs-CyuxzesF.js +0 -41
- package/dist/web/server/assets/MembersEditor-BWQztvrX.js +0 -131
- package/dist/web/server/assets/Sidebar-DmEiewRN.js +0 -529
- package/dist/web/server/assets/SpawnTeamModal-dSN421k_.js +0 -107
- package/dist/web/server/assets/_id-BKev9H1p.js +0 -12
- package/dist/web/server/assets/_id-BNwlbWHP.js +0 -24
- package/dist/web/server/assets/_id-CRqqi8IE.js +0 -161
- package/dist/web/server/assets/_id-CXg-Blec.js +0 -367
- package/dist/web/server/assets/_tanstack-start-manifest_v-D9FLKShQ.js +0 -178
- package/dist/web/server/assets/agents-C7SBPN0M.js +0 -210
- package/dist/web/server/assets/groups-CbSwND2r.js +0 -12
- package/dist/web/server/assets/groups-CeRRlZaZ.js +0 -150
- package/dist/web/server/assets/groups-pk4CYSuf.js +0 -21
- package/dist/web/server/assets/inbox-DU27iHv_.js +0 -133
- package/dist/web/server/assets/login-CNznncgA.js +0 -58
- package/dist/web/server/assets/login-CQybKk7Y.js +0 -74
- package/dist/web/server/assets/profile-groups-CiU06yN1.js +0 -28
- package/dist/web/server/assets/profile-groups-D21MYoLM.js +0 -208
- package/dist/web/server/assets/profile-groups-aoJleXHP.js +0 -12
- package/dist/web/server/assets/router-BrDascdO.js +0 -460
- package/dist/web/server/assets/services-B91w2f-X.js +0 -94
- package/dist/web/server/assets/skills-D89ND2kR.js +0 -321
- 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,10 +1,13 @@
|
|
|
1
|
-
import { t as Route } from "./
|
|
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
|
|
4
|
+
import { t as DEFAULT_PROFILE_COMMUNICATION } from "./team-policy-vPG01onj.js";
|
|
5
|
+
import { t as ProfileCommunicationEditor } from "./ProfileCommunicationEditor-C2RU-2QB.js";
|
|
6
|
+
import { t as TemplatesTabs } from "./TemplatesTabs-CcRxZhJe.js";
|
|
4
7
|
import { useState } from "react";
|
|
5
8
|
import { useRouter } from "@tanstack/react-router";
|
|
6
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
//#region src/routes/
|
|
10
|
+
//#region src/routes/templates/agents/index.tsx?tsr-split=component
|
|
8
11
|
function ProfilesPage() {
|
|
9
12
|
const { profiles, modelGroups, skills, templates } = Route.useLoaderData();
|
|
10
13
|
const router = useRouter();
|
|
@@ -18,56 +21,62 @@ function ProfilesPage() {
|
|
|
18
21
|
}
|
|
19
22
|
await router.invalidate();
|
|
20
23
|
}
|
|
21
|
-
return /* @__PURE__ */ jsxs(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
/* @__PURE__ */ jsx("
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return /* @__PURE__ */ jsxs("tr", { children: [
|
|
48
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("a", {
|
|
49
|
-
href: `/profiles/${p.id}`,
|
|
50
|
-
children: /* @__PURE__ */ jsx("code", { children: p.id })
|
|
51
|
-
}) }),
|
|
52
|
-
/* @__PURE__ */ jsx("td", { children: p.name }),
|
|
53
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("code", { children: p.defaultModel }) }),
|
|
54
|
-
/* @__PURE__ */ jsx("td", { children: p.agentCount }),
|
|
55
|
-
/* @__PURE__ */ jsx("td", {
|
|
56
|
-
className: "text-xs text-mocha-light",
|
|
57
|
-
children: skillsLabel
|
|
58
|
-
}),
|
|
59
|
-
/* @__PURE__ */ jsx("td", { children: p.agentCount === 0 ? /* @__PURE__ */ jsx(Button, {
|
|
60
|
-
variant: "danger",
|
|
61
|
-
onClick: () => del(p.id),
|
|
62
|
-
children: "delete"
|
|
63
|
-
}) : /* @__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,
|
|
64
50
|
className: "muted",
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
+
});
|
|
71
80
|
}
|
|
72
81
|
function CreateProfileForm({ modelGroups, skills, templates, onCreated }) {
|
|
73
82
|
const [tab, setTab] = useState("basics");
|
|
@@ -82,13 +91,12 @@ function CreateProfileForm({ modelGroups, skills, templates, onCreated }) {
|
|
|
82
91
|
const [enableAgents, setEnableAgents] = useState(true);
|
|
83
92
|
const [toolsTpl, setToolsTpl] = useState(templates.tools);
|
|
84
93
|
const [enableTools, setEnableTools] = useState(true);
|
|
85
|
-
const [heartbeatTpl, setHeartbeatTpl] = useState(templates.heartbeat);
|
|
86
|
-
const [enableHeartbeat, setEnableHeartbeat] = useState(false);
|
|
87
94
|
function setTemplateEnabled(key, setter, on) {
|
|
88
95
|
setter(on);
|
|
89
96
|
if (!on && tab === key) setTab("basics");
|
|
90
97
|
}
|
|
91
98
|
const [skillsMode, setSkillsMode] = useState("all");
|
|
99
|
+
const [communication, setCommunication] = useState(DEFAULT_PROFILE_COMMUNICATION);
|
|
92
100
|
const [picked, setPicked] = useState(/* @__PURE__ */ new Set());
|
|
93
101
|
const [error, setError] = useState(null);
|
|
94
102
|
const [submitting, setSubmitting] = useState(false);
|
|
@@ -124,7 +132,7 @@ function CreateProfileForm({ modelGroups, skills, templates, onCreated }) {
|
|
|
124
132
|
bootstrap: enableBootstrap ? bootstrap : null,
|
|
125
133
|
agents: enableAgents ? agentsTpl : null,
|
|
126
134
|
tools: enableTools ? toolsTpl : null,
|
|
127
|
-
|
|
135
|
+
communicationDefaults: communication
|
|
128
136
|
};
|
|
129
137
|
const res = await fetch("/api/profiles", {
|
|
130
138
|
method: "POST",
|
|
@@ -143,10 +151,9 @@ function CreateProfileForm({ modelGroups, skills, templates, onCreated }) {
|
|
|
143
151
|
setEnableAgents(true);
|
|
144
152
|
setToolsTpl(templates.tools);
|
|
145
153
|
setEnableTools(true);
|
|
146
|
-
setHeartbeatTpl(templates.heartbeat);
|
|
147
|
-
setEnableHeartbeat(false);
|
|
148
154
|
setPicked(/* @__PURE__ */ new Set());
|
|
149
155
|
setSkillsMode("all");
|
|
156
|
+
setCommunication(DEFAULT_PROFILE_COMMUNICATION);
|
|
150
157
|
setTab("basics");
|
|
151
158
|
onCreated();
|
|
152
159
|
} catch (err) {
|
|
@@ -159,7 +166,7 @@ function CreateProfileForm({ modelGroups, skills, templates, onCreated }) {
|
|
|
159
166
|
className: "card",
|
|
160
167
|
onSubmit: submit,
|
|
161
168
|
children: [
|
|
162
|
-
/* @__PURE__ */ jsx("h3", { children: "create
|
|
169
|
+
/* @__PURE__ */ jsx("h3", { children: "create agent template" }),
|
|
163
170
|
error && /* @__PURE__ */ jsx("div", {
|
|
164
171
|
className: "err",
|
|
165
172
|
children: error
|
|
@@ -193,14 +200,13 @@ function CreateProfileForm({ modelGroups, skills, templates, onCreated }) {
|
|
|
193
200
|
label: "TOOLS",
|
|
194
201
|
disabled: !enableTools
|
|
195
202
|
},
|
|
196
|
-
{
|
|
197
|
-
id: "heartbeat",
|
|
198
|
-
label: "HEARTBEAT",
|
|
199
|
-
disabled: !enableHeartbeat
|
|
200
|
-
},
|
|
201
203
|
{
|
|
202
204
|
id: "skills",
|
|
203
205
|
label: "skills"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
id: "communication",
|
|
209
|
+
label: "communication"
|
|
204
210
|
}
|
|
205
211
|
],
|
|
206
212
|
active: tab,
|
|
@@ -257,20 +263,12 @@ function CreateProfileForm({ modelGroups, skills, templates, onCreated }) {
|
|
|
257
263
|
checked: enableTools,
|
|
258
264
|
onChange: (e) => setTemplateEnabled("tools", setEnableTools, e.target.checked)
|
|
259
265
|
}), "TOOLS.md"]
|
|
260
|
-
}),
|
|
261
|
-
/* @__PURE__ */ jsxs("label", {
|
|
262
|
-
className: "inline-flex cursor-pointer items-center gap-1.5",
|
|
263
|
-
children: [/* @__PURE__ */ jsx("input", {
|
|
264
|
-
type: "checkbox",
|
|
265
|
-
checked: enableHeartbeat,
|
|
266
|
-
onChange: (e) => setTemplateEnabled("heartbeat", setEnableHeartbeat, e.target.checked)
|
|
267
|
-
}), "HEARTBEAT.md"]
|
|
268
266
|
})
|
|
269
267
|
]
|
|
270
268
|
}),
|
|
271
269
|
/* @__PURE__ */ jsx("p", {
|
|
272
270
|
className: "muted mt-2 text-[0.8em]",
|
|
273
|
-
children: "Disabled files aren't created for this
|
|
271
|
+
children: "Disabled files aren't created for this Agent template. Each spawned agent gets its own copy of the enabled files at spawn time."
|
|
274
272
|
})
|
|
275
273
|
]
|
|
276
274
|
}),
|
|
@@ -353,13 +351,6 @@ function CreateProfileForm({ modelGroups, skills, templates, onCreated }) {
|
|
|
353
351
|
onChange: setToolsTpl,
|
|
354
352
|
rows: 14
|
|
355
353
|
}),
|
|
356
|
-
tab === "heartbeat" && /* @__PURE__ */ jsx(TemplateTab, {
|
|
357
|
-
label: "HEARTBEAT.md",
|
|
358
|
-
hint: "Optional checklist run on scheduled wake-ups. Pair with an interval/cron trigger.",
|
|
359
|
-
value: heartbeatTpl,
|
|
360
|
-
onChange: setHeartbeatTpl,
|
|
361
|
-
rows: 12
|
|
362
|
-
}),
|
|
363
354
|
tab === "skills" && /* @__PURE__ */ jsxs("div", { children: [
|
|
364
355
|
/* @__PURE__ */ jsx("p", {
|
|
365
356
|
className: "muted my-2",
|
|
@@ -410,6 +401,23 @@ function CreateProfileForm({ modelGroups, skills, templates, onCreated }) {
|
|
|
410
401
|
}, s.name))
|
|
411
402
|
})
|
|
412
403
|
] }),
|
|
404
|
+
tab === "communication" && /* @__PURE__ */ jsxs("div", { children: [
|
|
405
|
+
/* @__PURE__ */ jsx("div", {
|
|
406
|
+
className: "mb-3 flex items-center gap-2",
|
|
407
|
+
children: /* @__PURE__ */ jsx("h4", {
|
|
408
|
+
className: "text-sm font-semibold text-chocolate",
|
|
409
|
+
children: "Communication defaults"
|
|
410
|
+
})
|
|
411
|
+
}),
|
|
412
|
+
/* @__PURE__ */ jsx("p", {
|
|
413
|
+
className: "muted mb-4",
|
|
414
|
+
children: "Materialized when a Team or live policy snapshot is created. Existing snapshots never inherit later changes."
|
|
415
|
+
}),
|
|
416
|
+
/* @__PURE__ */ jsx(ProfileCommunicationEditor, {
|
|
417
|
+
value: communication,
|
|
418
|
+
onChange: setCommunication
|
|
419
|
+
})
|
|
420
|
+
] }),
|
|
413
421
|
/* @__PURE__ */ jsx("div", {
|
|
414
422
|
className: "mt-5 flex gap-2",
|
|
415
423
|
children: /* @__PURE__ */ jsx(Button, {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { t as createServerFn } from "../server.js";
|
|
2
|
+
import { t as createServerRpc } from "./createServerRpc-pU-IQV2Y.js";
|
|
3
|
+
import { n as daemonClient } from "./daemon-client-2NRMzlTr.js";
|
|
4
|
+
//#region src/routes/approvals/index.tsx?tss-serverfn-split
|
|
5
|
+
var loadApprovals_createServerFn_handler = createServerRpc({
|
|
6
|
+
id: "816fcbc7b3c7f2952660d3a2c8f49bb0c91084627a284c185b333b1d418fadf8",
|
|
7
|
+
name: "loadApprovals",
|
|
8
|
+
filename: "src/routes/approvals/index.tsx"
|
|
9
|
+
}, (opts) => loadApprovals.__executeServer(opts));
|
|
10
|
+
var loadApprovals = createServerFn({ method: "GET" }).handler(loadApprovals_createServerFn_handler, () => daemonClient().get("/api/approvals?limit=100"));
|
|
11
|
+
//#endregion
|
|
12
|
+
export { loadApprovals_createServerFn_handler };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { t as createServerFn } from "../server.js";
|
|
2
|
+
import { t as createSsrRpc } from "./createSsrRpc-DFsIAfFd.js";
|
|
3
|
+
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
|
+
//#region src/routes/approvals/index.tsx
|
|
5
|
+
var $$splitErrorComponentImporter = () => import("./approvals-CbFXFvG8.js");
|
|
6
|
+
var $$splitComponentImporter = () => import("./approvals-DCaVw1Mz.js");
|
|
7
|
+
var loadApprovals = createServerFn({ method: "GET" }).handler(createSsrRpc("816fcbc7b3c7f2952660d3a2c8f49bb0c91084627a284c185b333b1d418fadf8"));
|
|
8
|
+
var Route = createFileRoute("/approvals/")({
|
|
9
|
+
loader: () => loadApprovals(),
|
|
10
|
+
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
11
|
+
errorComponent: lazyRouteComponent($$splitErrorComponentImporter, "errorComponent")
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Route as t };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { t as RecoveryState } from "./RecoveryState-B2SG-mrY.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/routes/approvals/index.tsx?tsr-split=errorComponent
|
|
4
|
+
var SplitErrorComponent = ({ error, reset }) => /* @__PURE__ */ jsx(RecoveryState, {
|
|
5
|
+
title: "Approval queue unavailable",
|
|
6
|
+
error,
|
|
7
|
+
reset,
|
|
8
|
+
fallbackHref: "/"
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { SplitErrorComponent as errorComponent };
|