bazilion 0.27.0 → 0.50.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/dist/cli.js +405 -243
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +1077 -623
- package/dist/daemon.js.map +1 -1
- package/dist/web/client/assets/ConfigPage-_FY--9PB.js +1 -0
- package/dist/web/client/assets/ConfirmDialog-BblXqMVb.js +1 -0
- package/dist/web/client/assets/ConnectionsView-BZHJysCa.js +1 -0
- package/dist/web/client/assets/FieldRow-k05wfDy9.js +1 -0
- package/dist/web/client/assets/SectionTabs-DlfXtepS.js +1 -0
- package/dist/web/client/assets/{SkillFindings-8LX6bYf_.js → SkillFindings-CHf5ZGY0.js} +1 -1
- package/dist/web/client/assets/SpawnDialog-C-Ujb4bC.js +1 -0
- package/dist/web/client/assets/TeamForm-D6EAAF7m.js +1 -0
- package/dist/web/client/assets/TeamThread-DpUOwMoi.js +1 -0
- package/dist/web/client/assets/UnsavedChangesGuard-DTUP7hwu.js +1 -0
- package/dist/web/client/assets/_id-C94dgBDe.js +1 -0
- package/dist/web/client/assets/_id-CxmEfoEp.js +1 -0
- package/dist/web/client/assets/agents-C-bJ5R_0.js +1 -0
- package/dist/web/client/assets/agents-odqBNx-A.js +1 -0
- package/dist/web/client/assets/api-CPzQ_z9m.js +1 -0
- package/dist/web/client/assets/arrow-right-Dyta3p06.js +1 -0
- package/dist/web/client/assets/attention-D0e7o7fh.js +1 -0
- package/dist/web/client/assets/chevron-right-B2YEg9rw.js +1 -0
- package/dist/web/client/assets/config-B7Y5MtpM.js +3 -0
- package/dist/web/client/assets/createLucideIcon-Cgab8gqu.js +1 -0
- package/dist/web/client/assets/index-CNVw44IE.js +54 -0
- package/dist/web/client/assets/link-ClwtaO_E.js +1 -0
- package/dist/web/client/assets/login-Br1F4rQx.js +1 -0
- package/dist/web/client/assets/mcp-B8bIAY6k.js +1 -0
- package/dist/web/client/assets/routes-BZdlkRdC.js +76 -0
- package/dist/web/client/assets/save-ZqeB_I-c.js +1 -0
- package/dist/web/client/assets/{services-B2f7e5jV.js → services-CPJxDrVG.js} +1 -1
- package/dist/web/client/assets/skills-DE_kQQGj.js +1 -0
- package/dist/web/client/assets/style-BWShXY3e.js +7 -0
- package/dist/web/client/assets/styles-Tney8jZq.css +2 -0
- package/dist/web/client/assets/teams-AcuSLc3I.js +1 -0
- package/dist/web/client/assets/teams-tRamPg7O.js +1 -0
- package/dist/web/client/assets/telegram-Ku69-GAv.js +1 -0
- package/dist/web/client/assets/tokens-DuLNZMgi.js +1 -0
- package/dist/web/client/assets/welcome-CrQk6n6I.js +1 -0
- package/dist/web/server/assets/{ConfigPage-CGld_wCK.js → ConfigPage-DSLM5CLw.js} +2 -2
- package/dist/web/server/assets/{ConfirmDialog-LdVlEanK.js → ConfirmDialog-CvLZgbfY.js} +1 -1
- package/dist/web/server/assets/ConnectionsView-DVLNH81Y.js +708 -0
- package/dist/web/server/assets/{FieldRow-Dah2KKqo.js → FieldRow-DQBzMtcR.js} +4 -4
- package/dist/web/server/assets/{Page-CMSYKXWJ.js → Page-KIL1CsME.js} +1 -1
- package/dist/web/server/assets/Rail-D8LhjS38.js +756 -0
- package/dist/web/server/assets/{SectionTabs-CqFg9Vwx.js → SectionTabs-CNcvxbR8.js} +1 -16
- package/dist/web/server/assets/{SkillFindings-Bd6e81Wu.js → SkillFindings-DX8lCMG7.js} +1 -1
- package/dist/web/server/assets/{SpawnDialog-BGNaMfFb.js → SpawnDialog-Brmkl_ll.js} +24 -6
- package/dist/web/server/assets/{TeamForm-C93tpn9r.js → TeamForm-CvQAs2FA.js} +1 -1
- package/dist/web/server/assets/TeamThread-BNJi6gPM.js +205 -0
- package/dist/web/server/assets/{UnsavedChangesGuard-Dm4a27_5.js → UnsavedChangesGuard-B3Lpl08z.js} +8 -4
- package/dist/web/server/assets/{TeamPolicyEditor-BHS3J0R9.js → _id-BH1631a8.js} +114 -263
- package/dist/web/server/assets/{_id-sW6zXrTP.js → _id-CA3QO7J5.js} +1 -1
- package/dist/web/server/assets/{_id-lOVnT5sS.js → _id-CO1PgvyG.js} +5 -5
- package/dist/web/server/assets/{_id-B0x1ffz3.js → _id-DIXUiIaB.js} +1 -1
- package/dist/web/server/assets/{_id-ByiXeIPS.js → _id-E2N4gZ4O.js} +2 -2
- package/dist/web/server/assets/{_id-Bdf_Rg62.js → _id-TVruGcOd.js} +1 -1
- package/dist/web/server/assets/_tanstack-start-manifest_v-BVfrV7LQ.js +191 -0
- package/dist/web/server/assets/{agents-BNPkidbH.js → agents-BnWgFo6o.js} +1 -1
- package/dist/web/server/assets/{agents-BK8OmB8g.js → agents-C63VycUw.js} +2 -2
- package/dist/web/server/assets/{agents-D4tqK1kH.js → agents-CalSKogx.js} +14 -15
- package/dist/web/server/assets/{agents-Cn9GkXFX.js → agents-CdZvooeQ.js} +1 -1
- package/dist/web/server/assets/{agents-lOqc6VGd.js → agents-DPZVni4Q.js} +1 -1
- package/dist/web/server/assets/{agents-DycxHDt8.js → agents-DrkEwIpR.js} +8 -8
- package/dist/web/server/assets/{attention-DULVjdmF.js → attention-BbE4yc-V.js} +1 -1
- package/dist/web/server/assets/{attention-YWnLKA2E.js → attention-Cr7puThv.js} +1 -1
- package/dist/web/server/assets/{attention-BIm455bC.js → attention-DIyX3VMB.js} +6 -6
- package/dist/web/server/assets/{auth-DiN92ydD.js → auth-dJnrFW6y.js} +1 -1
- package/dist/web/server/assets/{config-C1VB28se.js → config-3tPtOmPE.js} +1 -1
- package/dist/web/server/assets/{config-BNEgu7WG.js → config-DJGZiPBJ.js} +13 -13
- package/dist/web/server/assets/{config-TdVqnqNL.js → config-rUqhMjIs.js} +1 -1
- package/dist/web/server/assets/{daemon-client-DL2ik2Em.js → daemon-client-B_ZRIIrT.js} +2 -1
- package/dist/web/server/assets/{mcp-BwmpNQPN.js → mcp-C97uAZe1.js} +1 -1
- package/dist/web/server/assets/{mcp-B09_O05r.js → mcp-Cf7KzOJ9.js} +9 -9
- package/dist/web/server/assets/{mcp-CqdTfXcn.js → mcp-DE14q5c0.js} +1 -1
- package/dist/web/server/assets/{router-BI9gmY3S.js → router-w2yPgmC1.js} +412 -259
- package/dist/web/server/assets/routes-1FEodTRm.js +16 -0
- package/dist/web/server/assets/routes-B6AO0LjK.js +57 -0
- package/dist/web/server/assets/routes-D1NHwz6f.js +7644 -0
- package/dist/web/server/assets/{services-tCfB1B83.js → services-BjroGXgC.js} +4 -4
- package/dist/web/server/assets/{services-Q9HYQXXB.js → services-Cdk40QHq.js} +1 -1
- package/dist/web/server/assets/{services-BLvAvb8g.js → services-DsHRLL8q.js} +1 -1
- package/dist/web/server/assets/{skills-BZg_txbf.js → skills-CA17GjuZ.js} +1 -1
- package/dist/web/server/assets/{skills-C7fqRPna.js → skills-DC1OTc8n.js} +11 -11
- package/dist/web/server/assets/{skills-C_g8IKag.js → skills-h5aHa7Q8.js} +1 -1
- package/dist/web/server/assets/style-GYDODk2F.js +178 -0
- package/dist/web/server/assets/{teams-D4CaU76n.js → teams-Bm63mbTt.js} +1 -1
- package/dist/web/server/assets/{teams-DX2HmKqi.js → teams-BxnvFTyn.js} +1 -1
- package/dist/web/server/assets/{teams-BS-oweRl.js → teams-Cg-QQWpH.js} +23 -15
- package/dist/web/server/assets/{teams-BHkhnt6b.js → teams-D6Tx-Jyn.js} +1 -1
- package/dist/web/server/assets/{teams-BSflKBP8.js → teams-OzHTyVi9.js} +6 -6
- package/dist/web/server/assets/{teams-CNyB5nM9.js → teams-YrmyutM4.js} +1 -1
- package/dist/web/server/assets/{telegram-CrJiygCX.js → telegram-BJ4l_TA_.js} +6 -6
- package/dist/web/server/assets/{telegram-C4v1HhyJ.js → telegram-Gy7_9yih.js} +1 -1
- package/dist/web/server/assets/{telegram-BUdnc8oF.js → telegram-xU-vXgef.js} +1 -1
- package/dist/web/server/assets/{tokens-DqldzPUq.js → tokens-ByPTGFBQ.js} +1 -1
- package/dist/web/server/assets/{tokens-B1twAJdd.js → tokens-CEdl8puR.js} +1 -1
- package/dist/web/server/assets/{tokens-DdjEyALj.js → tokens-CsqoRt5T.js} +10 -10
- package/dist/web/server/assets/{welcome-D0d38Pzx.js → welcome-O6Rjd7yO.js} +1 -1
- package/dist/web/server/assets/workspace-DeEYMPDX.js +658 -0
- package/dist/web/server/server.js +20 -72
- package/dist/worker.js +1 -1
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
- package/dist/web/client/assets/AgentAvatar-DWx-bM6n.js +0 -1
- package/dist/web/client/assets/ChatPane-DOV_HJg-.js +0 -72
- package/dist/web/client/assets/ConfigPage-Dfu9DzFX.js +0 -1
- package/dist/web/client/assets/ConfirmDialog-536ziJ5P.js +0 -1
- package/dist/web/client/assets/FieldRow-z1JqCdqn.js +0 -1
- package/dist/web/client/assets/ResultCard-X4nTbjYY.js +0 -1
- package/dist/web/client/assets/SectionTabs-DXHzXmmb.js +0 -1
- package/dist/web/client/assets/SpawnDialog-DoZl-yes.js +0 -1
- package/dist/web/client/assets/SpawnTeamModal-C638hEoN.js +0 -1
- package/dist/web/client/assets/TeamForm-C-WzvOl4.js +0 -1
- package/dist/web/client/assets/TeamPolicyEditor-CSKBx0oK.js +0 -7
- package/dist/web/client/assets/UnsavedChangesGuard-GC-vzw7h.js +0 -1
- package/dist/web/client/assets/_id-BKLynswT.js +0 -1
- package/dist/web/client/assets/_id-BYM_NORr.js +0 -1
- package/dist/web/client/assets/_id-Cxa98a9m.js +0 -1
- package/dist/web/client/assets/_id-D4hV1U1t.js +0 -1
- package/dist/web/client/assets/agent-actions-CXQCoxKO.js +0 -1
- package/dist/web/client/assets/agents-BxPS1_Bp.js +0 -1
- package/dist/web/client/assets/agents-GozAWW-l.js +0 -1
- package/dist/web/client/assets/attention-Cz9rZcrr.js +0 -1
- package/dist/web/client/assets/chevron-right-CPAb1zac.js +0 -1
- package/dist/web/client/assets/config-9vv9Lipb.js +0 -3
- package/dist/web/client/assets/inbox-DHLArXxl.js +0 -1
- package/dist/web/client/assets/index-1YXquAq8.js +0 -52
- package/dist/web/client/assets/learning-PvtXm8Ne.js +0 -1
- package/dist/web/client/assets/login-DIJpNQFo.js +0 -1
- package/dist/web/client/assets/mcp-pKBL0xIf.js +0 -1
- package/dist/web/client/assets/members-DHWsgsEs.js +0 -1
- package/dist/web/client/assets/memory-CEVppPyU.js +0 -1
- package/dist/web/client/assets/plus-BaIRdB10.js +0 -1
- package/dist/web/client/assets/policy-DEh4BLSw.js +0 -1
- package/dist/web/client/assets/preload-helper-eUUcpe2S.js +0 -1
- package/dist/web/client/assets/results-DgJPjEZF.js +0 -1
- package/dist/web/client/assets/review-BbshafTQ.js +0 -1
- package/dist/web/client/assets/route-Ccb8v41z.js +0 -1
- package/dist/web/client/assets/route-D1d6kCEV.js +0 -1
- package/dist/web/client/assets/routes-g7V4ru7T.js +0 -1
- package/dist/web/client/assets/settings-B6elpcYm.js +0 -1
- package/dist/web/client/assets/skills-CngE7TF8.js +0 -1
- package/dist/web/client/assets/styles-xUnZ-ep_.css +0 -2
- package/dist/web/client/assets/teams-BdJZXOan.js +0 -1
- package/dist/web/client/assets/teams-c496ISsT.js +0 -1
- package/dist/web/client/assets/telegram-B_-hK6EC.js +0 -1
- package/dist/web/client/assets/tokens-CKz8gx4-.js +0 -1
- package/dist/web/client/assets/triggers-DCEPciGW.js +0 -1
- package/dist/web/client/assets/welcome-D-zVOLGA.js +0 -1
- package/dist/web/server/assets/AgentAvatar-8gTAy_tP.js +0 -37
- package/dist/web/server/assets/ChatPane-De_FPEoD.js +0 -1887
- package/dist/web/server/assets/ResultCard-CZn1w4KA.js +0 -97
- package/dist/web/server/assets/Sidebar-puq47KyR.js +0 -430
- package/dist/web/server/assets/SpawnTeamModal-C6GbfScI.js +0 -97
- package/dist/web/server/assets/_id-BR6tnR6I.js +0 -23
- package/dist/web/server/assets/_id-Bm611NQz.js +0 -13
- package/dist/web/server/assets/_id-D5UCoyES.js +0 -359
- package/dist/web/server/assets/_id-DHx5UmmL.js +0 -12
- package/dist/web/server/assets/_id-DLpGmOVm.js +0 -19
- package/dist/web/server/assets/_id-Y5ctILG2.js +0 -13
- package/dist/web/server/assets/_id-dDA0pdVo.js +0 -54
- package/dist/web/server/assets/_tanstack-start-manifest_v-B8u80HjK.js +0 -292
- package/dist/web/server/assets/agent-actions-BBdFVdoa.js +0 -20
- package/dist/web/server/assets/api-WWxPqx67.js +0 -85
- package/dist/web/server/assets/inbox-4Vj5jTT8.js +0 -245
- package/dist/web/server/assets/inbox-D4IqUv3l.js +0 -38
- package/dist/web/server/assets/inbox-Dle24AfV.js +0 -23
- package/dist/web/server/assets/learning-BScq7VbO.js +0 -12
- package/dist/web/server/assets/learning-CBWFEnhg.js +0 -263
- package/dist/web/server/assets/learning-DWAKevhF.js +0 -25
- package/dist/web/server/assets/members-B8QBF6TF.js +0 -12
- package/dist/web/server/assets/members-DsF02Wp7.js +0 -12
- package/dist/web/server/assets/members-tWZA9b15.js +0 -36
- package/dist/web/server/assets/memory-BNN0b-0x.js +0 -12
- package/dist/web/server/assets/memory-CTl1E1Rm.js +0 -267
- package/dist/web/server/assets/memory-CV5uCBb2.js +0 -12
- package/dist/web/server/assets/policy-C9M6zV6w.js +0 -79
- package/dist/web/server/assets/policy-h-6NpU3m.js +0 -19
- package/dist/web/server/assets/policy-xEw9X0DK.js +0 -12
- package/dist/web/server/assets/results-D3A3UA4d.js +0 -182
- package/dist/web/server/assets/results-D6Ui5S8D.js +0 -12
- package/dist/web/server/assets/results-DWmxvfyn.js +0 -15
- package/dist/web/server/assets/review-CyQky-WQ.js +0 -40
- package/dist/web/server/assets/review-Sq0GGcPV.js +0 -322
- package/dist/web/server/assets/review-XWbSF8cF.js +0 -12
- package/dist/web/server/assets/route-BErtkz6t.js +0 -19
- package/dist/web/server/assets/route-CLoV-An_.js +0 -48
- package/dist/web/server/assets/route-WQ19JkBa.js +0 -19
- package/dist/web/server/assets/route-dEK_2GLj.js +0 -203
- package/dist/web/server/assets/route-iHTkhO81.js +0 -16
- package/dist/web/server/assets/route-zs8uUQtB.js +0 -16
- package/dist/web/server/assets/routes-081s4n24.js +0 -45
- package/dist/web/server/assets/routes-CWo5WPsr.js +0 -15
- package/dist/web/server/assets/routes-Cqp1ufHm.js +0 -56
- package/dist/web/server/assets/settings-CVaGv-xF.js +0 -12
- package/dist/web/server/assets/settings-D9viV-86.js +0 -561
- package/dist/web/server/assets/settings-DaZNZ_CC.js +0 -27
- package/dist/web/server/assets/triggers-B7LW784F.js +0 -214
- package/dist/web/server/assets/triggers-C5sMCZXv2.js +0 -12
- package/dist/web/server/assets/triggers-DMfVdImD.js +0 -12
- package/dist/web/client/assets/{TeamPolicyEditor-DLioOiRN.css → style-DLioOiRN.css} +0 -0
- package/dist/web/server/assets/{start-DTX6aKCi.js → start-DhW7sy23.js} +1 -1
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { t as Route } from "./routes-CWo5WPsr.js";
|
|
2
|
-
import { t as ChatPane } from "./ChatPane-De_FPEoD.js";
|
|
3
|
-
import { n as Sidebar } from "./Sidebar-puq47KyR.js";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
//#region src/routes/index.tsx?tsr-split=component
|
|
6
|
-
/** The sidebar's open/closed Teams; a bad cookie is ignored. */
|
|
7
|
-
function HomePage() {
|
|
8
|
-
const { agents, profiles, teamTemplates, teams, selected, openGroups } = Route.useLoaderData();
|
|
9
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
10
|
-
className: "grid h-full min-h-0 grid-cols-1 gap-3 py-3 lg:grid-cols-[18rem_minmax(0,1fr)]",
|
|
11
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
12
|
-
className: `min-h-0 ${selected ? "hidden lg:block" : ""}`,
|
|
13
|
-
children: /* @__PURE__ */ jsx(Sidebar, {
|
|
14
|
-
agents,
|
|
15
|
-
teams,
|
|
16
|
-
profiles,
|
|
17
|
-
teamTemplates,
|
|
18
|
-
selectedAgentId: selected?.resolved.agent.id ?? null,
|
|
19
|
-
initialOpenGroups: openGroups
|
|
20
|
-
})
|
|
21
|
-
}), /* @__PURE__ */ jsx("section", {
|
|
22
|
-
className: `min-h-0 overflow-hidden ${selected ? "" : "hidden lg:block"}`,
|
|
23
|
-
children: selected ? /* @__PURE__ */ jsx(ChatPane, {
|
|
24
|
-
agentId: selected.resolved.agent.id,
|
|
25
|
-
agentName: selected.resolved.agent.name,
|
|
26
|
-
initialMessages: selected.messages,
|
|
27
|
-
initialSessionHead: selected.head
|
|
28
|
-
}) : /* @__PURE__ */ jsx("div", {
|
|
29
|
-
className: "flex h-full items-center justify-center rounded-2xl border border-dashed bg-card px-6 text-center text-muted-foreground",
|
|
30
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
31
|
-
className: "max-w-sm",
|
|
32
|
-
children: [/* @__PURE__ */ jsx("h1", {
|
|
33
|
-
className: "m-0 font-body text-lg font-semibold text-foreground",
|
|
34
|
-
children: agents.length === 0 ? "Start your first conversation" : "Choose an agent"
|
|
35
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
36
|
-
className: "mt-2 text-sm leading-6",
|
|
37
|
-
children: agents.length === 0 ? "Your default Team and Agent template are ready. Use “Spawn first agent” on the left to create a working member." : "Pick an agent in the Team list to open its persistent conversation."
|
|
38
|
-
})]
|
|
39
|
-
})
|
|
40
|
-
})
|
|
41
|
-
})]
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
//#endregion
|
|
45
|
-
export { HomePage as component };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { n as createServerFn } from "../server.js";
|
|
2
|
-
import { t as createSsrRpc } from "./createSsrRpc-6LHNEsSK.js";
|
|
3
|
-
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
|
-
//#region src/routes/index.tsx
|
|
5
|
-
var $$splitComponentImporter = () => import("./routes-081s4n24.js");
|
|
6
|
-
/** The sidebar's open/closed Teams; a bad cookie is ignored. */
|
|
7
|
-
var fetchHome = createServerFn({ method: "GET" }).validator((data) => data).handler(createSsrRpc("aa485ed8b67fcc5a2feedbfdbdf6b41aa7c7aff92f357123818169f62b907ce1"));
|
|
8
|
-
var Route = createFileRoute("/")({
|
|
9
|
-
validateSearch: (search) => ({ agent: typeof search.agent === "string" ? search.agent : void 0 }),
|
|
10
|
-
loaderDeps: ({ search }) => ({ agentId: search.agent }),
|
|
11
|
-
loader: ({ deps }) => fetchHome({ data: { agentId: deps.agentId } }),
|
|
12
|
-
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
13
|
-
});
|
|
14
|
-
//#endregion
|
|
15
|
-
export { Route as t };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { a as getCookie, n as createServerFn } from "../server.js";
|
|
2
|
-
import { t as createServerRpc } from "./createServerRpc-B7Yr1K8i.js";
|
|
3
|
-
import { n as daemonClient, r as ApiClientError } from "./daemon-client-DL2ik2Em.js";
|
|
4
|
-
import { t as SIDEBAR_OPEN_GROUPS_COOKIE } from "./Sidebar-puq47KyR.js";
|
|
5
|
-
//#region src/routes/index.tsx?tss-serverfn-split
|
|
6
|
-
/** The sidebar's open/closed Teams; a bad cookie is ignored. */
|
|
7
|
-
function parseOpenGroupsCookie(raw) {
|
|
8
|
-
try {
|
|
9
|
-
const parsed = JSON.parse(decodeURIComponent(raw ?? "{}"));
|
|
10
|
-
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
|
|
11
|
-
return Object.fromEntries(Object.entries(parsed).filter((entry) => {
|
|
12
|
-
return typeof entry[1] === "boolean";
|
|
13
|
-
}));
|
|
14
|
-
} catch {
|
|
15
|
-
return {};
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
var fetchHome_createServerFn_handler = createServerRpc({
|
|
19
|
-
id: "aa485ed8b67fcc5a2feedbfdbdf6b41aa7c7aff92f357123818169f62b907ce1",
|
|
20
|
-
name: "fetchHome",
|
|
21
|
-
filename: "src/routes/index.tsx"
|
|
22
|
-
}, (opts) => fetchHome.__executeServer(opts));
|
|
23
|
-
var fetchHome = createServerFn({ method: "GET" }).validator((data) => data).handler(fetchHome_createServerFn_handler, async ({ data }) => {
|
|
24
|
-
const client = daemonClient();
|
|
25
|
-
const [agents, profiles, teamTemplates, teams] = await Promise.all([
|
|
26
|
-
client.get("/api/agents?includeArchived=false"),
|
|
27
|
-
client.get("/api/profiles"),
|
|
28
|
-
client.get("/api/team-templates"),
|
|
29
|
-
client.get("/api/teams")
|
|
30
|
-
]);
|
|
31
|
-
let selected = null;
|
|
32
|
-
if (data.agentId) try {
|
|
33
|
-
const resolved = await client.get(`/api/agents/${encodeURIComponent(data.agentId)}`);
|
|
34
|
-
if (resolved.agent.status !== "archived") {
|
|
35
|
-
const history = await client.get(`/api/agents/${encodeURIComponent(resolved.agent.id)}/sessions/messages`);
|
|
36
|
-
selected = {
|
|
37
|
-
resolved,
|
|
38
|
-
messages: history.messages,
|
|
39
|
-
head: history.head
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
} catch (err) {
|
|
43
|
-
if (!(err instanceof ApiClientError) || err.status !== 404) throw err;
|
|
44
|
-
}
|
|
45
|
-
const openGroups = parseOpenGroupsCookie(getCookie(SIDEBAR_OPEN_GROUPS_COOKIE));
|
|
46
|
-
return {
|
|
47
|
-
agents,
|
|
48
|
-
profiles,
|
|
49
|
-
teamTemplates,
|
|
50
|
-
teams,
|
|
51
|
-
selected,
|
|
52
|
-
openGroups
|
|
53
|
-
};
|
|
54
|
-
});
|
|
55
|
-
//#endregion
|
|
56
|
-
export { fetchHome_createServerFn_handler };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { n as createServerFn } from "../server.js";
|
|
2
|
-
import { t as createSsrRpc } from "./createSsrRpc-6LHNEsSK.js";
|
|
3
|
-
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
|
-
//#region src/routes/agents/$id/settings.tsx
|
|
5
|
-
var $$splitComponentImporter = () => import("./settings-D9viV-86.js");
|
|
6
|
-
var fetchSettings = createServerFn({ method: "GET" }).handler(createSsrRpc("0fa2a6b260fc042ad52b696162ea55906f3ccbff079f0bfa26ed337fa369639e"));
|
|
7
|
-
var Route = createFileRoute("/agents/$id/settings")({
|
|
8
|
-
loader: () => fetchSettings(),
|
|
9
|
-
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
10
|
-
});
|
|
11
|
-
//#endregion
|
|
12
|
-
export { Route as t };
|
|
@@ -1,561 +0,0 @@
|
|
|
1
|
-
import { i as REASONING_LEVELS } from "./entities-Dn2xzKIw.js";
|
|
2
|
-
import { i as errorMessage, n as api, o as Button } from "./api-WWxPqx67.js";
|
|
3
|
-
import { c as StatusBadge, n as ItemList, o as SectionCard, r as ItemRow } from "./Page-CMSYKXWJ.js";
|
|
4
|
-
import { t as Route } from "./settings-CVaGv-xF.js";
|
|
5
|
-
import { t as ConfirmDialog } from "./ConfirmDialog-LdVlEanK.js";
|
|
6
|
-
import { n as FindingSummary, t as FindingList } from "./SkillFindings-Bd6e81Wu.js";
|
|
7
|
-
import { n as ModelSelect } from "./ModelSelect-Vwro6OkL.js";
|
|
8
|
-
import { useCallback, useEffect, useState } from "react";
|
|
9
|
-
import { getRouteApi, useRouter } from "@tanstack/react-router";
|
|
10
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
//#region src/components/AgentBrowserCard.tsx
|
|
12
|
-
function StatusList({ status }) {
|
|
13
|
-
return /* @__PURE__ */ jsxs("dl", {
|
|
14
|
-
className: "grid min-w-0 grid-cols-1 gap-x-4 gap-y-2 text-sm sm:grid-cols-[max-content_minmax(0,1fr)]",
|
|
15
|
-
children: [
|
|
16
|
-
/* @__PURE__ */ jsx("dt", {
|
|
17
|
-
className: "font-medium text-mocha",
|
|
18
|
-
children: "Browser tools"
|
|
19
|
-
}),
|
|
20
|
-
/* @__PURE__ */ jsx("dd", { children: status.enabled ? "Enabled" : "Disabled" }),
|
|
21
|
-
/* @__PURE__ */ jsx("dt", {
|
|
22
|
-
className: "font-medium text-mocha",
|
|
23
|
-
children: "Session"
|
|
24
|
-
}),
|
|
25
|
-
/* @__PURE__ */ jsx("dd", { children: status.running ? "Running" : "Stopped" }),
|
|
26
|
-
/* @__PURE__ */ jsx("dt", {
|
|
27
|
-
className: "font-medium text-mocha",
|
|
28
|
-
children: "Profile"
|
|
29
|
-
}),
|
|
30
|
-
/* @__PURE__ */ jsx("dd", { children: status.profilePresent ? "Saved (cookies and logins)" : "None yet" }),
|
|
31
|
-
/* @__PURE__ */ jsx("dt", {
|
|
32
|
-
className: "font-medium text-mocha",
|
|
33
|
-
children: "Browser"
|
|
34
|
-
}),
|
|
35
|
-
/* @__PURE__ */ jsx("dd", {
|
|
36
|
-
className: "break-words",
|
|
37
|
-
children: status.browser ? `${status.browser.name} · ${status.browser.mode}` : "None found"
|
|
38
|
-
})
|
|
39
|
-
]
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
/** The Agent's persistent managed browser: status, stop and profile reset. */
|
|
43
|
-
function AgentBrowserCard({ agentId }) {
|
|
44
|
-
const path = `/api/agents/${encodeURIComponent(agentId)}/browser`;
|
|
45
|
-
const [status, setStatus] = useState(null);
|
|
46
|
-
const [loading, setLoading] = useState(true);
|
|
47
|
-
const [pending, setPending] = useState(null);
|
|
48
|
-
const [error, setError] = useState(null);
|
|
49
|
-
const [confirmReset, setConfirmReset] = useState(false);
|
|
50
|
-
const refresh = useCallback(async () => {
|
|
51
|
-
setLoading(true);
|
|
52
|
-
try {
|
|
53
|
-
setStatus(await api(path));
|
|
54
|
-
} catch (cause) {
|
|
55
|
-
setError(errorMessage(cause));
|
|
56
|
-
} finally {
|
|
57
|
-
setLoading(false);
|
|
58
|
-
}
|
|
59
|
-
}, [path]);
|
|
60
|
-
const reload = useCallback(() => {
|
|
61
|
-
setError(null);
|
|
62
|
-
refresh();
|
|
63
|
-
}, [refresh]);
|
|
64
|
-
useEffect(() => {
|
|
65
|
-
reload();
|
|
66
|
-
}, [reload]);
|
|
67
|
-
async function run(action) {
|
|
68
|
-
setPending(action);
|
|
69
|
-
setError(null);
|
|
70
|
-
try {
|
|
71
|
-
if (action === "stop") await api(`${path}/stop`, { method: "POST" });
|
|
72
|
-
else await api(`${path}/profile`, { method: "DELETE" });
|
|
73
|
-
} catch (cause) {
|
|
74
|
-
setError(errorMessage(cause));
|
|
75
|
-
} finally {
|
|
76
|
-
await refresh();
|
|
77
|
-
setPending(null);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
const busy = pending !== null || loading;
|
|
81
|
-
return /* @__PURE__ */ jsxs(SectionCard, {
|
|
82
|
-
title: "Managed browser",
|
|
83
|
-
description: "This Agent's own persistent browser, used by its browser_* tools.",
|
|
84
|
-
actions: /* @__PURE__ */ jsx(Button, {
|
|
85
|
-
variant: "ghost",
|
|
86
|
-
disabled: busy,
|
|
87
|
-
onClick: reload,
|
|
88
|
-
children: loading ? "Refreshing…" : "Refresh status"
|
|
89
|
-
}),
|
|
90
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
91
|
-
className: "space-y-4",
|
|
92
|
-
children: [
|
|
93
|
-
loading && !status && /* @__PURE__ */ jsx("p", {
|
|
94
|
-
role: "status",
|
|
95
|
-
children: "Loading browser status…"
|
|
96
|
-
}),
|
|
97
|
-
status && /* @__PURE__ */ jsx(StatusList, { status }),
|
|
98
|
-
status?.error && /* @__PURE__ */ jsx("p", {
|
|
99
|
-
className: "whitespace-pre-wrap break-words rounded-md bg-fawn/35 p-3 text-sm text-chocolate",
|
|
100
|
-
children: status.error
|
|
101
|
-
}),
|
|
102
|
-
error && /* @__PURE__ */ jsx("p", {
|
|
103
|
-
role: "alert",
|
|
104
|
-
className: "err break-words",
|
|
105
|
-
children: error
|
|
106
|
-
}),
|
|
107
|
-
/* @__PURE__ */ jsxs("div", {
|
|
108
|
-
className: "flex flex-wrap gap-2",
|
|
109
|
-
children: [/* @__PURE__ */ jsx(Button, {
|
|
110
|
-
variant: "ghost",
|
|
111
|
-
disabled: busy || !status?.running,
|
|
112
|
-
onClick: () => void run("stop"),
|
|
113
|
-
children: pending === "stop" ? "Stopping…" : "Stop session"
|
|
114
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
115
|
-
variant: "danger",
|
|
116
|
-
disabled: busy || !status?.profilePresent && !status?.running,
|
|
117
|
-
onClick: () => setConfirmReset(true),
|
|
118
|
-
children: "Reset profile"
|
|
119
|
-
})]
|
|
120
|
-
}),
|
|
121
|
-
/* @__PURE__ */ jsx("p", {
|
|
122
|
-
className: "text-xs leading-5 text-mocha-light",
|
|
123
|
-
children: "Stopping, archiving and moving the Agent to another Team keep the profile; Reset and deleting the Agent remove it. Browser profiles are not included in backups."
|
|
124
|
-
})
|
|
125
|
-
]
|
|
126
|
-
}), /* @__PURE__ */ jsx(ConfirmDialog, {
|
|
127
|
-
open: confirmReset,
|
|
128
|
-
onOpenChange: setConfirmReset,
|
|
129
|
-
title: "Reset this Agent's browser profile?",
|
|
130
|
-
description: /* @__PURE__ */ jsx("p", { children: "This stops the browser and permanently deletes this Agent's profile, including cookies and logins." }),
|
|
131
|
-
confirmLabel: "Delete profile",
|
|
132
|
-
onConfirm: () => run("reset")
|
|
133
|
-
})]
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region src/components/AgentSkills.tsx
|
|
138
|
-
/** Attach and detach installed skills for one Agent; scan findings need confirmation. */
|
|
139
|
-
function AgentSkills({ agentId, attached, all }) {
|
|
140
|
-
const router = useRouter();
|
|
141
|
-
const [pending, setPending] = useState(null);
|
|
142
|
-
const [error, setError] = useState(null);
|
|
143
|
-
const [risky, setRisky] = useState(null);
|
|
144
|
-
const [detaching, setDetaching] = useState(null);
|
|
145
|
-
const base = `/api/agents/${encodeURIComponent(agentId)}/skills`;
|
|
146
|
-
async function change(name, request) {
|
|
147
|
-
setPending(name);
|
|
148
|
-
setError(null);
|
|
149
|
-
try {
|
|
150
|
-
await request();
|
|
151
|
-
await router.invalidate();
|
|
152
|
-
} catch (cause) {
|
|
153
|
-
setError(errorMessage(cause));
|
|
154
|
-
throw cause;
|
|
155
|
-
} finally {
|
|
156
|
-
setPending(null);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
const attach = (skill) => change(skill.name, () => api(base, { body: {
|
|
160
|
-
skill: skill.name,
|
|
161
|
-
allowFindings: (skill.scanFindings ?? []).length > 0
|
|
162
|
-
} }));
|
|
163
|
-
const detach = (name) => change(name, () => api(`${base}/${encodeURIComponent(name)}`, { method: "DELETE" }));
|
|
164
|
-
if (all.length === 0) return /* @__PURE__ */ jsx("p", {
|
|
165
|
-
className: "text-[0.9em] text-mocha-light",
|
|
166
|
-
children: "No skills installed."
|
|
167
|
-
});
|
|
168
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
169
|
-
error && /* @__PURE__ */ jsx("p", {
|
|
170
|
-
role: "alert",
|
|
171
|
-
className: "mb-2 text-[0.85em] text-danger",
|
|
172
|
-
children: error
|
|
173
|
-
}),
|
|
174
|
-
/* @__PURE__ */ jsx(ItemList, { children: all.map((skill) => {
|
|
175
|
-
const isAttached = attached.has(skill.name);
|
|
176
|
-
const busy = pending === skill.name;
|
|
177
|
-
const findings = skill.scanFindings ?? [];
|
|
178
|
-
return /* @__PURE__ */ jsx(ItemRow, {
|
|
179
|
-
title: /* @__PURE__ */ jsx("code", { children: skill.name }),
|
|
180
|
-
meta: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
181
|
-
/* @__PURE__ */ jsx(StatusBadge, {
|
|
182
|
-
variant: isAttached ? "success" : "neutral",
|
|
183
|
-
children: isAttached ? "Attached" : "Available"
|
|
184
|
-
}),
|
|
185
|
-
/* @__PURE__ */ jsx("span", { children: skill.description || "No description." }),
|
|
186
|
-
/* @__PURE__ */ jsx(FindingSummary, { findings })
|
|
187
|
-
] }),
|
|
188
|
-
actions: isAttached ? /* @__PURE__ */ jsx(Button, {
|
|
189
|
-
variant: "ghost",
|
|
190
|
-
disabled: busy,
|
|
191
|
-
onClick: () => setDetaching(skill.name),
|
|
192
|
-
children: busy ? "Detaching…" : "Detach"
|
|
193
|
-
}) : /* @__PURE__ */ jsx(Button, {
|
|
194
|
-
variant: "ghost",
|
|
195
|
-
disabled: busy,
|
|
196
|
-
onClick: () => findings.length > 0 ? setRisky(skill) : void attach(skill).catch(() => {}),
|
|
197
|
-
children: busy ? "Attaching…" : "Attach"
|
|
198
|
-
})
|
|
199
|
-
}, skill.name);
|
|
200
|
-
}) }),
|
|
201
|
-
/* @__PURE__ */ jsx(ConfirmDialog, {
|
|
202
|
-
open: risky !== null,
|
|
203
|
-
onOpenChange: (open) => {
|
|
204
|
-
if (!open) setRisky(null);
|
|
205
|
-
},
|
|
206
|
-
title: `Attach ${risky?.name ?? "skill"} despite scan findings?`,
|
|
207
|
-
description: /* @__PURE__ */ jsxs("div", {
|
|
208
|
-
className: "space-y-2",
|
|
209
|
-
children: [/* @__PURE__ */ jsxs("p", { children: [
|
|
210
|
-
"Static scanning found ",
|
|
211
|
-
risky?.scanFindings?.length ?? 0,
|
|
212
|
-
" potentially unsafe instruction",
|
|
213
|
-
risky?.scanFindings?.length === 1 ? "" : "s",
|
|
214
|
-
". Review them before allowing this skill into the Agent's prompt."
|
|
215
|
-
] }), /* @__PURE__ */ jsx(FindingList, { findings: risky?.scanFindings ?? [] })]
|
|
216
|
-
}),
|
|
217
|
-
confirmLabel: "Attach despite findings",
|
|
218
|
-
onConfirm: async () => {
|
|
219
|
-
if (risky) await attach(risky);
|
|
220
|
-
}
|
|
221
|
-
}),
|
|
222
|
-
/* @__PURE__ */ jsx(ConfirmDialog, {
|
|
223
|
-
open: detaching !== null,
|
|
224
|
-
onOpenChange: (open) => {
|
|
225
|
-
if (!open) setDetaching(null);
|
|
226
|
-
},
|
|
227
|
-
title: `Detach ${detaching ?? "skill"}?`,
|
|
228
|
-
description: /* @__PURE__ */ jsx("p", { children: "This removes the skill's instructions from this Agent's future turns. It does not uninstall the skill, and you can attach it again later." }),
|
|
229
|
-
confirmLabel: "Detach skill",
|
|
230
|
-
onConfirm: async () => {
|
|
231
|
-
if (detaching) await detach(detaching);
|
|
232
|
-
}
|
|
233
|
-
})
|
|
234
|
-
] });
|
|
235
|
-
}
|
|
236
|
-
//#endregion
|
|
237
|
-
//#region src/components/AgentTelegram.tsx
|
|
238
|
-
/** An Agent's Telegram forum topic: bind, open, unbind, mirroring and the topic icon. */
|
|
239
|
-
function AgentTelegram({ agent }) {
|
|
240
|
-
const router = useRouter();
|
|
241
|
-
const [busy, setBusy] = useState(false);
|
|
242
|
-
const [error, setError] = useState(null);
|
|
243
|
-
const [mirrorMode, setMirrorMode] = useState(agent.telegramMirrorMode);
|
|
244
|
-
const [iconEmoji, setIconEmoji] = useState(agent.telegramIconEmoji ?? "");
|
|
245
|
-
const [confirmUnbind, setConfirmUnbind] = useState(false);
|
|
246
|
-
const path = `/api/agents/${encodeURIComponent(agent.id)}`;
|
|
247
|
-
const bound = agent.telegramTopicId !== null;
|
|
248
|
-
async function run(request) {
|
|
249
|
-
setBusy(true);
|
|
250
|
-
setError(null);
|
|
251
|
-
try {
|
|
252
|
-
await request();
|
|
253
|
-
await router.invalidate();
|
|
254
|
-
} catch (cause) {
|
|
255
|
-
setError(errorMessage(cause));
|
|
256
|
-
throw cause;
|
|
257
|
-
} finally {
|
|
258
|
-
setBusy(false);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
async function bind() {
|
|
262
|
-
await run(async () => {
|
|
263
|
-
const { deepLink } = await api(`${path}/telegram/bind`, { method: "POST" });
|
|
264
|
-
window.open(deepLink, "_blank", "noopener");
|
|
265
|
-
}).catch(() => {});
|
|
266
|
-
}
|
|
267
|
-
async function saveMirrorMode(next) {
|
|
268
|
-
setMirrorMode(next);
|
|
269
|
-
await run(() => api(path, {
|
|
270
|
-
method: "PATCH",
|
|
271
|
-
body: { telegramMirrorMode: next }
|
|
272
|
-
})).catch(() => setMirrorMode(agent.telegramMirrorMode));
|
|
273
|
-
}
|
|
274
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
275
|
-
className: "text-[0.9em]",
|
|
276
|
-
children: [
|
|
277
|
-
/* @__PURE__ */ jsx("div", {
|
|
278
|
-
className: "mb-3 flex flex-wrap items-center gap-3",
|
|
279
|
-
children: bound ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
280
|
-
/* @__PURE__ */ jsx("span", {
|
|
281
|
-
className: "rounded-full bg-success/10 px-2 py-0.5 text-xs font-semibold text-success",
|
|
282
|
-
children: "bound"
|
|
283
|
-
}),
|
|
284
|
-
/* @__PURE__ */ jsxs("span", {
|
|
285
|
-
className: "font-mono text-mocha",
|
|
286
|
-
children: ["topic #", agent.telegramTopicId]
|
|
287
|
-
}),
|
|
288
|
-
/* @__PURE__ */ jsx(Button, {
|
|
289
|
-
variant: "ghost",
|
|
290
|
-
onClick: () => void bind(),
|
|
291
|
-
disabled: busy,
|
|
292
|
-
children: "Open in Telegram"
|
|
293
|
-
}),
|
|
294
|
-
/* @__PURE__ */ jsx(Button, {
|
|
295
|
-
variant: "danger",
|
|
296
|
-
onClick: () => setConfirmUnbind(true),
|
|
297
|
-
disabled: busy,
|
|
298
|
-
children: "Unbind"
|
|
299
|
-
})
|
|
300
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
301
|
-
className: "rounded-full bg-warning/10 px-2 py-0.5 text-xs font-semibold text-warning",
|
|
302
|
-
children: "unbound"
|
|
303
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
304
|
-
variant: "ghost",
|
|
305
|
-
onClick: () => void bind(),
|
|
306
|
-
disabled: busy,
|
|
307
|
-
children: busy ? "Binding…" : "Bind a topic"
|
|
308
|
-
})] })
|
|
309
|
-
}),
|
|
310
|
-
/* @__PURE__ */ jsxs("label", {
|
|
311
|
-
className: "flex flex-col gap-1 sm:flex-row sm:items-center sm:gap-2",
|
|
312
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
313
|
-
className: "text-mocha-light",
|
|
314
|
-
children: "Mirror mode"
|
|
315
|
-
}), /* @__PURE__ */ jsxs("select", {
|
|
316
|
-
value: mirrorMode,
|
|
317
|
-
onChange: (event) => void saveMirrorMode(event.target.value),
|
|
318
|
-
className: "sm:max-w-sm",
|
|
319
|
-
disabled: busy,
|
|
320
|
-
children: [/* @__PURE__ */ jsx("option", {
|
|
321
|
-
value: "minimal",
|
|
322
|
-
children: "minimal — assistant messages only"
|
|
323
|
-
}), /* @__PURE__ */ jsx("option", {
|
|
324
|
-
value: "verbose",
|
|
325
|
-
children: "verbose — also tool calls"
|
|
326
|
-
})]
|
|
327
|
-
})]
|
|
328
|
-
}),
|
|
329
|
-
/* @__PURE__ */ jsxs("div", {
|
|
330
|
-
className: "mt-3 flex flex-wrap items-end gap-2",
|
|
331
|
-
children: [/* @__PURE__ */ jsxs("label", {
|
|
332
|
-
className: "m-0",
|
|
333
|
-
children: ["Topic icon", /* @__PURE__ */ jsx("input", {
|
|
334
|
-
value: iconEmoji,
|
|
335
|
-
onChange: (event) => setIconEmoji(event.target.value),
|
|
336
|
-
placeholder: "(template default)",
|
|
337
|
-
maxLength: 8,
|
|
338
|
-
className: "w-40 font-mono",
|
|
339
|
-
disabled: busy
|
|
340
|
-
})]
|
|
341
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
342
|
-
variant: "ghost",
|
|
343
|
-
onClick: () => void run(() => api(path, {
|
|
344
|
-
method: "PATCH",
|
|
345
|
-
body: { telegramIconEmoji: iconEmoji.trim() || null }
|
|
346
|
-
})).catch(() => {}),
|
|
347
|
-
disabled: busy || iconEmoji === (agent.telegramIconEmoji ?? ""),
|
|
348
|
-
children: "Save icon"
|
|
349
|
-
})]
|
|
350
|
-
}),
|
|
351
|
-
error && /* @__PURE__ */ jsx("p", {
|
|
352
|
-
role: "alert",
|
|
353
|
-
className: "mt-2 text-sm text-danger",
|
|
354
|
-
children: error
|
|
355
|
-
}),
|
|
356
|
-
/* @__PURE__ */ jsx("p", {
|
|
357
|
-
className: "mt-3 text-[0.85em] text-mocha-light",
|
|
358
|
-
children: "While bound, every assistant turn of this Agent is mirrored to the topic, and a message in the topic starts a turn. On iOS, Telegram opens the topic list instead of the topic."
|
|
359
|
-
})
|
|
360
|
-
]
|
|
361
|
-
}), /* @__PURE__ */ jsx(ConfirmDialog, {
|
|
362
|
-
open: confirmUnbind,
|
|
363
|
-
onOpenChange: setConfirmUnbind,
|
|
364
|
-
title: `Unbind ${agent.name} from Telegram?`,
|
|
365
|
-
description: /* @__PURE__ */ jsx("p", { children: "Telegram ingress and mirroring stop for this Agent. The forum topic stays in Telegram until you remove it there." }),
|
|
366
|
-
confirmLabel: "Unbind Telegram topic",
|
|
367
|
-
onConfirm: () => run(() => api(`${path}/telegram/binding`, { method: "DELETE" }))
|
|
368
|
-
})] });
|
|
369
|
-
}
|
|
370
|
-
//#endregion
|
|
371
|
-
//#region src/routes/agents/$id/settings.tsx?tsr-split=component
|
|
372
|
-
var agentRoute = getRouteApi("/agents/$id");
|
|
373
|
-
function AgentSettingsPage() {
|
|
374
|
-
const resolved = agentRoute.useLoaderData();
|
|
375
|
-
const { teams, skills, modelGroups, telegramConfigured } = Route.useLoaderData();
|
|
376
|
-
const { agent } = resolved;
|
|
377
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
378
|
-
className: "space-y-6",
|
|
379
|
-
children: [
|
|
380
|
-
/* @__PURE__ */ jsx(AgentBrowserCard, { agentId: agent.id }),
|
|
381
|
-
/* @__PURE__ */ jsx(ModelSettings, {
|
|
382
|
-
agentId: agent.id,
|
|
383
|
-
modelOverride: agent.modelOverride ?? null,
|
|
384
|
-
templateModel: resolved.profile.defaultModel,
|
|
385
|
-
reasoning: resolved.reasoningLevel,
|
|
386
|
-
modelGroups
|
|
387
|
-
}),
|
|
388
|
-
/* @__PURE__ */ jsxs(SectionCard, {
|
|
389
|
-
title: "Team",
|
|
390
|
-
description: "Move this Agent to another Team workspace. It leaves its allow edges behind and joins with none.",
|
|
391
|
-
children: [/* @__PURE__ */ jsxs("p", {
|
|
392
|
-
className: "text-[0.9em] text-mocha-light",
|
|
393
|
-
children: [
|
|
394
|
-
"Current team: ",
|
|
395
|
-
/* @__PURE__ */ jsx("code", { children: resolved.team.id }),
|
|
396
|
-
" (",
|
|
397
|
-
resolved.team.name,
|
|
398
|
-
") —",
|
|
399
|
-
" ",
|
|
400
|
-
/* @__PURE__ */ jsx("code", { children: resolved.team.path }),
|
|
401
|
-
".",
|
|
402
|
-
" ",
|
|
403
|
-
/* @__PURE__ */ jsx("a", {
|
|
404
|
-
href: `/teams/${encodeURIComponent(resolved.team.id)}`,
|
|
405
|
-
children: "View or edit USER.md"
|
|
406
|
-
})
|
|
407
|
-
]
|
|
408
|
-
}), /* @__PURE__ */ jsx(MoveTeamForm, {
|
|
409
|
-
agentId: agent.id,
|
|
410
|
-
currentTeamId: resolved.team.id,
|
|
411
|
-
teams
|
|
412
|
-
})]
|
|
413
|
-
}),
|
|
414
|
-
/* @__PURE__ */ jsx(SectionCard, {
|
|
415
|
-
title: "Skills",
|
|
416
|
-
description: "Attach or detach prompt skills for this Agent.",
|
|
417
|
-
children: /* @__PURE__ */ jsx(AgentSkills, {
|
|
418
|
-
agentId: agent.id,
|
|
419
|
-
attached: new Set(resolved.skills),
|
|
420
|
-
all: skills
|
|
421
|
-
})
|
|
422
|
-
}),
|
|
423
|
-
telegramConfigured && /* @__PURE__ */ jsx(SectionCard, {
|
|
424
|
-
title: "Telegram",
|
|
425
|
-
description: "Bind this Agent to its Telegram topic and control mirroring.",
|
|
426
|
-
children: /* @__PURE__ */ jsx(AgentTelegram, { agent })
|
|
427
|
-
})
|
|
428
|
-
]
|
|
429
|
-
});
|
|
430
|
-
}
|
|
431
|
-
function ModelSettings({ agentId, modelOverride, templateModel, reasoning: currentReasoning, modelGroups }) {
|
|
432
|
-
const router = useRouter();
|
|
433
|
-
const [model, setModel] = useState(modelOverride ?? "");
|
|
434
|
-
const [reasoning, setReasoning] = useState(currentReasoning);
|
|
435
|
-
const [saving, setSaving] = useState(false);
|
|
436
|
-
const [saved, setSaved] = useState(false);
|
|
437
|
-
const [error, setError] = useState(null);
|
|
438
|
-
async function save(event) {
|
|
439
|
-
event.preventDefault();
|
|
440
|
-
setSaving(true);
|
|
441
|
-
setError(null);
|
|
442
|
-
try {
|
|
443
|
-
await api(`/api/agents/${encodeURIComponent(agentId)}`, {
|
|
444
|
-
method: "PATCH",
|
|
445
|
-
body: {
|
|
446
|
-
modelOverride: model || null,
|
|
447
|
-
reasoningLevel: reasoning
|
|
448
|
-
}
|
|
449
|
-
});
|
|
450
|
-
setSaved(true);
|
|
451
|
-
setTimeout(() => setSaved(false), 1500);
|
|
452
|
-
await router.invalidate();
|
|
453
|
-
} catch (cause) {
|
|
454
|
-
setError(errorMessage(cause));
|
|
455
|
-
} finally {
|
|
456
|
-
setSaving(false);
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
return /* @__PURE__ */ jsx(SectionCard, {
|
|
460
|
-
title: "Model and reasoning",
|
|
461
|
-
description: "Override the Agent template defaults for this Agent only.",
|
|
462
|
-
children: /* @__PURE__ */ jsxs("form", {
|
|
463
|
-
onSubmit: (event) => void save(event),
|
|
464
|
-
className: "grid gap-x-4 sm:grid-cols-2",
|
|
465
|
-
children: [
|
|
466
|
-
/* @__PURE__ */ jsx(ModelSelect, {
|
|
467
|
-
label: "Model override",
|
|
468
|
-
value: model,
|
|
469
|
-
onChange: setModel,
|
|
470
|
-
groups: modelGroups,
|
|
471
|
-
emptyOption: `Inherit from the template (${templateModel})`
|
|
472
|
-
}),
|
|
473
|
-
/* @__PURE__ */ jsxs("label", { children: ["Reasoning level", /* @__PURE__ */ jsx("select", {
|
|
474
|
-
value: reasoning,
|
|
475
|
-
onChange: (event) => setReasoning(event.target.value),
|
|
476
|
-
children: REASONING_LEVELS.map((level) => /* @__PURE__ */ jsx("option", {
|
|
477
|
-
value: level,
|
|
478
|
-
children: level
|
|
479
|
-
}, level))
|
|
480
|
-
})] }),
|
|
481
|
-
/* @__PURE__ */ jsxs("div", {
|
|
482
|
-
className: "flex flex-wrap items-center gap-3 sm:col-span-2",
|
|
483
|
-
children: [
|
|
484
|
-
/* @__PURE__ */ jsx(Button, {
|
|
485
|
-
variant: "primary",
|
|
486
|
-
type: "submit",
|
|
487
|
-
disabled: saving,
|
|
488
|
-
children: saving ? "Saving…" : "Save model settings"
|
|
489
|
-
}),
|
|
490
|
-
saved && /* @__PURE__ */ jsx("span", {
|
|
491
|
-
role: "status",
|
|
492
|
-
className: "text-sm text-success",
|
|
493
|
-
children: "Saved"
|
|
494
|
-
}),
|
|
495
|
-
error && /* @__PURE__ */ jsx("span", {
|
|
496
|
-
role: "alert",
|
|
497
|
-
className: "text-sm text-danger",
|
|
498
|
-
children: error
|
|
499
|
-
})
|
|
500
|
-
]
|
|
501
|
-
})
|
|
502
|
-
]
|
|
503
|
-
})
|
|
504
|
-
});
|
|
505
|
-
}
|
|
506
|
-
function MoveTeamForm({ agentId, currentTeamId, teams }) {
|
|
507
|
-
const router = useRouter();
|
|
508
|
-
const [teamId, setTeamId] = useState(currentTeamId);
|
|
509
|
-
const [moving, setMoving] = useState(false);
|
|
510
|
-
const [error, setError] = useState(null);
|
|
511
|
-
async function move(event) {
|
|
512
|
-
event.preventDefault();
|
|
513
|
-
setMoving(true);
|
|
514
|
-
setError(null);
|
|
515
|
-
try {
|
|
516
|
-
await api(`/api/agents/${encodeURIComponent(agentId)}/team`, {
|
|
517
|
-
method: "PATCH",
|
|
518
|
-
body: { teamId }
|
|
519
|
-
});
|
|
520
|
-
await router.invalidate();
|
|
521
|
-
} catch (cause) {
|
|
522
|
-
setError(errorMessage(cause));
|
|
523
|
-
} finally {
|
|
524
|
-
setMoving(false);
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
return /* @__PURE__ */ jsxs("form", {
|
|
528
|
-
onSubmit: (event) => void move(event),
|
|
529
|
-
className: "mt-2 flex flex-wrap items-end gap-2",
|
|
530
|
-
children: [
|
|
531
|
-
/* @__PURE__ */ jsxs("label", {
|
|
532
|
-
className: "m-0 min-w-0 flex-1",
|
|
533
|
-
children: ["Move to", /* @__PURE__ */ jsx("select", {
|
|
534
|
-
value: teamId,
|
|
535
|
-
onChange: (event) => setTeamId(event.target.value),
|
|
536
|
-
children: teams.map((team) => /* @__PURE__ */ jsxs("option", {
|
|
537
|
-
value: team.id,
|
|
538
|
-
children: [
|
|
539
|
-
team.id,
|
|
540
|
-
" — ",
|
|
541
|
-
team.path
|
|
542
|
-
]
|
|
543
|
-
}, team.id))
|
|
544
|
-
})]
|
|
545
|
-
}),
|
|
546
|
-
/* @__PURE__ */ jsx(Button, {
|
|
547
|
-
variant: "primary",
|
|
548
|
-
type: "submit",
|
|
549
|
-
disabled: moving || teamId === currentTeamId,
|
|
550
|
-
children: moving ? "Moving…" : "Move"
|
|
551
|
-
}),
|
|
552
|
-
error && /* @__PURE__ */ jsx("span", {
|
|
553
|
-
role: "alert",
|
|
554
|
-
className: "basis-full text-[0.85em] text-danger",
|
|
555
|
-
children: error
|
|
556
|
-
})
|
|
557
|
-
]
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
//#endregion
|
|
561
|
-
export { AgentSettingsPage as component };
|