bazilion 0.51.0 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +74 -28
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +547 -187
- package/dist/daemon.js.map +1 -1
- package/dist/web/client/assets/AddProviderDialog-CO_uijWF.js +1 -0
- package/dist/web/client/assets/AgentTemplateParts-Dl35c-Ux.js +1 -0
- package/dist/web/client/assets/ConfigPage-DiQiJXP6.js +1 -0
- package/dist/web/client/assets/ConfirmDialog-BVytx3kN.js +1 -0
- package/dist/web/client/assets/ConnectionsView-DDrBaiLg.js +1 -0
- package/dist/web/client/assets/Dialog-BTDzv3J5.js +1 -0
- package/dist/web/client/assets/ManagePage-xlePXXx5.js +1 -0
- package/dist/web/client/assets/SectionTabs-BMiRKFfb.js +1 -0
- package/dist/web/client/assets/Segmented-Co4n2C5X.js +1 -0
- package/dist/web/client/assets/SpawnDialog-ejwXnyxy.js +1 -0
- package/dist/web/client/assets/SpawnTeamModal-Cp-nAvIC.js +1 -0
- package/dist/web/client/assets/TeamForm-Cz9uDVvb.js +1 -0
- package/dist/web/client/assets/TeamThread-D8xqE_gb.js +1 -0
- package/dist/web/client/assets/UnsavedChangesGuard-DmT4nBQU.js +1 -0
- package/dist/web/client/assets/_id-DEQxwq2v.js +1 -0
- package/dist/web/client/assets/_id-DSRgpxEc.js +1 -0
- package/dist/web/client/assets/access-34_ShgHU.js +1 -0
- package/dist/web/client/assets/agent-actions--EO4yJ4Q.js +1 -0
- package/dist/web/client/assets/agents-C87yBHaR.js +1 -0
- package/dist/web/client/assets/agents-DvCSl1Ro.js +1 -0
- package/dist/web/client/assets/api-CoLs57oO.js +1 -0
- package/dist/web/client/assets/arrow-right-BhTWtC9z.js +1 -0
- package/dist/web/client/assets/attention-CteEeRvX.js +1 -0
- package/dist/web/client/assets/chevron-right-BqOIX9UM.js +1 -0
- package/dist/web/client/assets/config-XJuQeEP4.js +1 -0
- package/dist/web/client/assets/createLucideIcon-dN8ooBD1.js +1 -0
- package/dist/web/client/assets/download-Dj-1ltZb.js +1 -0
- package/dist/web/client/assets/file-text-DiP-LaEg.js +1 -0
- package/dist/web/client/assets/form-Bvr_f9lR.js +1 -0
- package/dist/web/client/assets/images-BKjyhYUc.js +1 -0
- package/dist/web/client/assets/index-J_Uqj4md.js +54 -0
- package/dist/web/client/assets/key-round-QpqZklz6.js +1 -0
- package/dist/web/client/assets/list-checks-BeyG5SVQ.js +1 -0
- package/dist/web/client/assets/login-076Bc601.js +1 -0
- package/dist/web/client/assets/manage-CsrV2hhK.js +1 -0
- package/dist/web/client/assets/mcp-8N0BqZ0G.js +1 -0
- package/dist/web/client/assets/message-square-DnpSOYv4.js +1 -0
- package/dist/web/client/assets/model-facts-DoB6QD5y.js +1 -0
- package/dist/web/client/assets/network-BC7rNaOC.js +1 -0
- package/dist/web/client/assets/parts-B0JBolvG.js +1 -0
- package/dist/web/client/assets/plus-DZ3KVo7E.js +1 -0
- package/dist/web/client/assets/routes-3HkZZOOe.js +76 -0
- package/dist/web/client/assets/skills-DiaqZRXT.js +1 -0
- package/dist/web/client/assets/square-terminal-hQZ6pexU.js +1 -0
- package/dist/web/client/assets/style-BtcFIkOS.js +7 -0
- package/dist/web/client/assets/styles-C7Ztw15K.css +2 -0
- package/dist/web/client/assets/system-YWlJ8ogO.js +1 -0
- package/dist/web/client/assets/teams-DQwceMvk.js +1 -0
- package/dist/web/client/assets/teams-DTC3plIH.js +1 -0
- package/dist/web/client/assets/telegram-D4wINntt.js +1 -0
- package/dist/web/client/assets/tools-CZeQ9pDx.js +1 -0
- package/dist/web/client/assets/use-resource-BaTkTGvG.js +1 -0
- package/dist/web/client/assets/welcome-CnxP_RCk.js +1 -0
- package/dist/web/client/assets/wrench-BrwBswfo.js +1 -0
- package/dist/web/server/assets/{AddProviderDialog-CR6TRYdZ.js → AddProviderDialog-Di5crZUB.js} +9 -205
- package/dist/web/server/assets/AgentTemplateParts-Cqy7kSzx.js +269 -0
- package/dist/web/server/assets/{ConfigPage-CIh3ohea.js → ConfigPage-oXM3wyOU.js} +2 -2
- package/dist/web/server/assets/{ConfirmDialog-B79K2KEW.js → ConfirmDialog-DfaJ--A6.js} +2 -2
- package/dist/web/server/assets/{ConnectionsView-BIMYdp9C.js → ConnectionsView-DZrLoNoW.js} +7 -7
- package/dist/web/server/assets/{Dialog-CVqpXxuN.js → Dialog-aup_yJv5.js} +1 -1
- package/dist/web/server/assets/ManagePage-0LKHEcT_.js +29 -0
- package/dist/web/server/assets/ModelMenu-BAZeARx6.js +138 -0
- package/dist/web/server/assets/{Rail-Cg-efcpA.js → Rail-7JU6ly2O.js} +17 -107
- package/dist/web/server/assets/{SectionTabs-DrcgVeZd.js → SectionTabs-CWQ5orUW.js} +12 -5
- package/dist/web/server/assets/SpawnDialog-CYkwzETs.js +124 -0
- package/dist/web/server/assets/SpawnTeamModal-CCe6P82H.js +127 -0
- package/dist/web/server/assets/TeamForm-BzQmdhVi.js +141 -0
- package/dist/web/server/assets/{TeamThread-5CjVPcDr.js → TeamThread-SyQpUvz5.js} +3 -3
- package/dist/web/server/assets/{UnsavedChangesGuard-CyF2Z9p1.js → UnsavedChangesGuard-DrOvPV14.js} +1 -1
- package/dist/web/server/assets/_id-AcyGvFrE.js +400 -0
- package/dist/web/server/assets/{_id-8bsYEcGg.js → _id-BGTgqsWm.js} +8 -4
- package/dist/web/server/assets/{_id-TVruGcOd.js → _id-BKzOw78O.js} +11 -3
- package/dist/web/server/assets/{_id-0fEWiVZX.js → _id-DPGzfmjG.js} +258 -206
- package/dist/web/server/assets/_id-DXm9W55C.js +16 -0
- package/dist/web/server/assets/_id-DojvxRZn.js +39 -0
- package/dist/web/server/assets/_tanstack-start-manifest_v-D7RvKGRH.js +285 -0
- package/dist/web/server/assets/{tokens-C-oDTqnp.js → access-BJe-NduL.js} +5 -5
- package/dist/web/server/assets/access-CKSW7MFH.js +297 -0
- package/dist/web/server/assets/{tokens-CEdl8puR.js → access-WWspT0v4.js} +5 -4
- package/dist/web/server/assets/agent-actions-CUDMCG0F.js +20 -0
- package/dist/web/server/assets/agents-1sjSvp5p.js +12 -0
- package/dist/web/server/assets/{agents-BnWgFo6o.js → agents-6d9WxbYF.js} +9 -6
- package/dist/web/server/assets/agents-DKVGUwD1.js +31 -0
- package/dist/web/server/assets/agents-DUI4Yjtg.js +13 -0
- package/dist/web/server/assets/agents-DsHeRaLq.js +327 -0
- package/dist/web/server/assets/agents-DtLDoZ_u.js +136 -0
- package/dist/web/server/assets/{attention-Cr7puThv.js → attention-B6sSDR_4.js} +2 -1
- package/dist/web/server/assets/{attention-CHQEQiZl.js → attention-DefKwvgm.js} +2 -2
- package/dist/web/server/assets/attention-johfkM0_.js +203 -0
- package/dist/web/server/assets/{config-DOp28gcy.js → config-Clz57LuN.js} +186 -87
- package/dist/web/server/assets/{config-DzgkbBoD.js → config-DYAaaE9Z.js} +2 -2
- package/dist/web/server/assets/{createSsrRpc-CcLbajrF.js → createSsrRpc-BijMHgqE.js} +2 -46
- package/dist/web/server/assets/form-BRQAsKKq.js +319 -0
- package/dist/web/server/assets/manage-Ppyi3Y5y.js +230 -0
- package/dist/web/server/assets/mcp-Ce6O8Qs2.js +378 -0
- package/dist/web/server/assets/{mcp-D3OCoHtO.js → mcp-DB38leWS.js} +2 -2
- package/dist/web/server/assets/model-facts-mrfrWQne.js +136 -0
- package/dist/web/server/assets/parts-mabERIJZ.js +380 -0
- package/dist/web/server/assets/{router-Cs2Ak4II.js → router-C97bwlXi.js} +55 -50
- package/dist/web/server/assets/{routes-BSNOKE-C.js → routes-C4aGqXfr.js} +65 -17
- package/dist/web/server/assets/{routes-CO4l-GJ0.js → routes-DuOShl4q.js} +2 -2
- package/dist/web/server/assets/{routes-BVwqgZGI.js → routes-IHMVKpDK.js} +3 -3
- package/dist/web/server/assets/{skills-CggQJk6a.js → skills-B7sg0QKS.js} +2 -2
- package/dist/web/server/assets/{skills-h5aHa7Q8.js → skills-DWzlT_hC.js} +9 -1
- package/dist/web/server/assets/skills-hfTSwqsG.js +353 -0
- package/dist/web/server/assets/{style-GYDODk2F.js → style-BR7ufS6Z.js} +1 -1
- package/dist/web/server/assets/system-CNQpt3JB.js +145 -0
- package/dist/web/server/assets/{system-DtswhLW62.js → system-D3th6n2E.js} +4 -2
- package/dist/web/server/assets/{system-DsJfpBPl.js → system-DaP0ol67.js} +2 -2
- package/dist/web/server/assets/{teams-B6lBhvdL.js → teams-4cEZ4_rw.js} +4 -2
- package/dist/web/server/assets/{teams-BxnvFTyn.js → teams-70u1XQTr.js} +1 -3
- package/dist/web/server/assets/teams-BKHe67f3.js +176 -0
- package/dist/web/server/assets/{teams-YrmyutM4.js → teams-BopOP4x7.js} +8 -1
- package/dist/web/server/assets/teams-C3xwTz8-.js +219 -0
- package/dist/web/server/assets/{teams-Bp2tERZe.js → teams-CuKE5iAK.js} +2 -2
- package/dist/web/server/assets/{telegram-D2RZriz_.js → telegram-BnQADwnj.js} +5 -5
- package/dist/web/server/assets/telegram-BpmK-HHV.js +1059 -0
- package/dist/web/server/assets/{telegram-Gy7_9yih.js → telegram-CGol0CKX.js} +3 -3
- package/dist/web/server/assets/tools-BQeWn7Tj.js +12 -0
- package/dist/web/server/assets/tools-C-wwWjLI.js +12 -0
- package/dist/web/server/assets/tools-CURTfG2q.js +341 -0
- package/dist/web/server/assets/{use-resource-ChQozXVI.js → use-resource-DVzK0toP.js} +1 -1
- package/dist/web/server/assets/utils-C_uf36nf.js +8 -0
- package/dist/web/server/assets/{welcome-BLw1G6SS.js → welcome-OiZCAIHZ.js} +5 -5
- package/dist/web/server/assets/{welcome-ByAkvHSP.js → welcome-SNsE49JO.js} +2 -2
- package/dist/web/server/assets/{workspace-DeEYMPDX.js → workspace-DaitCM0t.js} +1 -8
- package/dist/web/server/server.js +30 -30
- package/dist/worker.js +202 -120
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
- package/dist/web/client/assets/AddProviderDialog-Diic36c_.js +0 -1
- package/dist/web/client/assets/ConfigPage-pupvtSCX.js +0 -1
- package/dist/web/client/assets/ConfirmDialog-GFDcHI1L.js +0 -1
- package/dist/web/client/assets/ConnectionsView-y1CeY-6U.js +0 -1
- package/dist/web/client/assets/Dialog-bg86_x4v.js +0 -1
- package/dist/web/client/assets/FieldRow-B8eIni5r.js +0 -1
- package/dist/web/client/assets/ModelSelect-DvCLUmkW.js +0 -1
- package/dist/web/client/assets/SectionTabs-D4ezA6U4.js +0 -1
- package/dist/web/client/assets/Segmented-Dh77vmpp.js +0 -1
- package/dist/web/client/assets/SkillFindings-BzLO1lNA.js +0 -1
- package/dist/web/client/assets/SkillsPicker-hI3YXvib.js +0 -1
- package/dist/web/client/assets/SpawnDialog-YJX6UMBC.js +0 -1
- package/dist/web/client/assets/Tabs-f6bHvCGn.js +0 -1
- package/dist/web/client/assets/TeamForm-kda1HYZG.js +0 -1
- package/dist/web/client/assets/TeamThread-DFvbakHo.js +0 -1
- package/dist/web/client/assets/UnsavedChangesGuard-DBJikVgc.js +0 -1
- package/dist/web/client/assets/_id-BjNtLwak.js +0 -1
- package/dist/web/client/assets/_id-BklaQf3z.js +0 -1
- package/dist/web/client/assets/agents-D9cUF2d9.js +0 -1
- package/dist/web/client/assets/agents-wuBlzx4e.js +0 -1
- package/dist/web/client/assets/api-HC_YzjBy.js +0 -1
- package/dist/web/client/assets/arrow-right-Gm_FDWJ_.js +0 -1
- package/dist/web/client/assets/attention-8ZkSLl2e.js +0 -1
- package/dist/web/client/assets/check-BjgKoGvU.js +0 -1
- package/dist/web/client/assets/config-Con_BbSh.js +0 -1
- package/dist/web/client/assets/createLucideIcon-C6gOo8sD.js +0 -1
- package/dist/web/client/assets/index-Br9qkGM-.js +0 -54
- package/dist/web/client/assets/link-Cbztlp_R.js +0 -1
- package/dist/web/client/assets/login-llnOKSJc.js +0 -1
- package/dist/web/client/assets/mcp-zIUguMSI.js +0 -1
- package/dist/web/client/assets/plus-CWrKMtvA.js +0 -1
- package/dist/web/client/assets/routes-BY5uqJ2n.js +0 -76
- package/dist/web/client/assets/save-f9O-CQia.js +0 -1
- package/dist/web/client/assets/services-esLrcTwe.js +0 -1
- package/dist/web/client/assets/skills-DzYXksM0.js +0 -1
- package/dist/web/client/assets/style-Cdzqt_TJ.js +0 -7
- package/dist/web/client/assets/styles-BRSS6yrm.css +0 -2
- package/dist/web/client/assets/system-CsI66nyZ.js +0 -1
- package/dist/web/client/assets/teams-CHE_zpxS.js +0 -1
- package/dist/web/client/assets/teams-dxG9OESG.js +0 -1
- package/dist/web/client/assets/telegram-C3dGndJV.js +0 -1
- package/dist/web/client/assets/tokens-CNNH-Wr9.js +0 -1
- package/dist/web/client/assets/use-resource-BjnxgGvh.js +0 -1
- package/dist/web/client/assets/welcome-C8EOtc8P.js +0 -1
- package/dist/web/server/assets/FieldRow-CHVhX2rS.js +0 -173
- package/dist/web/server/assets/ModelSelect-DrZrdndo.js +0 -43
- package/dist/web/server/assets/SkillFindings-DSDiL6hn.js +0 -46
- package/dist/web/server/assets/SkillsPicker-DlqEfRWh.js +0 -67
- package/dist/web/server/assets/SpawnDialog-BUUlLxE9.js +0 -129
- package/dist/web/server/assets/Tabs-BhF41MfQ.js +0 -20
- package/dist/web/server/assets/TeamForm-CvQAs2FA.js +0 -96
- package/dist/web/server/assets/_id-BvAaRSUW.js +0 -18
- package/dist/web/server/assets/_id-Dg6M_qfr.js +0 -383
- package/dist/web/server/assets/_id-Dji7xr9C.js +0 -28
- package/dist/web/server/assets/_tanstack-start-manifest_v-sxiIH4M7.js +0 -214
- package/dist/web/server/assets/agents-BDA5yYZ2.js +0 -130
- package/dist/web/server/assets/agents-BTDxmp-F.js +0 -12
- package/dist/web/server/assets/agents-DM7guWF2.js +0 -14
- package/dist/web/server/assets/agents-DktqUffG.js +0 -327
- package/dist/web/server/assets/agents-xgZ9rsac.js +0 -27
- package/dist/web/server/assets/attention-De3-ehuf.js +0 -216
- package/dist/web/server/assets/mcp-CO_tycXU.js +0 -250
- package/dist/web/server/assets/services-DZLxUSG8.js +0 -13
- package/dist/web/server/assets/services-DsHRLL8q.js +0 -12
- package/dist/web/server/assets/services-DsvpaF3L.js +0 -74
- package/dist/web/server/assets/skills-DKYV7PTk.js +0 -275
- package/dist/web/server/assets/system-CZ2qzBz3.js +0 -138
- package/dist/web/server/assets/teams-B6PzNcoy.js +0 -88
- package/dist/web/server/assets/teams-C-8iz-uV.js +0 -108
- package/dist/web/server/assets/telegram-CXrP3hMp.js +0 -984
- package/dist/web/server/assets/tokens-DSLwQ1Pw.js +0 -232
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
//#region src/components/SkillsPicker.tsx
|
|
3
|
-
/** Which skills an Agent template attaches at spawn: every installed skill, or the ticked ones. */
|
|
4
|
-
function SkillsPicker({ mode, onModeChange, picked, onPickedChange, skills }) {
|
|
5
|
-
function toggle(name) {
|
|
6
|
-
const next = new Set(picked);
|
|
7
|
-
if (next.has(name)) next.delete(name);
|
|
8
|
-
else next.add(name);
|
|
9
|
-
onPickedChange(next);
|
|
10
|
-
}
|
|
11
|
-
return /* @__PURE__ */ jsxs("fieldset", {
|
|
12
|
-
className: "m-0 border-0 p-0",
|
|
13
|
-
children: [
|
|
14
|
-
/* @__PURE__ */ jsx("legend", {
|
|
15
|
-
className: "sr-only",
|
|
16
|
-
children: "Skills at spawn"
|
|
17
|
-
}),
|
|
18
|
-
/* @__PURE__ */ jsxs("label", {
|
|
19
|
-
className: "my-2 flex cursor-pointer items-start gap-2",
|
|
20
|
-
children: [/* @__PURE__ */ jsx("input", {
|
|
21
|
-
type: "radio",
|
|
22
|
-
checked: mode === "all",
|
|
23
|
-
onChange: () => onModeChange("all")
|
|
24
|
-
}), /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx("strong", { children: "All skills" }), ": every installed skill is attached at spawn."] })]
|
|
25
|
-
}),
|
|
26
|
-
/* @__PURE__ */ jsxs("label", {
|
|
27
|
-
className: "my-2 flex cursor-pointer items-start gap-2",
|
|
28
|
-
children: [/* @__PURE__ */ jsx("input", {
|
|
29
|
-
type: "radio",
|
|
30
|
-
checked: mode === "selected",
|
|
31
|
-
onChange: () => onModeChange("selected")
|
|
32
|
-
}), /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx("strong", { children: "Selected skills" }), ": only the ones ticked below."] })]
|
|
33
|
-
}),
|
|
34
|
-
/* @__PURE__ */ jsx("div", {
|
|
35
|
-
className: `mt-3 max-h-[22rem] overflow-y-auto rounded-md border border-frost p-3 ${mode === "all" ? "pointer-events-none opacity-50" : ""}`,
|
|
36
|
-
children: skills.length === 0 ? /* @__PURE__ */ jsxs("p", {
|
|
37
|
-
className: "muted",
|
|
38
|
-
children: [
|
|
39
|
-
"No skills installed yet. Import some on ",
|
|
40
|
-
/* @__PURE__ */ jsx("a", {
|
|
41
|
-
href: "/skills",
|
|
42
|
-
children: "Skills"
|
|
43
|
-
}),
|
|
44
|
-
"."
|
|
45
|
-
]
|
|
46
|
-
}) : skills.map((skill) => /* @__PURE__ */ jsxs("label", {
|
|
47
|
-
className: "my-1.5 flex cursor-pointer items-start gap-2",
|
|
48
|
-
children: [/* @__PURE__ */ jsx("input", {
|
|
49
|
-
type: "checkbox",
|
|
50
|
-
checked: picked.has(skill.name),
|
|
51
|
-
disabled: mode === "all",
|
|
52
|
-
onChange: () => toggle(skill.name)
|
|
53
|
-
}), /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx("code", { children: skill.name }), skill.description && /* @__PURE__ */ jsxs("span", {
|
|
54
|
-
className: "text-[0.9em] text-mocha-light",
|
|
55
|
-
children: [" — ", skill.description]
|
|
56
|
-
})] })]
|
|
57
|
-
}, skill.name))
|
|
58
|
-
}),
|
|
59
|
-
/* @__PURE__ */ jsx("p", {
|
|
60
|
-
className: "muted mt-2 text-[0.85em]",
|
|
61
|
-
children: "Each Agent can still attach or detach skills after it is spawned."
|
|
62
|
-
})
|
|
63
|
-
]
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
//#endregion
|
|
67
|
-
export { SkillsPicker as t };
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { E as errorMessage, d as Button, w as api } from "./workspace-DeEYMPDX.js";
|
|
2
|
-
import "./entities-Dn2xzKIw.js";
|
|
3
|
-
import { n as DialogActions, t as Dialog } from "./Dialog-CVqpXxuN.js";
|
|
4
|
-
import { n as ModelSelect, t as AVAILABLE_MODELS_PATH } from "./ModelSelect-DrZrdndo.js";
|
|
5
|
-
import { useEffect, useState } from "react";
|
|
6
|
-
import { useNavigate } from "@tanstack/react-router";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
//#region src/lib/agent-actions.ts
|
|
9
|
-
var agentPath = (id) => `/api/agents/${encodeURIComponent(id)}`;
|
|
10
|
-
function archiveAgent(id) {
|
|
11
|
-
return api(`${agentPath(id)}/archive`, { method: "POST" });
|
|
12
|
-
}
|
|
13
|
-
function unarchiveAgent(id) {
|
|
14
|
-
return api(`${agentPath(id)}/unarchive`, { method: "POST" });
|
|
15
|
-
}
|
|
16
|
-
function deleteAgent(id) {
|
|
17
|
-
return api(agentPath(id), { method: "DELETE" });
|
|
18
|
-
}
|
|
19
|
-
function renameAgent(id, name) {
|
|
20
|
-
return api(agentPath(id), {
|
|
21
|
-
method: "PATCH",
|
|
22
|
-
body: { name }
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
//#region src/components/SpawnDialog.tsx
|
|
27
|
-
/** The one way to spawn an Agent; opens its chat afterwards. */
|
|
28
|
-
function SpawnDialog({ profiles, teams, profileId: initialProfileId, teamId: initialTeamId, onClose }) {
|
|
29
|
-
const navigate = useNavigate();
|
|
30
|
-
const [profileId, setProfileId] = useState(initialProfileId ?? profiles.find((profile) => profile.id === "default")?.id ?? profiles[0]?.id ?? "");
|
|
31
|
-
const [name, setName] = useState("");
|
|
32
|
-
const [model, setModel] = useState("");
|
|
33
|
-
const [modelGroups, setModelGroups] = useState([]);
|
|
34
|
-
const [teamId, setTeamId] = useState(teams.find((team) => team.id === initialTeamId)?.id ?? teams.find((team) => team.id === "default")?.id ?? teams[0]?.id ?? "");
|
|
35
|
-
const [busy, setBusy] = useState(false);
|
|
36
|
-
const [error, setError] = useState(null);
|
|
37
|
-
const restricted = teams.find((team) => team.id === teamId)?.policyMode === "restricted";
|
|
38
|
-
useEffect(() => {
|
|
39
|
-
const controller = new AbortController();
|
|
40
|
-
api(AVAILABLE_MODELS_PATH, { signal: controller.signal }).then((response) => setModelGroups(response.teams)).catch(() => {});
|
|
41
|
-
return () => controller.abort();
|
|
42
|
-
}, []);
|
|
43
|
-
async function submit(event) {
|
|
44
|
-
event.preventDefault();
|
|
45
|
-
setError(null);
|
|
46
|
-
setBusy(true);
|
|
47
|
-
try {
|
|
48
|
-
const request = {
|
|
49
|
-
profileId,
|
|
50
|
-
teamId
|
|
51
|
-
};
|
|
52
|
-
if (name.trim()) request.name = name.trim();
|
|
53
|
-
if (model) request.model = model;
|
|
54
|
-
const { agent } = await api("/api/agents", { body: request });
|
|
55
|
-
onClose();
|
|
56
|
-
await navigate({
|
|
57
|
-
to: "/",
|
|
58
|
-
search: { agent: agent.id }
|
|
59
|
-
});
|
|
60
|
-
} catch (cause) {
|
|
61
|
-
setError(errorMessage(cause));
|
|
62
|
-
setBusy(false);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return /* @__PURE__ */ jsx(Dialog, {
|
|
66
|
-
title: "Spawn an agent",
|
|
67
|
-
busy,
|
|
68
|
-
onClose,
|
|
69
|
-
children: /* @__PURE__ */ jsxs("form", {
|
|
70
|
-
onSubmit: (event) => void submit(event),
|
|
71
|
-
children: [
|
|
72
|
-
/* @__PURE__ */ jsxs("label", { children: ["Agent template", /* @__PURE__ */ jsx("select", {
|
|
73
|
-
value: profileId,
|
|
74
|
-
onChange: (event) => setProfileId(event.target.value),
|
|
75
|
-
required: true,
|
|
76
|
-
children: profiles.map((profile) => /* @__PURE__ */ jsx("option", {
|
|
77
|
-
value: profile.id,
|
|
78
|
-
children: profile.name || profile.id
|
|
79
|
-
}, profile.id))
|
|
80
|
-
})] }),
|
|
81
|
-
/* @__PURE__ */ jsxs("label", { children: ["Name (optional; defaults to the template's)", /* @__PURE__ */ jsx("input", {
|
|
82
|
-
value: name,
|
|
83
|
-
onChange: (event) => setName(event.target.value),
|
|
84
|
-
autoComplete: "off"
|
|
85
|
-
})] }),
|
|
86
|
-
/* @__PURE__ */ jsx(ModelSelect, {
|
|
87
|
-
label: "Model",
|
|
88
|
-
value: model,
|
|
89
|
-
onChange: setModel,
|
|
90
|
-
groups: modelGroups,
|
|
91
|
-
emptyOption: "Use the template default"
|
|
92
|
-
}),
|
|
93
|
-
/* @__PURE__ */ jsxs("label", { children: ["Team", /* @__PURE__ */ jsx("select", {
|
|
94
|
-
value: teamId,
|
|
95
|
-
onChange: (event) => setTeamId(event.target.value),
|
|
96
|
-
children: teams.map((team) => /* @__PURE__ */ jsxs("option", {
|
|
97
|
-
value: team.id,
|
|
98
|
-
children: [team.name, team.id === "default" ? " (default)" : ""]
|
|
99
|
-
}, team.id))
|
|
100
|
-
})] }),
|
|
101
|
-
restricted && /* @__PURE__ */ jsx("p", {
|
|
102
|
-
className: "text-xs text-muted-foreground",
|
|
103
|
-
children: "This Team is restricted: the new Agent starts with no connections. Add them under Connections."
|
|
104
|
-
}),
|
|
105
|
-
error && /* @__PURE__ */ jsx("p", {
|
|
106
|
-
role: "alert",
|
|
107
|
-
className: "err mt-2",
|
|
108
|
-
children: error
|
|
109
|
-
}),
|
|
110
|
-
/* @__PURE__ */ jsx("div", {
|
|
111
|
-
className: "mt-4",
|
|
112
|
-
children: /* @__PURE__ */ jsxs(DialogActions, { children: [/* @__PURE__ */ jsx(Button, {
|
|
113
|
-
variant: "ghost",
|
|
114
|
-
disabled: busy,
|
|
115
|
-
onClick: onClose,
|
|
116
|
-
children: "Cancel"
|
|
117
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
118
|
-
variant: "primary",
|
|
119
|
-
type: "submit",
|
|
120
|
-
disabled: busy || !profileId,
|
|
121
|
-
children: busy ? "Spawning…" : "Spawn agent"
|
|
122
|
-
})] })
|
|
123
|
-
})
|
|
124
|
-
]
|
|
125
|
-
})
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
//#endregion
|
|
129
|
-
export { unarchiveAgent as a, renameAgent as i, archiveAgent as n, deleteAgent as r, SpawnDialog as t };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
//#region src/components/Tabs.tsx
|
|
3
|
-
/** In-page tabs that switch between panels of one form or page. */
|
|
4
|
-
function Tabs({ items, active, onChange }) {
|
|
5
|
-
return /* @__PURE__ */ jsx("div", {
|
|
6
|
-
role: "tablist",
|
|
7
|
-
className: "mb-5 flex flex-wrap gap-1 border-b border-frost",
|
|
8
|
-
children: items.map((item) => /* @__PURE__ */ jsx("button", {
|
|
9
|
-
type: "button",
|
|
10
|
-
role: "tab",
|
|
11
|
-
"aria-selected": active === item.id,
|
|
12
|
-
disabled: item.disabled,
|
|
13
|
-
onClick: () => onChange(item.id),
|
|
14
|
-
className: `unstyled -mb-px border-b-2 bg-transparent px-4 py-2 text-[0.9em] font-medium transition-colors ${item.disabled ? "cursor-not-allowed border-transparent text-mocha-light/40" : active === item.id ? "cursor-pointer border-sapphire text-sapphire" : "cursor-pointer border-transparent text-mocha hover:text-sapphire"}`,
|
|
15
|
-
children: item.label
|
|
16
|
-
}, item.id))
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
|
-
export { Tabs as t };
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { E as errorMessage, d as Button, w as api } from "./workspace-DeEYMPDX.js";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/TeamForm.tsx
|
|
5
|
-
/**
|
|
6
|
-
* Register a Team: a slug, an optional name and an optional absolute path the slot links to
|
|
7
|
-
* (empty creates a fresh directory under ~/.bazilion/teams/<slug>/).
|
|
8
|
-
*/
|
|
9
|
-
function TeamForm({ onCreated, onBusyChange, extraActions }) {
|
|
10
|
-
const [id, setId] = useState("");
|
|
11
|
-
const [name, setName] = useState("");
|
|
12
|
-
const [link, setLink] = useState("");
|
|
13
|
-
const [busy, setBusy] = useState(false);
|
|
14
|
-
const [error, setError] = useState(null);
|
|
15
|
-
function changeBusy(next) {
|
|
16
|
-
setBusy(next);
|
|
17
|
-
onBusyChange?.(next);
|
|
18
|
-
}
|
|
19
|
-
async function submit(event) {
|
|
20
|
-
event.preventDefault();
|
|
21
|
-
setError(null);
|
|
22
|
-
changeBusy(true);
|
|
23
|
-
try {
|
|
24
|
-
const team = await api("/api/teams", { body: {
|
|
25
|
-
id: id.trim(),
|
|
26
|
-
name: name.trim() || void 0,
|
|
27
|
-
link: link.trim() || void 0
|
|
28
|
-
} });
|
|
29
|
-
setId("");
|
|
30
|
-
setName("");
|
|
31
|
-
setLink("");
|
|
32
|
-
await onCreated(team);
|
|
33
|
-
} catch (cause) {
|
|
34
|
-
setError(errorMessage(cause));
|
|
35
|
-
} finally {
|
|
36
|
-
changeBusy(false);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return /* @__PURE__ */ jsxs("form", {
|
|
40
|
-
onSubmit: (event) => void submit(event),
|
|
41
|
-
children: [
|
|
42
|
-
/* @__PURE__ */ jsxs("div", {
|
|
43
|
-
className: "grid gap-x-4 sm:grid-cols-2",
|
|
44
|
-
children: [
|
|
45
|
-
/* @__PURE__ */ jsxs("label", { children: ["ID (slug)", /* @__PURE__ */ jsx("input", {
|
|
46
|
-
value: id,
|
|
47
|
-
onChange: (event) => setId(event.target.value),
|
|
48
|
-
required: true,
|
|
49
|
-
pattern: "[a-z0-9][a-z0-9\\-]*",
|
|
50
|
-
placeholder: "my-project"
|
|
51
|
-
})] }),
|
|
52
|
-
/* @__PURE__ */ jsxs("label", { children: ["Name (optional)", /* @__PURE__ */ jsx("input", {
|
|
53
|
-
value: name,
|
|
54
|
-
onChange: (event) => setName(event.target.value),
|
|
55
|
-
placeholder: "My project"
|
|
56
|
-
})] }),
|
|
57
|
-
/* @__PURE__ */ jsxs("label", {
|
|
58
|
-
className: "sm:col-span-2",
|
|
59
|
-
children: [
|
|
60
|
-
"Link target (optional, absolute path)",
|
|
61
|
-
/* @__PURE__ */ jsx("input", {
|
|
62
|
-
value: link,
|
|
63
|
-
onChange: (event) => setLink(event.target.value),
|
|
64
|
-
placeholder: "/home/you/projects/my-project"
|
|
65
|
-
}),
|
|
66
|
-
/* @__PURE__ */ jsxs("span", {
|
|
67
|
-
className: "mt-1 block text-xs text-muted-foreground",
|
|
68
|
-
children: [
|
|
69
|
-
"Leave blank for a fresh directory under ",
|
|
70
|
-
/* @__PURE__ */ jsx("code", { children: "~/.bazilion/teams/<slug>/" }),
|
|
71
|
-
". Give a path to link the Team to an existing project tree."
|
|
72
|
-
]
|
|
73
|
-
})
|
|
74
|
-
]
|
|
75
|
-
})
|
|
76
|
-
]
|
|
77
|
-
}),
|
|
78
|
-
error && /* @__PURE__ */ jsx("p", {
|
|
79
|
-
role: "alert",
|
|
80
|
-
className: "err mt-2",
|
|
81
|
-
children: error
|
|
82
|
-
}),
|
|
83
|
-
/* @__PURE__ */ jsxs("div", {
|
|
84
|
-
className: "mt-4 flex flex-wrap justify-end gap-2",
|
|
85
|
-
children: [extraActions?.(busy), /* @__PURE__ */ jsx(Button, {
|
|
86
|
-
variant: "primary",
|
|
87
|
-
type: "submit",
|
|
88
|
-
disabled: busy || !id.trim(),
|
|
89
|
-
children: busy ? "Creating…" : "Create team"
|
|
90
|
-
})]
|
|
91
|
-
})
|
|
92
|
-
]
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
//#endregion
|
|
96
|
-
export { TeamForm as t };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { n as createServerFn } from "../server.js";
|
|
2
|
-
import { t as createSsrRpc } from "./createSsrRpc-CcLbajrF.js";
|
|
3
|
-
import { createFileRoute, lazyRouteComponent, redirect } from "@tanstack/react-router";
|
|
4
|
-
//#region src/routes/templates/agents/$id/index.tsx
|
|
5
|
-
var $$splitComponentImporter = () => import("./_id-Dg6M_qfr.js");
|
|
6
|
-
var fetchProfile = createServerFn({ method: "GET" }).validator((data) => data).handler(createSsrRpc("032d74b7d41c718191dbdde6b06ba44993340ce1154af1fa6723a6d4f7a7236e"));
|
|
7
|
-
var Route = createFileRoute("/templates/agents/$id/")({
|
|
8
|
-
loader: async ({ params }) => {
|
|
9
|
-
const data = await fetchProfile({ data: { id: params.id } });
|
|
10
|
-
if (!data) throw redirect({ to: "/templates/agents" });
|
|
11
|
-
return data;
|
|
12
|
-
},
|
|
13
|
-
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
14
|
-
});
|
|
15
|
-
/** Saving and failure win over "unsaved changes". */
|
|
16
|
-
/** Run a save, reporting progress in the card's status line. */
|
|
17
|
-
//#endregion
|
|
18
|
-
export { Route as t };
|