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
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { n as createServerFn } from "../server.js";
|
|
2
|
+
import { t as MODELS_PATH } from "./ModelMenu-BAZeARx6.js";
|
|
3
|
+
import { t as createServerRpc } from "./createServerRpc-B7Yr1K8i.js";
|
|
4
|
+
import { n as daemonClient, r as ApiClientError } from "./daemon-client-B_ZRIIrT.js";
|
|
5
|
+
//#region src/routes/templates/agents/$id/index.tsx?tss-serverfn-split
|
|
6
|
+
var fetchTemplate_createServerFn_handler = createServerRpc({
|
|
7
|
+
id: "a3ce4c3b27c4c69828cf8a81d1f5312a9f8e2c82de6c7e6e2846eb5c2fc322ea",
|
|
8
|
+
name: "fetchTemplate",
|
|
9
|
+
filename: "src/routes/templates/agents/$id/index.tsx"
|
|
10
|
+
}, (opts) => fetchTemplate.__executeServer(opts));
|
|
11
|
+
var fetchTemplate = createServerFn({ method: "GET" }).validator((data) => data).handler(fetchTemplate_createServerFn_handler, async ({ data }) => {
|
|
12
|
+
const client = daemonClient();
|
|
13
|
+
let loaded;
|
|
14
|
+
try {
|
|
15
|
+
loaded = await client.get(`/api/profiles/${encodeURIComponent(data.id)}`);
|
|
16
|
+
} catch (error) {
|
|
17
|
+
if (error instanceof ApiClientError && error.status === 404) return null;
|
|
18
|
+
throw error;
|
|
19
|
+
}
|
|
20
|
+
const [models, skills, starter, templates, teamTemplates, teams] = await Promise.all([
|
|
21
|
+
client.get(MODELS_PATH),
|
|
22
|
+
client.get("/api/skills"),
|
|
23
|
+
client.get("/api/profiles/_/templates"),
|
|
24
|
+
client.get("/api/profiles"),
|
|
25
|
+
client.get("/api/team-templates"),
|
|
26
|
+
client.get("/api/teams")
|
|
27
|
+
]);
|
|
28
|
+
return {
|
|
29
|
+
loaded,
|
|
30
|
+
chat: models.chat,
|
|
31
|
+
skills,
|
|
32
|
+
starter,
|
|
33
|
+
templates,
|
|
34
|
+
teamTemplates,
|
|
35
|
+
teams
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
//#endregion
|
|
39
|
+
export { fetchTemplate_createServerFn_handler };
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
//#region \0tanstack-start-manifest:v
|
|
2
|
+
var tsrStartManifest = () => ({ routes: {
|
|
3
|
+
__root__: {
|
|
4
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/__root.tsx",
|
|
5
|
+
children: [
|
|
6
|
+
"/",
|
|
7
|
+
"/login",
|
|
8
|
+
"/welcome",
|
|
9
|
+
"/api/$",
|
|
10
|
+
"/config/access",
|
|
11
|
+
"/config/mcp",
|
|
12
|
+
"/config/system",
|
|
13
|
+
"/config/telegram",
|
|
14
|
+
"/config/tools",
|
|
15
|
+
"/agents/",
|
|
16
|
+
"/attention/",
|
|
17
|
+
"/config/",
|
|
18
|
+
"/skills/",
|
|
19
|
+
"/teams/",
|
|
20
|
+
"/templates/",
|
|
21
|
+
"/templates/agents/",
|
|
22
|
+
"/templates/teams/",
|
|
23
|
+
"/templates/agents/$id/",
|
|
24
|
+
"/templates/teams/$id/"
|
|
25
|
+
],
|
|
26
|
+
css: ["/assets/index-Cofc7zhl.css"],
|
|
27
|
+
preloads: [
|
|
28
|
+
"/assets/index-J_Uqj4md.js",
|
|
29
|
+
"/assets/createLucideIcon-dN8ooBD1.js",
|
|
30
|
+
"/assets/api-CoLs57oO.js"
|
|
31
|
+
],
|
|
32
|
+
scripts: [{ attrs: {
|
|
33
|
+
type: "module",
|
|
34
|
+
async: !0,
|
|
35
|
+
src: "/assets/index-J_Uqj4md.js"
|
|
36
|
+
} }]
|
|
37
|
+
},
|
|
38
|
+
"/": {
|
|
39
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/index.tsx",
|
|
40
|
+
children: void 0,
|
|
41
|
+
preloads: [
|
|
42
|
+
"/assets/routes-3HkZZOOe.js",
|
|
43
|
+
"/assets/ConfirmDialog-BVytx3kN.js",
|
|
44
|
+
"/assets/Dialog-BTDzv3J5.js",
|
|
45
|
+
"/assets/SpawnDialog-ejwXnyxy.js",
|
|
46
|
+
"/assets/Segmented-Co4n2C5X.js",
|
|
47
|
+
"/assets/SpawnTeamModal-Cp-nAvIC.js",
|
|
48
|
+
"/assets/UnsavedChangesGuard-DmT4nBQU.js",
|
|
49
|
+
"/assets/TeamThread-D8xqE_gb.js",
|
|
50
|
+
"/assets/parts-B0JBolvG.js",
|
|
51
|
+
"/assets/agent-actions--EO4yJ4Q.js",
|
|
52
|
+
"/assets/use-resource-BaTkTGvG.js",
|
|
53
|
+
"/assets/download-Dj-1ltZb.js",
|
|
54
|
+
"/assets/images-BKjyhYUc.js",
|
|
55
|
+
"/assets/arrow-right-BhTWtC9z.js",
|
|
56
|
+
"/assets/chevron-right-BqOIX9UM.js",
|
|
57
|
+
"/assets/file-text-DiP-LaEg.js",
|
|
58
|
+
"/assets/list-checks-BeyG5SVQ.js",
|
|
59
|
+
"/assets/message-square-DnpSOYv4.js",
|
|
60
|
+
"/assets/network-BC7rNaOC.js",
|
|
61
|
+
"/assets/plus-DZ3KVo7E.js",
|
|
62
|
+
"/assets/wrench-BrwBswfo.js",
|
|
63
|
+
"/assets/entities-xVoB-p2j.js"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"/login": {
|
|
67
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/login.tsx",
|
|
68
|
+
children: void 0,
|
|
69
|
+
preloads: ["/assets/login-076Bc601.js", "/assets/key-round-QpqZklz6.js"]
|
|
70
|
+
},
|
|
71
|
+
"/welcome": {
|
|
72
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/welcome.tsx",
|
|
73
|
+
children: void 0,
|
|
74
|
+
preloads: [
|
|
75
|
+
"/assets/welcome-CnxP_RCk.js",
|
|
76
|
+
"/assets/AddProviderDialog-CO_uijWF.js",
|
|
77
|
+
"/assets/parts-B0JBolvG.js",
|
|
78
|
+
"/assets/use-resource-BaTkTGvG.js",
|
|
79
|
+
"/assets/arrow-right-BhTWtC9z.js",
|
|
80
|
+
"/assets/entities-xVoB-p2j.js"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"/config/access": {
|
|
84
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/config/access.tsx",
|
|
85
|
+
children: void 0,
|
|
86
|
+
preloads: [
|
|
87
|
+
"/assets/access-34_ShgHU.js",
|
|
88
|
+
"/assets/ConfigPage-DiQiJXP6.js",
|
|
89
|
+
"/assets/ConfirmDialog-BVytx3kN.js",
|
|
90
|
+
"/assets/form-Bvr_f9lR.js",
|
|
91
|
+
"/assets/parts-B0JBolvG.js",
|
|
92
|
+
"/assets/key-round-QpqZklz6.js",
|
|
93
|
+
"/assets/plus-DZ3KVo7E.js"
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"/config/mcp": {
|
|
97
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/config/mcp.tsx",
|
|
98
|
+
children: void 0,
|
|
99
|
+
preloads: [
|
|
100
|
+
"/assets/mcp-8N0BqZ0G.js",
|
|
101
|
+
"/assets/ConfigPage-DiQiJXP6.js",
|
|
102
|
+
"/assets/ConfirmDialog-BVytx3kN.js",
|
|
103
|
+
"/assets/form-Bvr_f9lR.js",
|
|
104
|
+
"/assets/parts-B0JBolvG.js",
|
|
105
|
+
"/assets/plus-DZ3KVo7E.js"
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
"/config/system": {
|
|
109
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/config/system.tsx",
|
|
110
|
+
children: void 0,
|
|
111
|
+
preloads: [
|
|
112
|
+
"/assets/system-YWlJ8ogO.js",
|
|
113
|
+
"/assets/ConfigPage-DiQiJXP6.js",
|
|
114
|
+
"/assets/parts-B0JBolvG.js",
|
|
115
|
+
"/assets/download-Dj-1ltZb.js",
|
|
116
|
+
"/assets/square-terminal-hQZ6pexU.js"
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
"/config/telegram": {
|
|
120
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/config/telegram.tsx",
|
|
121
|
+
children: void 0,
|
|
122
|
+
preloads: [
|
|
123
|
+
"/assets/telegram-D4wINntt.js",
|
|
124
|
+
"/assets/ConfigPage-DiQiJXP6.js",
|
|
125
|
+
"/assets/ConfirmDialog-BVytx3kN.js",
|
|
126
|
+
"/assets/form-Bvr_f9lR.js",
|
|
127
|
+
"/assets/parts-B0JBolvG.js",
|
|
128
|
+
"/assets/model-facts-DoB6QD5y.js",
|
|
129
|
+
"/assets/use-resource-BaTkTGvG.js",
|
|
130
|
+
"/assets/list-checks-BeyG5SVQ.js"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
"/config/tools": {
|
|
134
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/config/tools.tsx",
|
|
135
|
+
children: void 0,
|
|
136
|
+
preloads: [
|
|
137
|
+
"/assets/tools-CZeQ9pDx.js",
|
|
138
|
+
"/assets/ConfigPage-DiQiJXP6.js",
|
|
139
|
+
"/assets/form-Bvr_f9lR.js",
|
|
140
|
+
"/assets/parts-B0JBolvG.js",
|
|
141
|
+
"/assets/chevron-right-BqOIX9UM.js",
|
|
142
|
+
"/assets/file-text-DiP-LaEg.js",
|
|
143
|
+
"/assets/square-terminal-hQZ6pexU.js",
|
|
144
|
+
"/assets/wrench-BrwBswfo.js"
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
"/agents/": {
|
|
148
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/agents/index.tsx",
|
|
149
|
+
children: void 0,
|
|
150
|
+
preloads: [
|
|
151
|
+
"/assets/agents-C87yBHaR.js",
|
|
152
|
+
"/assets/ConfirmDialog-BVytx3kN.js",
|
|
153
|
+
"/assets/Dialog-BTDzv3J5.js",
|
|
154
|
+
"/assets/ManagePage-xlePXXx5.js",
|
|
155
|
+
"/assets/SpawnDialog-ejwXnyxy.js",
|
|
156
|
+
"/assets/Segmented-Co4n2C5X.js",
|
|
157
|
+
"/assets/form-Bvr_f9lR.js",
|
|
158
|
+
"/assets/parts-B0JBolvG.js",
|
|
159
|
+
"/assets/agent-actions--EO4yJ4Q.js",
|
|
160
|
+
"/assets/manage-CsrV2hhK.js"
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
"/attention/": {
|
|
164
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/attention/index.tsx",
|
|
165
|
+
children: void 0,
|
|
166
|
+
preloads: [
|
|
167
|
+
"/assets/attention-CteEeRvX.js",
|
|
168
|
+
"/assets/Segmented-Co4n2C5X.js",
|
|
169
|
+
"/assets/form-Bvr_f9lR.js",
|
|
170
|
+
"/assets/parts-B0JBolvG.js",
|
|
171
|
+
"/assets/manage-CsrV2hhK.js",
|
|
172
|
+
"/assets/model-facts-DoB6QD5y.js"
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
"/config/": {
|
|
176
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/config/index.tsx",
|
|
177
|
+
children: void 0,
|
|
178
|
+
preloads: [
|
|
179
|
+
"/assets/config-XJuQeEP4.js",
|
|
180
|
+
"/assets/ConfigPage-DiQiJXP6.js",
|
|
181
|
+
"/assets/ConfirmDialog-BVytx3kN.js",
|
|
182
|
+
"/assets/Dialog-BTDzv3J5.js",
|
|
183
|
+
"/assets/Segmented-Co4n2C5X.js",
|
|
184
|
+
"/assets/AddProviderDialog-CO_uijWF.js",
|
|
185
|
+
"/assets/parts-B0JBolvG.js",
|
|
186
|
+
"/assets/model-facts-DoB6QD5y.js",
|
|
187
|
+
"/assets/use-resource-BaTkTGvG.js",
|
|
188
|
+
"/assets/images-BKjyhYUc.js",
|
|
189
|
+
"/assets/chevron-right-BqOIX9UM.js",
|
|
190
|
+
"/assets/message-square-DnpSOYv4.js",
|
|
191
|
+
"/assets/plus-DZ3KVo7E.js"
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
"/skills/": {
|
|
195
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/skills/index.tsx",
|
|
196
|
+
children: void 0,
|
|
197
|
+
preloads: [
|
|
198
|
+
"/assets/skills-DiaqZRXT.js",
|
|
199
|
+
"/assets/ConfirmDialog-BVytx3kN.js",
|
|
200
|
+
"/assets/Dialog-BTDzv3J5.js",
|
|
201
|
+
"/assets/ManagePage-xlePXXx5.js",
|
|
202
|
+
"/assets/form-Bvr_f9lR.js",
|
|
203
|
+
"/assets/parts-B0JBolvG.js",
|
|
204
|
+
"/assets/manage-CsrV2hhK.js",
|
|
205
|
+
"/assets/model-facts-DoB6QD5y.js"
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
"/teams/": {
|
|
209
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/teams/index.tsx",
|
|
210
|
+
children: void 0,
|
|
211
|
+
preloads: [
|
|
212
|
+
"/assets/teams-DQwceMvk.js",
|
|
213
|
+
"/assets/ConfirmDialog-BVytx3kN.js",
|
|
214
|
+
"/assets/Dialog-BTDzv3J5.js",
|
|
215
|
+
"/assets/ManagePage-xlePXXx5.js",
|
|
216
|
+
"/assets/TeamForm-Cz9uDVvb.js",
|
|
217
|
+
"/assets/parts-B0JBolvG.js",
|
|
218
|
+
"/assets/manage-CsrV2hhK.js"
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
"/templates/agents/": {
|
|
222
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/templates/agents/index.tsx",
|
|
223
|
+
children: void 0,
|
|
224
|
+
preloads: [
|
|
225
|
+
"/assets/agents-DvCSl1Ro.js",
|
|
226
|
+
"/assets/ConfirmDialog-BVytx3kN.js",
|
|
227
|
+
"/assets/ManagePage-xlePXXx5.js",
|
|
228
|
+
"/assets/SpawnDialog-ejwXnyxy.js",
|
|
229
|
+
"/assets/AgentTemplateParts-Dl35c-Ux.js",
|
|
230
|
+
"/assets/parts-B0JBolvG.js",
|
|
231
|
+
"/assets/manage-CsrV2hhK.js",
|
|
232
|
+
"/assets/file-text-DiP-LaEg.js"
|
|
233
|
+
]
|
|
234
|
+
},
|
|
235
|
+
"/templates/teams/": {
|
|
236
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/templates/teams/index.tsx",
|
|
237
|
+
children: void 0,
|
|
238
|
+
preloads: [
|
|
239
|
+
"/assets/teams-DTC3plIH.js",
|
|
240
|
+
"/assets/ConfirmDialog-BVytx3kN.js",
|
|
241
|
+
"/assets/Dialog-BTDzv3J5.js",
|
|
242
|
+
"/assets/ManagePage-xlePXXx5.js",
|
|
243
|
+
"/assets/SpawnTeamModal-Cp-nAvIC.js",
|
|
244
|
+
"/assets/form-Bvr_f9lR.js",
|
|
245
|
+
"/assets/parts-B0JBolvG.js",
|
|
246
|
+
"/assets/manage-CsrV2hhK.js",
|
|
247
|
+
"/assets/network-BC7rNaOC.js"
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
"/templates/agents/$id/": {
|
|
251
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/templates/agents/$id/index.tsx",
|
|
252
|
+
children: void 0,
|
|
253
|
+
preloads: [
|
|
254
|
+
"/assets/_id-DEQxwq2v.js",
|
|
255
|
+
"/assets/ConfirmDialog-BVytx3kN.js",
|
|
256
|
+
"/assets/ManagePage-xlePXXx5.js",
|
|
257
|
+
"/assets/SpawnDialog-ejwXnyxy.js",
|
|
258
|
+
"/assets/UnsavedChangesGuard-DmT4nBQU.js",
|
|
259
|
+
"/assets/AgentTemplateParts-Dl35c-Ux.js",
|
|
260
|
+
"/assets/form-Bvr_f9lR.js",
|
|
261
|
+
"/assets/parts-B0JBolvG.js",
|
|
262
|
+
"/assets/manage-CsrV2hhK.js"
|
|
263
|
+
]
|
|
264
|
+
},
|
|
265
|
+
"/templates/teams/$id/": {
|
|
266
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/templates/teams/$id/index.tsx",
|
|
267
|
+
children: void 0,
|
|
268
|
+
css: ["/assets/style-DLioOiRN.css"],
|
|
269
|
+
preloads: [
|
|
270
|
+
"/assets/_id-DSRgpxEc.js",
|
|
271
|
+
"/assets/ConfirmDialog-BVytx3kN.js",
|
|
272
|
+
"/assets/ManagePage-xlePXXx5.js",
|
|
273
|
+
"/assets/Segmented-Co4n2C5X.js",
|
|
274
|
+
"/assets/SpawnTeamModal-Cp-nAvIC.js",
|
|
275
|
+
"/assets/UnsavedChangesGuard-DmT4nBQU.js",
|
|
276
|
+
"/assets/style-BtcFIkOS.js",
|
|
277
|
+
"/assets/form-Bvr_f9lR.js",
|
|
278
|
+
"/assets/parts-B0JBolvG.js",
|
|
279
|
+
"/assets/manage-CsrV2hhK.js",
|
|
280
|
+
"/assets/plus-DZ3KVo7E.js"
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
} });
|
|
284
|
+
//#endregion
|
|
285
|
+
export { tsrStartManifest };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as createServerFn } from "../server.js";
|
|
2
|
-
import { t as createSsrRpc } from "./createSsrRpc-
|
|
2
|
+
import { t as createSsrRpc } from "./createSsrRpc-BijMHgqE.js";
|
|
3
3
|
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
|
-
//#region src/routes/config/
|
|
5
|
-
var $$splitComponentImporter = () => import("./
|
|
6
|
-
var fetchTokens = createServerFn({ method: "GET" }).validator((data) => data).handler(createSsrRpc("
|
|
7
|
-
var Route = createFileRoute("/config/
|
|
4
|
+
//#region src/routes/config/access.tsx
|
|
5
|
+
var $$splitComponentImporter = () => import("./access-CKSW7MFH.js");
|
|
6
|
+
var fetchTokens = createServerFn({ method: "GET" }).validator((data) => data).handler(createSsrRpc("c945ba2c0b997bf2ce9d965e41ad7655facbaa4c6f6c3284f90fbe6f2d427f52"));
|
|
7
|
+
var Route = createFileRoute("/config/access")({
|
|
8
8
|
validateSearch: (search) => ({ all: search.all === 1 ? 1 : void 0 }),
|
|
9
9
|
loaderDeps: ({ search }) => ({ all: search.all === 1 }),
|
|
10
10
|
loader: ({ deps }) => fetchTokens({ data: deps }),
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { C as api, T as errorMessage, u as Button } from "./workspace-DaitCM0t.js";
|
|
2
|
+
import { t as ConfirmDialog } from "./ConfirmDialog-DfaJ--A6.js";
|
|
3
|
+
import { a as CardForm, d as Chip, g as Notice, h as ListRow, o as CardList, s as CardRow, y as SetupCard } from "./parts-mabERIJZ.js";
|
|
4
|
+
import { l as TextField } from "./form-BRQAsKKq.js";
|
|
5
|
+
import { t as Route } from "./access-BJe-NduL.js";
|
|
6
|
+
import { t as ConfigPage } from "./ConfigPage-oXM3wyOU.js";
|
|
7
|
+
import { useState } from "react";
|
|
8
|
+
import { useRouter } from "@tanstack/react-router";
|
|
9
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { KeyRound, MonitorSmartphone, Plus } from "lucide-react";
|
|
11
|
+
//#region src/lib/token-form.ts
|
|
12
|
+
function tokenForm(draft) {
|
|
13
|
+
const label = draft.label.trim();
|
|
14
|
+
const days = draft.days.trim();
|
|
15
|
+
const problems = {};
|
|
16
|
+
if (days !== "" && (!/^\d+$/.test(days) || Number(days) < 1)) problems.days = "A whole number of days, 1 or more. Empty means it never expires.";
|
|
17
|
+
const missing = label === "" && days !== "" ? "A token needs a label to tell it from the others." : null;
|
|
18
|
+
if (label === "" || problems.days) return {
|
|
19
|
+
problems,
|
|
20
|
+
missing,
|
|
21
|
+
body: null
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
problems,
|
|
25
|
+
missing,
|
|
26
|
+
body: {
|
|
27
|
+
label,
|
|
28
|
+
...days ? { expiresInDays: Number(days) } : {}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/** Whether a token still signs in. */
|
|
33
|
+
function tokenState(token, now) {
|
|
34
|
+
if (token.revokedAt) return {
|
|
35
|
+
label: "Revoked",
|
|
36
|
+
tone: "neutral"
|
|
37
|
+
};
|
|
38
|
+
if (token.expiresAt !== null && token.expiresAt <= now) return {
|
|
39
|
+
label: "Expired",
|
|
40
|
+
tone: "neutral"
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
label: "Active",
|
|
44
|
+
tone: "success"
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/** A moment as the daemon's clock has it, to the minute. */
|
|
48
|
+
function when(timestamp) {
|
|
49
|
+
return new Date(timestamp).toISOString().slice(0, 16).replace("T", " ");
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/components/setup/AccessCards.tsx
|
|
53
|
+
/** A token for another device, a script, or the CLI on another machine. */
|
|
54
|
+
function MintTokenCard({ onMinted }) {
|
|
55
|
+
const [draft, setDraft] = useState({
|
|
56
|
+
label: "",
|
|
57
|
+
days: ""
|
|
58
|
+
});
|
|
59
|
+
const [created, setCreated] = useState(null);
|
|
60
|
+
const [busy, setBusy] = useState(false);
|
|
61
|
+
const [error, setError] = useState(null);
|
|
62
|
+
const form = tokenForm(draft);
|
|
63
|
+
const edit = (change) => {
|
|
64
|
+
setError(null);
|
|
65
|
+
setDraft((current) => ({
|
|
66
|
+
...current,
|
|
67
|
+
...change
|
|
68
|
+
}));
|
|
69
|
+
};
|
|
70
|
+
async function mint(event) {
|
|
71
|
+
event.preventDefault();
|
|
72
|
+
if (!form.body || busy) return;
|
|
73
|
+
setBusy(true);
|
|
74
|
+
setError(null);
|
|
75
|
+
try {
|
|
76
|
+
const { token } = await api("/api/tokens", { body: form.body });
|
|
77
|
+
setCreated(token);
|
|
78
|
+
setDraft({
|
|
79
|
+
label: "",
|
|
80
|
+
days: ""
|
|
81
|
+
});
|
|
82
|
+
await onMinted();
|
|
83
|
+
} catch (cause) {
|
|
84
|
+
setError(errorMessage(cause));
|
|
85
|
+
} finally {
|
|
86
|
+
setBusy(false);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return /* @__PURE__ */ jsx(SetupCard, {
|
|
90
|
+
labelledBy: "access-mint",
|
|
91
|
+
icon: /* @__PURE__ */ jsx(Plus, { className: "size-5" }),
|
|
92
|
+
title: "Mint a new token",
|
|
93
|
+
description: "One for each other device or script, so that each can be revoked on its own.",
|
|
94
|
+
children: /* @__PURE__ */ jsxs(CardForm, {
|
|
95
|
+
onSubmit: mint,
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ jsxs("div", {
|
|
98
|
+
className: "grid items-start gap-x-3 gap-y-4 sm:grid-cols-[minmax(0,18rem)_minmax(0,11rem)]",
|
|
99
|
+
children: [/* @__PURE__ */ jsx(TextField, {
|
|
100
|
+
label: "Label",
|
|
101
|
+
value: draft.label,
|
|
102
|
+
disabled: busy,
|
|
103
|
+
placeholder: "e.g. laptop-tailscale",
|
|
104
|
+
onChange: (label) => edit({ label })
|
|
105
|
+
}), /* @__PURE__ */ jsx(TextField, {
|
|
106
|
+
label: "Expires in days",
|
|
107
|
+
value: draft.days,
|
|
108
|
+
disabled: busy,
|
|
109
|
+
placeholder: "never",
|
|
110
|
+
inputMode: "numeric",
|
|
111
|
+
problem: form.problems.days,
|
|
112
|
+
onChange: (days) => edit({ days })
|
|
113
|
+
})]
|
|
114
|
+
}),
|
|
115
|
+
/* @__PURE__ */ jsxs("div", {
|
|
116
|
+
className: "flex flex-wrap items-center gap-x-4 gap-y-2",
|
|
117
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
118
|
+
variant: "primary",
|
|
119
|
+
type: "submit",
|
|
120
|
+
disabled: busy || !form.body,
|
|
121
|
+
children: busy ? "Creating…" : "Create"
|
|
122
|
+
}), error ? /* @__PURE__ */ jsxs("p", {
|
|
123
|
+
role: "alert",
|
|
124
|
+
className: "m-0 min-w-0 flex-1 basis-56 text-sm font-medium text-warning",
|
|
125
|
+
children: ["Nothing was created: ", error]
|
|
126
|
+
}) : form.missing && /* @__PURE__ */ jsx("p", {
|
|
127
|
+
role: "status",
|
|
128
|
+
className: "m-0 min-w-0 flex-1 basis-56 text-sm font-medium text-warning",
|
|
129
|
+
children: form.missing
|
|
130
|
+
})]
|
|
131
|
+
}),
|
|
132
|
+
created && /* @__PURE__ */ jsx(Notice, {
|
|
133
|
+
tone: "warning",
|
|
134
|
+
title: "Copy this token now; it cannot be shown again.",
|
|
135
|
+
children: /* @__PURE__ */ jsx("code", {
|
|
136
|
+
className: "mt-1 block break-all bg-transparent p-0 text-[0.85em] text-foreground",
|
|
137
|
+
children: created
|
|
138
|
+
})
|
|
139
|
+
})
|
|
140
|
+
]
|
|
141
|
+
})
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/** Every token that signs in: the one in `auth.json`, and one per other device. */
|
|
145
|
+
function TokensCard({ tokens, sessions, includeRevoked, now, onRevoked }) {
|
|
146
|
+
const [revoking, setRevoking] = useState(null);
|
|
147
|
+
const usedHere = (token) => sessions.some((session) => session.current && session.tokenId === token?.id);
|
|
148
|
+
return /* @__PURE__ */ jsxs(SetupCard, {
|
|
149
|
+
labelledBy: "access-tokens",
|
|
150
|
+
icon: /* @__PURE__ */ jsx(KeyRound, { className: "size-5" }),
|
|
151
|
+
title: "Tokens",
|
|
152
|
+
description: "Each signs in to the HTTP API, the CLI and the web UI, with full access.",
|
|
153
|
+
action: /* @__PURE__ */ jsx("a", {
|
|
154
|
+
className: "ghost-btn",
|
|
155
|
+
href: includeRevoked ? "/config/access" : "/config/access?all=1",
|
|
156
|
+
children: includeRevoked ? "Hide revoked" : "Show revoked"
|
|
157
|
+
}),
|
|
158
|
+
children: [tokens.length === 0 ? /* @__PURE__ */ jsx(CardRow, {
|
|
159
|
+
className: "py-4 text-sm text-muted-foreground",
|
|
160
|
+
children: "No tokens yet; mint one above."
|
|
161
|
+
}) : /* @__PURE__ */ jsx(CardList, { children: tokens.map((token) => {
|
|
162
|
+
const bootstrap = token.kind === "bootstrap";
|
|
163
|
+
const state = tokenState(token, now);
|
|
164
|
+
return /* @__PURE__ */ jsx(ListRow, {
|
|
165
|
+
title: token.label,
|
|
166
|
+
chip: /* @__PURE__ */ jsx(Chip, {
|
|
167
|
+
tone: state.tone,
|
|
168
|
+
children: state.label
|
|
169
|
+
}),
|
|
170
|
+
meta: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
171
|
+
/* @__PURE__ */ jsx("span", { children: bootstrap ? "bootstrap (auth.json)" : token.kind }),
|
|
172
|
+
/* @__PURE__ */ jsxs("span", { children: ["created ", when(token.createdAt)] }),
|
|
173
|
+
/* @__PURE__ */ jsxs("span", { children: ["last used ", token.lastUsedAt ? when(token.lastUsedAt) : "never"] }),
|
|
174
|
+
/* @__PURE__ */ jsxs("span", { children: ["expires ", token.expiresAt ? when(token.expiresAt) : "never"] }),
|
|
175
|
+
/* @__PURE__ */ jsx("code", { children: token.id })
|
|
176
|
+
] }),
|
|
177
|
+
actions: !token.revokedAt && !bootstrap && /* @__PURE__ */ jsx(Button, {
|
|
178
|
+
variant: "danger",
|
|
179
|
+
"aria-label": `Revoke ${token.label}`,
|
|
180
|
+
onClick: () => setRevoking(token),
|
|
181
|
+
children: "Revoke"
|
|
182
|
+
})
|
|
183
|
+
}, token.id);
|
|
184
|
+
}) }), /* @__PURE__ */ jsx(ConfirmDialog, {
|
|
185
|
+
open: revoking !== null,
|
|
186
|
+
onOpenChange: (open) => {
|
|
187
|
+
if (!open) setRevoking(null);
|
|
188
|
+
},
|
|
189
|
+
title: `Revoke ${revoking?.label ?? ""}?`,
|
|
190
|
+
description: /* @__PURE__ */ jsxs("p", {
|
|
191
|
+
className: "m-0",
|
|
192
|
+
children: [
|
|
193
|
+
"This permanently revokes token ",
|
|
194
|
+
/* @__PURE__ */ jsx("code", { children: revoking?.id }),
|
|
195
|
+
" and ends every browser session opened with it.",
|
|
196
|
+
usedHere(revoking) && " This includes the session you are using now."
|
|
197
|
+
]
|
|
198
|
+
}),
|
|
199
|
+
confirmLabel: "Revoke token and sessions",
|
|
200
|
+
onConfirm: async () => {
|
|
201
|
+
if (!revoking) return;
|
|
202
|
+
await api(`/api/tokens/${encodeURIComponent(revoking.id)}`, { method: "DELETE" });
|
|
203
|
+
await onRevoked(usedHere(revoking));
|
|
204
|
+
}
|
|
205
|
+
})]
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
/** The browsers that are signed in. */
|
|
209
|
+
function SessionsCard({ sessions, onRevoked }) {
|
|
210
|
+
const [revoking, setRevoking] = useState(null);
|
|
211
|
+
return /* @__PURE__ */ jsxs(SetupCard, {
|
|
212
|
+
labelledBy: "access-sessions",
|
|
213
|
+
icon: /* @__PURE__ */ jsx(MonitorSmartphone, { className: "size-5" }),
|
|
214
|
+
title: "Browser sessions",
|
|
215
|
+
description: "A session ends after 30 days without use. Revoking a token also ends every session opened with it.",
|
|
216
|
+
children: [sessions.length === 0 ? /* @__PURE__ */ jsx(CardRow, {
|
|
217
|
+
className: "py-4 text-sm text-muted-foreground",
|
|
218
|
+
children: "No active browser sessions."
|
|
219
|
+
}) : /* @__PURE__ */ jsx(CardList, { children: sessions.map((session) => /* @__PURE__ */ jsx(ListRow, {
|
|
220
|
+
title: session.tokenLabel,
|
|
221
|
+
chip: session.current && /* @__PURE__ */ jsx(Chip, {
|
|
222
|
+
tone: "success",
|
|
223
|
+
children: "This browser"
|
|
224
|
+
}),
|
|
225
|
+
meta: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
226
|
+
/* @__PURE__ */ jsxs("span", { children: ["last seen ", when(session.lastSeenAt)] }),
|
|
227
|
+
/* @__PURE__ */ jsxs("span", { children: ["expires ", when(session.expiresAt)] }),
|
|
228
|
+
/* @__PURE__ */ jsx("code", { children: session.id })
|
|
229
|
+
] }),
|
|
230
|
+
actions: /* @__PURE__ */ jsx(Button, {
|
|
231
|
+
variant: "danger",
|
|
232
|
+
"aria-label": session.current ? "Revoke the session of this browser" : `Revoke the ${session.tokenLabel} session last seen ${when(session.lastSeenAt)}`,
|
|
233
|
+
onClick: () => setRevoking(session),
|
|
234
|
+
children: "Revoke"
|
|
235
|
+
})
|
|
236
|
+
}, session.id)) }), /* @__PURE__ */ jsx(ConfirmDialog, {
|
|
237
|
+
open: revoking !== null,
|
|
238
|
+
onOpenChange: (open) => {
|
|
239
|
+
if (!open) setRevoking(null);
|
|
240
|
+
},
|
|
241
|
+
title: `Revoke the ${revoking?.tokenLabel ?? ""} browser session?`,
|
|
242
|
+
description: /* @__PURE__ */ jsxs("p", {
|
|
243
|
+
className: "m-0",
|
|
244
|
+
children: [
|
|
245
|
+
"This ends browser session ",
|
|
246
|
+
/* @__PURE__ */ jsx("code", { children: revoking?.id }),
|
|
247
|
+
revoking?.current ? " and signs this browser out." : ". The token stays active for later logins."
|
|
248
|
+
]
|
|
249
|
+
}),
|
|
250
|
+
confirmLabel: revoking?.current ? "Sign out this browser" : "Revoke session",
|
|
251
|
+
onConfirm: async () => {
|
|
252
|
+
if (!revoking) return;
|
|
253
|
+
await api(`/api/sessions/${encodeURIComponent(revoking.id)}`, { method: "DELETE" });
|
|
254
|
+
await onRevoked(revoking.current);
|
|
255
|
+
}
|
|
256
|
+
})]
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
//#endregion
|
|
260
|
+
//#region src/routes/config/access.tsx?tsr-split=component
|
|
261
|
+
function AccessPage() {
|
|
262
|
+
const { tokens, sessions, now } = Route.useLoaderData();
|
|
263
|
+
const includeRevoked = Route.useSearch().all === 1;
|
|
264
|
+
const router = useRouter();
|
|
265
|
+
/** Revoking the session this browser uses signs it out. */
|
|
266
|
+
async function afterRevoke(signedOut) {
|
|
267
|
+
if (signedOut) window.location.assign("/login");
|
|
268
|
+
else await router.invalidate({ sync: true });
|
|
269
|
+
}
|
|
270
|
+
return /* @__PURE__ */ jsxs(ConfigPage, {
|
|
271
|
+
title: "Access",
|
|
272
|
+
description: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
273
|
+
"Every token has full access to the HTTP API, the CLI and browser login. The",
|
|
274
|
+
" ",
|
|
275
|
+
/* @__PURE__ */ jsx("code", { children: "bootstrap" }),
|
|
276
|
+
" token from ",
|
|
277
|
+
/* @__PURE__ */ jsx("code", { children: "~/.bazilion/auth.json" }),
|
|
278
|
+
" cannot be revoked; mint a separate, revocable token for each other device."
|
|
279
|
+
] }),
|
|
280
|
+
children: [
|
|
281
|
+
/* @__PURE__ */ jsx(MintTokenCard, { onMinted: () => router.invalidate({ sync: true }) }),
|
|
282
|
+
/* @__PURE__ */ jsx(TokensCard, {
|
|
283
|
+
tokens,
|
|
284
|
+
sessions,
|
|
285
|
+
includeRevoked,
|
|
286
|
+
now,
|
|
287
|
+
onRevoked: afterRevoke
|
|
288
|
+
}),
|
|
289
|
+
/* @__PURE__ */ jsx(SessionsCard, {
|
|
290
|
+
sessions,
|
|
291
|
+
onRevoked: afterRevoke
|
|
292
|
+
})
|
|
293
|
+
]
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
//#endregion
|
|
297
|
+
export { AccessPage as component };
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { n as createServerFn } from "../server.js";
|
|
2
2
|
import { t as createServerRpc } from "./createServerRpc-B7Yr1K8i.js";
|
|
3
3
|
import { n as daemonClient } from "./daemon-client-B_ZRIIrT.js";
|
|
4
|
-
//#region src/routes/config/
|
|
4
|
+
//#region src/routes/config/access.tsx?tss-serverfn-split
|
|
5
5
|
var fetchTokens_createServerFn_handler = createServerRpc({
|
|
6
|
-
id: "
|
|
6
|
+
id: "c945ba2c0b997bf2ce9d965e41ad7655facbaa4c6f6c3284f90fbe6f2d427f52",
|
|
7
7
|
name: "fetchTokens",
|
|
8
|
-
filename: "src/routes/config/
|
|
8
|
+
filename: "src/routes/config/access.tsx"
|
|
9
9
|
}, (opts) => fetchTokens.__executeServer(opts));
|
|
10
10
|
var fetchTokens = createServerFn({ method: "GET" }).validator((data) => data).handler(fetchTokens_createServerFn_handler, async ({ data }) => {
|
|
11
11
|
const client = daemonClient();
|
|
12
12
|
const [tokens, sessions] = await Promise.all([client.get(`/api/tokens${data.all ? "?includeRevoked=1" : ""}`), client.get("/api/sessions")]);
|
|
13
13
|
return {
|
|
14
14
|
...tokens,
|
|
15
|
-
...sessions
|
|
15
|
+
...sessions,
|
|
16
|
+
now: Date.now()
|
|
16
17
|
};
|
|
17
18
|
});
|
|
18
19
|
//#endregion
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { C as api } from "./workspace-DaitCM0t.js";
|
|
2
|
+
//#region src/lib/agent-actions.ts
|
|
3
|
+
var agentPath = (id) => `/api/agents/${encodeURIComponent(id)}`;
|
|
4
|
+
function archiveAgent(id) {
|
|
5
|
+
return api(`${agentPath(id)}/archive`, { method: "POST" });
|
|
6
|
+
}
|
|
7
|
+
function unarchiveAgent(id) {
|
|
8
|
+
return api(`${agentPath(id)}/unarchive`, { method: "POST" });
|
|
9
|
+
}
|
|
10
|
+
function deleteAgent(id) {
|
|
11
|
+
return api(agentPath(id), { method: "DELETE" });
|
|
12
|
+
}
|
|
13
|
+
function renameAgent(id, name) {
|
|
14
|
+
return api(agentPath(id), {
|
|
15
|
+
method: "PATCH",
|
|
16
|
+
body: { name }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { unarchiveAgent as i, deleteAgent as n, renameAgent as r, archiveAgent as t };
|