bazilion 0.27.0 → 0.51.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 +651 -309
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +2105 -997
- package/dist/daemon.js.map +1 -1
- package/dist/web/client/assets/AddProviderDialog-Diic36c_.js +1 -0
- package/dist/web/client/assets/ConfigPage-pupvtSCX.js +1 -0
- package/dist/web/client/assets/ConfirmDialog-GFDcHI1L.js +1 -0
- package/dist/web/client/assets/ConnectionsView-y1CeY-6U.js +1 -0
- package/dist/web/client/assets/Dialog-bg86_x4v.js +1 -0
- package/dist/web/client/assets/FieldRow-B8eIni5r.js +1 -0
- package/dist/web/client/assets/ModelSelect-DvCLUmkW.js +1 -0
- package/dist/web/client/assets/SectionTabs-D4ezA6U4.js +1 -0
- package/dist/web/client/assets/Segmented-Dh77vmpp.js +1 -0
- package/dist/web/client/assets/SkillFindings-BzLO1lNA.js +1 -0
- package/dist/web/client/assets/SkillsPicker-hI3YXvib.js +1 -0
- package/dist/web/client/assets/SpawnDialog-YJX6UMBC.js +1 -0
- package/dist/web/client/assets/Tabs-f6bHvCGn.js +1 -0
- package/dist/web/client/assets/TeamForm-kda1HYZG.js +1 -0
- package/dist/web/client/assets/TeamThread-DFvbakHo.js +1 -0
- package/dist/web/client/assets/UnsavedChangesGuard-DBJikVgc.js +1 -0
- package/dist/web/client/assets/_id-BjNtLwak.js +1 -0
- package/dist/web/client/assets/_id-BklaQf3z.js +1 -0
- package/dist/web/client/assets/agents-D9cUF2d9.js +1 -0
- package/dist/web/client/assets/agents-wuBlzx4e.js +1 -0
- package/dist/web/client/assets/api-HC_YzjBy.js +1 -0
- package/dist/web/client/assets/arrow-right-Gm_FDWJ_.js +1 -0
- package/dist/web/client/assets/attention-8ZkSLl2e.js +1 -0
- package/dist/web/client/assets/check-BjgKoGvU.js +1 -0
- package/dist/web/client/assets/config-Con_BbSh.js +1 -0
- package/dist/web/client/assets/createLucideIcon-C6gOo8sD.js +1 -0
- package/dist/web/client/assets/index-Br9qkGM-.js +54 -0
- package/dist/web/client/assets/link-Cbztlp_R.js +1 -0
- package/dist/web/client/assets/login-llnOKSJc.js +1 -0
- package/dist/web/client/assets/mcp-zIUguMSI.js +1 -0
- package/dist/web/client/assets/plus-CWrKMtvA.js +1 -0
- package/dist/web/client/assets/routes-BY5uqJ2n.js +76 -0
- package/dist/web/client/assets/save-f9O-CQia.js +1 -0
- package/dist/web/client/assets/services-esLrcTwe.js +1 -0
- package/dist/web/client/assets/skills-DzYXksM0.js +1 -0
- package/dist/web/client/assets/style-Cdzqt_TJ.js +7 -0
- package/dist/web/client/assets/styles-BRSS6yrm.css +2 -0
- package/dist/web/client/assets/system-CsI66nyZ.js +1 -0
- package/dist/web/client/assets/teams-CHE_zpxS.js +1 -0
- package/dist/web/client/assets/teams-dxG9OESG.js +1 -0
- package/dist/web/client/assets/telegram-C3dGndJV.js +1 -0
- package/dist/web/client/assets/tokens-CNNH-Wr9.js +1 -0
- package/dist/web/client/assets/use-resource-BjnxgGvh.js +1 -0
- package/dist/web/client/assets/welcome-C8EOtc8P.js +1 -0
- package/dist/web/server/assets/AddProviderDialog-CR6TRYdZ.js +910 -0
- package/dist/web/server/assets/{ConfigPage-CGld_wCK.js → ConfigPage-CIh3ohea.js} +4 -4
- package/dist/web/server/assets/ConfirmDialog-B79K2KEW.js +52 -0
- package/dist/web/server/assets/ConnectionsView-BIMYdp9C.js +710 -0
- package/dist/web/server/assets/{ConfirmDialog-LdVlEanK.js → Dialog-CVqpXxuN.js} +3 -50
- package/dist/web/server/assets/{FieldRow-Dah2KKqo.js → FieldRow-CHVhX2rS.js} +4 -4
- package/dist/web/server/assets/{ModelSelect-Vwro6OkL.js → ModelSelect-DrZrdndo.js} +7 -7
- package/dist/web/server/assets/Rail-Cg-efcpA.js +698 -0
- package/dist/web/server/assets/{SectionTabs-CqFg9Vwx.js → SectionTabs-DrcgVeZd.js} +4 -18
- package/dist/web/server/assets/Segmented-3ZLdqa5U.js +18 -0
- package/dist/web/server/assets/{SkillFindings-Bd6e81Wu.js → SkillFindings-DSDiL6hn.js} +1 -1
- package/dist/web/server/assets/{SpawnDialog-BGNaMfFb.js → SpawnDialog-BUUlLxE9.js} +25 -7
- package/dist/web/server/assets/{TeamForm-C93tpn9r.js → TeamForm-CvQAs2FA.js} +1 -1
- package/dist/web/server/assets/TeamThread-5CjVPcDr.js +190 -0
- package/dist/web/server/assets/{UnsavedChangesGuard-Dm4a27_5.js → UnsavedChangesGuard-CyF2Z9p1.js} +8 -4
- package/dist/web/server/assets/{TeamPolicyEditor-BHS3J0R9.js → _id-0fEWiVZX.js} +114 -263
- package/dist/web/server/assets/{_id-B0x1ffz3.js → _id-8bsYEcGg.js} +2 -2
- package/dist/web/server/assets/{_id-sW6zXrTP.js → _id-BvAaRSUW.js} +2 -2
- package/dist/web/server/assets/{_id-lOVnT5sS.js → _id-Dg6M_qfr.js} +6 -6
- package/dist/web/server/assets/{_id-ByiXeIPS.js → _id-Dji7xr9C.js} +2 -2
- package/dist/web/server/assets/{_id-Bdf_Rg62.js → _id-TVruGcOd.js} +1 -1
- package/dist/web/server/assets/_tanstack-start-manifest_v-sxiIH4M7.js +214 -0
- package/dist/web/server/assets/{agents-D4tqK1kH.js → agents-BDA5yYZ2.js} +14 -15
- package/dist/web/server/assets/{agents-Cn9GkXFX.js → agents-BTDxmp-F.js} +2 -2
- package/dist/web/server/assets/{agents-BNPkidbH.js → agents-BnWgFo6o.js} +1 -1
- package/dist/web/server/assets/{agents-lOqc6VGd.js → agents-DM7guWF2.js} +2 -2
- package/dist/web/server/assets/{agents-DycxHDt8.js → agents-DktqUffG.js} +10 -10
- package/dist/web/server/assets/{agents-BK8OmB8g.js → agents-xgZ9rsac.js} +2 -2
- package/dist/web/server/assets/{attention-DULVjdmF.js → attention-CHQEQiZl.js} +2 -2
- package/dist/web/server/assets/{attention-YWnLKA2E.js → attention-Cr7puThv.js} +1 -1
- package/dist/web/server/assets/{attention-BIm455bC.js → attention-De3-ehuf.js} +6 -6
- package/dist/web/server/assets/{auth-DiN92ydD.js → auth-dJnrFW6y.js} +1 -1
- package/dist/web/server/assets/config-DOp28gcy.js +1067 -0
- package/dist/web/server/assets/config-DzgkbBoD.js +17 -0
- package/dist/web/server/assets/config-X7qWbbpH.js +20 -0
- package/dist/web/server/assets/{Page-CMSYKXWJ.js → createSsrRpc-CcLbajrF.js} +17 -2
- package/dist/web/server/assets/{daemon-client-DL2ik2Em.js → daemon-client-B_ZRIIrT.js} +2 -1
- package/dist/web/server/assets/{mcp-BwmpNQPN.js → mcp-C97uAZe1.js} +1 -1
- package/dist/web/server/assets/{mcp-B09_O05r.js → mcp-CO_tycXU.js} +9 -9
- package/dist/web/server/assets/{mcp-CqdTfXcn.js → mcp-D3OCoHtO.js} +2 -2
- package/dist/web/server/assets/router-Cs2Ak4II.js +892 -0
- package/dist/web/server/assets/routes-BSNOKE-C.js +7647 -0
- package/dist/web/server/assets/routes-BVwqgZGI.js +16 -0
- package/dist/web/server/assets/routes-CO4l-GJ0.js +57 -0
- package/dist/web/server/assets/{services-Q9HYQXXB.js → services-DZLxUSG8.js} +2 -2
- package/dist/web/server/assets/{services-BLvAvb8g.js → services-DsHRLL8q.js} +1 -1
- package/dist/web/server/assets/{services-tCfB1B83.js → services-DsvpaF3L.js} +4 -4
- package/dist/web/server/assets/{skills-BZg_txbf.js → skills-CggQJk6a.js} +2 -2
- package/dist/web/server/assets/{skills-C7fqRPna.js → skills-DKYV7PTk.js} +11 -11
- package/dist/web/server/assets/{skills-C_g8IKag.js → skills-h5aHa7Q8.js} +1 -1
- package/dist/web/server/assets/style-GYDODk2F.js +178 -0
- package/dist/web/server/assets/system-CZ2qzBz3.js +138 -0
- package/dist/web/server/assets/system-DsJfpBPl.js +12 -0
- package/dist/web/server/assets/system-DtswhLW62.js +18 -0
- package/dist/web/server/assets/{teams-BS-oweRl.js → teams-B6PzNcoy.js} +23 -15
- package/dist/web/server/assets/{teams-D4CaU76n.js → teams-B6lBhvdL.js} +2 -2
- package/dist/web/server/assets/{teams-BHkhnt6b.js → teams-Bp2tERZe.js} +2 -2
- package/dist/web/server/assets/{teams-DX2HmKqi.js → teams-BxnvFTyn.js} +1 -1
- package/dist/web/server/assets/{teams-BSflKBP8.js → teams-C-8iz-uV.js} +6 -6
- package/dist/web/server/assets/{teams-CNyB5nM9.js → teams-YrmyutM4.js} +1 -1
- package/dist/web/server/assets/{telegram-CrJiygCX.js → telegram-CXrP3hMp.js} +6 -6
- package/dist/web/server/assets/{telegram-BUdnc8oF.js → telegram-D2RZriz_.js} +2 -2
- package/dist/web/server/assets/{telegram-C4v1HhyJ.js → telegram-Gy7_9yih.js} +1 -1
- package/dist/web/server/assets/{tokens-DqldzPUq.js → tokens-C-oDTqnp.js} +2 -2
- package/dist/web/server/assets/{tokens-B1twAJdd.js → tokens-CEdl8puR.js} +1 -1
- package/dist/web/server/assets/{tokens-DdjEyALj.js → tokens-DSLwQ1Pw.js} +10 -10
- package/dist/web/server/assets/use-resource-ChQozXVI.js +63 -0
- package/dist/web/server/assets/welcome-BLw1G6SS.js +318 -0
- package/dist/web/server/assets/welcome-ByAkvHSP.js +26 -0
- package/dist/web/server/assets/welcome-CxXMI4HI.js +15 -0
- package/dist/web/server/assets/workspace-DeEYMPDX.js +658 -0
- package/dist/web/server/server.js +30 -74
- package/dist/worker.js +78 -36
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
- package/dist/web/client/assets/AgentAvatar-DWx-bM6n.js +0 -1
- package/dist/web/client/assets/ChatPane-DOV_HJg-.js +0 -72
- package/dist/web/client/assets/ConfigPage-Dfu9DzFX.js +0 -1
- package/dist/web/client/assets/ConfirmDialog-536ziJ5P.js +0 -1
- package/dist/web/client/assets/FieldRow-z1JqCdqn.js +0 -1
- package/dist/web/client/assets/ModelSelect-CvOHjUyB.js +0 -1
- package/dist/web/client/assets/ResultCard-X4nTbjYY.js +0 -1
- package/dist/web/client/assets/SectionTabs-DXHzXmmb.js +0 -1
- package/dist/web/client/assets/SkillFindings-8LX6bYf_.js +0 -1
- package/dist/web/client/assets/SkillsPicker-Cr87y_W-.js +0 -1
- package/dist/web/client/assets/SpawnDialog-DoZl-yes.js +0 -1
- package/dist/web/client/assets/SpawnTeamModal-C638hEoN.js +0 -1
- package/dist/web/client/assets/Tabs-D0LgBNIk.js +0 -1
- package/dist/web/client/assets/TeamForm-C-WzvOl4.js +0 -1
- package/dist/web/client/assets/TeamPolicyEditor-CSKBx0oK.js +0 -7
- package/dist/web/client/assets/UnsavedChangesGuard-GC-vzw7h.js +0 -1
- package/dist/web/client/assets/_id-BKLynswT.js +0 -1
- package/dist/web/client/assets/_id-BYM_NORr.js +0 -1
- package/dist/web/client/assets/_id-Cxa98a9m.js +0 -1
- package/dist/web/client/assets/_id-D4hV1U1t.js +0 -1
- package/dist/web/client/assets/agent-actions-CXQCoxKO.js +0 -1
- package/dist/web/client/assets/agents-BxPS1_Bp.js +0 -1
- package/dist/web/client/assets/agents-GozAWW-l.js +0 -1
- package/dist/web/client/assets/attention-Cz9rZcrr.js +0 -1
- package/dist/web/client/assets/chevron-right-CPAb1zac.js +0 -1
- package/dist/web/client/assets/config-9vv9Lipb.js +0 -3
- package/dist/web/client/assets/inbox-DHLArXxl.js +0 -1
- package/dist/web/client/assets/index-1YXquAq8.js +0 -52
- package/dist/web/client/assets/jsx-runtime-bzQ4Vb5N.js +0 -1
- package/dist/web/client/assets/learning-PvtXm8Ne.js +0 -1
- package/dist/web/client/assets/login-DIJpNQFo.js +0 -1
- package/dist/web/client/assets/mcp-pKBL0xIf.js +0 -1
- package/dist/web/client/assets/members-DHWsgsEs.js +0 -1
- package/dist/web/client/assets/memory-CEVppPyU.js +0 -1
- package/dist/web/client/assets/plus-BaIRdB10.js +0 -1
- package/dist/web/client/assets/policy-DEh4BLSw.js +0 -1
- package/dist/web/client/assets/preload-helper-eUUcpe2S.js +0 -1
- package/dist/web/client/assets/results-DgJPjEZF.js +0 -1
- package/dist/web/client/assets/review-BbshafTQ.js +0 -1
- package/dist/web/client/assets/route-Ccb8v41z.js +0 -1
- package/dist/web/client/assets/route-D1d6kCEV.js +0 -1
- package/dist/web/client/assets/routes-g7V4ru7T.js +0 -1
- package/dist/web/client/assets/services-B2f7e5jV.js +0 -1
- package/dist/web/client/assets/settings-B6elpcYm.js +0 -1
- package/dist/web/client/assets/skills-CngE7TF8.js +0 -1
- package/dist/web/client/assets/styles-xUnZ-ep_.css +0 -2
- package/dist/web/client/assets/teams-BdJZXOan.js +0 -1
- package/dist/web/client/assets/teams-c496ISsT.js +0 -1
- package/dist/web/client/assets/telegram-B_-hK6EC.js +0 -1
- package/dist/web/client/assets/tokens-CKz8gx4-.js +0 -1
- package/dist/web/client/assets/triggers-DCEPciGW.js +0 -1
- package/dist/web/client/assets/welcome-D-zVOLGA.js +0 -1
- package/dist/web/server/assets/AgentAvatar-8gTAy_tP.js +0 -37
- package/dist/web/server/assets/ChatPane-De_FPEoD.js +0 -1887
- package/dist/web/server/assets/ResultCard-CZn1w4KA.js +0 -97
- package/dist/web/server/assets/Sidebar-puq47KyR.js +0 -430
- package/dist/web/server/assets/SpawnTeamModal-C6GbfScI.js +0 -97
- package/dist/web/server/assets/_id-BR6tnR6I.js +0 -23
- package/dist/web/server/assets/_id-Bm611NQz.js +0 -13
- package/dist/web/server/assets/_id-D5UCoyES.js +0 -359
- package/dist/web/server/assets/_id-DHx5UmmL.js +0 -12
- package/dist/web/server/assets/_id-DLpGmOVm.js +0 -19
- package/dist/web/server/assets/_id-Y5ctILG2.js +0 -13
- package/dist/web/server/assets/_id-dDA0pdVo.js +0 -54
- package/dist/web/server/assets/_tanstack-start-manifest_v-B8u80HjK.js +0 -292
- package/dist/web/server/assets/agent-actions-BBdFVdoa.js +0 -20
- package/dist/web/server/assets/api-WWxPqx67.js +0 -85
- package/dist/web/server/assets/config-BNEgu7WG.js +0 -798
- package/dist/web/server/assets/config-C1VB28se.js +0 -12
- package/dist/web/server/assets/config-TdVqnqNL.js +0 -25
- package/dist/web/server/assets/createSsrRpc-6LHNEsSK.js +0 -16
- package/dist/web/server/assets/inbox-4Vj5jTT8.js +0 -245
- package/dist/web/server/assets/inbox-D4IqUv3l.js +0 -38
- package/dist/web/server/assets/inbox-Dle24AfV.js +0 -23
- package/dist/web/server/assets/learning-BScq7VbO.js +0 -12
- package/dist/web/server/assets/learning-CBWFEnhg.js +0 -263
- package/dist/web/server/assets/learning-DWAKevhF.js +0 -25
- package/dist/web/server/assets/members-B8QBF6TF.js +0 -12
- package/dist/web/server/assets/members-DsF02Wp7.js +0 -12
- package/dist/web/server/assets/members-tWZA9b15.js +0 -36
- package/dist/web/server/assets/memory-BNN0b-0x.js +0 -12
- package/dist/web/server/assets/memory-CTl1E1Rm.js +0 -267
- package/dist/web/server/assets/memory-CV5uCBb2.js +0 -12
- package/dist/web/server/assets/policy-C9M6zV6w.js +0 -79
- package/dist/web/server/assets/policy-h-6NpU3m.js +0 -19
- package/dist/web/server/assets/policy-xEw9X0DK.js +0 -12
- package/dist/web/server/assets/results-D3A3UA4d.js +0 -182
- package/dist/web/server/assets/results-D6Ui5S8D.js +0 -12
- package/dist/web/server/assets/results-DWmxvfyn.js +0 -15
- package/dist/web/server/assets/review-CyQky-WQ.js +0 -40
- package/dist/web/server/assets/review-Sq0GGcPV.js +0 -322
- package/dist/web/server/assets/review-XWbSF8cF.js +0 -12
- package/dist/web/server/assets/route-BErtkz6t.js +0 -19
- package/dist/web/server/assets/route-CLoV-An_.js +0 -48
- package/dist/web/server/assets/route-WQ19JkBa.js +0 -19
- package/dist/web/server/assets/route-dEK_2GLj.js +0 -203
- package/dist/web/server/assets/route-iHTkhO81.js +0 -16
- package/dist/web/server/assets/route-zs8uUQtB.js +0 -16
- package/dist/web/server/assets/router-BI9gmY3S.js +0 -751
- package/dist/web/server/assets/routes-081s4n24.js +0 -45
- package/dist/web/server/assets/routes-CWo5WPsr.js +0 -15
- package/dist/web/server/assets/routes-Cqp1ufHm.js +0 -56
- package/dist/web/server/assets/settings-CVaGv-xF.js +0 -12
- package/dist/web/server/assets/settings-D9viV-86.js +0 -561
- package/dist/web/server/assets/settings-DaZNZ_CC.js +0 -27
- package/dist/web/server/assets/triggers-B7LW784F.js +0 -214
- package/dist/web/server/assets/triggers-C5sMCZXv2.js +0 -12
- package/dist/web/server/assets/triggers-DMfVdImD.js +0 -12
- package/dist/web/server/assets/welcome-D0d38Pzx.js +0 -93
- package/dist/web/client/assets/{TeamPolicyEditor-DLioOiRN.css → style-DLioOiRN.css} +0 -0
- package/dist/web/server/assets/{start-DTX6aKCi.js → start-DhW7sy23.js} +1 -1
|
@@ -1,751 +0,0 @@
|
|
|
1
|
-
import { n as createServerFn } from "../server.js";
|
|
2
|
-
import { t as DAEMON_BASE_URL } from "./daemon-client-DL2ik2Em.js";
|
|
3
|
-
import { n as publicOriginConfig } from "./public-origin-BpDkdS5Q.js";
|
|
4
|
-
import { i as errorMessage, n as api, o as Button } from "./api-WWxPqx67.js";
|
|
5
|
-
import { a as PageShell } from "./Page-CMSYKXWJ.js";
|
|
6
|
-
import { i as BaziuLogo, n as ThemeToggle, r as PawIcon, t as Route$4 } from "./login-JoIjlcmu.js";
|
|
7
|
-
import { r as readCookie } from "./cookies-HnTYjKRp.js";
|
|
8
|
-
import { t as createSsrRpc } from "./createSsrRpc-6LHNEsSK.js";
|
|
9
|
-
import { t as Route$5 } from "./routes-CWo5WPsr.js";
|
|
10
|
-
import { t as Route$6 } from "./teams-BHkhnt6b.js";
|
|
11
|
-
import { t as Route$7 } from "./skills-BZg_txbf.js";
|
|
12
|
-
import { t as Route$8 } from "./config-C1VB28se.js";
|
|
13
|
-
import { t as Route$9 } from "./attention-DULVjdmF.js";
|
|
14
|
-
import { t as Route$10 } from "./agents-lOqc6VGd.js";
|
|
15
|
-
import { t as Route$11 } from "./tokens-DqldzPUq.js";
|
|
16
|
-
import { t as Route$12 } from "./services-Q9HYQXXB.js";
|
|
17
|
-
import { t as Route$13 } from "./mcp-CqdTfXcn.js";
|
|
18
|
-
import { t as Route$14 } from "./route-zs8uUQtB.js";
|
|
19
|
-
import { t as Route$15 } from "./route-iHTkhO81.js";
|
|
20
|
-
import { t as Route$16 } from "./teams-D4CaU76n.js";
|
|
21
|
-
import { t as Route$17 } from "./agents-Cn9GkXFX.js";
|
|
22
|
-
import { t as Route$18 } from "./_id-Bm611NQz.js";
|
|
23
|
-
import { t as Route$19 } from "./_id-Y5ctILG2.js";
|
|
24
|
-
import { t as Route$20 } from "./review-XWbSF8cF.js";
|
|
25
|
-
import { t as Route$21 } from "./results-D6Ui5S8D.js";
|
|
26
|
-
import { t as Route$22 } from "./policy-xEw9X0DK.js";
|
|
27
|
-
import { t as Route$23 } from "./memory-BNN0b-0x.js";
|
|
28
|
-
import { t as Route$24 } from "./members-B8QBF6TF.js";
|
|
29
|
-
import { t as Route$25 } from "./telegram-BUdnc8oF.js";
|
|
30
|
-
import { t as Route$26 } from "./triggers-DMfVdImD.js";
|
|
31
|
-
import { t as Route$27 } from "./settings-CVaGv-xF.js";
|
|
32
|
-
import { t as Route$28 } from "./learning-BScq7VbO.js";
|
|
33
|
-
import { t as Route$29 } from "./inbox-Dle24AfV.js";
|
|
34
|
-
import { t as Route$30 } from "./_id-B0x1ffz3.js";
|
|
35
|
-
import { t as Route$31 } from "./_id-sW6zXrTP.js";
|
|
36
|
-
import { useEffect, useState } from "react";
|
|
37
|
-
import { HeadContent, Link, Outlet, Scripts, createFileRoute, createRootRoute, createRouter, lazyRouteComponent, redirect, useRouter, useRouterState } from "@tanstack/react-router";
|
|
38
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
39
|
-
import { BellRing, Bot, ChevronDown, LayoutTemplate, LogOut, MessageCircle, Settings2, Sparkles, UsersRound } from "lucide-react";
|
|
40
|
-
import { DropdownMenu } from "radix-ui";
|
|
41
|
-
//#region src/components/RouteStates.tsx
|
|
42
|
-
/** The router's error view for every route: a loader failed. The top nav stays usable. */
|
|
43
|
-
function RouteErrorState({ error }) {
|
|
44
|
-
const router = useRouter();
|
|
45
|
-
return /* @__PURE__ */ jsx(PageShell, { children: /* @__PURE__ */ jsxs("section", {
|
|
46
|
-
role: "alert",
|
|
47
|
-
className: "mx-auto my-10 w-full max-w-2xl rounded-md border border-rose-baziu bg-snow p-6",
|
|
48
|
-
children: [
|
|
49
|
-
/* @__PURE__ */ jsx("h1", {
|
|
50
|
-
className: "text-2xl",
|
|
51
|
-
children: "Could not load this page"
|
|
52
|
-
}),
|
|
53
|
-
/* @__PURE__ */ jsx("pre", {
|
|
54
|
-
className: "mt-4 overflow-auto whitespace-pre-wrap rounded-md bg-ivory p-3 text-xs",
|
|
55
|
-
children: error.message
|
|
56
|
-
}),
|
|
57
|
-
/* @__PURE__ */ jsxs("div", {
|
|
58
|
-
className: "mt-4 flex flex-wrap gap-2",
|
|
59
|
-
children: [/* @__PURE__ */ jsx(Button, {
|
|
60
|
-
variant: "primary",
|
|
61
|
-
onClick: () => void router.invalidate(),
|
|
62
|
-
children: "Retry"
|
|
63
|
-
}), /* @__PURE__ */ jsx("a", {
|
|
64
|
-
className: "ghost-btn",
|
|
65
|
-
href: "/",
|
|
66
|
-
children: "Home"
|
|
67
|
-
})]
|
|
68
|
-
})
|
|
69
|
-
]
|
|
70
|
-
}) });
|
|
71
|
-
}
|
|
72
|
-
/** The router's pending view while a loader runs. */
|
|
73
|
-
function RoutePendingState() {
|
|
74
|
-
return /* @__PURE__ */ jsx(PageShell, { children: /* @__PURE__ */ jsxs("div", {
|
|
75
|
-
"aria-busy": "true",
|
|
76
|
-
className: "my-10 flex items-center justify-center gap-3",
|
|
77
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
78
|
-
"aria-hidden": "true",
|
|
79
|
-
className: "inline-block h-4 w-4 animate-spin rounded-full border-2 border-fawn border-t-transparent"
|
|
80
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
81
|
-
className: "text-sm text-mocha",
|
|
82
|
-
children: "Loading…"
|
|
83
|
-
})]
|
|
84
|
-
}) });
|
|
85
|
-
}
|
|
86
|
-
//#endregion
|
|
87
|
-
//#region src/components/Footer.tsx
|
|
88
|
-
function Footer() {
|
|
89
|
-
return /* @__PURE__ */ jsxs("footer", {
|
|
90
|
-
className: "mx-auto mt-14 flex w-full max-w-[1500px] shrink-0 flex-col items-center justify-between gap-3 border-t border-frost py-5 text-xs text-mocha-light sm:flex-row",
|
|
91
|
-
children: [/* @__PURE__ */ jsxs(Link, {
|
|
92
|
-
to: "/",
|
|
93
|
-
className: "group inline-flex items-center gap-2 rounded-lg text-charcoal transition-opacity hover:text-charcoal hover:opacity-80",
|
|
94
|
-
children: [/* @__PURE__ */ jsx(BaziuLogo, { className: "h-6 w-6 transition-transform duration-300 group-hover:rotate-[-8deg]" }), /* @__PURE__ */ jsx("span", {
|
|
95
|
-
className: "font-display text-sm tracking-[-0.01em]",
|
|
96
|
-
children: "bazilion"
|
|
97
|
-
})]
|
|
98
|
-
}), /* @__PURE__ */ jsxs("span", {
|
|
99
|
-
className: "inline-flex items-center gap-1.5",
|
|
100
|
-
children: ["dedicated to Baziu", /* @__PURE__ */ jsx(PawIcon, {
|
|
101
|
-
className: "h-3 w-3 text-rose-baziu opacity-60",
|
|
102
|
-
"aria-hidden": "true"
|
|
103
|
-
})]
|
|
104
|
-
})]
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
//#endregion
|
|
108
|
-
//#region src/components/TopNav.tsx
|
|
109
|
-
var PRIMARY_LINKS = [
|
|
110
|
-
{
|
|
111
|
-
to: "/",
|
|
112
|
-
label: "Chat",
|
|
113
|
-
icon: MessageCircle
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
to: "/agents",
|
|
117
|
-
label: "Agents",
|
|
118
|
-
icon: Bot
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
to: "/teams",
|
|
122
|
-
label: "Teams",
|
|
123
|
-
icon: UsersRound
|
|
124
|
-
}
|
|
125
|
-
];
|
|
126
|
-
var MANAGE_LINKS = [
|
|
127
|
-
{
|
|
128
|
-
href: "/templates",
|
|
129
|
-
label: "Templates",
|
|
130
|
-
description: "Reusable Agent behavior and Team rosters.",
|
|
131
|
-
icon: LayoutTemplate
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
href: "/skills",
|
|
135
|
-
label: "Skills",
|
|
136
|
-
description: "Prompt skills available to your agents.",
|
|
137
|
-
icon: Sparkles
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
href: "/config",
|
|
141
|
-
label: "Setup",
|
|
142
|
-
description: "Providers, integrations, access, and services.",
|
|
143
|
-
icon: Settings2
|
|
144
|
-
}
|
|
145
|
-
];
|
|
146
|
-
function TopNav() {
|
|
147
|
-
const pathname = useRouterState({ select: (state) => state.location.pathname });
|
|
148
|
-
const [attention, setAttention] = useState(null);
|
|
149
|
-
const [logoutError, setLogoutError] = useState(null);
|
|
150
|
-
useEffect(() => {
|
|
151
|
-
if (pathname === "/login" || pathname === "/welcome") return;
|
|
152
|
-
const controller = new AbortController();
|
|
153
|
-
api("/api/attention/summary", { signal: controller.signal }).then(setAttention).catch(() => {});
|
|
154
|
-
return () => controller.abort();
|
|
155
|
-
}, [pathname]);
|
|
156
|
-
const attentionActive = pathname === "/attention" || pathname.startsWith("/attention/");
|
|
157
|
-
const openAttention = attention?.openTotal ?? 0;
|
|
158
|
-
async function logout() {
|
|
159
|
-
setLogoutError(null);
|
|
160
|
-
try {
|
|
161
|
-
await api("/api/logout", { method: "POST" });
|
|
162
|
-
window.location.assign("/login");
|
|
163
|
-
} catch (error) {
|
|
164
|
-
setLogoutError(errorMessage(error));
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
return /* @__PURE__ */ jsxs("nav", {
|
|
168
|
-
"aria-label": "Primary navigation",
|
|
169
|
-
className: "relative mx-auto grid w-full max-w-[1500px] shrink-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-3 gap-y-2 border-b border-frost py-3 md:flex md:gap-2 md:py-4",
|
|
170
|
-
children: [
|
|
171
|
-
/* @__PURE__ */ jsxs(Link, {
|
|
172
|
-
to: "/",
|
|
173
|
-
"aria-label": "Bazilion home",
|
|
174
|
-
className: "group flex min-w-0 items-center gap-2 rounded-lg text-charcoal transition-opacity hover:text-charcoal hover:opacity-80",
|
|
175
|
-
children: [/* @__PURE__ */ jsx(BaziuLogo, { className: "h-8 w-8 shrink-0 transition-transform duration-300 group-hover:rotate-[-8deg] group-hover:scale-[1.08]" }), /* @__PURE__ */ jsx("span", {
|
|
176
|
-
className: "truncate font-display text-[1.35rem] tracking-[-0.02em]",
|
|
177
|
-
children: "bazilion"
|
|
178
|
-
})]
|
|
179
|
-
}),
|
|
180
|
-
/* @__PURE__ */ jsxs("div", {
|
|
181
|
-
className: "col-span-2 row-start-2 flex min-w-0 items-center gap-1 overflow-x-auto pb-0.5 md:col-auto md:row-auto md:ml-4 md:flex-1 md:overflow-visible md:pb-0",
|
|
182
|
-
children: [
|
|
183
|
-
PRIMARY_LINKS.map((link) => {
|
|
184
|
-
const active = link.to === "/" ? pathname === "/" : pathname === link.to || pathname.startsWith(`${link.to}/`);
|
|
185
|
-
const Icon = link.icon;
|
|
186
|
-
return /* @__PURE__ */ jsxs(Link, {
|
|
187
|
-
to: link.to,
|
|
188
|
-
"aria-current": active ? "page" : void 0,
|
|
189
|
-
className: navButtonClass(active),
|
|
190
|
-
children: [/* @__PURE__ */ jsx(Icon, {
|
|
191
|
-
className: "hidden size-4 shrink-0 sm:block",
|
|
192
|
-
"aria-hidden": "true"
|
|
193
|
-
}), /* @__PURE__ */ jsx("span", { children: link.label })]
|
|
194
|
-
}, link.to);
|
|
195
|
-
}),
|
|
196
|
-
/* @__PURE__ */ jsxs(Link, {
|
|
197
|
-
to: "/attention",
|
|
198
|
-
"aria-current": attentionActive ? "page" : void 0,
|
|
199
|
-
className: navButtonClass(attentionActive),
|
|
200
|
-
children: [
|
|
201
|
-
/* @__PURE__ */ jsx(BellRing, {
|
|
202
|
-
className: "hidden size-4 shrink-0 sm:block",
|
|
203
|
-
"aria-hidden": "true"
|
|
204
|
-
}),
|
|
205
|
-
/* @__PURE__ */ jsx("span", { children: "Attention" }),
|
|
206
|
-
openAttention > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
207
|
-
/* @__PURE__ */ jsx("span", {
|
|
208
|
-
className: "size-2 shrink-0 rounded-full bg-danger sm:hidden",
|
|
209
|
-
"aria-hidden": "true"
|
|
210
|
-
}),
|
|
211
|
-
/* @__PURE__ */ jsx("span", {
|
|
212
|
-
className: "hidden min-w-5 items-center justify-center rounded-full bg-danger px-1.5 py-0.5 text-xs font-semibold leading-4 text-primary-foreground sm:inline-flex",
|
|
213
|
-
"aria-hidden": "true",
|
|
214
|
-
children: openAttention > 99 ? "99+" : openAttention
|
|
215
|
-
}),
|
|
216
|
-
/* @__PURE__ */ jsxs("span", {
|
|
217
|
-
className: "sr-only",
|
|
218
|
-
children: [
|
|
219
|
-
", ",
|
|
220
|
-
openAttention,
|
|
221
|
-
" open items"
|
|
222
|
-
]
|
|
223
|
-
})
|
|
224
|
-
] })
|
|
225
|
-
]
|
|
226
|
-
}),
|
|
227
|
-
/* @__PURE__ */ jsx(NavMenu, {
|
|
228
|
-
label: "Manage",
|
|
229
|
-
icon: Settings2,
|
|
230
|
-
links: MANAGE_LINKS,
|
|
231
|
-
pathname,
|
|
232
|
-
align: "end"
|
|
233
|
-
})
|
|
234
|
-
]
|
|
235
|
-
}),
|
|
236
|
-
/* @__PURE__ */ jsxs("div", {
|
|
237
|
-
className: "col-start-2 row-start-1 flex items-center gap-1 md:col-auto md:row-auto md:ml-auto",
|
|
238
|
-
children: [/* @__PURE__ */ jsx(ThemeToggle, {}), /* @__PURE__ */ jsx("button", {
|
|
239
|
-
type: "button",
|
|
240
|
-
onClick: () => void logout(),
|
|
241
|
-
"aria-label": "Log out",
|
|
242
|
-
title: "Log out",
|
|
243
|
-
className: "unstyled inline-flex h-9 w-9 items-center justify-center rounded-lg text-mocha hover:bg-ivory hover:text-sapphire",
|
|
244
|
-
children: /* @__PURE__ */ jsx(LogOut, {
|
|
245
|
-
className: "h-4 w-4",
|
|
246
|
-
"aria-hidden": "true"
|
|
247
|
-
})
|
|
248
|
-
})]
|
|
249
|
-
}),
|
|
250
|
-
logoutError && /* @__PURE__ */ jsx("p", {
|
|
251
|
-
role: "alert",
|
|
252
|
-
className: "col-span-2 m-0 rounded-lg bg-danger/10 px-3 py-2 text-sm text-danger md:absolute md:right-0 md:top-[calc(100%+0.35rem)] md:z-50 md:shadow-baziu-md",
|
|
253
|
-
children: logoutError
|
|
254
|
-
})
|
|
255
|
-
]
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
function NavMenu({ label, icon: Icon, links, pathname, align = "start" }) {
|
|
259
|
-
const active = links.some((link) => pathname === link.href || pathname.startsWith(`${link.href}/`));
|
|
260
|
-
return /* @__PURE__ */ jsxs(DropdownMenu.Root, { children: [/* @__PURE__ */ jsx(DropdownMenu.Trigger, {
|
|
261
|
-
asChild: true,
|
|
262
|
-
children: /* @__PURE__ */ jsxs("button", {
|
|
263
|
-
type: "button",
|
|
264
|
-
className: navButtonClass(active),
|
|
265
|
-
"aria-label": `${label} menu`,
|
|
266
|
-
children: [
|
|
267
|
-
/* @__PURE__ */ jsx(Icon, {
|
|
268
|
-
className: "hidden size-4 shrink-0 sm:block",
|
|
269
|
-
"aria-hidden": "true"
|
|
270
|
-
}),
|
|
271
|
-
/* @__PURE__ */ jsx("span", { children: label }),
|
|
272
|
-
/* @__PURE__ */ jsx(ChevronDown, {
|
|
273
|
-
className: "size-3 shrink-0 text-muted-foreground",
|
|
274
|
-
"aria-hidden": "true"
|
|
275
|
-
})
|
|
276
|
-
]
|
|
277
|
-
})
|
|
278
|
-
}), /* @__PURE__ */ jsx(DropdownMenu.Portal, { children: /* @__PURE__ */ jsxs(DropdownMenu.Content, {
|
|
279
|
-
align,
|
|
280
|
-
sideOffset: 8,
|
|
281
|
-
collisionPadding: 12,
|
|
282
|
-
className: "z-50 w-[min(21rem,calc(100vw-1.5rem))] rounded-xl border border-border bg-popover p-1.5 text-popover-foreground shadow-baziu-lg outline-none data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
283
|
-
children: [/* @__PURE__ */ jsx(DropdownMenu.Label, {
|
|
284
|
-
className: "px-2.5 pb-1 pt-1 text-xs font-semibold uppercase tracking-[0.1em] text-muted-foreground",
|
|
285
|
-
children: label
|
|
286
|
-
}), links.map((link) => {
|
|
287
|
-
const ItemIcon = link.icon;
|
|
288
|
-
const itemActive = pathname === link.href || pathname.startsWith(`${link.href}/`);
|
|
289
|
-
return /* @__PURE__ */ jsx(DropdownMenu.Item, {
|
|
290
|
-
asChild: true,
|
|
291
|
-
children: /* @__PURE__ */ jsxs("a", {
|
|
292
|
-
href: link.href,
|
|
293
|
-
"aria-current": itemActive ? "page" : void 0,
|
|
294
|
-
className: `flex cursor-pointer items-start gap-3 rounded-lg px-2.5 py-2.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground ${itemActive ? "bg-accent/70 text-accent-foreground" : "text-foreground"}`,
|
|
295
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
296
|
-
className: "mt-0.5 flex size-7 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground",
|
|
297
|
-
children: /* @__PURE__ */ jsx(ItemIcon, {
|
|
298
|
-
className: "size-3.5",
|
|
299
|
-
"aria-hidden": "true"
|
|
300
|
-
})
|
|
301
|
-
}), /* @__PURE__ */ jsxs("span", {
|
|
302
|
-
className: "min-w-0 flex-1",
|
|
303
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
304
|
-
className: "block text-sm font-semibold",
|
|
305
|
-
children: link.label
|
|
306
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
307
|
-
className: "mt-0.5 block text-xs leading-5 text-muted-foreground",
|
|
308
|
-
children: link.description
|
|
309
|
-
})]
|
|
310
|
-
})]
|
|
311
|
-
})
|
|
312
|
-
}, link.href);
|
|
313
|
-
})]
|
|
314
|
-
}) })] });
|
|
315
|
-
}
|
|
316
|
-
function navButtonClass(active) {
|
|
317
|
-
return `unstyled inline-flex h-9 shrink-0 items-center justify-center gap-1.5 rounded-lg border px-2 text-sm font-semibold transition-colors sm:px-2.5 ${active ? "border-sapphire-light bg-sapphire-glow text-sapphire shadow-baziu-sm" : "border-transparent text-mocha hover:border-frost hover:bg-ivory hover:text-sapphire"}`;
|
|
318
|
-
}
|
|
319
|
-
//#endregion
|
|
320
|
-
//#region src/lib/auth.ts
|
|
321
|
-
var fetchAuthState = createServerFn({ method: "GET" }).handler(createSsrRpc("a5d3825fc69573bb55bab6df578c750ebb0240dd394c3acee3adea02918a5dc2"));
|
|
322
|
-
/** Pages reachable without a session. */
|
|
323
|
-
var PUBLIC_PATHS = new Set(["/login"]);
|
|
324
|
-
var SETUP_OPEN_PREFIXES = ["/welcome", "/config"];
|
|
325
|
-
function isSetupOpen(path) {
|
|
326
|
-
return SETUP_OPEN_PREFIXES.some((prefix) => path === prefix || path.startsWith(`${prefix}/`));
|
|
327
|
-
}
|
|
328
|
-
//#endregion
|
|
329
|
-
//#region src/styles.css?url
|
|
330
|
-
var styles_default = "/assets/styles-xUnZ-ep_.css";
|
|
331
|
-
//#endregion
|
|
332
|
-
//#region src/routes/__root.tsx
|
|
333
|
-
var THEME_INIT_SCRIPT = `(function(){try{var t=localStorage.getItem('baziu-theme');var sd=window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches;var d=t==='dark'||((t===null||t==='system')&&sd);document.documentElement.classList.toggle('dark',d);}catch(e){}})();`;
|
|
334
|
-
var Route$3 = createRootRoute({
|
|
335
|
-
beforeLoad: async ({ location }) => {
|
|
336
|
-
const path = location.pathname;
|
|
337
|
-
if (PUBLIC_PATHS.has(path)) return;
|
|
338
|
-
if (path.startsWith("/api/")) return;
|
|
339
|
-
const auth = await fetchAuthState();
|
|
340
|
-
if (!auth.authed) throw redirect({ to: "/login" });
|
|
341
|
-
if (!isSetupOpen(path) && !auth.setupComplete) throw redirect({ to: "/welcome" });
|
|
342
|
-
},
|
|
343
|
-
head: () => ({
|
|
344
|
-
meta: [
|
|
345
|
-
{ charSet: "utf-8" },
|
|
346
|
-
{
|
|
347
|
-
name: "viewport",
|
|
348
|
-
content: "width=device-width, initial-scale=1"
|
|
349
|
-
},
|
|
350
|
-
{ title: "bazilion" }
|
|
351
|
-
],
|
|
352
|
-
links: [{
|
|
353
|
-
rel: "icon",
|
|
354
|
-
type: "image/svg+xml",
|
|
355
|
-
href: "/baziu.svg"
|
|
356
|
-
}, {
|
|
357
|
-
rel: "stylesheet",
|
|
358
|
-
href: styles_default
|
|
359
|
-
}]
|
|
360
|
-
}),
|
|
361
|
-
component: RootComponent,
|
|
362
|
-
notFoundComponent: NotFound
|
|
363
|
-
});
|
|
364
|
-
function NotFound() {
|
|
365
|
-
const pathname = useRouterState({ select: (s) => s.location.pathname });
|
|
366
|
-
return /* @__PURE__ */ jsx("div", {
|
|
367
|
-
className: "mx-auto max-w-2xl",
|
|
368
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
369
|
-
className: "card",
|
|
370
|
-
children: [
|
|
371
|
-
/* @__PURE__ */ jsx("h1", { children: "Not found" }),
|
|
372
|
-
/* @__PURE__ */ jsxs("p", {
|
|
373
|
-
className: "muted my-3",
|
|
374
|
-
children: [
|
|
375
|
-
"Nothing lives at ",
|
|
376
|
-
/* @__PURE__ */ jsx("code", { children: pathname }),
|
|
377
|
-
"."
|
|
378
|
-
]
|
|
379
|
-
}),
|
|
380
|
-
/* @__PURE__ */ jsx(Link, {
|
|
381
|
-
to: "/",
|
|
382
|
-
children: "Back to home"
|
|
383
|
-
})
|
|
384
|
-
]
|
|
385
|
-
})
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
|
-
function RootComponent() {
|
|
389
|
-
const pathname = useRouterState({ select: (s) => s.location.pathname });
|
|
390
|
-
const isLogin = pathname === "/login";
|
|
391
|
-
const isWorkspace = pathname === "/";
|
|
392
|
-
return /* @__PURE__ */ jsxs("html", {
|
|
393
|
-
lang: "en",
|
|
394
|
-
"data-layout": isWorkspace ? "workspace" : "page",
|
|
395
|
-
suppressHydrationWarning: true,
|
|
396
|
-
children: [/* @__PURE__ */ jsxs("head", { children: [/* @__PURE__ */ jsx("script", { dangerouslySetInnerHTML: { __html: THEME_INIT_SCRIPT } }), /* @__PURE__ */ jsx(HeadContent, {})] }), /* @__PURE__ */ jsxs("body", {
|
|
397
|
-
"data-layout": isWorkspace ? "workspace" : "page",
|
|
398
|
-
children: [
|
|
399
|
-
!isLogin && /* @__PURE__ */ jsx("a", {
|
|
400
|
-
href: "#main-content",
|
|
401
|
-
className: "sr-only z-[100] rounded-lg bg-primary px-4 py-2 font-semibold text-primary-foreground focus:not-sr-only focus:fixed focus:left-3 focus:top-3",
|
|
402
|
-
children: "Skip to main content"
|
|
403
|
-
}),
|
|
404
|
-
isLogin ? /* @__PURE__ */ jsx(Outlet, {}) : isWorkspace ? /* @__PURE__ */ jsxs("div", {
|
|
405
|
-
className: "flex h-dvh flex-col",
|
|
406
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
407
|
-
className: "px-3 sm:px-5",
|
|
408
|
-
children: /* @__PURE__ */ jsx(TopNav, {})
|
|
409
|
-
}), /* @__PURE__ */ jsx("main", {
|
|
410
|
-
id: "main-content",
|
|
411
|
-
tabIndex: -1,
|
|
412
|
-
className: "mx-auto min-h-0 w-full max-w-[1600px] flex-1 overflow-hidden px-3 pb-3 sm:px-5 sm:pb-5",
|
|
413
|
-
children: /* @__PURE__ */ jsx(Outlet, {})
|
|
414
|
-
})]
|
|
415
|
-
}) : /* @__PURE__ */ jsxs("div", {
|
|
416
|
-
className: "flex min-h-dvh flex-col",
|
|
417
|
-
children: [
|
|
418
|
-
/* @__PURE__ */ jsx("div", {
|
|
419
|
-
className: "px-3 sm:px-5",
|
|
420
|
-
children: /* @__PURE__ */ jsx(TopNav, {})
|
|
421
|
-
}),
|
|
422
|
-
/* @__PURE__ */ jsx("main", {
|
|
423
|
-
id: "main-content",
|
|
424
|
-
tabIndex: -1,
|
|
425
|
-
className: "mx-auto w-full max-w-[1500px] flex-1 px-4 py-9 sm:px-6 sm:py-12",
|
|
426
|
-
children: /* @__PURE__ */ jsx(Outlet, {})
|
|
427
|
-
}),
|
|
428
|
-
/* @__PURE__ */ jsx("div", {
|
|
429
|
-
className: "px-4 sm:px-6",
|
|
430
|
-
children: /* @__PURE__ */ jsx(Footer, {})
|
|
431
|
-
})
|
|
432
|
-
]
|
|
433
|
-
}),
|
|
434
|
-
/* @__PURE__ */ jsx(Scripts, {})
|
|
435
|
-
]
|
|
436
|
-
})]
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
//#endregion
|
|
440
|
-
//#region src/routes/welcome.tsx
|
|
441
|
-
var $$splitComponentImporter = () => import("./welcome-D0d38Pzx.js");
|
|
442
|
-
var Route$2 = createFileRoute("/welcome")({
|
|
443
|
-
beforeLoad: async () => {
|
|
444
|
-
if ((await fetchAuthState()).setupComplete) throw redirect({ to: "/" });
|
|
445
|
-
},
|
|
446
|
-
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
447
|
-
});
|
|
448
|
-
//#endregion
|
|
449
|
-
//#region src/routes/templates/index.tsx
|
|
450
|
-
var Route$1 = createFileRoute("/templates/")({ beforeLoad: () => {
|
|
451
|
-
throw redirect({ to: "/templates/agents" });
|
|
452
|
-
} });
|
|
453
|
-
//#endregion
|
|
454
|
-
//#region src/routes/api/$.ts
|
|
455
|
-
var HOP_BY_HOP = [
|
|
456
|
-
"connection",
|
|
457
|
-
"keep-alive",
|
|
458
|
-
"proxy-authenticate",
|
|
459
|
-
"proxy-authorization",
|
|
460
|
-
"te",
|
|
461
|
-
"trailer",
|
|
462
|
-
"transfer-encoding",
|
|
463
|
-
"upgrade"
|
|
464
|
-
];
|
|
465
|
-
var STRIP_REQUEST = new Set([
|
|
466
|
-
...HOP_BY_HOP,
|
|
467
|
-
"host",
|
|
468
|
-
"cookie",
|
|
469
|
-
"content-length",
|
|
470
|
-
"forwarded",
|
|
471
|
-
"x-forwarded-for",
|
|
472
|
-
"x-forwarded-host",
|
|
473
|
-
"x-forwarded-proto",
|
|
474
|
-
"x-real-ip"
|
|
475
|
-
]);
|
|
476
|
-
var STRIP_RESPONSE = new Set([...HOP_BY_HOP, "set-cookie"]);
|
|
477
|
-
/**
|
|
478
|
-
* Fits a 25 MB chat attachment sent as base64 JSON and a 50 MB skill ZIP; the daemon applies its
|
|
479
|
-
* own per-route limits. Only a request carrying a credential (the session cookie or a bearer) gets
|
|
480
|
-
* it: the gateway buffers bodies before the daemon authenticates, and an anonymous request can
|
|
481
|
-
* only log in.
|
|
482
|
-
*/
|
|
483
|
-
var MAX_BODY = 64 * 1024 * 1024;
|
|
484
|
-
var MAX_ANONYMOUS_BODY = 64 * 1024;
|
|
485
|
-
/**
|
|
486
|
-
* The request body, buffered (an upstream 401 on a one-shot stream body surfaced as a gateway
|
|
487
|
-
* 500), or null when it is larger than `limit`.
|
|
488
|
-
*/
|
|
489
|
-
async function readBody(request, limit) {
|
|
490
|
-
if (Number(request.headers.get("content-length") ?? 0) > limit) return null;
|
|
491
|
-
const chunks = [];
|
|
492
|
-
if (!request.body) return new Blob(chunks);
|
|
493
|
-
const reader = request.body.getReader();
|
|
494
|
-
let size = 0;
|
|
495
|
-
for (;;) {
|
|
496
|
-
const { done, value } = await reader.read();
|
|
497
|
-
if (done) return new Blob(chunks);
|
|
498
|
-
size += value.byteLength;
|
|
499
|
-
if (size > limit) {
|
|
500
|
-
await reader.cancel("request body exceeds the gateway limit");
|
|
501
|
-
return null;
|
|
502
|
-
}
|
|
503
|
-
chunks.push(value);
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
async function forward(request) {
|
|
507
|
-
const url = new URL(request.url);
|
|
508
|
-
const headers = new Headers();
|
|
509
|
-
for (const [name, value] of request.headers) if (!STRIP_REQUEST.has(name)) headers.set(name, value);
|
|
510
|
-
const origin = publicOriginConfig(process.env.BAZILION_PUBLIC_ORIGIN);
|
|
511
|
-
const cookies = request.headers.get("cookie");
|
|
512
|
-
const session = readCookie(cookies, origin.sessionCookie);
|
|
513
|
-
const forwarded = [origin.sessionCookie, origin.csrfCookie].map((name) => [name, readCookie(cookies, name)]).filter(([, value]) => value).map(([name, value]) => `${name}=${value}`);
|
|
514
|
-
if (forwarded.length > 0) headers.set("cookie", forwarded.join("; "));
|
|
515
|
-
const init = {
|
|
516
|
-
method: request.method,
|
|
517
|
-
headers,
|
|
518
|
-
redirect: "manual",
|
|
519
|
-
signal: request.signal
|
|
520
|
-
};
|
|
521
|
-
if (request.method !== "GET" && request.method !== "HEAD") {
|
|
522
|
-
const body = await readBody(request, Boolean(session) || request.headers.has("authorization") ? MAX_BODY : MAX_ANONYMOUS_BODY);
|
|
523
|
-
if (!body) return new Response("request body too large", { status: 413 });
|
|
524
|
-
init.body = body;
|
|
525
|
-
}
|
|
526
|
-
const upstream = await fetch(`${DAEMON_BASE_URL}${url.pathname}${url.search}`, init);
|
|
527
|
-
const responseHeaders = new Headers();
|
|
528
|
-
for (const [name, value] of upstream.headers) if (!STRIP_RESPONSE.has(name)) responseHeaders.set(name, value);
|
|
529
|
-
for (const value of upstream.headers.getSetCookie()) responseHeaders.append("set-cookie", value);
|
|
530
|
-
return new Response(upstream.body, {
|
|
531
|
-
status: upstream.status,
|
|
532
|
-
statusText: upstream.statusText,
|
|
533
|
-
headers: responseHeaders
|
|
534
|
-
});
|
|
535
|
-
}
|
|
536
|
-
var Route = createFileRoute("/api/$")({ server: { handlers: {
|
|
537
|
-
GET: ({ request }) => forward(request),
|
|
538
|
-
POST: ({ request }) => forward(request),
|
|
539
|
-
PUT: ({ request }) => forward(request),
|
|
540
|
-
PATCH: ({ request }) => forward(request),
|
|
541
|
-
DELETE: ({ request }) => forward(request)
|
|
542
|
-
} } });
|
|
543
|
-
//#endregion
|
|
544
|
-
//#region src/routeTree.gen.ts
|
|
545
|
-
var WelcomeRoute = Route$2.update({
|
|
546
|
-
id: "/welcome",
|
|
547
|
-
path: "/welcome",
|
|
548
|
-
getParentRoute: () => Route$3
|
|
549
|
-
});
|
|
550
|
-
var LoginRoute = Route$4.update({
|
|
551
|
-
id: "/login",
|
|
552
|
-
path: "/login",
|
|
553
|
-
getParentRoute: () => Route$3
|
|
554
|
-
});
|
|
555
|
-
var IndexRoute = Route$5.update({
|
|
556
|
-
id: "/",
|
|
557
|
-
path: "/",
|
|
558
|
-
getParentRoute: () => Route$3
|
|
559
|
-
});
|
|
560
|
-
var TemplatesIndexRoute = Route$1.update({
|
|
561
|
-
id: "/templates/",
|
|
562
|
-
path: "/templates/",
|
|
563
|
-
getParentRoute: () => Route$3
|
|
564
|
-
});
|
|
565
|
-
var TeamsIndexRoute = Route$6.update({
|
|
566
|
-
id: "/teams/",
|
|
567
|
-
path: "/teams/",
|
|
568
|
-
getParentRoute: () => Route$3
|
|
569
|
-
});
|
|
570
|
-
var SkillsIndexRoute = Route$7.update({
|
|
571
|
-
id: "/skills/",
|
|
572
|
-
path: "/skills/",
|
|
573
|
-
getParentRoute: () => Route$3
|
|
574
|
-
});
|
|
575
|
-
var ConfigIndexRoute = Route$8.update({
|
|
576
|
-
id: "/config/",
|
|
577
|
-
path: "/config/",
|
|
578
|
-
getParentRoute: () => Route$3
|
|
579
|
-
});
|
|
580
|
-
var AttentionIndexRoute = Route$9.update({
|
|
581
|
-
id: "/attention/",
|
|
582
|
-
path: "/attention/",
|
|
583
|
-
getParentRoute: () => Route$3
|
|
584
|
-
});
|
|
585
|
-
var AgentsIndexRoute = Route$10.update({
|
|
586
|
-
id: "/agents/",
|
|
587
|
-
path: "/agents/",
|
|
588
|
-
getParentRoute: () => Route$3
|
|
589
|
-
});
|
|
590
|
-
var ConfigTokensRoute = Route$11.update({
|
|
591
|
-
id: "/config/tokens",
|
|
592
|
-
path: "/config/tokens",
|
|
593
|
-
getParentRoute: () => Route$3
|
|
594
|
-
});
|
|
595
|
-
var ConfigServicesRoute = Route$12.update({
|
|
596
|
-
id: "/config/services",
|
|
597
|
-
path: "/config/services",
|
|
598
|
-
getParentRoute: () => Route$3
|
|
599
|
-
});
|
|
600
|
-
var ConfigMcpRoute = Route$13.update({
|
|
601
|
-
id: "/config/mcp",
|
|
602
|
-
path: "/config/mcp",
|
|
603
|
-
getParentRoute: () => Route$3
|
|
604
|
-
});
|
|
605
|
-
var ApiSplatRoute = Route.update({
|
|
606
|
-
id: "/api/$",
|
|
607
|
-
path: "/api/$",
|
|
608
|
-
getParentRoute: () => Route$3
|
|
609
|
-
});
|
|
610
|
-
var TeamsIdRouteRoute = Route$14.update({
|
|
611
|
-
id: "/teams/$id",
|
|
612
|
-
path: "/teams/$id",
|
|
613
|
-
getParentRoute: () => Route$3
|
|
614
|
-
});
|
|
615
|
-
var AgentsIdRouteRoute = Route$15.update({
|
|
616
|
-
id: "/agents/$id",
|
|
617
|
-
path: "/agents/$id",
|
|
618
|
-
getParentRoute: () => Route$3
|
|
619
|
-
});
|
|
620
|
-
var TemplatesTeamsIndexRoute = Route$16.update({
|
|
621
|
-
id: "/templates/teams/",
|
|
622
|
-
path: "/templates/teams/",
|
|
623
|
-
getParentRoute: () => Route$3
|
|
624
|
-
});
|
|
625
|
-
var TemplatesAgentsIndexRoute = Route$17.update({
|
|
626
|
-
id: "/templates/agents/",
|
|
627
|
-
path: "/templates/agents/",
|
|
628
|
-
getParentRoute: () => Route$3
|
|
629
|
-
});
|
|
630
|
-
var TeamsIdIndexRoute = Route$18.update({
|
|
631
|
-
id: "/",
|
|
632
|
-
path: "/",
|
|
633
|
-
getParentRoute: () => TeamsIdRouteRoute
|
|
634
|
-
});
|
|
635
|
-
var AgentsIdIndexRoute = Route$19.update({
|
|
636
|
-
id: "/",
|
|
637
|
-
path: "/",
|
|
638
|
-
getParentRoute: () => AgentsIdRouteRoute
|
|
639
|
-
});
|
|
640
|
-
var TeamsIdReviewRoute = Route$20.update({
|
|
641
|
-
id: "/review",
|
|
642
|
-
path: "/review",
|
|
643
|
-
getParentRoute: () => TeamsIdRouteRoute
|
|
644
|
-
});
|
|
645
|
-
var TeamsIdResultsRoute = Route$21.update({
|
|
646
|
-
id: "/results",
|
|
647
|
-
path: "/results",
|
|
648
|
-
getParentRoute: () => TeamsIdRouteRoute
|
|
649
|
-
});
|
|
650
|
-
var TeamsIdPolicyRoute = Route$22.update({
|
|
651
|
-
id: "/policy",
|
|
652
|
-
path: "/policy",
|
|
653
|
-
getParentRoute: () => TeamsIdRouteRoute
|
|
654
|
-
});
|
|
655
|
-
var TeamsIdMemoryRoute = Route$23.update({
|
|
656
|
-
id: "/memory",
|
|
657
|
-
path: "/memory",
|
|
658
|
-
getParentRoute: () => TeamsIdRouteRoute
|
|
659
|
-
});
|
|
660
|
-
var TeamsIdMembersRoute = Route$24.update({
|
|
661
|
-
id: "/members",
|
|
662
|
-
path: "/members",
|
|
663
|
-
getParentRoute: () => TeamsIdRouteRoute
|
|
664
|
-
});
|
|
665
|
-
var ConfigIntegrationsTelegramRoute = Route$25.update({
|
|
666
|
-
id: "/config/integrations/telegram",
|
|
667
|
-
path: "/config/integrations/telegram",
|
|
668
|
-
getParentRoute: () => Route$3
|
|
669
|
-
});
|
|
670
|
-
var AgentsIdTriggersRoute = Route$26.update({
|
|
671
|
-
id: "/triggers",
|
|
672
|
-
path: "/triggers",
|
|
673
|
-
getParentRoute: () => AgentsIdRouteRoute
|
|
674
|
-
});
|
|
675
|
-
var AgentsIdSettingsRoute = Route$27.update({
|
|
676
|
-
id: "/settings",
|
|
677
|
-
path: "/settings",
|
|
678
|
-
getParentRoute: () => AgentsIdRouteRoute
|
|
679
|
-
});
|
|
680
|
-
var AgentsIdLearningRoute = Route$28.update({
|
|
681
|
-
id: "/learning",
|
|
682
|
-
path: "/learning",
|
|
683
|
-
getParentRoute: () => AgentsIdRouteRoute
|
|
684
|
-
});
|
|
685
|
-
var AgentsIdInboxRoute = Route$29.update({
|
|
686
|
-
id: "/inbox",
|
|
687
|
-
path: "/inbox",
|
|
688
|
-
getParentRoute: () => AgentsIdRouteRoute
|
|
689
|
-
});
|
|
690
|
-
var TemplatesTeamsIdIndexRoute = Route$30.update({
|
|
691
|
-
id: "/templates/teams/$id/",
|
|
692
|
-
path: "/templates/teams/$id/",
|
|
693
|
-
getParentRoute: () => Route$3
|
|
694
|
-
});
|
|
695
|
-
var TemplatesAgentsIdIndexRoute = Route$31.update({
|
|
696
|
-
id: "/templates/agents/$id/",
|
|
697
|
-
path: "/templates/agents/$id/",
|
|
698
|
-
getParentRoute: () => Route$3
|
|
699
|
-
});
|
|
700
|
-
var AgentsIdRouteRouteChildren = {
|
|
701
|
-
AgentsIdInboxRoute,
|
|
702
|
-
AgentsIdLearningRoute,
|
|
703
|
-
AgentsIdSettingsRoute,
|
|
704
|
-
AgentsIdTriggersRoute,
|
|
705
|
-
AgentsIdIndexRoute
|
|
706
|
-
};
|
|
707
|
-
var AgentsIdRouteRouteWithChildren = AgentsIdRouteRoute._addFileChildren(AgentsIdRouteRouteChildren);
|
|
708
|
-
var TeamsIdRouteRouteChildren = {
|
|
709
|
-
TeamsIdMembersRoute,
|
|
710
|
-
TeamsIdMemoryRoute,
|
|
711
|
-
TeamsIdPolicyRoute,
|
|
712
|
-
TeamsIdResultsRoute,
|
|
713
|
-
TeamsIdReviewRoute,
|
|
714
|
-
TeamsIdIndexRoute
|
|
715
|
-
};
|
|
716
|
-
var rootRouteChildren = {
|
|
717
|
-
IndexRoute,
|
|
718
|
-
LoginRoute,
|
|
719
|
-
WelcomeRoute,
|
|
720
|
-
AgentsIdRouteRoute: AgentsIdRouteRouteWithChildren,
|
|
721
|
-
TeamsIdRouteRoute: TeamsIdRouteRoute._addFileChildren(TeamsIdRouteRouteChildren),
|
|
722
|
-
ApiSplatRoute,
|
|
723
|
-
ConfigMcpRoute,
|
|
724
|
-
ConfigServicesRoute,
|
|
725
|
-
ConfigTokensRoute,
|
|
726
|
-
AgentsIndexRoute,
|
|
727
|
-
AttentionIndexRoute,
|
|
728
|
-
ConfigIndexRoute,
|
|
729
|
-
SkillsIndexRoute,
|
|
730
|
-
TeamsIndexRoute,
|
|
731
|
-
TemplatesIndexRoute,
|
|
732
|
-
ConfigIntegrationsTelegramRoute,
|
|
733
|
-
TemplatesAgentsIndexRoute,
|
|
734
|
-
TemplatesTeamsIndexRoute,
|
|
735
|
-
TemplatesAgentsIdIndexRoute,
|
|
736
|
-
TemplatesTeamsIdIndexRoute
|
|
737
|
-
};
|
|
738
|
-
var routeTree = Route$3._addFileChildren(rootRouteChildren)._addFileTypes();
|
|
739
|
-
//#endregion
|
|
740
|
-
//#region src/router.tsx
|
|
741
|
-
function getRouter() {
|
|
742
|
-
return createRouter({
|
|
743
|
-
routeTree,
|
|
744
|
-
scrollRestoration: true,
|
|
745
|
-
defaultPreload: "intent",
|
|
746
|
-
defaultErrorComponent: RouteErrorState,
|
|
747
|
-
defaultPendingComponent: RoutePendingState
|
|
748
|
-
});
|
|
749
|
-
}
|
|
750
|
-
//#endregion
|
|
751
|
-
export { getRouter };
|