bazilion 0.52.0 → 0.54.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 +3 -3
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +296 -232
- package/dist/daemon.js.map +1 -1
- package/dist/web/client/assets/AddProviderDialog-CkwSq3C7.js +1 -0
- package/dist/web/client/assets/AgentTemplateParts-CEn_4qVs.js +1 -0
- package/dist/web/client/assets/Button-UiegBKOK.js +1 -0
- package/dist/web/client/assets/ConfigPage-CUbHBhzx.js +1 -0
- package/dist/web/client/assets/ConfirmDialog-VqBOFZEp.js +1 -0
- package/dist/web/client/assets/ConnectionsView-ByARMcWP.js +1 -0
- package/dist/web/client/assets/ManagePage-BJWZd1ts.js +1 -0
- package/dist/web/client/assets/SectionTabs-ViZKm3-B.js +1 -0
- package/dist/web/client/assets/Segmented-MYKKTuZO.js +1 -0
- package/dist/web/client/assets/SkillsParts-UvNK5SYP.js +1 -0
- package/dist/web/client/assets/SpawnTeamModal-DG5UbJNK.js +1 -0
- package/dist/web/client/assets/TeamForm-DGlxWv4e.js +1 -0
- package/dist/web/client/assets/TeamThread-mkwODO0S.js +1 -0
- package/dist/web/client/assets/UnsavedChangesGuard-BmdwLH99.js +1 -0
- package/dist/web/client/assets/_id-CvcxNmBH.js +1 -0
- package/dist/web/client/assets/_id-UyBk7gRl.js +1 -0
- package/dist/web/client/assets/access-C8d8vaQ6.js +1 -0
- package/dist/web/client/assets/agent-actions-BgE9fKHH.js +1 -0
- package/dist/web/client/assets/agents-CgtzqBpD.js +1 -0
- package/dist/web/client/assets/agents-D7W4BT8r.js +1 -0
- package/dist/web/client/assets/arrow-right-D0HKRb7U.js +1 -0
- package/dist/web/client/assets/attention-D9mQWoKt.js +1 -0
- package/dist/web/client/assets/bot-Bb--PFVU.js +1 -0
- package/dist/web/client/assets/chevron-right-bs0TUSl2.js +1 -0
- package/dist/web/client/assets/config-Dw6GWf38.js +1 -0
- package/dist/web/client/assets/createLucideIcon-DkniuEtD.js +1 -0
- package/dist/web/client/assets/download-C4t9l5wR.js +1 -0
- package/dist/web/client/assets/file-text-DzbjpYrV.js +1 -0
- package/dist/web/client/assets/images-DSYgPKM7.js +1 -0
- package/dist/web/client/assets/index-YW0gXPfk.js +14 -0
- package/dist/web/client/assets/key-round-BpK4-E3T.js +1 -0
- package/dist/web/client/assets/list-checks-JNXcmws9.js +1 -0
- package/dist/web/client/assets/login-DcQJk5-U.js +1 -0
- package/dist/web/client/assets/manage-SRGSx8n2.js +1 -0
- package/dist/web/client/assets/mcp-BUWu4TvS.js +1 -0
- package/dist/web/client/assets/message-square-DM2MP9vF.js +1 -0
- package/dist/web/client/assets/network-BJ4iPjQO.js +1 -0
- package/dist/web/client/assets/parts-LZxl9Gvc.js +41 -0
- package/dist/web/client/assets/plus-CLGNN5QX.js +1 -0
- package/dist/web/client/assets/routes-BxIIyGho.js +85 -0
- package/dist/web/client/assets/skills-C7DzIwFJ.js +1 -0
- package/dist/web/client/assets/square-terminal-Dmm6cV-G.js +1 -0
- package/dist/web/client/assets/style-CA2GAk9b.js +7 -0
- package/dist/web/client/assets/styles-C3CDSGAr.css +2 -0
- package/dist/web/client/assets/system-zQ0NnQML.js +1 -0
- package/dist/web/client/assets/teams-BEIJHObN.js +1 -0
- package/dist/web/client/assets/teams-DlOc7Ods.js +1 -0
- package/dist/web/client/assets/telegram-DKHq5DpE.js +1 -0
- package/dist/web/client/assets/tools-BKIpLaiC.js +1 -0
- package/dist/web/client/assets/use-resource-CQaIZbpy.js +1 -0
- package/dist/web/client/assets/users-round-BJrym3FG.js +1 -0
- package/dist/web/client/assets/welcome-CyS4Hrd-.js +1 -0
- package/dist/web/client/assets/wrench-GbE1M1RJ.js +1 -0
- package/dist/web/server/assets/{AddProviderDialog-Tn4AskPm.js → AddProviderDialog-Nc5mc_P6.js} +106 -8
- package/dist/web/server/assets/AgentTemplateParts-DZK_r3nQ.js +266 -0
- package/dist/web/server/assets/{ConfigPage-DqDUujmt.js → ConfigPage-CxzL-gTm.js} +2 -2
- package/dist/web/server/assets/{ConfirmDialog-DfaJ--A6.js → ConfirmDialog-4xeCXKHe.js} +1 -2
- package/dist/web/server/assets/{ConnectionsView-DAG-zNBz.js → ConnectionsView-B02FjNsM.js} +9 -9
- package/dist/web/server/assets/ManagePage-BfCWE8Lj.js +29 -0
- package/dist/web/server/assets/ModelMenu-D-hTgYOO.js +278 -0
- package/dist/web/server/assets/{Rail-BIC_4ptO.js → Rail-3gbidhyv.js} +17 -110
- package/dist/web/server/assets/{SectionTabs-BGsrf-UQ.js → SectionTabs-CWQ5orUW.js} +9 -2
- package/dist/web/server/assets/SkillsParts-D58l8voo.js +199 -0
- package/dist/web/server/assets/SpawnDialog-MJWwppgC.js +1648 -0
- package/dist/web/server/assets/SpawnTeamModal-RjzAeX_Q.js +124 -0
- package/dist/web/server/assets/TeamForm-DdOgIMiV.js +138 -0
- package/dist/web/server/assets/{TeamThread-DuLlGDcw.js → TeamThread-D-PvO3fu.js} +9 -9
- package/dist/web/server/assets/{UnsavedChangesGuard-DrOvPV14.js → UnsavedChangesGuard-Bb5frygQ.js} +1 -1
- package/dist/web/server/assets/{_id-TVruGcOd.js → _id-BKzOw78O.js} +11 -3
- package/dist/web/server/assets/_id-BPjVkcNb.js +396 -0
- package/dist/web/server/assets/_id-BUfy-GwH.js +16 -0
- package/dist/web/server/assets/{_id-yN0z7VqE.js → _id-C1_l6oSR.js} +257 -207
- package/dist/web/server/assets/{_id-DJnYgisy.js → _id-CHvYQhWt.js} +8 -4
- package/dist/web/server/assets/_id-De3Bm0SG.js +39 -0
- package/dist/web/server/assets/_tanstack-start-manifest_v-CR3jm1nY.js +256 -0
- package/dist/web/server/assets/access-CNfvQ3NB.js +295 -0
- package/dist/web/server/assets/{access-GMGed5O8.js → access-Cm_izIIC.js} +2 -2
- package/dist/web/server/assets/{access-C_pupPks.js → access-WWspT0v4.js} +2 -1
- package/dist/web/server/assets/agent-actions-COnfW5AU.js +20 -0
- package/dist/web/server/assets/agents-C7UmTjfO.js +13 -0
- package/dist/web/server/assets/{agents-BnWgFo6o.js → agents-CRtMfKqX.js} +9 -6
- package/dist/web/server/assets/agents-D0hfGIMK.js +134 -0
- package/dist/web/server/assets/agents-DQowl6Ly.js +31 -0
- package/dist/web/server/assets/agents-DzpqlIuJ.js +12 -0
- package/dist/web/server/assets/agents-NOkh61dV.js +323 -0
- package/dist/web/server/assets/attention-CRvxt22X.js +232 -0
- package/dist/web/server/assets/{attention-Cr7puThv.js → attention-CgWhXjX7.js} +4 -1
- package/dist/web/server/assets/{attention-DS3O9UmJ.js → attention-Cx9ZWPOO.js} +4 -2
- package/dist/web/server/assets/{config-DjTGA4iZ.js → config-B5CS8juO.js} +2 -2
- package/dist/web/server/assets/{config-Q7livfa3.js → config-D117117T.js} +51 -102
- package/dist/web/server/assets/createSsrRpc-CwTd0zrB.js +72 -0
- package/dist/web/server/assets/{login-VV10kZBl.js → login-IF0Gbsuq.js} +36 -2
- package/dist/web/server/assets/{login-JoIjlcmu.js → login-va4EtvA8.js} +34 -45
- package/dist/web/server/assets/manage-Ce6cI4eW.js +240 -0
- package/dist/web/server/assets/{mcp-ZARSOxZW.js → mcp-Bm9U6x7N.js} +2 -2
- package/dist/web/server/assets/mcp-C96PBxpb.js +376 -0
- package/dist/web/server/assets/page-title-CwcbXMhx.js +95 -0
- package/dist/web/server/assets/{router-Dh2-IvLL.js → router-8Iq19GOz.js} +366 -203
- package/dist/web/server/assets/{routes-C9NawqcV.js → routes-BLo-fWbQ.js} +2681 -1667
- package/dist/web/server/assets/{routes-CDskMy5C.js → routes-BXvYYFrN.js} +2 -2
- package/dist/web/server/assets/routes-Kwam6JmS.js +89 -0
- package/dist/web/server/assets/{skills-StN15QhC.js → skills-BqCnA-74.js} +2 -2
- package/dist/web/server/assets/skills-DSezIdDc.js +157 -0
- package/dist/web/server/assets/{skills-h5aHa7Q8.js → skills-DWzlT_hC.js} +9 -1
- package/dist/web/server/assets/{style-GYDODk2F.js → style-C2hIPY_Y.js} +2 -2
- package/dist/web/server/assets/{system-Dl-1RhoP.js → system-CcLCmkIC.js} +2 -2
- package/dist/web/server/assets/{system-DtswhLW6.js → system-D3th6n2E.js} +4 -2
- package/dist/web/server/assets/system-E0VePdzO.js +145 -0
- package/dist/web/server/assets/{teams-BxnvFTyn.js → teams-70u1XQTr.js} +1 -3
- package/dist/web/server/assets/{teams-YrmyutM4.js → teams-BopOP4x7.js} +8 -1
- package/dist/web/server/assets/teams-CQVV18D3.js +216 -0
- package/dist/web/server/assets/teams-CdCmBJIj.js +174 -0
- package/dist/web/server/assets/{teams-5PMGvHuM.js → teams-DScFp8mK.js} +2 -2
- package/dist/web/server/assets/{teams-CbIPKf99.js → teams-DxA-vnzY.js} +4 -2
- package/dist/web/server/assets/telegram-DJ8s_91Y.js +1057 -0
- package/dist/web/server/assets/{telegram-Cv0D4gyz.js → telegram-DR7xijeS.js} +2 -2
- package/dist/web/server/assets/{tools-ioJcPzMW.js → tools-CsH9DI-4.js} +2 -2
- package/dist/web/server/assets/{tools-OfD22R-C.js → tools-V6kezUpL.js} +55 -218
- package/dist/web/server/assets/{use-resource-DVzK0toP.js → use-resource-CjcJwn7F.js} +1 -1
- package/dist/web/server/assets/{welcome-jxmpE_Jb.js → welcome-BpmcD-ia.js} +2 -2
- package/dist/web/server/assets/{welcome-FFEbrNT1.js → welcome-Ya8TkL4v.js} +10 -10
- package/dist/web/server/server.js +19 -19
- package/dist/worker.js +17 -0
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
- package/dist/web/client/assets/AddProviderDialog-BiGLKnu2.js +0 -1
- package/dist/web/client/assets/ConfigPage-DvBzy2MN.js +0 -1
- package/dist/web/client/assets/ConfirmDialog-CiZ5tk9R.js +0 -1
- package/dist/web/client/assets/ConnectionsView-Czkpm2JY.js +0 -1
- package/dist/web/client/assets/Dialog-s_kPtI-W.js +0 -1
- package/dist/web/client/assets/ModelMenu-BfUPoRjV.js +0 -1
- package/dist/web/client/assets/SectionTabs-DENNb6Nw.js +0 -1
- package/dist/web/client/assets/Segmented-Dh77vmpp.js +0 -1
- package/dist/web/client/assets/SkillFindings-Xng11qqx.js +0 -1
- package/dist/web/client/assets/SkillsPicker-hI3YXvib.js +0 -1
- package/dist/web/client/assets/SpawnDialog-CKWFQ6jk.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-2rm1JGSk.js +0 -1
- package/dist/web/client/assets/UnsavedChangesGuard-nx6dv2Yw.js +0 -1
- package/dist/web/client/assets/_id-B72mIpcE.js +0 -1
- package/dist/web/client/assets/_id-Bzavnza1.js +0 -1
- package/dist/web/client/assets/access-Yw9jODuk.js +0 -1
- package/dist/web/client/assets/agents-C9xoyL7o.js +0 -1
- package/dist/web/client/assets/agents-TviG16wx.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-DmURtlJm.js +0 -1
- package/dist/web/client/assets/check-BjgKoGvU.js +0 -1
- package/dist/web/client/assets/chevron-right-CUZiA2aG.js +0 -1
- package/dist/web/client/assets/config-UZz_mjO5.js +0 -1
- package/dist/web/client/assets/createLucideIcon-C6gOo8sD.js +0 -1
- package/dist/web/client/assets/dist-BWppw70N.js +0 -41
- package/dist/web/client/assets/dist-D2dwY7MR.js +0 -1
- package/dist/web/client/assets/entities-xVoB-p2j.js +0 -1
- package/dist/web/client/assets/index-Df1oUtAP.js +0 -14
- package/dist/web/client/assets/link-Cbztlp_R.js +0 -1
- package/dist/web/client/assets/login-CPfdaqsV.js +0 -1
- package/dist/web/client/assets/mcp-FlYnNon0.js +0 -1
- package/dist/web/client/assets/model-facts-DoB6QD5y.js +0 -1
- package/dist/web/client/assets/parts-tIDBNsYA.js +0 -1
- package/dist/web/client/assets/plus-CWrKMtvA.js +0 -1
- package/dist/web/client/assets/routes-BZaWCoQj.js +0 -76
- package/dist/web/client/assets/save-f9O-CQia.js +0 -1
- package/dist/web/client/assets/skills-C7yDPC8s.js +0 -1
- package/dist/web/client/assets/style-DDuTFJUu.js +0 -7
- package/dist/web/client/assets/styles-BviXU81u.css +0 -2
- package/dist/web/client/assets/system-CL3Kz36L.js +0 -1
- package/dist/web/client/assets/teams-CQTEF5gV.js +0 -1
- package/dist/web/client/assets/teams-DQ7SqVyF.js +0 -1
- package/dist/web/client/assets/telegram-BLgxtGhZ.js +0 -1
- package/dist/web/client/assets/tools-pOQyGVYo.js +0 -1
- package/dist/web/client/assets/use-resource-C3MBZJop.js +0 -1
- package/dist/web/client/assets/welcome-Hr6JpMef.js +0 -1
- package/dist/web/client/assets/wrench-6BEIqKDn.js +0 -1
- package/dist/web/server/assets/Dialog-aup_yJv5.js +0 -85
- package/dist/web/server/assets/ModelMenu-DUY9aHkE.js +0 -138
- package/dist/web/server/assets/SkillFindings-BdATze1A.js +0 -46
- package/dist/web/server/assets/SkillsPicker-DlqEfRWh.js +0 -67
- package/dist/web/server/assets/SpawnDialog-D_SMPCG_.js +0 -132
- package/dist/web/server/assets/Tabs-BhF41MfQ.js +0 -20
- package/dist/web/server/assets/TeamForm-ilBaeLI4.js +0 -96
- package/dist/web/server/assets/_id-BsZcsabI.js +0 -383
- package/dist/web/server/assets/_id-D8Kj0F30.js +0 -18
- package/dist/web/server/assets/_id-QYifTM9w.js +0 -28
- package/dist/web/server/assets/_tanstack-start-manifest_v-D6zrzUC7.js +0 -223
- package/dist/web/server/assets/access-DKOpcHIJ.js +0 -232
- package/dist/web/server/assets/agents-B6OR3x99.js +0 -327
- package/dist/web/server/assets/agents-B7642eRO.js +0 -130
- package/dist/web/server/assets/agents-BJ-_oC2e.js +0 -14
- package/dist/web/server/assets/agents-CjV0w-Zy.js +0 -12
- package/dist/web/server/assets/agents-Dy_Q-9lG.js +0 -27
- package/dist/web/server/assets/attention-CLP4HYBz.js +0 -216
- package/dist/web/server/assets/createSsrRpc-GCCF14VW.js +0 -169
- package/dist/web/server/assets/entities-Dn2xzKIw.js +0 -16
- package/dist/web/server/assets/mcp-BI-FD-JI.js +0 -250
- package/dist/web/server/assets/model-facts-mrfrWQne.js +0 -136
- package/dist/web/server/assets/parts-B31PJkhi.js +0 -190
- package/dist/web/server/assets/routes-BJIJWCIE.js +0 -16
- package/dist/web/server/assets/skills-BqLq3ZXq.js +0 -275
- package/dist/web/server/assets/system-BtRA2HUs.js +0 -138
- package/dist/web/server/assets/teams-COaU0wN9.js +0 -108
- package/dist/web/server/assets/teams-Ca8W4mvl.js +0 -88
- package/dist/web/server/assets/telegram-Yx8nm6Ei.js +0 -984
- package/dist/web/server/assets/utils-C_uf36nf.js +0 -8
- package/dist/web/server/assets/workspace-DaitCM0t.js +0 -651
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { n as createServerFn } from "../server.js";
|
|
2
|
-
import { t as createSsrRpc } from "./createSsrRpc-
|
|
3
|
-
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
2
|
+
import { t as createSsrRpc } from "./createSsrRpc-CwTd0zrB.js";
|
|
3
|
+
import { createFileRoute, lazyRouteComponent, redirect } from "@tanstack/react-router";
|
|
4
4
|
//#region src/routes/templates/teams/$id/index.tsx
|
|
5
|
-
var $$splitComponentImporter = () => import("./_id-
|
|
5
|
+
var $$splitComponentImporter = () => import("./_id-C1_l6oSR.js");
|
|
6
6
|
var fetchTemplate = createServerFn({ method: "GET" }).validator((data) => data).handler(createSsrRpc("c13d90cf82cd448c86427091165d0361b92843852a3f73a5bf4412dd2adc6bae"));
|
|
7
7
|
var Route = createFileRoute("/templates/teams/$id/")({
|
|
8
|
-
loader: ({ params }) =>
|
|
8
|
+
loader: async ({ params }) => {
|
|
9
|
+
const data = await fetchTemplate({ data: { id: params.id } });
|
|
10
|
+
if (!data) throw redirect({ to: "/templates/teams" });
|
|
11
|
+
return data;
|
|
12
|
+
},
|
|
9
13
|
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
10
14
|
});
|
|
11
15
|
//#endregion
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { n as createServerFn } from "../server.js";
|
|
2
|
+
import { t as MODELS_PATH } from "./ModelMenu-D-hTgYOO.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,256 @@
|
|
|
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-YW0gXPfk.js",
|
|
29
|
+
"/assets/createLucideIcon-DkniuEtD.js",
|
|
30
|
+
"/assets/Button-UiegBKOK.js",
|
|
31
|
+
"/assets/parts-LZxl9Gvc.js"
|
|
32
|
+
],
|
|
33
|
+
scripts: [{ attrs: {
|
|
34
|
+
type: "module",
|
|
35
|
+
async: !0,
|
|
36
|
+
src: "/assets/index-YW0gXPfk.js"
|
|
37
|
+
} }]
|
|
38
|
+
},
|
|
39
|
+
"/": {
|
|
40
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/index.tsx",
|
|
41
|
+
children: void 0,
|
|
42
|
+
preloads: [
|
|
43
|
+
"/assets/routes-BxIIyGho.js",
|
|
44
|
+
"/assets/ConfirmDialog-VqBOFZEp.js",
|
|
45
|
+
"/assets/Segmented-MYKKTuZO.js",
|
|
46
|
+
"/assets/SpawnTeamModal-DG5UbJNK.js",
|
|
47
|
+
"/assets/UnsavedChangesGuard-BmdwLH99.js",
|
|
48
|
+
"/assets/TeamThread-mkwODO0S.js",
|
|
49
|
+
"/assets/SkillsParts-UvNK5SYP.js",
|
|
50
|
+
"/assets/agent-actions-BgE9fKHH.js",
|
|
51
|
+
"/assets/manage-SRGSx8n2.js",
|
|
52
|
+
"/assets/use-resource-CQaIZbpy.js",
|
|
53
|
+
"/assets/download-C4t9l5wR.js",
|
|
54
|
+
"/assets/images-DSYgPKM7.js",
|
|
55
|
+
"/assets/arrow-right-D0HKRb7U.js",
|
|
56
|
+
"/assets/chevron-right-bs0TUSl2.js",
|
|
57
|
+
"/assets/file-text-DzbjpYrV.js",
|
|
58
|
+
"/assets/list-checks-JNXcmws9.js",
|
|
59
|
+
"/assets/message-square-DM2MP9vF.js",
|
|
60
|
+
"/assets/wrench-GbE1M1RJ.js",
|
|
61
|
+
"/assets/network-BJ4iPjQO.js",
|
|
62
|
+
"/assets/plus-CLGNN5QX.js"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"/login": {
|
|
66
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/login.tsx",
|
|
67
|
+
children: void 0,
|
|
68
|
+
preloads: [
|
|
69
|
+
"/assets/login-DcQJk5-U.js",
|
|
70
|
+
"/assets/key-round-BpK4-E3T.js",
|
|
71
|
+
"/assets/users-round-BJrym3FG.js"
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"/welcome": {
|
|
75
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/welcome.tsx",
|
|
76
|
+
children: void 0,
|
|
77
|
+
preloads: [
|
|
78
|
+
"/assets/welcome-CyS4Hrd-.js",
|
|
79
|
+
"/assets/AddProviderDialog-CkwSq3C7.js",
|
|
80
|
+
"/assets/use-resource-CQaIZbpy.js",
|
|
81
|
+
"/assets/arrow-right-D0HKRb7U.js"
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"/config/access": {
|
|
85
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/config/access.tsx",
|
|
86
|
+
children: void 0,
|
|
87
|
+
preloads: [
|
|
88
|
+
"/assets/access-C8d8vaQ6.js",
|
|
89
|
+
"/assets/ConfigPage-CUbHBhzx.js",
|
|
90
|
+
"/assets/ConfirmDialog-VqBOFZEp.js",
|
|
91
|
+
"/assets/key-round-BpK4-E3T.js",
|
|
92
|
+
"/assets/plus-CLGNN5QX.js"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"/config/mcp": {
|
|
96
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/config/mcp.tsx",
|
|
97
|
+
children: void 0,
|
|
98
|
+
preloads: [
|
|
99
|
+
"/assets/mcp-BUWu4TvS.js",
|
|
100
|
+
"/assets/ConfigPage-CUbHBhzx.js",
|
|
101
|
+
"/assets/ConfirmDialog-VqBOFZEp.js",
|
|
102
|
+
"/assets/plus-CLGNN5QX.js"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"/config/system": {
|
|
106
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/config/system.tsx",
|
|
107
|
+
children: void 0,
|
|
108
|
+
preloads: [
|
|
109
|
+
"/assets/system-zQ0NnQML.js",
|
|
110
|
+
"/assets/ConfigPage-CUbHBhzx.js",
|
|
111
|
+
"/assets/download-C4t9l5wR.js",
|
|
112
|
+
"/assets/square-terminal-Dmm6cV-G.js"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
"/config/telegram": {
|
|
116
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/config/telegram.tsx",
|
|
117
|
+
children: void 0,
|
|
118
|
+
preloads: [
|
|
119
|
+
"/assets/telegram-DKHq5DpE.js",
|
|
120
|
+
"/assets/ConfigPage-CUbHBhzx.js",
|
|
121
|
+
"/assets/ConfirmDialog-VqBOFZEp.js",
|
|
122
|
+
"/assets/use-resource-CQaIZbpy.js",
|
|
123
|
+
"/assets/bot-Bb--PFVU.js",
|
|
124
|
+
"/assets/list-checks-JNXcmws9.js"
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
"/config/tools": {
|
|
128
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/config/tools.tsx",
|
|
129
|
+
children: void 0,
|
|
130
|
+
preloads: [
|
|
131
|
+
"/assets/tools-BKIpLaiC.js",
|
|
132
|
+
"/assets/ConfigPage-CUbHBhzx.js",
|
|
133
|
+
"/assets/chevron-right-bs0TUSl2.js",
|
|
134
|
+
"/assets/file-text-DzbjpYrV.js",
|
|
135
|
+
"/assets/wrench-GbE1M1RJ.js",
|
|
136
|
+
"/assets/square-terminal-Dmm6cV-G.js"
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
"/agents/": {
|
|
140
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/agents/index.tsx",
|
|
141
|
+
children: void 0,
|
|
142
|
+
preloads: [
|
|
143
|
+
"/assets/agents-CgtzqBpD.js",
|
|
144
|
+
"/assets/ConfirmDialog-VqBOFZEp.js",
|
|
145
|
+
"/assets/ManagePage-BJWZd1ts.js",
|
|
146
|
+
"/assets/Segmented-MYKKTuZO.js",
|
|
147
|
+
"/assets/agent-actions-BgE9fKHH.js",
|
|
148
|
+
"/assets/manage-SRGSx8n2.js",
|
|
149
|
+
"/assets/bot-Bb--PFVU.js"
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
"/attention/": {
|
|
153
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/attention/index.tsx",
|
|
154
|
+
children: void 0,
|
|
155
|
+
preloads: [
|
|
156
|
+
"/assets/attention-D9mQWoKt.js",
|
|
157
|
+
"/assets/Segmented-MYKKTuZO.js",
|
|
158
|
+
"/assets/manage-SRGSx8n2.js",
|
|
159
|
+
"/assets/use-resource-CQaIZbpy.js"
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
"/config/": {
|
|
163
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/config/index.tsx",
|
|
164
|
+
children: void 0,
|
|
165
|
+
preloads: [
|
|
166
|
+
"/assets/config-Dw6GWf38.js",
|
|
167
|
+
"/assets/ConfigPage-CUbHBhzx.js",
|
|
168
|
+
"/assets/ConfirmDialog-VqBOFZEp.js",
|
|
169
|
+
"/assets/Segmented-MYKKTuZO.js",
|
|
170
|
+
"/assets/AddProviderDialog-CkwSq3C7.js",
|
|
171
|
+
"/assets/use-resource-CQaIZbpy.js",
|
|
172
|
+
"/assets/images-DSYgPKM7.js",
|
|
173
|
+
"/assets/chevron-right-bs0TUSl2.js",
|
|
174
|
+
"/assets/message-square-DM2MP9vF.js",
|
|
175
|
+
"/assets/plus-CLGNN5QX.js"
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
"/skills/": {
|
|
179
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/skills/index.tsx",
|
|
180
|
+
children: void 0,
|
|
181
|
+
preloads: [
|
|
182
|
+
"/assets/skills-C7DzIwFJ.js",
|
|
183
|
+
"/assets/ConfirmDialog-VqBOFZEp.js",
|
|
184
|
+
"/assets/ManagePage-BJWZd1ts.js",
|
|
185
|
+
"/assets/SkillsParts-UvNK5SYP.js",
|
|
186
|
+
"/assets/manage-SRGSx8n2.js"
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
"/teams/": {
|
|
190
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/teams/index.tsx",
|
|
191
|
+
children: void 0,
|
|
192
|
+
preloads: [
|
|
193
|
+
"/assets/teams-BEIJHObN.js",
|
|
194
|
+
"/assets/ConfirmDialog-VqBOFZEp.js",
|
|
195
|
+
"/assets/ManagePage-BJWZd1ts.js",
|
|
196
|
+
"/assets/TeamForm-DGlxWv4e.js",
|
|
197
|
+
"/assets/manage-SRGSx8n2.js",
|
|
198
|
+
"/assets/users-round-BJrym3FG.js"
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
"/templates/agents/": {
|
|
202
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/templates/agents/index.tsx",
|
|
203
|
+
children: void 0,
|
|
204
|
+
preloads: [
|
|
205
|
+
"/assets/agents-D7W4BT8r.js",
|
|
206
|
+
"/assets/ConfirmDialog-VqBOFZEp.js",
|
|
207
|
+
"/assets/ManagePage-BJWZd1ts.js",
|
|
208
|
+
"/assets/AgentTemplateParts-CEn_4qVs.js",
|
|
209
|
+
"/assets/manage-SRGSx8n2.js",
|
|
210
|
+
"/assets/file-text-DzbjpYrV.js"
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
"/templates/teams/": {
|
|
214
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/templates/teams/index.tsx",
|
|
215
|
+
children: void 0,
|
|
216
|
+
preloads: [
|
|
217
|
+
"/assets/teams-DlOc7Ods.js",
|
|
218
|
+
"/assets/ConfirmDialog-VqBOFZEp.js",
|
|
219
|
+
"/assets/ManagePage-BJWZd1ts.js",
|
|
220
|
+
"/assets/SpawnTeamModal-DG5UbJNK.js",
|
|
221
|
+
"/assets/manage-SRGSx8n2.js",
|
|
222
|
+
"/assets/network-BJ4iPjQO.js"
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
"/templates/agents/$id/": {
|
|
226
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/templates/agents/$id/index.tsx",
|
|
227
|
+
children: void 0,
|
|
228
|
+
preloads: [
|
|
229
|
+
"/assets/_id-CvcxNmBH.js",
|
|
230
|
+
"/assets/ConfirmDialog-VqBOFZEp.js",
|
|
231
|
+
"/assets/ManagePage-BJWZd1ts.js",
|
|
232
|
+
"/assets/UnsavedChangesGuard-BmdwLH99.js",
|
|
233
|
+
"/assets/AgentTemplateParts-CEn_4qVs.js",
|
|
234
|
+
"/assets/manage-SRGSx8n2.js"
|
|
235
|
+
]
|
|
236
|
+
},
|
|
237
|
+
"/templates/teams/$id/": {
|
|
238
|
+
filePath: "/home/runner/work/bazilion/bazilion/apps/web/src/routes/templates/teams/$id/index.tsx",
|
|
239
|
+
children: void 0,
|
|
240
|
+
css: ["/assets/style-DLioOiRN.css"],
|
|
241
|
+
preloads: [
|
|
242
|
+
"/assets/_id-UyBk7gRl.js",
|
|
243
|
+
"/assets/ConfirmDialog-VqBOFZEp.js",
|
|
244
|
+
"/assets/ManagePage-BJWZd1ts.js",
|
|
245
|
+
"/assets/Segmented-MYKKTuZO.js",
|
|
246
|
+
"/assets/SpawnTeamModal-DG5UbJNK.js",
|
|
247
|
+
"/assets/UnsavedChangesGuard-BmdwLH99.js",
|
|
248
|
+
"/assets/style-CA2GAk9b.js",
|
|
249
|
+
"/assets/manage-SRGSx8n2.js",
|
|
250
|
+
"/assets/bot-Bb--PFVU.js",
|
|
251
|
+
"/assets/plus-CLGNN5QX.js"
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
} });
|
|
255
|
+
//#endregion
|
|
256
|
+
export { tsrStartManifest };
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { K as Button, M as SetupCard, O as ListRow, b as CardRow, dt as errorMessage, f as TextField, k as Notice, lt as api, v as CardForm, w as Chip, y as CardList } from "./SpawnDialog-MJWwppgC.js";
|
|
2
|
+
import { t as ConfirmDialog } from "./ConfirmDialog-4xeCXKHe.js";
|
|
3
|
+
import { t as Route } from "./access-Cm_izIIC.js";
|
|
4
|
+
import { t as ConfigPage } from "./ConfigPage-CxzL-gTm.js";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import { useRouter } from "@tanstack/react-router";
|
|
7
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { KeyRound, MonitorSmartphone, Plus } from "lucide-react";
|
|
9
|
+
//#region src/lib/token-form.ts
|
|
10
|
+
function tokenForm(draft) {
|
|
11
|
+
const label = draft.label.trim();
|
|
12
|
+
const days = draft.days.trim();
|
|
13
|
+
const problems = {};
|
|
14
|
+
if (days !== "" && (!/^\d+$/.test(days) || Number(days) < 1)) problems.days = "A whole number of days, 1 or more. Empty means it never expires.";
|
|
15
|
+
const missing = label === "" && days !== "" ? "A token needs a label to tell it from the others." : null;
|
|
16
|
+
if (label === "" || problems.days) return {
|
|
17
|
+
problems,
|
|
18
|
+
missing,
|
|
19
|
+
body: null
|
|
20
|
+
};
|
|
21
|
+
return {
|
|
22
|
+
problems,
|
|
23
|
+
missing,
|
|
24
|
+
body: {
|
|
25
|
+
label,
|
|
26
|
+
...days ? { expiresInDays: Number(days) } : {}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/** Whether a token still signs in. */
|
|
31
|
+
function tokenState(token, now) {
|
|
32
|
+
if (token.revokedAt) return {
|
|
33
|
+
label: "Revoked",
|
|
34
|
+
tone: "neutral"
|
|
35
|
+
};
|
|
36
|
+
if (token.expiresAt !== null && token.expiresAt <= now) return {
|
|
37
|
+
label: "Expired",
|
|
38
|
+
tone: "neutral"
|
|
39
|
+
};
|
|
40
|
+
return {
|
|
41
|
+
label: "Active",
|
|
42
|
+
tone: "success"
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/** A moment as the daemon's clock has it, to the minute. */
|
|
46
|
+
function when(timestamp) {
|
|
47
|
+
return new Date(timestamp).toISOString().slice(0, 16).replace("T", " ");
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/components/setup/AccessCards.tsx
|
|
51
|
+
/** A token for another device, a script, or the CLI on another machine. */
|
|
52
|
+
function MintTokenCard({ onMinted }) {
|
|
53
|
+
const [draft, setDraft] = useState({
|
|
54
|
+
label: "",
|
|
55
|
+
days: ""
|
|
56
|
+
});
|
|
57
|
+
const [created, setCreated] = useState(null);
|
|
58
|
+
const [busy, setBusy] = useState(false);
|
|
59
|
+
const [error, setError] = useState(null);
|
|
60
|
+
const form = tokenForm(draft);
|
|
61
|
+
const edit = (change) => {
|
|
62
|
+
setError(null);
|
|
63
|
+
setDraft((current) => ({
|
|
64
|
+
...current,
|
|
65
|
+
...change
|
|
66
|
+
}));
|
|
67
|
+
};
|
|
68
|
+
async function mint(event) {
|
|
69
|
+
event.preventDefault();
|
|
70
|
+
if (!form.body || busy) return;
|
|
71
|
+
setBusy(true);
|
|
72
|
+
setError(null);
|
|
73
|
+
try {
|
|
74
|
+
const { token } = await api("/api/tokens", { body: form.body });
|
|
75
|
+
setCreated(token);
|
|
76
|
+
setDraft({
|
|
77
|
+
label: "",
|
|
78
|
+
days: ""
|
|
79
|
+
});
|
|
80
|
+
await onMinted();
|
|
81
|
+
} catch (cause) {
|
|
82
|
+
setError(errorMessage(cause));
|
|
83
|
+
} finally {
|
|
84
|
+
setBusy(false);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return /* @__PURE__ */ jsx(SetupCard, {
|
|
88
|
+
labelledBy: "access-mint",
|
|
89
|
+
icon: /* @__PURE__ */ jsx(Plus, { className: "size-5" }),
|
|
90
|
+
title: "Mint a new token",
|
|
91
|
+
description: "One for each other device or script, so that each can be revoked on its own.",
|
|
92
|
+
children: /* @__PURE__ */ jsxs(CardForm, {
|
|
93
|
+
onSubmit: mint,
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ jsxs("div", {
|
|
96
|
+
className: "grid items-start gap-x-3 gap-y-4 sm:grid-cols-[minmax(0,18rem)_minmax(0,11rem)]",
|
|
97
|
+
children: [/* @__PURE__ */ jsx(TextField, {
|
|
98
|
+
label: "Label",
|
|
99
|
+
value: draft.label,
|
|
100
|
+
disabled: busy,
|
|
101
|
+
placeholder: "e.g. laptop-tailscale",
|
|
102
|
+
onChange: (label) => edit({ label })
|
|
103
|
+
}), /* @__PURE__ */ jsx(TextField, {
|
|
104
|
+
label: "Expires in days",
|
|
105
|
+
value: draft.days,
|
|
106
|
+
disabled: busy,
|
|
107
|
+
placeholder: "never",
|
|
108
|
+
inputMode: "numeric",
|
|
109
|
+
problem: form.problems.days,
|
|
110
|
+
onChange: (days) => edit({ days })
|
|
111
|
+
})]
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ jsxs("div", {
|
|
114
|
+
className: "flex flex-wrap items-center gap-x-4 gap-y-2",
|
|
115
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
116
|
+
variant: "primary",
|
|
117
|
+
type: "submit",
|
|
118
|
+
disabled: busy || !form.body,
|
|
119
|
+
children: busy ? "Creating…" : "Create"
|
|
120
|
+
}), error ? /* @__PURE__ */ jsxs("p", {
|
|
121
|
+
role: "alert",
|
|
122
|
+
className: "m-0 min-w-0 flex-1 basis-56 text-sm font-medium text-warning",
|
|
123
|
+
children: ["Nothing was created: ", error]
|
|
124
|
+
}) : form.missing && /* @__PURE__ */ jsx("p", {
|
|
125
|
+
role: "status",
|
|
126
|
+
className: "m-0 min-w-0 flex-1 basis-56 text-sm font-medium text-warning",
|
|
127
|
+
children: form.missing
|
|
128
|
+
})]
|
|
129
|
+
}),
|
|
130
|
+
created && /* @__PURE__ */ jsx(Notice, {
|
|
131
|
+
tone: "warning",
|
|
132
|
+
title: "Copy this token now; it cannot be shown again.",
|
|
133
|
+
children: /* @__PURE__ */ jsx("code", {
|
|
134
|
+
className: "mt-1 block break-all bg-transparent p-0 text-[0.85em] text-foreground",
|
|
135
|
+
children: created
|
|
136
|
+
})
|
|
137
|
+
})
|
|
138
|
+
]
|
|
139
|
+
})
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
/** Every token that signs in: the one in `auth.json`, and one per other device. */
|
|
143
|
+
function TokensCard({ tokens, sessions, includeRevoked, now, onRevoked }) {
|
|
144
|
+
const [revoking, setRevoking] = useState(null);
|
|
145
|
+
const usedHere = (token) => sessions.some((session) => session.current && session.tokenId === token?.id);
|
|
146
|
+
return /* @__PURE__ */ jsxs(SetupCard, {
|
|
147
|
+
labelledBy: "access-tokens",
|
|
148
|
+
icon: /* @__PURE__ */ jsx(KeyRound, { className: "size-5" }),
|
|
149
|
+
title: "Tokens",
|
|
150
|
+
description: "Each signs in to the HTTP API, the CLI and the web UI, with full access.",
|
|
151
|
+
action: /* @__PURE__ */ jsx("a", {
|
|
152
|
+
className: "ghost-btn",
|
|
153
|
+
href: includeRevoked ? "/config/access" : "/config/access?all=1",
|
|
154
|
+
children: includeRevoked ? "Hide revoked" : "Show revoked"
|
|
155
|
+
}),
|
|
156
|
+
children: [tokens.length === 0 ? /* @__PURE__ */ jsx(CardRow, {
|
|
157
|
+
className: "py-4 text-sm text-muted-foreground",
|
|
158
|
+
children: "No tokens yet; mint one above."
|
|
159
|
+
}) : /* @__PURE__ */ jsx(CardList, { children: tokens.map((token) => {
|
|
160
|
+
const bootstrap = token.kind === "bootstrap";
|
|
161
|
+
const state = tokenState(token, now);
|
|
162
|
+
return /* @__PURE__ */ jsx(ListRow, {
|
|
163
|
+
title: token.label,
|
|
164
|
+
chip: /* @__PURE__ */ jsx(Chip, {
|
|
165
|
+
tone: state.tone,
|
|
166
|
+
children: state.label
|
|
167
|
+
}),
|
|
168
|
+
meta: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
169
|
+
/* @__PURE__ */ jsx("span", { children: bootstrap ? "bootstrap (auth.json)" : token.kind }),
|
|
170
|
+
/* @__PURE__ */ jsxs("span", { children: ["created ", when(token.createdAt)] }),
|
|
171
|
+
/* @__PURE__ */ jsxs("span", { children: ["last used ", token.lastUsedAt ? when(token.lastUsedAt) : "never"] }),
|
|
172
|
+
/* @__PURE__ */ jsxs("span", { children: ["expires ", token.expiresAt ? when(token.expiresAt) : "never"] }),
|
|
173
|
+
/* @__PURE__ */ jsx("code", { children: token.id })
|
|
174
|
+
] }),
|
|
175
|
+
actions: !token.revokedAt && !bootstrap && /* @__PURE__ */ jsx(Button, {
|
|
176
|
+
variant: "danger",
|
|
177
|
+
"aria-label": `Revoke ${token.label}`,
|
|
178
|
+
onClick: () => setRevoking(token),
|
|
179
|
+
children: "Revoke"
|
|
180
|
+
})
|
|
181
|
+
}, token.id);
|
|
182
|
+
}) }), /* @__PURE__ */ jsx(ConfirmDialog, {
|
|
183
|
+
open: revoking !== null,
|
|
184
|
+
onOpenChange: (open) => {
|
|
185
|
+
if (!open) setRevoking(null);
|
|
186
|
+
},
|
|
187
|
+
title: `Revoke ${revoking?.label ?? ""}?`,
|
|
188
|
+
description: /* @__PURE__ */ jsxs("p", {
|
|
189
|
+
className: "m-0",
|
|
190
|
+
children: [
|
|
191
|
+
"This permanently revokes token ",
|
|
192
|
+
/* @__PURE__ */ jsx("code", { children: revoking?.id }),
|
|
193
|
+
" and ends every browser session opened with it.",
|
|
194
|
+
usedHere(revoking) && " This includes the session you are using now."
|
|
195
|
+
]
|
|
196
|
+
}),
|
|
197
|
+
confirmLabel: "Revoke token and sessions",
|
|
198
|
+
onConfirm: async () => {
|
|
199
|
+
if (!revoking) return;
|
|
200
|
+
await api(`/api/tokens/${encodeURIComponent(revoking.id)}`, { method: "DELETE" });
|
|
201
|
+
await onRevoked(usedHere(revoking));
|
|
202
|
+
}
|
|
203
|
+
})]
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/** The browsers that are signed in. */
|
|
207
|
+
function SessionsCard({ sessions, onRevoked }) {
|
|
208
|
+
const [revoking, setRevoking] = useState(null);
|
|
209
|
+
return /* @__PURE__ */ jsxs(SetupCard, {
|
|
210
|
+
labelledBy: "access-sessions",
|
|
211
|
+
icon: /* @__PURE__ */ jsx(MonitorSmartphone, { className: "size-5" }),
|
|
212
|
+
title: "Browser sessions",
|
|
213
|
+
description: "A session ends after 30 days without use. Revoking a token also ends every session opened with it.",
|
|
214
|
+
children: [sessions.length === 0 ? /* @__PURE__ */ jsx(CardRow, {
|
|
215
|
+
className: "py-4 text-sm text-muted-foreground",
|
|
216
|
+
children: "No active browser sessions."
|
|
217
|
+
}) : /* @__PURE__ */ jsx(CardList, { children: sessions.map((session) => /* @__PURE__ */ jsx(ListRow, {
|
|
218
|
+
title: session.tokenLabel,
|
|
219
|
+
chip: session.current && /* @__PURE__ */ jsx(Chip, {
|
|
220
|
+
tone: "success",
|
|
221
|
+
children: "This browser"
|
|
222
|
+
}),
|
|
223
|
+
meta: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
224
|
+
/* @__PURE__ */ jsxs("span", { children: ["last seen ", when(session.lastSeenAt)] }),
|
|
225
|
+
/* @__PURE__ */ jsxs("span", { children: ["expires ", when(session.expiresAt)] }),
|
|
226
|
+
/* @__PURE__ */ jsx("code", { children: session.id })
|
|
227
|
+
] }),
|
|
228
|
+
actions: /* @__PURE__ */ jsx(Button, {
|
|
229
|
+
variant: "danger",
|
|
230
|
+
"aria-label": session.current ? "Revoke the session of this browser" : `Revoke the ${session.tokenLabel} session last seen ${when(session.lastSeenAt)}`,
|
|
231
|
+
onClick: () => setRevoking(session),
|
|
232
|
+
children: "Revoke"
|
|
233
|
+
})
|
|
234
|
+
}, session.id)) }), /* @__PURE__ */ jsx(ConfirmDialog, {
|
|
235
|
+
open: revoking !== null,
|
|
236
|
+
onOpenChange: (open) => {
|
|
237
|
+
if (!open) setRevoking(null);
|
|
238
|
+
},
|
|
239
|
+
title: `Revoke the ${revoking?.tokenLabel ?? ""} browser session?`,
|
|
240
|
+
description: /* @__PURE__ */ jsxs("p", {
|
|
241
|
+
className: "m-0",
|
|
242
|
+
children: [
|
|
243
|
+
"This ends browser session ",
|
|
244
|
+
/* @__PURE__ */ jsx("code", { children: revoking?.id }),
|
|
245
|
+
revoking?.current ? " and signs this browser out." : ". The token stays active for later logins."
|
|
246
|
+
]
|
|
247
|
+
}),
|
|
248
|
+
confirmLabel: revoking?.current ? "Sign out this browser" : "Revoke session",
|
|
249
|
+
onConfirm: async () => {
|
|
250
|
+
if (!revoking) return;
|
|
251
|
+
await api(`/api/sessions/${encodeURIComponent(revoking.id)}`, { method: "DELETE" });
|
|
252
|
+
await onRevoked(revoking.current);
|
|
253
|
+
}
|
|
254
|
+
})]
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
//#endregion
|
|
258
|
+
//#region src/routes/config/access.tsx?tsr-split=component
|
|
259
|
+
function AccessPage() {
|
|
260
|
+
const { tokens, sessions, now } = Route.useLoaderData();
|
|
261
|
+
const includeRevoked = Route.useSearch().all === 1;
|
|
262
|
+
const router = useRouter();
|
|
263
|
+
/** Revoking the session this browser uses signs it out. */
|
|
264
|
+
async function afterRevoke(signedOut) {
|
|
265
|
+
if (signedOut) window.location.assign("/login");
|
|
266
|
+
else await router.invalidate({ sync: true });
|
|
267
|
+
}
|
|
268
|
+
return /* @__PURE__ */ jsxs(ConfigPage, {
|
|
269
|
+
title: "Access",
|
|
270
|
+
description: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
271
|
+
"Every token has full access to the HTTP API, the CLI and browser login. The",
|
|
272
|
+
" ",
|
|
273
|
+
/* @__PURE__ */ jsx("code", { children: "bootstrap" }),
|
|
274
|
+
" token from ",
|
|
275
|
+
/* @__PURE__ */ jsx("code", { children: "~/.bazilion/auth.json" }),
|
|
276
|
+
" cannot be revoked; mint a separate, revocable token for each other device."
|
|
277
|
+
] }),
|
|
278
|
+
children: [
|
|
279
|
+
/* @__PURE__ */ jsx(MintTokenCard, { onMinted: () => router.invalidate({ sync: true }) }),
|
|
280
|
+
/* @__PURE__ */ jsx(TokensCard, {
|
|
281
|
+
tokens,
|
|
282
|
+
sessions,
|
|
283
|
+
includeRevoked,
|
|
284
|
+
now,
|
|
285
|
+
onRevoked: afterRevoke
|
|
286
|
+
}),
|
|
287
|
+
/* @__PURE__ */ jsx(SessionsCard, {
|
|
288
|
+
sessions,
|
|
289
|
+
onRevoked: afterRevoke
|
|
290
|
+
})
|
|
291
|
+
]
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
//#endregion
|
|
295
|
+
export { AccessPage as component };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as createServerFn } from "../server.js";
|
|
2
|
-
import { t as createSsrRpc } from "./createSsrRpc-
|
|
2
|
+
import { t as createSsrRpc } from "./createSsrRpc-CwTd0zrB.js";
|
|
3
3
|
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
4
|
//#region src/routes/config/access.tsx
|
|
5
|
-
var $$splitComponentImporter = () => import("./access-
|
|
5
|
+
var $$splitComponentImporter = () => import("./access-CNfvQ3NB.js");
|
|
6
6
|
var fetchTokens = createServerFn({ method: "GET" }).validator((data) => data).handler(createSsrRpc("c945ba2c0b997bf2ce9d965e41ad7655facbaa4c6f6c3284f90fbe6f2d427f52"));
|
|
7
7
|
var Route = createFileRoute("/config/access")({
|
|
8
8
|
validateSearch: (search) => ({ all: search.all === 1 ? 1 : void 0 }),
|
|
@@ -12,7 +12,8 @@ var fetchTokens = createServerFn({ method: "GET" }).validator((data) => data).ha
|
|
|
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 { lt as api } from "./SpawnDialog-MJWwppgC.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 };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { n as createServerFn } from "../server.js";
|
|
2
|
+
import { t as createSsrRpc } from "./createSsrRpc-CwTd0zrB.js";
|
|
3
|
+
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
|
+
//#region src/routes/templates/agents/index.tsx
|
|
5
|
+
var $$splitComponentImporter = () => import("./agents-D0hfGIMK.js");
|
|
6
|
+
var fetchTemplates = createServerFn({ method: "GET" }).handler(createSsrRpc("7bc7f3b145d10e7a733fbe068ce367dda04ec2f1cdb53f0d6dcba3838eb2deeb"));
|
|
7
|
+
var Route = createFileRoute("/templates/agents/")({
|
|
8
|
+
validateSearch: (search) => ({ new: search.new === 1 || search.new === "1" ? 1 : void 0 }),
|
|
9
|
+
loader: () => fetchTemplates(),
|
|
10
|
+
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
11
|
+
});
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Route as t };
|