bazilion 0.7.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 +1257 -638
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +5334 -1594
- 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-BSAVT-17.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-D8lNr2SX.js → login-Bk2wwIHQ.js} +1 -1
- package/dist/web/client/assets/{mcp-BLnngDsj.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-B__fLZjx.js +1 -0
- 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-D2_O9ARe.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-D0ytyXGY.js → _id-B6g9wmPR.js} +167 -31
- 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-81NrHA5d.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-BpBZgRwn.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/{skills-dLyBZb3B.js → skills-D89ND2kR.js} +67 -7
- package/dist/web/server/assets/{skills-CpsyR_WA.js → skills-l2cyQ3zS.js} +1 -1
- 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-Da7mg9FI.js +0 -1
- package/dist/web/client/assets/_id-BdKmo0gb.js +0 -1
- package/dist/web/client/assets/_id-LT6Ejjr0.js +0 -1
- package/dist/web/client/assets/_id-MR2XjWh0.js +0 -1
- package/dist/web/client/assets/_id-_6jIt0_-.js +0 -1
- package/dist/web/client/assets/agents-0arKbVYG.js +0 -1
- package/dist/web/client/assets/groups-BqTkhHes.js +0 -1
- package/dist/web/client/assets/inbox-ozoCXzr5.js +0 -1
- package/dist/web/client/assets/index-iayCEuU2.js +0 -12
- package/dist/web/client/assets/memory-D1GQjEvN.js +0 -1
- package/dist/web/client/assets/profile-groups-C2yJPTaE.js +0 -1
- package/dist/web/client/assets/profiles-BV7AAZjj.js +0 -1
- package/dist/web/client/assets/routes-DSHQLA7K.js +0 -1
- package/dist/web/client/assets/services-BbCJe1Du.js +0 -1
- package/dist/web/client/assets/skills-C6czKR5I.js +0 -1
- package/dist/web/client/assets/styles-C06axZZk.css +0 -2
- package/dist/web/client/assets/telegram-gE4j8gte.js +0 -1
- package/dist/web/client/assets/triggers-WljnfEfJ.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-DBlFH2gg.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
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as Route } from "./agents-
|
|
1
|
+
import { t as Route } from "./agents-Bp1nsVs2.js";
|
|
2
2
|
import { t as AgentAvatar } from "./AgentAvatar-8gTAy_tP.js";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { useRouter } from "@tanstack/react-router";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/routes/agents/index.tsx?tsr-split=component
|
|
7
7
|
function AgentsPage() {
|
|
8
|
-
const { agents, profiles,
|
|
8
|
+
const { agents, profiles, teams, modelGroups } = Route.useLoaderData();
|
|
9
9
|
const { all } = Route.useSearch();
|
|
10
10
|
const showAll = all === "1";
|
|
11
11
|
const router = useRouter();
|
|
@@ -20,14 +20,19 @@ function AgentsPage() {
|
|
|
20
20
|
}
|
|
21
21
|
async function del(id) {
|
|
22
22
|
if (!confirm("permanently delete this agent and all its data?")) return;
|
|
23
|
-
|
|
23
|
+
const agent = agents.find((candidate) => candidate.id === id);
|
|
24
|
+
if (!agent) return;
|
|
25
|
+
const policyResponse = await fetch(`/api/teams/${encodeURIComponent(agent.teamId)}/policy`);
|
|
26
|
+
if (!policyResponse.ok) return;
|
|
27
|
+
const policy = await policyResponse.json();
|
|
28
|
+
await fetch(`/api/agents/${encodeURIComponent(id)}?expectedTeamRevision=${policy.teamPolicy.revision}`, { method: "DELETE" });
|
|
24
29
|
await router.invalidate();
|
|
25
30
|
}
|
|
26
31
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
27
32
|
/* @__PURE__ */ jsx("h1", { children: "agents" }),
|
|
28
33
|
/* @__PURE__ */ jsx(SpawnForm, {
|
|
29
34
|
profiles,
|
|
30
|
-
|
|
35
|
+
teams,
|
|
31
36
|
modelGroups,
|
|
32
37
|
onSpawned: router.invalidate
|
|
33
38
|
}),
|
|
@@ -89,11 +94,12 @@ function AgentsPage() {
|
|
|
89
94
|
] }, a.id))] })] })
|
|
90
95
|
] });
|
|
91
96
|
}
|
|
92
|
-
function SpawnForm({ profiles,
|
|
97
|
+
function SpawnForm({ profiles, teams, modelGroups, onSpawned }) {
|
|
93
98
|
const [profileId, setProfileId] = useState("");
|
|
94
99
|
const [name, setName] = useState("");
|
|
95
100
|
const [model, setModel] = useState("");
|
|
96
|
-
const [
|
|
101
|
+
const [teamId, setTeamId] = useState(teams.find((g) => g.id === "default")?.id ?? "");
|
|
102
|
+
const [placement, setPlacement] = useState("profile_defaults");
|
|
97
103
|
const [submitting, setSubmitting] = useState(false);
|
|
98
104
|
const [err, setErr] = useState(null);
|
|
99
105
|
async function submit(e) {
|
|
@@ -108,7 +114,14 @@ function SpawnForm({ profiles, groups, modelGroups, onSpawned }) {
|
|
|
108
114
|
const body = { profile: profileId };
|
|
109
115
|
if (name) body.name = name;
|
|
110
116
|
if (model) body.model = model;
|
|
111
|
-
if (
|
|
117
|
+
if (teamId) {
|
|
118
|
+
const policyResponse = await fetch(`/api/teams/${encodeURIComponent(teamId)}/policy`);
|
|
119
|
+
if (!policyResponse.ok) throw new Error("The selected Team policy is unavailable.");
|
|
120
|
+
const current = await policyResponse.json();
|
|
121
|
+
body.teamId = teamId;
|
|
122
|
+
body.teamExpectedRevision = current.teamPolicy.revision;
|
|
123
|
+
body.placement = placement;
|
|
124
|
+
}
|
|
112
125
|
const res = await fetch("/api/agents", {
|
|
113
126
|
method: "POST",
|
|
114
127
|
headers: { "content-type": "application/json" },
|
|
@@ -118,6 +131,7 @@ function SpawnForm({ profiles, groups, modelGroups, onSpawned }) {
|
|
|
118
131
|
const b = await res.json().catch(() => null);
|
|
119
132
|
throw new Error(b?.error ?? res.statusText);
|
|
120
133
|
}
|
|
134
|
+
await res.json();
|
|
121
135
|
setName("");
|
|
122
136
|
setModel("");
|
|
123
137
|
onSpawned();
|
|
@@ -182,13 +196,13 @@ function SpawnForm({ profiles, groups, modelGroups, onSpawned }) {
|
|
|
182
196
|
}, m))
|
|
183
197
|
}, g.provider))]
|
|
184
198
|
})] }),
|
|
185
|
-
/* @__PURE__ */ jsxs("label", { children: ["
|
|
199
|
+
/* @__PURE__ */ jsxs("label", { children: ["team", teams.length === 0 ? /* @__PURE__ */ jsx("select", {
|
|
186
200
|
disabled: true,
|
|
187
|
-
children: /* @__PURE__ */ jsx("option", { children: "(no
|
|
201
|
+
children: /* @__PURE__ */ jsx("option", { children: "(no teams — register one on /teams)" })
|
|
188
202
|
}) : /* @__PURE__ */ jsx("select", {
|
|
189
|
-
value:
|
|
190
|
-
onChange: (e) =>
|
|
191
|
-
children:
|
|
203
|
+
value: teamId,
|
|
204
|
+
onChange: (e) => setTeamId(e.target.value),
|
|
205
|
+
children: teams.map((g) => /* @__PURE__ */ jsxs("option", {
|
|
192
206
|
value: g.id,
|
|
193
207
|
children: [
|
|
194
208
|
g.id,
|
|
@@ -198,6 +212,31 @@ function SpawnForm({ profiles, groups, modelGroups, onSpawned }) {
|
|
|
198
212
|
]
|
|
199
213
|
}, g.id))
|
|
200
214
|
})] }),
|
|
215
|
+
/* @__PURE__ */ jsxs("label", { children: [
|
|
216
|
+
"initial policy placement",
|
|
217
|
+
/* @__PURE__ */ jsxs("select", {
|
|
218
|
+
value: placement,
|
|
219
|
+
onChange: (e) => setPlacement(e.target.value),
|
|
220
|
+
children: [
|
|
221
|
+
/* @__PURE__ */ jsx("option", {
|
|
222
|
+
value: "profile_defaults",
|
|
223
|
+
children: "agent-template defaults"
|
|
224
|
+
}),
|
|
225
|
+
/* @__PURE__ */ jsx("option", {
|
|
226
|
+
value: "isolated",
|
|
227
|
+
children: "isolated"
|
|
228
|
+
}),
|
|
229
|
+
/* @__PURE__ */ jsx("option", {
|
|
230
|
+
value: "open",
|
|
231
|
+
children: "open to current members and boundaries"
|
|
232
|
+
})
|
|
233
|
+
]
|
|
234
|
+
}),
|
|
235
|
+
/* @__PURE__ */ jsx("span", {
|
|
236
|
+
className: "muted mt-1 block text-xs",
|
|
237
|
+
children: "Submit uses the latest displayed Team revision; a concurrent policy change is shown as a conflict and never overwritten."
|
|
238
|
+
})
|
|
239
|
+
] }),
|
|
201
240
|
/* @__PURE__ */ jsx("button", {
|
|
202
241
|
type: "submit",
|
|
203
242
|
disabled: submitting,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as createServerFn } from "../server.js";
|
|
2
2
|
import { t as createServerRpc } from "./createServerRpc-CeKECg65.js";
|
|
3
3
|
import { n as daemonClient } from "./daemon-client-2NRMzlTr.js";
|
|
4
|
-
//#region src/routes/
|
|
4
|
+
//#region src/routes/templates/agents/index.tsx?tss-serverfn-split
|
|
5
5
|
var fetchProfiles_createServerFn_handler = createServerRpc({
|
|
6
|
-
id: "
|
|
6
|
+
id: "bc31355f2be9889a616d03c35062d483ea77c3f967af9432d721626a81078ef3",
|
|
7
7
|
name: "fetchProfiles",
|
|
8
|
-
filename: "src/routes/
|
|
8
|
+
filename: "src/routes/templates/agents/index.tsx"
|
|
9
9
|
}, (opts) => fetchProfiles.__executeServer(opts));
|
|
10
10
|
var fetchProfiles = createServerFn({ method: "GET" }).handler(fetchProfiles_createServerFn_handler, async () => {
|
|
11
11
|
const c = daemonClient();
|
|
@@ -17,7 +17,7 @@ var fetchProfiles = createServerFn({ method: "GET" }).handler(fetchProfiles_crea
|
|
|
17
17
|
]);
|
|
18
18
|
return {
|
|
19
19
|
profiles,
|
|
20
|
-
modelGroups: models.
|
|
20
|
+
modelGroups: models.teams,
|
|
21
21
|
skills,
|
|
22
22
|
templates
|
|
23
23
|
};
|
|
@@ -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 };
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { t as Route } from "./approvals-Dw2LJoSA.js";
|
|
2
|
+
import { t as Button } from "./Button-Dsnw22OF.js";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/routes/approvals/index.tsx?tsr-split=component
|
|
6
|
+
function ApprovalQueue() {
|
|
7
|
+
const [approvals, setApprovals] = useState(Route.useLoaderData().approvals);
|
|
8
|
+
const [status, setStatus] = useState("pending");
|
|
9
|
+
const [selected, setSelected] = useState(null);
|
|
10
|
+
const [busy, setBusy] = useState(false);
|
|
11
|
+
const [notice, setNotice] = useState(null);
|
|
12
|
+
const visible = approvals.filter((item) => status === "all" || item.status === status);
|
|
13
|
+
const refresh = async () => {
|
|
14
|
+
const response = await fetch("/api/approvals?limit=100");
|
|
15
|
+
if (!response.ok) throw new Error(`Could not refresh approvals (${response.status})`);
|
|
16
|
+
setApprovals((await response.json()).approvals);
|
|
17
|
+
};
|
|
18
|
+
const inspect = async (id) => {
|
|
19
|
+
const response = await fetch(`/api/approvals/${encodeURIComponent(id)}`);
|
|
20
|
+
if (!response.ok) throw new Error(`Could not load approval (${response.status})`);
|
|
21
|
+
setSelected(await response.json());
|
|
22
|
+
};
|
|
23
|
+
const decide = async (action) => {
|
|
24
|
+
if (!selected) return;
|
|
25
|
+
setBusy(true);
|
|
26
|
+
setNotice(null);
|
|
27
|
+
try {
|
|
28
|
+
const response = await fetch(`/api/approvals/${encodeURIComponent(selected.id)}/${action}`, {
|
|
29
|
+
method: "POST",
|
|
30
|
+
headers: { "content-type": "application/json" },
|
|
31
|
+
body: JSON.stringify({ reason: action === "deny" ? "Denied by operator" : void 0 })
|
|
32
|
+
});
|
|
33
|
+
const body = await response.json();
|
|
34
|
+
if (!response.ok) throw new Error(body.error ?? `Decision failed (${response.status})`);
|
|
35
|
+
await refresh();
|
|
36
|
+
await inspect(selected.id);
|
|
37
|
+
setNotice(action === "approve" ? "Approved and delivered once." : "Denied.");
|
|
38
|
+
} catch (error) {
|
|
39
|
+
setNotice(error instanceof Error ? error.message : String(error));
|
|
40
|
+
await refresh();
|
|
41
|
+
await inspect(selected.id);
|
|
42
|
+
} finally {
|
|
43
|
+
setBusy(false);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
47
|
+
className: "mx-auto max-w-6xl space-y-5 px-4 py-6 sm:px-6",
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h1", { children: "communication approvals" }), /* @__PURE__ */ jsx("p", {
|
|
50
|
+
className: "muted",
|
|
51
|
+
children: "One durable queue for policy-protected attempts. Approval authorizes only the captured attempt."
|
|
52
|
+
})] }),
|
|
53
|
+
/* @__PURE__ */ jsxs("label", {
|
|
54
|
+
className: "block max-w-xs text-sm",
|
|
55
|
+
children: ["Status", /* @__PURE__ */ jsxs("select", {
|
|
56
|
+
value: status,
|
|
57
|
+
onChange: (event) => setStatus(event.target.value),
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ jsx("option", {
|
|
60
|
+
value: "pending",
|
|
61
|
+
children: "Pending"
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ jsx("option", {
|
|
64
|
+
value: "all",
|
|
65
|
+
children: "All history"
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ jsx("option", {
|
|
68
|
+
value: "delivered",
|
|
69
|
+
children: "Delivered"
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ jsx("option", {
|
|
72
|
+
value: "denied",
|
|
73
|
+
children: "Denied"
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ jsx("option", {
|
|
76
|
+
value: "expired",
|
|
77
|
+
children: "Expired"
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ jsx("option", {
|
|
80
|
+
value: "cancelled",
|
|
81
|
+
children: "Cancelled"
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ jsx("option", {
|
|
84
|
+
value: "delivery_failed",
|
|
85
|
+
children: "Delivery failed"
|
|
86
|
+
})
|
|
87
|
+
]
|
|
88
|
+
})]
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ jsxs("div", {
|
|
91
|
+
className: "grid gap-5 lg:grid-cols-[minmax(0,1fr)_minmax(320px,0.8fr)]",
|
|
92
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
93
|
+
className: "overflow-x-auto rounded-lg border border-frost",
|
|
94
|
+
children: [/* @__PURE__ */ jsxs("table", {
|
|
95
|
+
className: "w-full",
|
|
96
|
+
children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
97
|
+
/* @__PURE__ */ jsx("th", { children: "Status" }),
|
|
98
|
+
/* @__PURE__ */ jsx("th", { children: "Path" }),
|
|
99
|
+
/* @__PURE__ */ jsx("th", { children: "Origin" }),
|
|
100
|
+
/* @__PURE__ */ jsx("th", { children: "Expires" })
|
|
101
|
+
] }) }), /* @__PURE__ */ jsx("tbody", { children: visible.map((item) => /* @__PURE__ */ jsxs("tr", {
|
|
102
|
+
tabIndex: 0,
|
|
103
|
+
role: "button",
|
|
104
|
+
"aria-label": `Inspect ${item.attemptKind} approval`,
|
|
105
|
+
onClick: () => void inspect(item.id),
|
|
106
|
+
onKeyDown: (event) => {
|
|
107
|
+
if (event.key === "Enter" || event.key === " ") inspect(item.id);
|
|
108
|
+
},
|
|
109
|
+
className: "cursor-pointer",
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Status, { value: item.status }) }),
|
|
112
|
+
/* @__PURE__ */ jsxs("td", { children: [
|
|
113
|
+
endpoint(item.source),
|
|
114
|
+
" → ",
|
|
115
|
+
endpoint(item.target)
|
|
116
|
+
] }),
|
|
117
|
+
/* @__PURE__ */ jsx("td", { children: item.origin }),
|
|
118
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("time", {
|
|
119
|
+
dateTime: new Date(item.expiresAt).toISOString(),
|
|
120
|
+
children: formatTimestamp(item.expiresAt)
|
|
121
|
+
}) })
|
|
122
|
+
]
|
|
123
|
+
}, item.id)) })]
|
|
124
|
+
}), !visible.length && /* @__PURE__ */ jsx("p", {
|
|
125
|
+
className: "muted p-4",
|
|
126
|
+
children: "No approvals match this filter."
|
|
127
|
+
})]
|
|
128
|
+
}), /* @__PURE__ */ jsx("aside", {
|
|
129
|
+
className: "card min-w-0",
|
|
130
|
+
"aria-label": "Approval detail",
|
|
131
|
+
children: !selected ? /* @__PURE__ */ jsx("p", {
|
|
132
|
+
className: "muted",
|
|
133
|
+
children: "Select an attempt to inspect its policy and audit history."
|
|
134
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
135
|
+
className: "space-y-4",
|
|
136
|
+
children: [
|
|
137
|
+
/* @__PURE__ */ jsxs("div", {
|
|
138
|
+
className: "flex flex-wrap items-center gap-2",
|
|
139
|
+
children: [/* @__PURE__ */ jsx("h2", {
|
|
140
|
+
className: "m-0 text-lg",
|
|
141
|
+
children: "attempt detail"
|
|
142
|
+
}), /* @__PURE__ */ jsx(Status, { value: selected.status })]
|
|
143
|
+
}),
|
|
144
|
+
/* @__PURE__ */ jsxs("dl", {
|
|
145
|
+
className: "grid gap-3 text-sm",
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ jsx(Fact, {
|
|
148
|
+
label: "Attempt",
|
|
149
|
+
value: `${selected.attemptKind}:${selected.attemptId}`
|
|
150
|
+
}),
|
|
151
|
+
/* @__PURE__ */ jsx(Fact, {
|
|
152
|
+
label: "Operation",
|
|
153
|
+
value: selected.operation
|
|
154
|
+
}),
|
|
155
|
+
/* @__PURE__ */ jsx(Fact, {
|
|
156
|
+
label: "Path",
|
|
157
|
+
value: `${endpoint(selected.source)} → ${endpoint(selected.target)}`
|
|
158
|
+
}),
|
|
159
|
+
/* @__PURE__ */ jsx(Fact, {
|
|
160
|
+
label: "Policy",
|
|
161
|
+
value: selected.policyRefs.map((ref) => `${ref.teamId}@${ref.revision}`).join(", ")
|
|
162
|
+
}),
|
|
163
|
+
/* @__PURE__ */ jsx(Fact, {
|
|
164
|
+
label: "Expires",
|
|
165
|
+
value: formatTimestamp(selected.expiresAt)
|
|
166
|
+
})
|
|
167
|
+
]
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ jsxs("details", { children: [/* @__PURE__ */ jsx("summary", {
|
|
170
|
+
className: "cursor-pointer text-sm font-semibold",
|
|
171
|
+
children: "Sensitive payload"
|
|
172
|
+
}), /* @__PURE__ */ jsx("pre", {
|
|
173
|
+
className: "mt-2 max-h-48 overflow-auto rounded bg-ivory p-2 text-xs",
|
|
174
|
+
children: JSON.stringify(selected.payload, null, 2)
|
|
175
|
+
})] }),
|
|
176
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
177
|
+
className: "text-sm",
|
|
178
|
+
children: "Audit history"
|
|
179
|
+
}), /* @__PURE__ */ jsx("ol", {
|
|
180
|
+
className: "mt-2 space-y-1 text-xs",
|
|
181
|
+
children: selected.events.map((item) => /* @__PURE__ */ jsxs("li", { children: [
|
|
182
|
+
formatTimestamp(item.createdAt),
|
|
183
|
+
" · ",
|
|
184
|
+
item.event,
|
|
185
|
+
" · ",
|
|
186
|
+
item.actor
|
|
187
|
+
] }, item.id))
|
|
188
|
+
})] }),
|
|
189
|
+
notice && /* @__PURE__ */ jsx("p", {
|
|
190
|
+
role: "status",
|
|
191
|
+
className: "text-sm",
|
|
192
|
+
children: notice
|
|
193
|
+
}),
|
|
194
|
+
selected.status === "pending" && /* @__PURE__ */ jsxs("div", {
|
|
195
|
+
className: "flex gap-2",
|
|
196
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
197
|
+
variant: "primary",
|
|
198
|
+
disabled: busy,
|
|
199
|
+
onClick: () => void decide("approve"),
|
|
200
|
+
children: "Approve once"
|
|
201
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
202
|
+
variant: "danger",
|
|
203
|
+
disabled: busy,
|
|
204
|
+
onClick: () => void decide("deny"),
|
|
205
|
+
children: "Deny"
|
|
206
|
+
})]
|
|
207
|
+
})
|
|
208
|
+
]
|
|
209
|
+
})
|
|
210
|
+
})]
|
|
211
|
+
})
|
|
212
|
+
]
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
function Status({ value }) {
|
|
216
|
+
return /* @__PURE__ */ jsx("span", {
|
|
217
|
+
className: `rounded px-2 py-0.5 text-xs ${value === "pending" ? "bg-amber-100 text-amber-900 dark:bg-amber-900/40 dark:text-amber-100" : value === "delivered" ? "bg-sapphire-glow text-sapphire-deep" : "bg-rose-baziu/10 text-chocolate"}`,
|
|
218
|
+
children: value.replace("_", " ")
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
function endpoint(value) {
|
|
222
|
+
return value.kind === "agent" ? `Agent ${value.id}` : value.kind === "user" ? "User" : `Outside ${value.teamId}`;
|
|
223
|
+
}
|
|
224
|
+
function Fact({ label, value }) {
|
|
225
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
|
|
226
|
+
className: "text-xs font-semibold uppercase text-mocha-light",
|
|
227
|
+
children: label
|
|
228
|
+
}), /* @__PURE__ */ jsx("dd", {
|
|
229
|
+
className: "break-all",
|
|
230
|
+
children: value
|
|
231
|
+
})] });
|
|
232
|
+
}
|
|
233
|
+
var timestampFormatter = new Intl.DateTimeFormat("en-GB", {
|
|
234
|
+
dateStyle: "medium",
|
|
235
|
+
timeStyle: "medium",
|
|
236
|
+
timeZone: "UTC"
|
|
237
|
+
});
|
|
238
|
+
function formatTimestamp(value) {
|
|
239
|
+
return `${timestampFormatter.format(new Date(value))} UTC`;
|
|
240
|
+
}
|
|
241
|
+
//#endregion
|
|
242
|
+
export { ApprovalQueue as component };
|
|
@@ -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/approvals/index.tsx
|
|
5
|
+
var $$splitErrorComponentImporter = () => import("./approvals-CbFXFvG8.js");
|
|
6
|
+
var $$splitComponentImporter = () => import("./approvals-DHgARzd8.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,12 @@
|
|
|
1
|
+
import { t as createServerFn } from "../server.js";
|
|
2
|
+
import { t as createServerRpc } from "./createServerRpc-CeKECg65.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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Route } from "./config-
|
|
1
|
+
import { t as Route } from "./config-QvHaxGlP.js";
|
|
2
2
|
import { t as ConfigTabs } from "./ConfigTabs-CyuxzesF.js";
|
|
3
3
|
import { t as FieldRow } from "./FieldRow-DwyqycWI.js";
|
|
4
4
|
import { useState } from "react";
|
|
@@ -245,8 +245,8 @@ function ProviderCard({ p, openaiCodexStatus }) {
|
|
|
245
245
|
}
|
|
246
246
|
function exampleModelFor(providerId) {
|
|
247
247
|
switch (providerId) {
|
|
248
|
-
case "openai-codex": return "gpt-5.
|
|
249
|
-
case "openai": return "gpt-5.
|
|
248
|
+
case "openai-codex": return "gpt-5.6-luna";
|
|
249
|
+
case "openai": return "gpt-5.6-luna";
|
|
250
250
|
case "anthropic": return "claude-opus-4-8";
|
|
251
251
|
case "google": return "gemini-3-pro-preview";
|
|
252
252
|
case "google-vertex": return "gemini-3.1-pro-preview";
|
|
@@ -278,7 +278,7 @@ function exampleModelFor(providerId) {
|
|
|
278
278
|
case "opencode": return "claude-opus-4-8";
|
|
279
279
|
case "opencode-go": return "kimi-k2.7-code";
|
|
280
280
|
case "zai-coding-cn": return "glm-5.2";
|
|
281
|
-
case "azure-openai": return "gpt-5.
|
|
281
|
+
case "azure-openai": return "gpt-5.6-luna";
|
|
282
282
|
case "bedrock": return "anthropic.claude-opus-4-8";
|
|
283
283
|
case "ollama": return "llama3.3";
|
|
284
284
|
case "lmstudio": return "qwen3-coder-30b";
|
|
@@ -2,7 +2,7 @@ import { t as createServerFn } from "../server.js";
|
|
|
2
2
|
import { t as createSsrRpc } from "./createSsrRpc-ZBGxhl8t.js";
|
|
3
3
|
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
4
|
//#region src/routes/config/index.tsx
|
|
5
|
-
var $$splitComponentImporter = () => import("./config-
|
|
5
|
+
var $$splitComponentImporter = () => import("./config-BvKctDOX.js");
|
|
6
6
|
var fetchProvidersData = createServerFn({ method: "GET" }).handler(createSsrRpc("b18a227687dba45b99ea5a2ac7a5bf8efcd9bc54387bc279cd87510fd2f83f7e"));
|
|
7
7
|
var Route = createFileRoute("/config/")({
|
|
8
8
|
loader: () => fetchProvidersData(),
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { t as createServerFn } from "../server.js";
|
|
2
|
+
import { t as createServerRpc } from "./createServerRpc-CeKECg65.js";
|
|
3
|
+
import { n as daemonClient } from "./daemon-client-2NRMzlTr.js";
|
|
4
|
+
//#region src/routes/teams/$id/context.tsx?tss-serverfn-split
|
|
5
|
+
var fetchContext_createServerFn_handler = createServerRpc({
|
|
6
|
+
id: "b859e1340a80871c50b0d3e60bd3f3b48fe3c66b083f8ff9d5b2981720d36a81",
|
|
7
|
+
name: "fetchContext",
|
|
8
|
+
filename: "src/routes/teams/$id/context.tsx"
|
|
9
|
+
}, (opts) => fetchContext.__executeServer(opts));
|
|
10
|
+
var fetchContext = createServerFn({ method: "POST" }).inputValidator((data) => data).handler(fetchContext_createServerFn_handler, ({ data }) => daemonClient().get(`/api/teams/${encodeURIComponent(data.id)}`));
|
|
11
|
+
//#endregion
|
|
12
|
+
export { fetchContext_createServerFn_handler };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { t as Route } from "./context-D3Egm-vY.js";
|
|
2
|
+
import { t as TeamTabs } from "./TeamTabs-BPxDBfqy.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/routes/teams/$id/context.tsx?tsr-split=component
|
|
5
|
+
function ContextPage() {
|
|
6
|
+
const team = Route.useLoaderData();
|
|
7
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
8
|
+
className: "mx-auto max-w-5xl px-6 py-8",
|
|
9
|
+
children: [
|
|
10
|
+
/* @__PURE__ */ jsx("h1", { children: "team context" }),
|
|
11
|
+
/* @__PURE__ */ jsx("p", {
|
|
12
|
+
className: "muted",
|
|
13
|
+
children: "Workspace, operator context, and integrations owned by this Team."
|
|
14
|
+
}),
|
|
15
|
+
/* @__PURE__ */ jsx(TeamTabs, { teamId: team.id }),
|
|
16
|
+
/* @__PURE__ */ jsxs("section", {
|
|
17
|
+
className: "card",
|
|
18
|
+
children: [/* @__PURE__ */ jsxs("dl", {
|
|
19
|
+
className: "grid gap-4 sm:grid-cols-2",
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
|
|
22
|
+
className: "muted",
|
|
23
|
+
children: "workspace path"
|
|
24
|
+
}), /* @__PURE__ */ jsx("dd", { children: /* @__PURE__ */ jsx("code", { children: team.path }) })] }),
|
|
25
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
|
|
26
|
+
className: "muted",
|
|
27
|
+
children: "Telegram topic format"
|
|
28
|
+
}), /* @__PURE__ */ jsx("dd", { children: /* @__PURE__ */ jsx("code", { children: team.telegramTopicNameFormat ?? "built-in naming" }) })] }),
|
|
29
|
+
/* @__PURE__ */ jsxs("div", {
|
|
30
|
+
className: "sm:col-span-2",
|
|
31
|
+
children: [/* @__PURE__ */ jsx("dt", {
|
|
32
|
+
className: "muted",
|
|
33
|
+
children: "USER.md"
|
|
34
|
+
}), /* @__PURE__ */ jsx("dd", {
|
|
35
|
+
className: "mt-2 whitespace-pre-wrap rounded-md border border-frost bg-ivory p-3 text-sm",
|
|
36
|
+
children: team.userMd || "No operator context configured."
|
|
37
|
+
})]
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
41
|
+
className: "mt-4 text-sm text-mocha",
|
|
42
|
+
children: "Edit USER.md and Telegram naming from Overview during this transition. This route is the canonical context projection."
|
|
43
|
+
})]
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { ContextPage as component };
|
|
@@ -0,0 +1,12 @@
|
|
|
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/teams/$id/context.tsx
|
|
5
|
+
var $$splitComponentImporter = () => import("./context-CEr4-xiA.js");
|
|
6
|
+
var fetchContext = createServerFn({ method: "POST" }).inputValidator((data) => data).handler(createSsrRpc("b859e1340a80871c50b0d3e60bd3f3b48fe3c66b083f8ff9d5b2981720d36a81"));
|
|
7
|
+
var Route = createFileRoute("/teams/$id/context")({
|
|
8
|
+
loader: ({ params }) => fetchContext({ data: params }),
|
|
9
|
+
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Route as t };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { t as Route } from "./members-ksELRsyk.js";
|
|
2
|
+
import { t as TeamTabs } from "./TeamTabs-BPxDBfqy.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/routes/teams/$id/members.tsx?tsr-split=component
|
|
5
|
+
function TeamMembersPage() {
|
|
6
|
+
const detail = Route.useLoaderData();
|
|
7
|
+
const { id } = Route.useParams();
|
|
8
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
9
|
+
className: "mx-auto max-w-5xl px-6 py-8",
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ jsx("h1", { children: "team members" }),
|
|
12
|
+
/* @__PURE__ */ jsxs("p", {
|
|
13
|
+
className: "muted",
|
|
14
|
+
children: [/* @__PURE__ */ jsx("code", { children: "agents.team_id" }), " is the only live-membership authority."]
|
|
15
|
+
}),
|
|
16
|
+
/* @__PURE__ */ jsx(TeamTabs, { teamId: id }),
|
|
17
|
+
/* @__PURE__ */ jsx("div", {
|
|
18
|
+
className: "overflow-x-auto rounded-md border border-frost",
|
|
19
|
+
children: /* @__PURE__ */ jsxs("table", {
|
|
20
|
+
className: "w-full",
|
|
21
|
+
children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
22
|
+
/* @__PURE__ */ jsx("th", { children: "agent" }),
|
|
23
|
+
/* @__PURE__ */ jsx("th", { children: "status" }),
|
|
24
|
+
/* @__PURE__ */ jsx("th", { children: "agent template" }),
|
|
25
|
+
/* @__PURE__ */ jsx("th", { children: "source slot" })
|
|
26
|
+
] }) }), /* @__PURE__ */ jsxs("tbody", { children: [detail.members.map((agent) => {
|
|
27
|
+
const binding = detail.bindings.find((item) => item.agentId === agent.id);
|
|
28
|
+
return /* @__PURE__ */ jsxs("tr", { children: [
|
|
29
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("a", {
|
|
30
|
+
href: `/agents/${agent.id}`,
|
|
31
|
+
children: agent.name
|
|
32
|
+
}) }),
|
|
33
|
+
/* @__PURE__ */ jsx("td", { children: agent.status }),
|
|
34
|
+
/* @__PURE__ */ jsx("td", { children: agent.profileId }),
|
|
35
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("code", { children: binding?.sourceSlotId ?? "live-only" }) })
|
|
36
|
+
] }, agent.id);
|
|
37
|
+
}), detail.members.length === 0 && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
|
|
38
|
+
colSpan: 4,
|
|
39
|
+
className: "muted",
|
|
40
|
+
children: "No agents belong to this team."
|
|
41
|
+
}) })] })]
|
|
42
|
+
})
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { TeamMembersPage as component };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { t as createServerFn } from "../server.js";
|
|
2
|
+
import { t as createServerRpc } from "./createServerRpc-CeKECg65.js";
|
|
3
|
+
import { n as daemonClient } from "./daemon-client-2NRMzlTr.js";
|
|
4
|
+
//#region src/routes/teams/$id/members.tsx?tss-serverfn-split
|
|
5
|
+
var fetchMembers_createServerFn_handler = createServerRpc({
|
|
6
|
+
id: "0a6e766d2b4ea526da34cefed5342a6ecc5ff35ad1ce38fba4129b8c24d8e6e5",
|
|
7
|
+
name: "fetchMembers",
|
|
8
|
+
filename: "src/routes/teams/$id/members.tsx"
|
|
9
|
+
}, (opts) => fetchMembers.__executeServer(opts));
|
|
10
|
+
var fetchMembers = createServerFn({ method: "POST" }).inputValidator((data) => data).handler(fetchMembers_createServerFn_handler, ({ data }) => daemonClient().get(`/api/teams/${encodeURIComponent(data.id)}/policy`));
|
|
11
|
+
//#endregion
|
|
12
|
+
export { fetchMembers_createServerFn_handler };
|
|
@@ -0,0 +1,12 @@
|
|
|
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/teams/$id/members.tsx
|
|
5
|
+
var $$splitComponentImporter = () => import("./members-40DxRdVj.js");
|
|
6
|
+
var fetchMembers = createServerFn({ method: "POST" }).inputValidator((data) => data).handler(createSsrRpc("0a6e766d2b4ea526da34cefed5342a6ecc5ff35ad1ce38fba4129b8c24d8e6e5"));
|
|
7
|
+
var Route = createFileRoute("/teams/$id/members")({
|
|
8
|
+
loader: ({ params }) => fetchMembers({ data: params }),
|
|
9
|
+
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Route as t };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as createServerFn } from "../server.js";
|
|
2
2
|
import { t as createSsrRpc } from "./createSsrRpc-ZBGxhl8t.js";
|
|
3
3
|
import { createFileRoute, lazyRouteComponent, redirect } from "@tanstack/react-router";
|
|
4
|
-
//#region src/routes/
|
|
5
|
-
var $$splitComponentImporter = () => import("./memory-
|
|
6
|
-
var fetchMemory = createServerFn({ method: "POST" }).inputValidator((d) => d).handler(createSsrRpc("
|
|
7
|
-
var Route = createFileRoute("/
|
|
4
|
+
//#region src/routes/teams/$id/memory.tsx
|
|
5
|
+
var $$splitComponentImporter = () => import("./memory-CiTl4cN9.js");
|
|
6
|
+
var fetchMemory = createServerFn({ method: "POST" }).inputValidator((d) => d).handler(createSsrRpc("b96a98e3ed6c8a3ab5f6a4ed8458e93da753ffd74e2912ef1724bb6e58030cb5"));
|
|
7
|
+
var Route = createFileRoute("/teams/$id/memory")({
|
|
8
8
|
loader: async ({ params }) => {
|
|
9
9
|
const data = await fetchMemory({ data: { id: params.id } });
|
|
10
|
-
if (!data) throw redirect({ to: "/
|
|
10
|
+
if (!data) throw redirect({ to: "/teams" });
|
|
11
11
|
return data;
|
|
12
12
|
},
|
|
13
13
|
component: lazyRouteComponent($$splitComponentImporter, "component")
|