bazilion 0.8.0 → 0.9.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 +1184 -628
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +5194 -1574
- package/dist/daemon.js.map +1 -1
- package/dist/migrations/0001_init.sql +318 -88
- package/dist/web/client/assets/{FieldRow-CNKma5LE.js → FieldRow-DmwAFfbF.js} +1 -1
- package/dist/web/client/assets/ProductionTeamPolicyEditor-1a5jQqUB.js +7 -0
- package/dist/web/client/assets/ProductionTeamPolicyEditor-DLioOiRN.css +1 -0
- package/dist/web/client/assets/ProfileCommunicationEditor-D1OZ8WE5.js +1 -0
- package/dist/web/client/assets/RecoveryState-QfMSuwy3.js +1 -0
- package/dist/web/client/assets/TeamTabs-BViZ4sti.js +1 -0
- package/dist/web/client/assets/TemplatesTabs-DVcY9pMD.js +1 -0
- package/dist/web/client/assets/_id-8P7brhGy.js +1 -0
- package/dist/web/client/assets/_id-C3o3MHq8.js +1 -0
- package/dist/web/client/assets/_id-DGRrSF1e.js +1 -0
- package/dist/web/client/assets/_id-DGyKURCp.js +1 -0
- package/dist/web/client/assets/_id-KnJe-aW9.js +1 -0
- package/dist/web/client/assets/activity-DJuhhQCb.js +1 -0
- package/dist/web/client/assets/activity-WWvJSo4t.js +1 -0
- package/dist/web/client/assets/agents-C32T1voV.js +1 -0
- package/dist/web/client/assets/agents-nH4m4gZ1.js +1 -0
- package/dist/web/client/assets/approvals-DGi0PSx8.js +1 -0
- package/dist/web/client/assets/approvals-l8jIZjqz.js +1 -0
- package/dist/web/client/assets/{config-DIuEc5bm.js → config-C7wvi1nR.js} +2 -2
- package/dist/web/client/assets/context-BEGWE3RC.js +1 -0
- package/dist/web/client/assets/inbox--4aBaAgG.js +1 -0
- package/dist/web/client/assets/index-BCXoh1c8.js +12 -0
- package/dist/web/client/assets/{login-CawJX16E.js → login-Bk2wwIHQ.js} +1 -1
- package/dist/web/client/assets/{mcp-DIrh9-v_.js → mcp-vM7xgh9e.js} +1 -1
- package/dist/web/client/assets/members-cPKfnrSL.js +1 -0
- package/dist/web/client/assets/memory-BOcsaemD.js +1 -0
- package/dist/web/client/assets/policy-BGLCJYvS.js +1 -0
- package/dist/web/client/assets/policy-K4hIbbIN.js +1 -0
- package/dist/web/client/assets/{preload-helper-CvnapA2_.js → preload-helper-eOOCz1Fu.js} +1 -1
- package/dist/web/client/assets/routes-DnrP3dwv.js +1 -0
- package/dist/web/client/assets/services-C2_O3ifw.js +1 -0
- package/dist/web/client/assets/{skills-Da0MURjY.js → skills-B__fLZjx.js} +1 -1
- package/dist/web/client/assets/styles-Dn24-ZvP.css +2 -0
- package/dist/web/client/assets/team-policy-BdX340m4.js +1 -0
- package/dist/web/client/assets/teams-CSNyLz3l.js +1 -0
- package/dist/web/client/assets/teams-DZMB4_iw.js +1 -0
- package/dist/web/client/assets/teams-rpaYKNIb.js +1 -0
- package/dist/web/client/assets/telegram-B1O4Ko0V.js +1 -0
- package/dist/web/client/assets/{tokens-E_JvO5JN.js → tokens-D7FH9VgA.js} +1 -1
- package/dist/web/client/assets/triggers-3PLy2_Fo.js +1 -0
- package/dist/web/client/assets/welcome-B-QQobzq.js +1 -0
- package/dist/web/client/assets/{ChatPane-DzEgOEqS.js → wire-constants-BY9Q9Z7d.js} +4 -4
- package/dist/web/server/assets/{ChatPane-BvpswYvF.js → ChatPane-Dh3qxzdb.js} +23 -12
- package/dist/web/server/assets/ProductionTeamPolicyEditor-Bke5doyl.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/{Sidebar-DmEiewRN.js → Sidebar-CGmtCnYU.js} +372 -48
- package/dist/web/server/assets/TeamTabs-BPxDBfqy.js +50 -0
- package/dist/web/server/assets/{TemplatesTabs---7h5GYa.js → TemplatesTabs-zf4YhStd.js} +6 -6
- package/dist/web/server/assets/{_id-CXg-Blec.js → _id-5lLzLwcv.js} +52 -40
- package/dist/web/server/assets/_id-A8Xiv6Lc.js +11 -0
- package/dist/web/server/assets/{_id-BqnDy_Ca.js → _id-B04VaQlh.js} +6 -5
- package/dist/web/server/assets/{_id-BdRiQb2H.js → _id-B6g9wmPR.js} +126 -27
- package/dist/web/server/assets/_id-ButXHnRH.js +14 -0
- package/dist/web/server/assets/_id-C4AOhstq.js +44 -0
- package/dist/web/server/assets/{_id-DDixKEud.js → _id-CCHA0gdR.js} +72 -12
- package/dist/web/server/assets/{_id-D_Ew11ED.js → _id-CUWgTqMS.js} +8 -8
- package/dist/web/server/assets/_id-DJkzwHjM.js +42 -0
- package/dist/web/server/assets/{_id-CnQflrRv.js → _id-DdC9wpNN.js} +5 -5
- package/dist/web/server/assets/{_id-DUIrFV3G.js → _id-DkFgCIb-.js} +9 -1
- package/dist/web/server/assets/{_id-D8duqgd5.js → _id-_nFwi9gD.js} +5 -4
- package/dist/web/server/assets/{_id-Sjw0zhA6.js → _id-fpFQ9_Ya.js} +4 -4
- package/dist/web/server/assets/_tanstack-start-manifest_v-Div-TukY.js +241 -0
- package/dist/web/server/assets/activity-C2ZKg1Q9.js +170 -0
- package/dist/web/server/assets/activity-CGCf8BQf.js +11 -0
- package/dist/web/server/assets/activity-DedraoFj.js +14 -0
- package/dist/web/server/assets/activity-GPx8NCeB.js +12 -0
- package/dist/web/server/assets/{profiles-CZ5NkmVw.js → agents-B8kinIPW.js} +4 -4
- package/dist/web/server/assets/{agents-k5QURC4I.js → agents-BR2qXlXF.js} +4 -4
- package/dist/web/server/assets/{agents-ChcAJUI5.js → agents-Bp1nsVs2.js} +1 -1
- package/dist/web/server/assets/{profiles-LxcC_L6n.js → agents-CUQmWhTp.js} +36 -10
- package/dist/web/server/assets/{agents-C7SBPN0M.js → agents-DU9Hqs58.js} +51 -12
- package/dist/web/server/assets/{profiles-C6a3RKgu.js → agents-LHowEI6S.js} +4 -4
- package/dist/web/server/assets/approvals-CbFXFvG8.js +11 -0
- package/dist/web/server/assets/approvals-DHgARzd8.js +242 -0
- package/dist/web/server/assets/approvals-Dw2LJoSA.js +14 -0
- package/dist/web/server/assets/approvals-VPc0YpLN.js +12 -0
- package/dist/web/server/assets/{auth-DzRAMwVt.js → auth-l-Vf8wlu.js} +5 -1
- package/dist/web/server/assets/{config-CdVjqjin.js → config-BvKctDOX.js} +4 -4
- package/dist/web/server/assets/{config-Bq3o924J.js → config-QvHaxGlP.js} +1 -1
- package/dist/web/server/assets/context-5lrf2ame.js +12 -0
- package/dist/web/server/assets/context-CEr4-xiA.js +49 -0
- package/dist/web/server/assets/context-D3Egm-vY.js +12 -0
- package/dist/web/server/assets/members-40DxRdVj.js +48 -0
- package/dist/web/server/assets/members-DlGBKZNl.js +12 -0
- package/dist/web/server/assets/members-ksELRsyk.js +12 -0
- package/dist/web/server/assets/{memory-Ns2-Z31p.js → memory-B5moRnnp.js} +5 -5
- package/dist/web/server/assets/{memory-BaYnfm7K.js → memory-CO0jKGzJ.js} +8 -8
- package/dist/web/server/assets/memory-CiTl4cN9.js +289 -0
- package/dist/web/server/assets/policy-BYVXqsan.js +11 -0
- package/dist/web/server/assets/policy-DNcGZLOB.js +21 -0
- package/dist/web/server/assets/policy-Dr55y-Mh.js +496 -0
- package/dist/web/server/assets/policy-Dxs78_GO.js +40 -0
- package/dist/web/server/assets/{router-BrDascdO.js → router-_izWQUeG.js} +156 -101
- package/dist/web/server/assets/{routes-Ce2VWrU9.js → routes-BSSKp3Rv.js} +4 -4
- package/dist/web/server/assets/{routes-C61gBiXa.js → routes-BrTOoeth.js} +5 -5
- package/dist/web/server/assets/{routes-V9URcp1v.js → routes-DOj6ljcm.js} +1 -1
- package/dist/web/server/assets/{services-B91w2f-X.js → services-CHe4ihJk.js} +11 -11
- package/dist/web/server/assets/{services-Ccc5s2bS.js → services-Pv_V88VA.js} +3 -3
- package/dist/web/server/assets/{start-CYDpZ6cb.js → start-DlHq0RaQ.js} +1 -1
- package/dist/web/server/assets/team-policy-Csvc5EDd.js +180 -0
- package/dist/web/server/assets/teams-35Oprf6e.js +14 -0
- package/dist/web/server/assets/teams-3im0oQnS.js +11 -0
- package/dist/web/server/assets/teams-B5IF65p2.js +12 -0
- package/dist/web/server/assets/teams-B9O-WDH5.js +108 -0
- package/dist/web/server/assets/teams-DFkN7ic7.js +36 -0
- package/dist/web/server/assets/teams-DH1CvWmT.js +12 -0
- package/dist/web/server/assets/teams-zcm9XaQU.js +174 -0
- package/dist/web/server/assets/{telegram-DfAddLdv.js → telegram-C9sQFwWj.js} +7 -7
- package/dist/web/server/assets/{telegram-T3l9KtiE.js → telegram-mTnJCOmn.js} +1 -1
- package/dist/web/server/assets/{welcome-CP4CZ9B6.js → welcome-CDGE2Sdk.js} +2 -2
- package/dist/web/server/assets/{wire-constants-Deb4NxBb.js → wire-constants-C8nBJcU3.js} +3 -3
- package/dist/web/server/server.js +64 -42
- package/dist/worker.js +180 -128
- package/dist/worker.js.map +1 -1
- package/package.json +7 -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/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/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/memory-BpHbdKsd.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/styles-BgE5bCHA.css +0 -2
- package/dist/web/client/assets/telegram-Czh2MdVm.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/MembersEditor-BWQztvrX.js +0 -131
- 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/_tanstack-start-manifest_v-D9FLKShQ.js +0 -178
- 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/memory-CQaqWnyM.js +0 -284
- 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
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Link, useRouterState } from "@tanstack/react-router";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/TeamTabs.tsx
|
|
4
|
+
var TABS = [
|
|
5
|
+
{
|
|
6
|
+
suffix: "",
|
|
7
|
+
label: "overview",
|
|
8
|
+
exact: true
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
suffix: "/members",
|
|
12
|
+
label: "members"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
suffix: "/policy",
|
|
16
|
+
label: "policy"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
suffix: "/memory",
|
|
20
|
+
label: "memory"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
suffix: "/context",
|
|
24
|
+
label: "context"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
suffix: "/activity",
|
|
28
|
+
label: "activity"
|
|
29
|
+
}
|
|
30
|
+
];
|
|
31
|
+
function TeamTabs({ teamId }) {
|
|
32
|
+
const pathname = useRouterState({ select: (state) => state.location.pathname });
|
|
33
|
+
const base = `/teams/${encodeURIComponent(teamId)}`;
|
|
34
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
35
|
+
"aria-label": "Team sections",
|
|
36
|
+
className: "-mb-px mb-5 flex flex-wrap gap-1 border-b border-frost",
|
|
37
|
+
children: TABS.map((tab) => {
|
|
38
|
+
const href = `${base}${tab.suffix}`;
|
|
39
|
+
const active = "exact" in tab && tab.exact ? pathname === base || pathname === `${base}/` : pathname.startsWith(href);
|
|
40
|
+
return /* @__PURE__ */ jsx(Link, {
|
|
41
|
+
to: href,
|
|
42
|
+
"aria-current": active ? "page" : void 0,
|
|
43
|
+
className: `whitespace-nowrap border-b-2 px-3 py-2 text-sm font-medium ${active ? "border-sapphire text-sapphire" : "border-transparent text-mocha hover:text-sapphire"}`,
|
|
44
|
+
children: tab.label
|
|
45
|
+
}, tab.label);
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { TeamTabs as t };
|
|
@@ -7,13 +7,13 @@ function TemplatesTabs() {
|
|
|
7
7
|
role: "tablist",
|
|
8
8
|
className: "-mb-px mb-5 flex gap-1 border-b border-frost",
|
|
9
9
|
children: [{
|
|
10
|
-
to: "/
|
|
11
|
-
label: "
|
|
12
|
-
match: (p) => p.startsWith("/
|
|
10
|
+
to: "/templates/agents",
|
|
11
|
+
label: "agent templates",
|
|
12
|
+
match: (p) => p.startsWith("/templates/agents")
|
|
13
13
|
}, {
|
|
14
|
-
to: "/
|
|
15
|
-
label: "
|
|
16
|
-
match: (p) => p.startsWith("/
|
|
14
|
+
to: "/templates/teams",
|
|
15
|
+
label: "team templates",
|
|
16
|
+
match: (p) => p.startsWith("/templates/teams")
|
|
17
17
|
}].map((t) => {
|
|
18
18
|
const active = t.match(pathname);
|
|
19
19
|
return /* @__PURE__ */ jsx(Link, {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { t as Route } from "./_id-
|
|
1
|
+
import { t as Route } from "./_id-DdC9wpNN.js";
|
|
2
2
|
import { t as Button } from "./Button-Dsnw22OF.js";
|
|
3
|
+
import { t as TeamTabs } from "./TeamTabs-BPxDBfqy.js";
|
|
3
4
|
import { useState } from "react";
|
|
4
5
|
import { useRouter } from "@tanstack/react-router";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
//#region src/routes/
|
|
7
|
-
function
|
|
8
|
-
const {
|
|
7
|
+
//#region src/routes/teams/$id/index.tsx?tsr-split=component
|
|
8
|
+
function TeamDetailPage() {
|
|
9
|
+
const { team, members, profileGroups } = Route.useLoaderData();
|
|
9
10
|
const router = useRouter();
|
|
10
|
-
const [userMd, setUserMd] = useState(
|
|
11
|
+
const [userMd, setUserMd] = useState(team.userMd);
|
|
11
12
|
const [busy, setBusy] = useState(false);
|
|
12
13
|
const [err, setErr] = useState(null);
|
|
13
14
|
const [savedAt, setSavedAt] = useState(null);
|
|
@@ -15,7 +16,7 @@ function GroupDetailPage() {
|
|
|
15
16
|
setBusy(true);
|
|
16
17
|
setErr(null);
|
|
17
18
|
try {
|
|
18
|
-
const res = await fetch(`/api/
|
|
19
|
+
const res = await fetch(`/api/teams/${encodeURIComponent(team.id)}/user-md`, {
|
|
19
20
|
method: "PUT",
|
|
20
21
|
headers: { "content-type": "application/json" },
|
|
21
22
|
body: JSON.stringify({ userMd })
|
|
@@ -38,13 +39,13 @@ function GroupDetailPage() {
|
|
|
38
39
|
/* @__PURE__ */ jsxs("h1", {
|
|
39
40
|
className: "font-serif text-3xl text-foreground",
|
|
40
41
|
children: [
|
|
41
|
-
|
|
42
|
+
team.name,
|
|
42
43
|
" ",
|
|
43
44
|
/* @__PURE__ */ jsxs("span", {
|
|
44
45
|
className: "text-muted-foreground text-base",
|
|
45
46
|
children: [
|
|
46
47
|
"(",
|
|
47
|
-
|
|
48
|
+
team.id,
|
|
48
49
|
")"
|
|
49
50
|
]
|
|
50
51
|
})
|
|
@@ -55,7 +56,7 @@ function GroupDetailPage() {
|
|
|
55
56
|
children: [
|
|
56
57
|
/* @__PURE__ */ jsx("code", {
|
|
57
58
|
className: "font-mono",
|
|
58
|
-
children:
|
|
59
|
+
children: team.path
|
|
59
60
|
}),
|
|
60
61
|
" · ",
|
|
61
62
|
members.length,
|
|
@@ -65,12 +66,13 @@ function GroupDetailPage() {
|
|
|
65
66
|
" ·",
|
|
66
67
|
" ",
|
|
67
68
|
/* @__PURE__ */ jsx("a", {
|
|
68
|
-
href: `/
|
|
69
|
+
href: `/teams/${encodeURIComponent(team.id)}/memory`,
|
|
69
70
|
className: "text-primary underline",
|
|
70
71
|
children: "shared memory →"
|
|
71
72
|
})
|
|
72
73
|
]
|
|
73
74
|
}),
|
|
75
|
+
/* @__PURE__ */ jsx(TeamTabs, { teamId: team.id }),
|
|
74
76
|
/* @__PURE__ */ jsxs("section", {
|
|
75
77
|
className: "rounded-lg border bg-card p-5 mb-6",
|
|
76
78
|
children: [
|
|
@@ -87,7 +89,7 @@ function GroupDetailPage() {
|
|
|
87
89
|
onChange: (e) => setUserMd(e.target.value),
|
|
88
90
|
rows: 16,
|
|
89
91
|
className: "w-full rounded-md border bg-background px-3 py-2 font-mono text-sm outline-none focus:ring-2 focus:ring-ring/30",
|
|
90
|
-
placeholder: "What the agent should know about you in this
|
|
92
|
+
placeholder: "What the agent should know about you in this team context…"
|
|
91
93
|
}),
|
|
92
94
|
/* @__PURE__ */ jsxs("div", {
|
|
93
95
|
className: "flex items-center gap-3 mt-3",
|
|
@@ -95,7 +97,7 @@ function GroupDetailPage() {
|
|
|
95
97
|
/* @__PURE__ */ jsx(Button, {
|
|
96
98
|
variant: "primary",
|
|
97
99
|
onClick: save,
|
|
98
|
-
disabled: busy || userMd ===
|
|
100
|
+
disabled: busy || userMd === team.userMd,
|
|
99
101
|
children: busy ? "saving…" : "save"
|
|
100
102
|
}),
|
|
101
103
|
/* @__PURE__ */ jsxs("span", {
|
|
@@ -115,12 +117,12 @@ function GroupDetailPage() {
|
|
|
115
117
|
]
|
|
116
118
|
}),
|
|
117
119
|
/* @__PURE__ */ jsx(TopicNameFormatCard, {
|
|
118
|
-
|
|
120
|
+
team,
|
|
119
121
|
sampleAgent: members[0]?.name ?? "researcher",
|
|
120
122
|
onSaved: () => router.invalidate()
|
|
121
123
|
}),
|
|
122
124
|
members.length === 0 && /* @__PURE__ */ jsx(SpawnFromTemplateCard, {
|
|
123
|
-
|
|
125
|
+
teamId: team.id,
|
|
124
126
|
profileGroups,
|
|
125
127
|
onSpawned: () => router.invalidate()
|
|
126
128
|
}),
|
|
@@ -131,7 +133,7 @@ function GroupDetailPage() {
|
|
|
131
133
|
children: "members"
|
|
132
134
|
}), members.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
133
135
|
className: "text-muted-foreground text-sm",
|
|
134
|
-
children: "No agents in this
|
|
136
|
+
children: "No agents in this team yet."
|
|
135
137
|
}) : /* @__PURE__ */ jsxs("table", {
|
|
136
138
|
className: "w-full text-sm",
|
|
137
139
|
children: [/* @__PURE__ */ jsx("thead", {
|
|
@@ -172,19 +174,19 @@ function GroupDetailPage() {
|
|
|
172
174
|
]
|
|
173
175
|
});
|
|
174
176
|
}
|
|
175
|
-
function TopicNameFormatCard({
|
|
176
|
-
const [format, setFormat] = useState(
|
|
177
|
+
function TopicNameFormatCard({ team, sampleAgent, onSaved }) {
|
|
178
|
+
const [format, setFormat] = useState(team.telegramTopicNameFormat ?? "");
|
|
177
179
|
const [busy, setBusy] = useState(false);
|
|
178
180
|
const [err, setErr] = useState(null);
|
|
179
181
|
const [savedAt, setSavedAt] = useState(null);
|
|
180
182
|
const trimmed = format.trim();
|
|
181
|
-
const preview = trimmed ? trimmed.replaceAll("{agent.name}", sampleAgent).replaceAll("{
|
|
182
|
-
const dirty = (
|
|
183
|
+
const preview = trimmed ? trimmed.replaceAll("{agent.name}", sampleAgent).replaceAll("{team.name}", team.name).replaceAll("{team.slug}", team.id) : team.id === "default" ? sampleAgent : `${team.id} › ${sampleAgent}`;
|
|
184
|
+
const dirty = (team.telegramTopicNameFormat ?? "") !== format;
|
|
183
185
|
async function save(clear) {
|
|
184
186
|
setBusy(true);
|
|
185
187
|
setErr(null);
|
|
186
188
|
try {
|
|
187
|
-
const res = await fetch(`/api/
|
|
189
|
+
const res = await fetch(`/api/teams/${encodeURIComponent(team.id)}/topic-format`, {
|
|
188
190
|
method: "PUT",
|
|
189
191
|
headers: { "content-type": "application/json" },
|
|
190
192
|
body: JSON.stringify({ format: clear ? null : format })
|
|
@@ -212,7 +214,7 @@ function TopicNameFormatCard({ group, sampleAgent, onSaved }) {
|
|
|
212
214
|
/* @__PURE__ */ jsxs("p", {
|
|
213
215
|
className: "text-muted-foreground text-sm mb-3",
|
|
214
216
|
children: [
|
|
215
|
-
"Template for this
|
|
217
|
+
"Template for this team's Telegram forum-topic titles. Leave empty for built-in naming. Tokens: ",
|
|
216
218
|
/* @__PURE__ */ jsx("code", {
|
|
217
219
|
className: "font-mono",
|
|
218
220
|
children: "{agent.name}"
|
|
@@ -220,12 +222,12 @@ function TopicNameFormatCard({ group, sampleAgent, onSaved }) {
|
|
|
220
222
|
" ",
|
|
221
223
|
/* @__PURE__ */ jsx("code", {
|
|
222
224
|
className: "font-mono",
|
|
223
|
-
children: "{
|
|
225
|
+
children: "{team.name}"
|
|
224
226
|
}),
|
|
225
227
|
" ",
|
|
226
228
|
/* @__PURE__ */ jsx("code", {
|
|
227
229
|
className: "font-mono",
|
|
228
|
-
children: "{
|
|
230
|
+
children: "{team.slug}"
|
|
229
231
|
}),
|
|
230
232
|
" — must include",
|
|
231
233
|
" ",
|
|
@@ -239,7 +241,7 @@ function TopicNameFormatCard({ group, sampleAgent, onSaved }) {
|
|
|
239
241
|
/* @__PURE__ */ jsx("input", {
|
|
240
242
|
value: format,
|
|
241
243
|
onChange: (e) => setFormat(e.target.value),
|
|
242
|
-
placeholder: "{
|
|
244
|
+
placeholder: "{team.name} / {agent.name}",
|
|
243
245
|
className: "w-full rounded-md border bg-background px-3 py-2 font-mono text-sm outline-none focus:ring-2 focus:ring-ring/30"
|
|
244
246
|
}),
|
|
245
247
|
/* @__PURE__ */ jsxs("p", {
|
|
@@ -258,7 +260,7 @@ function TopicNameFormatCard({ group, sampleAgent, onSaved }) {
|
|
|
258
260
|
disabled: busy || !dirty || trimmed.length === 0,
|
|
259
261
|
children: busy ? "saving…" : "save"
|
|
260
262
|
}),
|
|
261
|
-
|
|
263
|
+
team.telegramTopicNameFormat && /* @__PURE__ */ jsx(Button, {
|
|
262
264
|
variant: "ghost",
|
|
263
265
|
onClick: () => save(true),
|
|
264
266
|
disabled: busy,
|
|
@@ -277,8 +279,8 @@ function TopicNameFormatCard({ group, sampleAgent, onSaved }) {
|
|
|
277
279
|
]
|
|
278
280
|
});
|
|
279
281
|
}
|
|
280
|
-
function SpawnFromTemplateCard({
|
|
281
|
-
const eligible = profileGroups.filter((g) => g.
|
|
282
|
+
function SpawnFromTemplateCard({ teamId, profileGroups, onSpawned }) {
|
|
283
|
+
const eligible = profileGroups.filter((g) => g.slotCount > 0 && !g.deletedAt);
|
|
282
284
|
const [selected, setSelected] = useState(eligible[0]?.id ?? "");
|
|
283
285
|
const [busy, setBusy] = useState(false);
|
|
284
286
|
const [err, setErr] = useState(null);
|
|
@@ -287,17 +289,25 @@ function SpawnFromTemplateCard({ groupId, profileGroups, onSpawned }) {
|
|
|
287
289
|
setBusy(true);
|
|
288
290
|
setErr(null);
|
|
289
291
|
try {
|
|
290
|
-
const
|
|
292
|
+
const template = eligible.find((item) => item.id === selected);
|
|
293
|
+
if (!template) throw new Error("Team template is unavailable.");
|
|
294
|
+
const policyResponse = await fetch(`/api/teams/${encodeURIComponent(teamId)}/policy`);
|
|
295
|
+
if (!policyResponse.ok) throw new Error("The current Team policy is unavailable.");
|
|
296
|
+
const current = await policyResponse.json();
|
|
297
|
+
const res = await fetch(`/api/team-templates/${encodeURIComponent(selected)}/spawn`, {
|
|
291
298
|
method: "POST",
|
|
292
299
|
headers: { "content-type": "application/json" },
|
|
293
|
-
body: JSON.stringify({
|
|
300
|
+
body: JSON.stringify({
|
|
301
|
+
templateExpectedRevision: template.currentRevision,
|
|
302
|
+
teamId,
|
|
303
|
+
teamExpectedRevision: current.teamPolicy.revision,
|
|
304
|
+
mode: "initialize"
|
|
305
|
+
})
|
|
294
306
|
});
|
|
295
307
|
if (!res.ok) {
|
|
296
308
|
const e = await res.json().catch(() => ({}));
|
|
297
309
|
throw new Error(e.error ?? `${res.status} ${res.statusText}`);
|
|
298
310
|
}
|
|
299
|
-
const result = await res.json();
|
|
300
|
-
if (result.orphanAgentIds && result.orphanAgentIds.length > 0) alert(`Spawn completed with warnings: ${result.orphanAgentIds.length} orphan agent dir(s) left on disk.`);
|
|
301
311
|
onSpawned();
|
|
302
312
|
} catch (e) {
|
|
303
313
|
setErr(e.message);
|
|
@@ -310,21 +320,21 @@ function SpawnFromTemplateCard({ groupId, profileGroups, onSpawned }) {
|
|
|
310
320
|
children: [
|
|
311
321
|
/* @__PURE__ */ jsx("h3", {
|
|
312
322
|
className: "font-serif text-xl mb-1",
|
|
313
|
-
children: "spawn a team into this
|
|
323
|
+
children: "spawn a team into this team"
|
|
314
324
|
}),
|
|
315
325
|
/* @__PURE__ */ jsx("p", {
|
|
316
326
|
className: "text-muted-foreground text-sm mb-3",
|
|
317
|
-
children: "This
|
|
327
|
+
children: "This Team is empty. Pick a canonical Team template to initialize its roster and policy at the current reviewed Team and Team revisions."
|
|
318
328
|
}),
|
|
319
329
|
eligible.length === 0 ? /* @__PURE__ */ jsxs("p", {
|
|
320
330
|
className: "text-muted-foreground text-sm",
|
|
321
331
|
children: [
|
|
322
|
-
"No
|
|
332
|
+
"No Team templates with slots yet. Build one on",
|
|
323
333
|
" ",
|
|
324
334
|
/* @__PURE__ */ jsx("a", {
|
|
325
|
-
href: "/
|
|
335
|
+
href: "/templates/teams",
|
|
326
336
|
className: "text-primary underline",
|
|
327
|
-
children: "
|
|
337
|
+
children: "Team templates"
|
|
328
338
|
}),
|
|
329
339
|
" ",
|
|
330
340
|
"first."
|
|
@@ -341,9 +351,11 @@ function SpawnFromTemplateCard({ groupId, profileGroups, onSpawned }) {
|
|
|
341
351
|
children: [
|
|
342
352
|
g.name,
|
|
343
353
|
" (",
|
|
344
|
-
g.
|
|
345
|
-
"
|
|
346
|
-
g.
|
|
354
|
+
g.slotCount,
|
|
355
|
+
" slot",
|
|
356
|
+
g.slotCount === 1 ? "" : "s",
|
|
357
|
+
", r",
|
|
358
|
+
g.currentRevision,
|
|
347
359
|
")"
|
|
348
360
|
]
|
|
349
361
|
}, g.id))
|
|
@@ -364,4 +376,4 @@ function SpawnFromTemplateCard({ groupId, profileGroups, onSpawned }) {
|
|
|
364
376
|
});
|
|
365
377
|
}
|
|
366
378
|
//#endregion
|
|
367
|
-
export {
|
|
379
|
+
export { TeamDetailPage as component };
|
|
@@ -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/templates/teams/$id/index.tsx?tsr-split=errorComponent
|
|
4
|
+
var SplitErrorComponent = ({ error, reset }) => /* @__PURE__ */ jsx(RecoveryState, {
|
|
5
|
+
title: "Team template unavailable",
|
|
6
|
+
error,
|
|
7
|
+
reset,
|
|
8
|
+
fallbackHref: "/templates/teams"
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { SplitErrorComponent as errorComponent };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { t as createServerFn } from "../server.js";
|
|
2
2
|
import { t as createSsrRpc } from "./createSsrRpc-ZBGxhl8t.js";
|
|
3
|
+
import "react";
|
|
3
4
|
import { createFileRoute, lazyRouteComponent, redirect } from "@tanstack/react-router";
|
|
4
|
-
//#region src/routes/
|
|
5
|
-
var $$splitComponentImporter = () => import("./_id-
|
|
6
|
-
var fetchProfile = createServerFn({ method: "POST" }).inputValidator((d) => d).handler(createSsrRpc("
|
|
7
|
-
var Route = createFileRoute("/
|
|
5
|
+
//#region src/routes/templates/agents/$id/index.tsx
|
|
6
|
+
var $$splitComponentImporter = () => import("./_id-CCHA0gdR.js");
|
|
7
|
+
var fetchProfile = createServerFn({ method: "POST" }).inputValidator((d) => d).handler(createSsrRpc("032d74b7d41c718191dbdde6b06ba44993340ce1154af1fa6723a6d4f7a7236e"));
|
|
8
|
+
var Route = createFileRoute("/templates/agents/$id/")({
|
|
8
9
|
loader: async ({ params }) => {
|
|
9
10
|
const data = await fetchProfile({ data: { id: params.id } });
|
|
10
|
-
if (!data) throw redirect({ to: "/
|
|
11
|
+
if (!data) throw redirect({ to: "/templates/agents" });
|
|
11
12
|
return data;
|
|
12
13
|
},
|
|
13
14
|
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { t as Route } from "./_id-
|
|
1
|
+
import { t as Route } from "./_id-DkFgCIb-.js";
|
|
2
2
|
import { t as AgentTabs } from "./AgentTabs-BOjTN7QF.js";
|
|
3
3
|
import { t as AgentAvatar } from "./AgentAvatar-8gTAy_tP.js";
|
|
4
|
-
import { t as ChatPane } from "./ChatPane-
|
|
5
|
-
import { r as REASONING_LEVELS } from "./wire-constants-
|
|
4
|
+
import { t as ChatPane } from "./ChatPane-Dh3qxzdb.js";
|
|
5
|
+
import { r as REASONING_LEVELS } from "./wire-constants-C8nBJcU3.js";
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import { useRouter } from "@tanstack/react-router";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { ArrowLeft } from "lucide-react";
|
|
9
10
|
//#region src/components/CopyButton.tsx
|
|
10
11
|
function CopyButton({ value, className, ariaLabel = "Copy to clipboard", title = "Copy to clipboard" }) {
|
|
11
12
|
const [copied, setCopied] = useState(false);
|
|
@@ -48,7 +49,8 @@ function CopyButton({ value, className, ariaLabel = "Copy to clipboard", title =
|
|
|
48
49
|
//#endregion
|
|
49
50
|
//#region src/routes/agents/$id/index.tsx?tsr-split=component
|
|
50
51
|
function AgentDetailPage() {
|
|
51
|
-
const { resolved, initialMessages, sessionHead,
|
|
52
|
+
const { resolved, initialMessages, sessionHead, teams, skills, modelGroups, telegramConfigured } = Route.useLoaderData();
|
|
53
|
+
const search = Route.useSearch();
|
|
52
54
|
const router = useRouter();
|
|
53
55
|
async function archive() {
|
|
54
56
|
if (!confirm(`archive "${resolved.agent.name}"? (reversible)`)) return;
|
|
@@ -62,7 +64,13 @@ function AgentDetailPage() {
|
|
|
62
64
|
async function del() {
|
|
63
65
|
const msg = `Permanently delete agent "${resolved.agent.name}"?\n\nThis removes the DB rows (messages, triggers, skill attachments) AND the agent's on-disk directory (memory, templates, state, sessions). This cannot be undone.`;
|
|
64
66
|
if (!confirm(msg)) return;
|
|
65
|
-
const
|
|
67
|
+
const policyResponse = await fetch(`/api/teams/${encodeURIComponent(resolved.team.id)}/policy`);
|
|
68
|
+
if (!policyResponse.ok) {
|
|
69
|
+
alert("The current Team policy is unavailable. Nothing was deleted.");
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const current = await policyResponse.json();
|
|
73
|
+
const res = await fetch(`/api/agents/${resolved.agent.id}?expectedTeamRevision=${current.teamPolicy.revision}`, { method: "DELETE" });
|
|
66
74
|
if (res.ok || res.status === 204) window.location.assign("/agents");
|
|
67
75
|
else alert(`failed: ${res.statusText}`);
|
|
68
76
|
}
|
|
@@ -70,6 +78,17 @@ function AgentDetailPage() {
|
|
|
70
78
|
/* @__PURE__ */ jsxs("header", {
|
|
71
79
|
className: "mb-8",
|
|
72
80
|
children: [
|
|
81
|
+
search.teamPolicy && /* @__PURE__ */ jsxs("div", {
|
|
82
|
+
className: "mb-4 flex flex-wrap items-center gap-2",
|
|
83
|
+
children: [/* @__PURE__ */ jsxs("a", {
|
|
84
|
+
href: `/teams/${encodeURIComponent(search.teamPolicy)}/policy?view=${search.view ?? "flow"}&selected=${encodeURIComponent(search.selected ?? "")}&vx=${search.vx ?? 0}&vy=${search.vy ?? 0}&vz=${search.vz ?? .9}`,
|
|
85
|
+
className: "ghost-btn",
|
|
86
|
+
children: [/* @__PURE__ */ jsx(ArrowLeft, { className: "h-4 w-4" }), " back to Team policy"]
|
|
87
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
88
|
+
className: "text-xs text-mocha-light",
|
|
89
|
+
children: "Returns to the same projection, viewport, and selection."
|
|
90
|
+
})]
|
|
91
|
+
}),
|
|
73
92
|
/* @__PURE__ */ jsxs("div", {
|
|
74
93
|
className: "flex items-center gap-3",
|
|
75
94
|
children: [/* @__PURE__ */ jsx(AgentAvatar, {
|
|
@@ -103,18 +122,18 @@ function AgentDetailPage() {
|
|
|
103
122
|
children: resolved.profile.id
|
|
104
123
|
})] }),
|
|
105
124
|
/* @__PURE__ */ jsxs(Tag, { children: [
|
|
106
|
-
"
|
|
125
|
+
"team:",
|
|
107
126
|
" ",
|
|
108
127
|
/* @__PURE__ */ jsx("a", {
|
|
109
|
-
href: `/
|
|
128
|
+
href: `/teams/${encodeURIComponent(resolved.team.id)}`,
|
|
110
129
|
className: "ml-1 bg-transparent px-0 font-mono underline",
|
|
111
|
-
children: resolved.
|
|
130
|
+
children: resolved.team.id
|
|
112
131
|
}),
|
|
113
132
|
" ",
|
|
114
133
|
"·",
|
|
115
134
|
" ",
|
|
116
135
|
/* @__PURE__ */ jsx("a", {
|
|
117
|
-
href: `/
|
|
136
|
+
href: `/teams/${encodeURIComponent(resolved.team.id)}/memory`,
|
|
118
137
|
className: "ml-0.5 underline",
|
|
119
138
|
children: "shared memory →"
|
|
120
139
|
})
|
|
@@ -198,29 +217,29 @@ function AgentDetailPage() {
|
|
|
198
217
|
/* @__PURE__ */ jsxs("section", {
|
|
199
218
|
className: "mt-10",
|
|
200
219
|
children: [
|
|
201
|
-
/* @__PURE__ */ jsx(SectionTitle, { children: "
|
|
220
|
+
/* @__PURE__ */ jsx(SectionTitle, { children: "Team" }),
|
|
202
221
|
/* @__PURE__ */ jsxs("p", {
|
|
203
222
|
className: "text-[0.9em] text-mocha-light",
|
|
204
223
|
children: [
|
|
205
|
-
"Current
|
|
206
|
-
/* @__PURE__ */ jsx("code", { children: resolved.
|
|
224
|
+
"Current team: ",
|
|
225
|
+
/* @__PURE__ */ jsx("code", { children: resolved.team.id }),
|
|
207
226
|
" (",
|
|
208
|
-
resolved.
|
|
227
|
+
resolved.team.name,
|
|
209
228
|
") —",
|
|
210
229
|
" ",
|
|
211
|
-
/* @__PURE__ */ jsx("code", { children: resolved.
|
|
230
|
+
/* @__PURE__ */ jsx("code", { children: resolved.team.path }),
|
|
212
231
|
".",
|
|
213
232
|
" ",
|
|
214
233
|
/* @__PURE__ */ jsx("a", {
|
|
215
|
-
href: `/
|
|
234
|
+
href: `/teams/${resolved.team.id}`,
|
|
216
235
|
children: "view / edit USER.md"
|
|
217
236
|
})
|
|
218
237
|
]
|
|
219
238
|
}),
|
|
220
239
|
/* @__PURE__ */ jsx(MoveGroupForm, {
|
|
221
240
|
agentId: resolved.agent.id,
|
|
222
|
-
|
|
223
|
-
|
|
241
|
+
currentTeamId: resolved.team.id,
|
|
242
|
+
teams
|
|
224
243
|
})
|
|
225
244
|
]
|
|
226
245
|
}),
|
|
@@ -356,21 +375,50 @@ function SettingsDetails({ agentId, currentModelOverride, profileDefaultModel, c
|
|
|
356
375
|
})]
|
|
357
376
|
});
|
|
358
377
|
}
|
|
359
|
-
function MoveGroupForm({ agentId,
|
|
378
|
+
function MoveGroupForm({ agentId, currentTeamId, teams }) {
|
|
360
379
|
const router = useRouter();
|
|
361
|
-
const [
|
|
380
|
+
const [teamId, setTeamId] = useState(currentTeamId);
|
|
362
381
|
const [moving, setMoving] = useState(false);
|
|
382
|
+
const [placement, setPlacement] = useState("profile_defaults");
|
|
363
383
|
const [err, setErr] = useState(null);
|
|
384
|
+
const [preview, setPreview] = useState(null);
|
|
364
385
|
async function move(e) {
|
|
365
386
|
e.preventDefault();
|
|
366
|
-
if (
|
|
387
|
+
if (teamId === currentTeamId) return;
|
|
367
388
|
setMoving(true);
|
|
368
389
|
setErr(null);
|
|
369
390
|
try {
|
|
370
|
-
const
|
|
391
|
+
const [sourceResponse, destinationResponse] = await Promise.all([fetch(`/api/teams/${encodeURIComponent(currentTeamId)}/policy`), fetch(`/api/teams/${encodeURIComponent(teamId)}/policy`)]);
|
|
392
|
+
if (!sourceResponse.ok || !destinationResponse.ok) throw new Error("A Team policy is unavailable. Nothing was moved.");
|
|
393
|
+
const source = await sourceResponse.json();
|
|
394
|
+
const destination = await destinationResponse.json();
|
|
395
|
+
const request = {
|
|
396
|
+
teamId,
|
|
397
|
+
sourceExpectedRevision: source.teamPolicy.revision,
|
|
398
|
+
destinationExpectedRevision: destination.teamPolicy.revision,
|
|
399
|
+
placement
|
|
400
|
+
};
|
|
401
|
+
if (!preview) {
|
|
402
|
+
const response = await fetch(`/api/agents/${encodeURIComponent(agentId)}/team/preview`, {
|
|
403
|
+
method: "POST",
|
|
404
|
+
headers: { "content-type": "application/json" },
|
|
405
|
+
body: JSON.stringify(request)
|
|
406
|
+
});
|
|
407
|
+
if (!response.ok) {
|
|
408
|
+
const body = await response.json().catch(() => null);
|
|
409
|
+
throw new Error(body?.error ?? response.statusText);
|
|
410
|
+
}
|
|
411
|
+
setPreview(await response.json());
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
const res = await fetch(`/api/agents/${encodeURIComponent(agentId)}/team`, {
|
|
371
415
|
method: "PATCH",
|
|
372
416
|
headers: { "content-type": "application/json" },
|
|
373
|
-
body: JSON.stringify({
|
|
417
|
+
body: JSON.stringify({
|
|
418
|
+
...request,
|
|
419
|
+
sourceExpectedRevision: preview.source.currentRevision,
|
|
420
|
+
destinationExpectedRevision: preview.destination.currentRevision
|
|
421
|
+
})
|
|
374
422
|
});
|
|
375
423
|
if (!res.ok) {
|
|
376
424
|
const body = await res.json().catch(() => null);
|
|
@@ -390,10 +438,13 @@ function MoveGroupForm({ agentId, currentGroupId, groups }) {
|
|
|
390
438
|
/* @__PURE__ */ jsxs("label", {
|
|
391
439
|
className: "flex flex-col gap-1 text-[0.85em] text-mocha-light",
|
|
392
440
|
children: ["move to:", /* @__PURE__ */ jsx("select", {
|
|
393
|
-
value:
|
|
394
|
-
onChange: (e) =>
|
|
441
|
+
value: teamId,
|
|
442
|
+
onChange: (e) => {
|
|
443
|
+
setTeamId(e.target.value);
|
|
444
|
+
setPreview(null);
|
|
445
|
+
},
|
|
395
446
|
className: "min-w-[18rem] rounded-sm border border-frost bg-snow px-2 py-1.5",
|
|
396
|
-
children:
|
|
447
|
+
children: teams.map((g) => /* @__PURE__ */ jsxs("option", {
|
|
397
448
|
value: g.id,
|
|
398
449
|
children: [
|
|
399
450
|
g.id,
|
|
@@ -403,14 +454,62 @@ function MoveGroupForm({ agentId, currentGroupId, groups }) {
|
|
|
403
454
|
}, g.id))
|
|
404
455
|
})]
|
|
405
456
|
}),
|
|
457
|
+
/* @__PURE__ */ jsxs("label", {
|
|
458
|
+
className: "flex flex-col gap-1 text-[0.85em] text-mocha-light",
|
|
459
|
+
children: ["destination placement:", /* @__PURE__ */ jsxs("select", {
|
|
460
|
+
value: placement,
|
|
461
|
+
onChange: (e) => {
|
|
462
|
+
setPlacement(e.target.value);
|
|
463
|
+
setPreview(null);
|
|
464
|
+
},
|
|
465
|
+
className: "rounded-sm border border-frost bg-snow px-2 py-1.5",
|
|
466
|
+
children: [
|
|
467
|
+
/* @__PURE__ */ jsx("option", {
|
|
468
|
+
value: "profile_defaults",
|
|
469
|
+
children: "agent-template defaults"
|
|
470
|
+
}),
|
|
471
|
+
/* @__PURE__ */ jsx("option", {
|
|
472
|
+
value: "isolated",
|
|
473
|
+
children: "isolated"
|
|
474
|
+
}),
|
|
475
|
+
/* @__PURE__ */ jsx("option", {
|
|
476
|
+
value: "open",
|
|
477
|
+
children: "open"
|
|
478
|
+
})
|
|
479
|
+
]
|
|
480
|
+
})]
|
|
481
|
+
}),
|
|
406
482
|
/* @__PURE__ */ jsx("button", {
|
|
407
483
|
type: "submit",
|
|
408
|
-
disabled: moving ||
|
|
409
|
-
children: moving ? "
|
|
484
|
+
disabled: moving || teamId === currentTeamId,
|
|
485
|
+
children: moving ? "working…" : preview ? "commit reviewed move" : "review move"
|
|
410
486
|
}),
|
|
411
487
|
err && /* @__PURE__ */ jsx("span", {
|
|
412
488
|
className: "text-[0.85em] text-[#9B3D3D]",
|
|
413
489
|
children: err
|
|
490
|
+
}),
|
|
491
|
+
preview && /* @__PURE__ */ jsxs("div", {
|
|
492
|
+
className: "basis-full rounded-md border border-sapphire-light bg-sapphire-glow p-3 text-sm",
|
|
493
|
+
children: [/* @__PURE__ */ jsxs("p", { children: [
|
|
494
|
+
"Source revision ",
|
|
495
|
+
preview.source.currentRevision,
|
|
496
|
+
" → ",
|
|
497
|
+
/* @__PURE__ */ jsx("strong", { children: preview.source.resultingRevision }),
|
|
498
|
+
", removing ",
|
|
499
|
+
preview.source.removedEdges.length,
|
|
500
|
+
" incident edges. Destination revision ",
|
|
501
|
+
preview.destination.currentRevision,
|
|
502
|
+
" → ",
|
|
503
|
+
/* @__PURE__ */ jsx("strong", { children: preview.destination.resultingRevision }),
|
|
504
|
+
", adding ",
|
|
505
|
+
preview.destination.addedEdges.length,
|
|
506
|
+
" edges to ",
|
|
507
|
+
preview.destination.existingEdges.length,
|
|
508
|
+
" existing edges."
|
|
509
|
+
] }), /* @__PURE__ */ jsx("p", {
|
|
510
|
+
className: "mt-1 muted",
|
|
511
|
+
children: preview.lineage
|
|
512
|
+
})]
|
|
414
513
|
})
|
|
415
514
|
]
|
|
416
515
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { t as createServerFn } from "../server.js";
|
|
2
|
+
import { t as createSsrRpc } from "./createSsrRpc-ZBGxhl8t.js";
|
|
3
|
+
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
|
+
//#region src/routes/templates/teams/$id/index.tsx
|
|
5
|
+
var $$splitErrorComponentImporter = () => import("./_id-A8Xiv6Lc.js");
|
|
6
|
+
var $$splitComponentImporter = () => import("./_id-C4AOhstq.js");
|
|
7
|
+
var fetchTeam = createServerFn({ method: "POST" }).validator((data) => data).handler(createSsrRpc("a0bbbee5d0c1240a05e35c04d56a0e95ec78f05265e4e937eec48c8ac2041e58"));
|
|
8
|
+
var Route = createFileRoute("/templates/teams/$id/")({
|
|
9
|
+
loader: ({ params }) => fetchTeam({ data: params }),
|
|
10
|
+
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
11
|
+
errorComponent: lazyRouteComponent($$splitErrorComponentImporter, "errorComponent")
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Route as t };
|