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,12 +0,0 @@
|
|
|
1
|
-
import { n as createServerFn } from "../server.js";
|
|
2
|
-
import { t as createSsrRpc } from "./createSsrRpc-6LHNEsSK.js";
|
|
3
|
-
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
|
-
//#region src/routes/config/index.tsx
|
|
5
|
-
var $$splitComponentImporter = () => import("./config-BNEgu7WG.js");
|
|
6
|
-
var fetchProvidersData = createServerFn({ method: "GET" }).handler(createSsrRpc("b18a227687dba45b99ea5a2ac7a5bf8efcd9bc54387bc279cd87510fd2f83f7e"));
|
|
7
|
-
var Route = createFileRoute("/config/")({
|
|
8
|
-
loader: () => fetchProvidersData(),
|
|
9
|
-
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
10
|
-
});
|
|
11
|
-
//#endregion
|
|
12
|
-
export { Route as t };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { n as createServerFn } from "../server.js";
|
|
2
|
-
import { t as createServerRpc } from "./createServerRpc-B7Yr1K8i.js";
|
|
3
|
-
import { n as daemonClient } from "./daemon-client-DL2ik2Em.js";
|
|
4
|
-
//#region src/routes/config/index.tsx?tss-serverfn-split
|
|
5
|
-
var fetchProvidersData_createServerFn_handler = createServerRpc({
|
|
6
|
-
id: "b18a227687dba45b99ea5a2ac7a5bf8efcd9bc54387bc279cd87510fd2f83f7e",
|
|
7
|
-
name: "fetchProvidersData",
|
|
8
|
-
filename: "src/routes/config/index.tsx"
|
|
9
|
-
}, (opts) => fetchProvidersData.__executeServer(opts));
|
|
10
|
-
var fetchProvidersData = createServerFn({ method: "GET" }).handler(fetchProvidersData_createServerFn_handler, async () => {
|
|
11
|
-
const c = daemonClient();
|
|
12
|
-
const [{ providers }, openaiCodex, health] = await Promise.all([
|
|
13
|
-
c.get("/api/config/providers"),
|
|
14
|
-
c.get("/api/auth/openai"),
|
|
15
|
-
c.get("/api/health/details")
|
|
16
|
-
]);
|
|
17
|
-
return {
|
|
18
|
-
providers,
|
|
19
|
-
openaiCodex,
|
|
20
|
-
runtime: health.shellSecurity,
|
|
21
|
-
readiness: { ok: health.ok }
|
|
22
|
-
};
|
|
23
|
-
});
|
|
24
|
-
//#endregion
|
|
25
|
-
export { fetchProvidersData_createServerFn_handler };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { i as getServerFnById, r as TSS_SERVER_FUNCTION } from "../server.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/@tanstack+start-server-core@1.169.17/node_modules/@tanstack/start-server-core/dist/esm/createSsrRpc.js
|
|
3
|
-
var createSsrRpc = (functionId) => {
|
|
4
|
-
const url = "/_serverFn/" + functionId;
|
|
5
|
-
const serverFnMeta = { id: functionId };
|
|
6
|
-
const fn = async (...args) => {
|
|
7
|
-
return (await getServerFnById(functionId, { origin: "server" }))(...args);
|
|
8
|
-
};
|
|
9
|
-
return Object.assign(fn, {
|
|
10
|
-
url,
|
|
11
|
-
serverFnMeta,
|
|
12
|
-
[TSS_SERVER_FUNCTION]: true
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
//#endregion
|
|
16
|
-
export { createSsrRpc as t };
|
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
import { i as errorMessage, n as api, o as Button } from "./api-WWxPqx67.js";
|
|
2
|
-
import { t as Route } from "./inbox-Dle24AfV.js";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import { getRouteApi, useRouter } from "@tanstack/react-router";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
//#region src/routes/agents/$id/inbox.tsx?tsr-split=component
|
|
7
|
-
var agentRoute = getRouteApi("/agents/$id");
|
|
8
|
-
function decodeText(payload) {
|
|
9
|
-
try {
|
|
10
|
-
const parsed = JSON.parse(payload);
|
|
11
|
-
if (typeof parsed.text === "string") return parsed.text;
|
|
12
|
-
} catch {}
|
|
13
|
-
return payload;
|
|
14
|
-
}
|
|
15
|
-
function InboxPage() {
|
|
16
|
-
const { agent } = agentRoute.useLoaderData();
|
|
17
|
-
const { messages, unreadCount, selected, agentNames, senders, loopBreaks } = Route.useLoaderData();
|
|
18
|
-
const router = useRouter();
|
|
19
|
-
const [markError, setMarkError] = useState(null);
|
|
20
|
-
const unreadOnly = Route.useSearch().unread === 1;
|
|
21
|
-
const misaddressed = Boolean(selected && selected.toAgentId !== agent.id);
|
|
22
|
-
const inbox = `/agents/${encodeURIComponent(agent.id)}/inbox`;
|
|
23
|
-
const label = (id) => agentNames[id] ? `${agentNames[id]} (${id.slice(0, 8)})` : id.slice(0, 8);
|
|
24
|
-
const filterClass = (active) => `-mb-px border-b-2 px-3 py-1.5 text-sm ${active ? "border-primary font-semibold text-primary" : "border-transparent text-muted-foreground"}`;
|
|
25
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
26
|
-
className: "grid grid-cols-1 gap-6 md:grid-cols-[360px_1fr]",
|
|
27
|
-
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("div", {
|
|
28
|
-
className: "mb-3 flex items-center gap-1 border-b",
|
|
29
|
-
children: [
|
|
30
|
-
/* @__PURE__ */ jsx("a", {
|
|
31
|
-
href: inbox,
|
|
32
|
-
className: filterClass(!unreadOnly),
|
|
33
|
-
children: "all"
|
|
34
|
-
}),
|
|
35
|
-
/* @__PURE__ */ jsx("a", {
|
|
36
|
-
href: `${inbox}?unread=1`,
|
|
37
|
-
className: filterClass(unreadOnly),
|
|
38
|
-
children: "unread"
|
|
39
|
-
}),
|
|
40
|
-
/* @__PURE__ */ jsxs("span", {
|
|
41
|
-
className: "ml-auto text-xs text-muted-foreground",
|
|
42
|
-
children: ["unread: ", unreadCount]
|
|
43
|
-
})
|
|
44
|
-
]
|
|
45
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
46
|
-
className: "max-h-[640px] overflow-y-auto rounded-lg border bg-card",
|
|
47
|
-
children: messages.length === 0 ? /* @__PURE__ */ jsx("div", {
|
|
48
|
-
className: "p-6 text-center italic text-muted-foreground",
|
|
49
|
-
children: unreadOnly ? "no unread messages" : "inbox empty"
|
|
50
|
-
}) : messages.map((message) => {
|
|
51
|
-
const text = decodeText(message.payload);
|
|
52
|
-
const unread = message.readAt === null;
|
|
53
|
-
return /* @__PURE__ */ jsxs("a", {
|
|
54
|
-
href: `${inbox}${unreadOnly ? `?unread=1&id=${message.id}` : `?id=${message.id}`}`,
|
|
55
|
-
className: `block border-b px-3 py-2 text-sm last:border-0 hover:bg-accent/30 ${selected?.id === message.id ? "bg-accent/40" : ""} ${unread ? "font-medium" : ""}`,
|
|
56
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
57
|
-
className: "flex justify-between text-xs text-muted-foreground",
|
|
58
|
-
children: [/* @__PURE__ */ jsxs("span", {
|
|
59
|
-
className: "font-mono",
|
|
60
|
-
children: [
|
|
61
|
-
unread && /* @__PURE__ */ jsx("span", { className: "mr-1.5 inline-block h-1.5 w-1.5 rounded-full bg-primary align-middle" }),
|
|
62
|
-
"from ",
|
|
63
|
-
label(message.fromAgentId)
|
|
64
|
-
]
|
|
65
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
66
|
-
className: "font-mono",
|
|
67
|
-
children: new Date(message.createdAt).toLocaleString()
|
|
68
|
-
})]
|
|
69
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
70
|
-
className: "mt-0.5 truncate text-foreground",
|
|
71
|
-
children: text.length > 80 ? `${text.slice(0, 80)}…` : text
|
|
72
|
-
})]
|
|
73
|
-
}, message.id);
|
|
74
|
-
})
|
|
75
|
-
})] }), /* @__PURE__ */ jsxs("div", { children: [
|
|
76
|
-
selected && !misaddressed && /* @__PURE__ */ jsxs("div", {
|
|
77
|
-
className: "mb-4 rounded-lg border bg-card p-5",
|
|
78
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
79
|
-
className: "mb-2 space-y-0.5 font-mono text-xs text-muted-foreground",
|
|
80
|
-
children: [
|
|
81
|
-
/* @__PURE__ */ jsxs("div", { children: ["id: ", /* @__PURE__ */ jsx("code", { children: selected.id })] }),
|
|
82
|
-
/* @__PURE__ */ jsxs("div", { children: ["from: ", /* @__PURE__ */ jsx("code", { children: label(selected.fromAgentId) })] }),
|
|
83
|
-
/* @__PURE__ */ jsxs("div", { children: ["received: ", new Date(selected.createdAt).toLocaleString()] }),
|
|
84
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
85
|
-
"read: ",
|
|
86
|
-
selected.readAt ? new Date(selected.readAt).toLocaleString() : "(unread)",
|
|
87
|
-
!selected.readAt && /* @__PURE__ */ jsx(Button, {
|
|
88
|
-
variant: "ghost",
|
|
89
|
-
className: "ml-2",
|
|
90
|
-
onClick: async () => {
|
|
91
|
-
setMarkError(null);
|
|
92
|
-
try {
|
|
93
|
-
await api(`/api/messages/${encodeURIComponent(selected.id)}`, {
|
|
94
|
-
method: "PATCH",
|
|
95
|
-
body: { read: true }
|
|
96
|
-
});
|
|
97
|
-
await router.invalidate();
|
|
98
|
-
} catch (cause) {
|
|
99
|
-
setMarkError(errorMessage(cause));
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
children: "Mark read"
|
|
103
|
-
}),
|
|
104
|
-
markError && /* @__PURE__ */ jsx("span", {
|
|
105
|
-
role: "alert",
|
|
106
|
-
className: "ml-2 text-danger",
|
|
107
|
-
children: markError
|
|
108
|
-
})
|
|
109
|
-
] }),
|
|
110
|
-
selected.replyTo && /* @__PURE__ */ jsxs("div", { children: ["reply to: ", /* @__PURE__ */ jsx("code", { children: selected.replyTo })] })
|
|
111
|
-
]
|
|
112
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
113
|
-
className: "whitespace-pre-wrap break-words border-t pt-3 font-mono text-sm",
|
|
114
|
-
children: decodeText(selected.payload)
|
|
115
|
-
})]
|
|
116
|
-
}),
|
|
117
|
-
misaddressed && /* @__PURE__ */ jsx("div", {
|
|
118
|
-
className: "mb-4 rounded-lg border bg-card p-5 text-muted-foreground",
|
|
119
|
-
children: "This message is not addressed to this Agent."
|
|
120
|
-
}),
|
|
121
|
-
/* @__PURE__ */ jsxs("p", {
|
|
122
|
-
className: "text-xs text-muted-foreground",
|
|
123
|
-
children: [
|
|
124
|
-
"Agents exchange messages with their ",
|
|
125
|
-
/* @__PURE__ */ jsx("code", {
|
|
126
|
-
className: "font-mono",
|
|
127
|
-
children: "send_message"
|
|
128
|
-
}),
|
|
129
|
-
" tool; an idle recipient picks up unread mail on the next scheduler tick."
|
|
130
|
-
]
|
|
131
|
-
}),
|
|
132
|
-
/* @__PURE__ */ jsx(SendMessageForm, {
|
|
133
|
-
agentId: agent.id,
|
|
134
|
-
senders,
|
|
135
|
-
onSent: () => router.invalidate()
|
|
136
|
-
}),
|
|
137
|
-
/* @__PURE__ */ jsxs("div", {
|
|
138
|
-
className: "mt-6 rounded-lg border bg-card p-4",
|
|
139
|
-
children: [/* @__PURE__ */ jsx("h2", {
|
|
140
|
-
className: "mb-2 font-serif text-lg text-foreground",
|
|
141
|
-
children: "Loop circuit breaker"
|
|
142
|
-
}), loopBreaks.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
143
|
-
className: "text-xs text-muted-foreground",
|
|
144
|
-
children: "No agent-message chains stopped."
|
|
145
|
-
}) : /* @__PURE__ */ jsx("div", {
|
|
146
|
-
className: "space-y-3",
|
|
147
|
-
children: loopBreaks.map((event) => /* @__PURE__ */ jsxs("div", {
|
|
148
|
-
className: "border-t pt-3 text-xs first:border-0 first:pt-0",
|
|
149
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
150
|
-
className: "font-mono text-foreground",
|
|
151
|
-
children: [
|
|
152
|
-
label(event.fromAgentId),
|
|
153
|
-
" → ",
|
|
154
|
-
label(event.toAgentId)
|
|
155
|
-
]
|
|
156
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
157
|
-
className: "mt-1 text-muted-foreground",
|
|
158
|
-
children: [
|
|
159
|
-
"stopped hop ",
|
|
160
|
-
event.attemptedHop,
|
|
161
|
-
" at limit ",
|
|
162
|
-
event.maxHops,
|
|
163
|
-
" · chain",
|
|
164
|
-
" ",
|
|
165
|
-
/* @__PURE__ */ jsx("code", { children: event.causalChainId.slice(0, 8) }),
|
|
166
|
-
" ·",
|
|
167
|
-
" ",
|
|
168
|
-
new Date(event.createdAt).toLocaleString()
|
|
169
|
-
]
|
|
170
|
-
})]
|
|
171
|
-
}, event.id))
|
|
172
|
-
})]
|
|
173
|
-
})
|
|
174
|
-
] })]
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
function SendMessageForm({ agentId, senders, onSent }) {
|
|
178
|
-
const [from, setFrom] = useState(senders[0]?.id ?? "");
|
|
179
|
-
const [text, setText] = useState("");
|
|
180
|
-
const [error, setError] = useState(null);
|
|
181
|
-
const [submitting, setSubmitting] = useState(false);
|
|
182
|
-
if (senders.length === 0) return null;
|
|
183
|
-
async function submit(event) {
|
|
184
|
-
event.preventDefault();
|
|
185
|
-
setError(null);
|
|
186
|
-
setSubmitting(true);
|
|
187
|
-
try {
|
|
188
|
-
const body = {
|
|
189
|
-
from,
|
|
190
|
-
payload: { text }
|
|
191
|
-
};
|
|
192
|
-
await api(`/api/agents/${encodeURIComponent(agentId)}/messages`, { body });
|
|
193
|
-
setText("");
|
|
194
|
-
onSent();
|
|
195
|
-
} catch (cause) {
|
|
196
|
-
setError(errorMessage(cause));
|
|
197
|
-
} finally {
|
|
198
|
-
setSubmitting(false);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
return /* @__PURE__ */ jsxs("form", {
|
|
202
|
-
onSubmit: (event) => void submit(event),
|
|
203
|
-
className: "mt-6 rounded-lg border bg-card p-4",
|
|
204
|
-
children: [
|
|
205
|
-
/* @__PURE__ */ jsx("h2", {
|
|
206
|
-
className: "mb-2 font-serif text-lg text-foreground",
|
|
207
|
-
children: "Send a message to this Agent"
|
|
208
|
-
}),
|
|
209
|
-
/* @__PURE__ */ jsxs("label", { children: ["From", /* @__PURE__ */ jsx("select", {
|
|
210
|
-
value: from,
|
|
211
|
-
onChange: (event) => setFrom(event.target.value),
|
|
212
|
-
children: senders.map((sender) => /* @__PURE__ */ jsxs("option", {
|
|
213
|
-
value: sender.id,
|
|
214
|
-
children: [
|
|
215
|
-
sender.name,
|
|
216
|
-
" (",
|
|
217
|
-
sender.id.slice(0, 8),
|
|
218
|
-
")"
|
|
219
|
-
]
|
|
220
|
-
}, sender.id))
|
|
221
|
-
})] }),
|
|
222
|
-
/* @__PURE__ */ jsxs("label", { children: ["Message", /* @__PURE__ */ jsx("textarea", {
|
|
223
|
-
required: true,
|
|
224
|
-
value: text,
|
|
225
|
-
onChange: (event) => setText(event.target.value),
|
|
226
|
-
className: "min-h-[80px] font-mono text-[0.9em]"
|
|
227
|
-
})] }),
|
|
228
|
-
/* @__PURE__ */ jsxs("div", {
|
|
229
|
-
className: "mt-3 flex items-center gap-3",
|
|
230
|
-
children: [/* @__PURE__ */ jsx(Button, {
|
|
231
|
-
variant: "primary",
|
|
232
|
-
type: "submit",
|
|
233
|
-
disabled: submitting,
|
|
234
|
-
children: submitting ? "Sending…" : "Send"
|
|
235
|
-
}), error && /* @__PURE__ */ jsx("span", {
|
|
236
|
-
role: "alert",
|
|
237
|
-
className: "text-[0.85em] text-danger",
|
|
238
|
-
children: error
|
|
239
|
-
})]
|
|
240
|
-
})
|
|
241
|
-
]
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
//#endregion
|
|
245
|
-
export { InboxPage as component };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { n as createServerFn } from "../server.js";
|
|
2
|
-
import { t as createServerRpc } from "./createServerRpc-B7Yr1K8i.js";
|
|
3
|
-
import { n as daemonClient, r as ApiClientError } from "./daemon-client-DL2ik2Em.js";
|
|
4
|
-
//#region src/routes/agents/$id/inbox.tsx?tss-serverfn-split
|
|
5
|
-
var fetchInbox_createServerFn_handler = createServerRpc({
|
|
6
|
-
id: "2cd8c6ec40e2e2d9518b5f127a518ecd83a2222d85665cc61d5144bcf59ed4fb",
|
|
7
|
-
name: "fetchInbox",
|
|
8
|
-
filename: "src/routes/agents/$id/inbox.tsx"
|
|
9
|
-
}, (opts) => fetchInbox.__executeServer(opts));
|
|
10
|
-
var fetchInbox = createServerFn({ method: "GET" }).validator((data) => data).handler(fetchInbox_createServerFn_handler, async ({ data }) => {
|
|
11
|
-
const client = daemonClient();
|
|
12
|
-
const agent = `/api/agents/${encodeURIComponent(data.id)}`;
|
|
13
|
-
const [list, unread, agents, loopBreaks] = await Promise.all([
|
|
14
|
-
client.get(`${agent}/messages${data.unreadOnly ? "?unread=1" : ""}`),
|
|
15
|
-
client.get(`${agent}/messages?unread=1`),
|
|
16
|
-
client.get("/api/agents?includeArchived=true"),
|
|
17
|
-
client.get(`${agent}/loop-breaks?limit=10`)
|
|
18
|
-
]);
|
|
19
|
-
let selected = null;
|
|
20
|
-
if (data.selectedId) try {
|
|
21
|
-
selected = await client.get(`/api/messages/${encodeURIComponent(data.selectedId)}`);
|
|
22
|
-
} catch (error) {
|
|
23
|
-
if (!(error instanceof ApiClientError) || error.status !== 404) throw error;
|
|
24
|
-
}
|
|
25
|
-
return {
|
|
26
|
-
messages: [...list.messages].reverse(),
|
|
27
|
-
unreadCount: unread.messages.length,
|
|
28
|
-
selected,
|
|
29
|
-
agentNames: Object.fromEntries(agents.map((a) => [a.id, a.name])),
|
|
30
|
-
senders: agents.filter((a) => a.status !== "archived" && a.id !== data.id).map((a) => ({
|
|
31
|
-
id: a.id,
|
|
32
|
-
name: a.name
|
|
33
|
-
})),
|
|
34
|
-
loopBreaks: loopBreaks.events
|
|
35
|
-
};
|
|
36
|
-
});
|
|
37
|
-
//#endregion
|
|
38
|
-
export { fetchInbox_createServerFn_handler };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { n as createServerFn } from "../server.js";
|
|
2
|
-
import { t as createSsrRpc } from "./createSsrRpc-6LHNEsSK.js";
|
|
3
|
-
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
|
-
//#region src/routes/agents/$id/inbox.tsx
|
|
5
|
-
var $$splitComponentImporter = () => import("./inbox-4Vj5jTT8.js");
|
|
6
|
-
var fetchInbox = createServerFn({ method: "GET" }).validator((data) => data).handler(createSsrRpc("2cd8c6ec40e2e2d9518b5f127a518ecd83a2222d85665cc61d5144bcf59ed4fb"));
|
|
7
|
-
var Route = createFileRoute("/agents/$id/inbox")({
|
|
8
|
-
validateSearch: (search) => ({
|
|
9
|
-
unread: search.unread === 1 ? 1 : void 0,
|
|
10
|
-
id: typeof search.id === "string" ? search.id : void 0
|
|
11
|
-
}),
|
|
12
|
-
loaderDeps: ({ search }) => ({
|
|
13
|
-
unreadOnly: search.unread === 1,
|
|
14
|
-
selectedId: search.id ?? ""
|
|
15
|
-
}),
|
|
16
|
-
loader: ({ params, deps }) => fetchInbox({ data: {
|
|
17
|
-
id: params.id,
|
|
18
|
-
...deps
|
|
19
|
-
} }),
|
|
20
|
-
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
21
|
-
});
|
|
22
|
-
//#endregion
|
|
23
|
-
export { Route as t };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { n as createServerFn } from "../server.js";
|
|
2
|
-
import { t as createSsrRpc } from "./createSsrRpc-6LHNEsSK.js";
|
|
3
|
-
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
|
-
//#region src/routes/agents/$id/learning.tsx
|
|
5
|
-
var $$splitComponentImporter = () => import("./learning-CBWFEnhg.js");
|
|
6
|
-
var fetchLearning = createServerFn({ method: "GET" }).validator((data) => data).handler(createSsrRpc("fcdd0f08b635c7c501caa840d01d1376ace6683e26cc5ac7dead28d7870f98b9"));
|
|
7
|
-
var Route = createFileRoute("/agents/$id/learning")({
|
|
8
|
-
loader: ({ params }) => fetchLearning({ data: { id: params.id } }),
|
|
9
|
-
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
10
|
-
});
|
|
11
|
-
//#endregion
|
|
12
|
-
export { Route as t };
|
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
import { i as REASONING_LEVELS } from "./entities-Dn2xzKIw.js";
|
|
2
|
-
import { i as errorMessage, n as api, o as Button } from "./api-WWxPqx67.js";
|
|
3
|
-
import { n as ItemList, o as SectionCard, r as ItemRow } from "./Page-CMSYKXWJ.js";
|
|
4
|
-
import { t as Route } from "./learning-BScq7VbO.js";
|
|
5
|
-
import { t as ConfirmDialog } from "./ConfirmDialog-LdVlEanK.js";
|
|
6
|
-
import { useState } from "react";
|
|
7
|
-
import { getRouteApi, useRouter } from "@tanstack/react-router";
|
|
8
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
//#region src/routes/agents/$id/learning.tsx?tsr-split=component
|
|
10
|
-
var agentRoute = getRouteApi("/agents/$id");
|
|
11
|
-
function LearningPage() {
|
|
12
|
-
const { agent } = agentRoute.useLoaderData();
|
|
13
|
-
const { config, reviews, proposals } = Route.useLoaderData();
|
|
14
|
-
const router = useRouter();
|
|
15
|
-
const [error, setError] = useState(null);
|
|
16
|
-
const [busy, setBusy] = useState(false);
|
|
17
|
-
const base = `/api/agents/${encodeURIComponent(agent.id)}`;
|
|
18
|
-
/** Run one request and reload; the failure shows on the page and is rethrown. */
|
|
19
|
-
const act = async (path, init) => {
|
|
20
|
-
setError(null);
|
|
21
|
-
setBusy(true);
|
|
22
|
-
try {
|
|
23
|
-
await api(path, init);
|
|
24
|
-
await router.invalidate();
|
|
25
|
-
} catch (cause) {
|
|
26
|
-
setError(errorMessage(cause));
|
|
27
|
-
throw cause;
|
|
28
|
-
} finally {
|
|
29
|
-
setBusy(false);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
33
|
-
className: "space-y-6",
|
|
34
|
-
children: [
|
|
35
|
-
error && /* @__PURE__ */ jsx("p", {
|
|
36
|
-
role: "alert",
|
|
37
|
-
className: "err",
|
|
38
|
-
children: error
|
|
39
|
-
}),
|
|
40
|
-
/* @__PURE__ */ jsxs(SectionCard, {
|
|
41
|
-
title: "Reviewed learning",
|
|
42
|
-
description: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
43
|
-
"A review reads at most 8 successful user turns and 40,000 characters with",
|
|
44
|
-
" ",
|
|
45
|
-
config.model ?? "the Agent model",
|
|
46
|
-
" at ",
|
|
47
|
-
config.reasoningLevel,
|
|
48
|
-
" reasoning and proposes at most five lessons. Nothing is applied until you approve it."
|
|
49
|
-
] }),
|
|
50
|
-
children: [/* @__PURE__ */ jsx(ReviewConfigForm, {
|
|
51
|
-
config,
|
|
52
|
-
disabled: busy,
|
|
53
|
-
onSave: (body) => act(`${base}/review-config`, {
|
|
54
|
-
method: "PATCH",
|
|
55
|
-
body
|
|
56
|
-
})
|
|
57
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
58
|
-
className: "mt-4 flex flex-wrap items-center gap-3",
|
|
59
|
-
children: [/* @__PURE__ */ jsx(Button, {
|
|
60
|
-
variant: "primary",
|
|
61
|
-
disabled: busy || agent.status === "archived",
|
|
62
|
-
onClick: () => void act(`${base}/reviews`, { method: "POST" }).catch(() => {}),
|
|
63
|
-
children: "Review now"
|
|
64
|
-
}), !config.enabled && /* @__PURE__ */ jsx("span", {
|
|
65
|
-
className: "text-sm text-muted-foreground",
|
|
66
|
-
children: "Periodic review is off; Review now still works."
|
|
67
|
-
})]
|
|
68
|
-
})]
|
|
69
|
-
}),
|
|
70
|
-
/* @__PURE__ */ jsx(SectionCard, {
|
|
71
|
-
title: "Lesson proposals",
|
|
72
|
-
children: proposals.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
73
|
-
className: "text-muted-foreground",
|
|
74
|
-
children: "No proposals yet. A successful review may also produce none."
|
|
75
|
-
}) : /* @__PURE__ */ jsx("div", {
|
|
76
|
-
className: "grid gap-3",
|
|
77
|
-
children: proposals.map((proposal) => /* @__PURE__ */ jsx(ProposalCard, {
|
|
78
|
-
proposal,
|
|
79
|
-
base: `${base}/lesson-proposals/${encodeURIComponent(proposal.id)}`,
|
|
80
|
-
busy,
|
|
81
|
-
act
|
|
82
|
-
}, proposal.id))
|
|
83
|
-
})
|
|
84
|
-
}),
|
|
85
|
-
/* @__PURE__ */ jsx(SectionCard, {
|
|
86
|
-
title: "Review history",
|
|
87
|
-
children: reviews.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
88
|
-
className: "text-muted-foreground",
|
|
89
|
-
children: "No reviews have been queued."
|
|
90
|
-
}) : /* @__PURE__ */ jsx(ItemList, { children: reviews.map((review) => /* @__PURE__ */ jsx(ItemRow, {
|
|
91
|
-
title: new Date(review.createdAt).toLocaleString(),
|
|
92
|
-
meta: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
93
|
-
/* @__PURE__ */ jsx("code", { children: review.status }),
|
|
94
|
-
/* @__PURE__ */ jsx("span", { children: review.trigger }),
|
|
95
|
-
/* @__PURE__ */ jsxs("span", { children: [review.turnsReviewed, " turns"] }),
|
|
96
|
-
/* @__PURE__ */ jsxs("span", { children: [review.proposalCount, " proposals"] })
|
|
97
|
-
] }),
|
|
98
|
-
children: review.lastError && /* @__PURE__ */ jsx("p", {
|
|
99
|
-
className: "mb-0 mt-1 break-words text-sm text-danger",
|
|
100
|
-
children: review.lastError
|
|
101
|
-
})
|
|
102
|
-
}, review.id)) })
|
|
103
|
-
})
|
|
104
|
-
]
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
function ReviewConfigForm({ config, disabled, onSave }) {
|
|
108
|
-
const [enabled, setEnabled] = useState(config.enabled);
|
|
109
|
-
const [every, setEvery] = useState(config.everyNTurns);
|
|
110
|
-
const [model, setModel] = useState(config.model ?? "");
|
|
111
|
-
const [reasoning, setReasoning] = useState(config.reasoningLevel);
|
|
112
|
-
return /* @__PURE__ */ jsxs("form", {
|
|
113
|
-
onSubmit: (event) => {
|
|
114
|
-
event.preventDefault();
|
|
115
|
-
onSave({
|
|
116
|
-
enabled,
|
|
117
|
-
everyNTurns: every,
|
|
118
|
-
model: model.trim() || null,
|
|
119
|
-
reasoningLevel: reasoning
|
|
120
|
-
}).catch(() => {});
|
|
121
|
-
},
|
|
122
|
-
className: "grid items-end gap-x-3 md:grid-cols-4",
|
|
123
|
-
children: [
|
|
124
|
-
/* @__PURE__ */ jsxs("label", { children: [/* @__PURE__ */ jsx("input", {
|
|
125
|
-
type: "checkbox",
|
|
126
|
-
checked: enabled,
|
|
127
|
-
onChange: (event) => setEnabled(event.target.checked)
|
|
128
|
-
}), "Periodic review"] }),
|
|
129
|
-
/* @__PURE__ */ jsxs("label", { children: ["Every N turns", /* @__PURE__ */ jsx("input", {
|
|
130
|
-
type: "number",
|
|
131
|
-
min: 1,
|
|
132
|
-
max: 100,
|
|
133
|
-
value: every,
|
|
134
|
-
onChange: (event) => setEvery(Number(event.target.value))
|
|
135
|
-
})] }),
|
|
136
|
-
/* @__PURE__ */ jsxs("label", { children: ["Model override", /* @__PURE__ */ jsx("input", {
|
|
137
|
-
value: model,
|
|
138
|
-
placeholder: "the Agent model",
|
|
139
|
-
onChange: (event) => setModel(event.target.value)
|
|
140
|
-
})] }),
|
|
141
|
-
/* @__PURE__ */ jsxs("label", { children: ["Reasoning", /* @__PURE__ */ jsx("select", {
|
|
142
|
-
value: reasoning,
|
|
143
|
-
onChange: (event) => setReasoning(event.target.value),
|
|
144
|
-
children: REASONING_LEVELS.map((level) => /* @__PURE__ */ jsx("option", { children: level }, level))
|
|
145
|
-
})] }),
|
|
146
|
-
/* @__PURE__ */ jsx("div", {
|
|
147
|
-
className: "md:col-span-4",
|
|
148
|
-
children: /* @__PURE__ */ jsx(Button, {
|
|
149
|
-
variant: "primary",
|
|
150
|
-
type: "submit",
|
|
151
|
-
disabled,
|
|
152
|
-
children: "Save learning settings"
|
|
153
|
-
})
|
|
154
|
-
})
|
|
155
|
-
]
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
function ProposalCard({ proposal, base, busy, act }) {
|
|
159
|
-
const [text, setText] = useState(proposal.text);
|
|
160
|
-
const [scope, setScope] = useState(proposal.scope);
|
|
161
|
-
const [confirm, setConfirm] = useState(null);
|
|
162
|
-
const version = { version: proposal.version };
|
|
163
|
-
const summary = proposal.text.length > 54 ? `${proposal.text.slice(0, 51)}…` : proposal.text;
|
|
164
|
-
return /* @__PURE__ */ jsxs("article", {
|
|
165
|
-
className: "rounded-lg border bg-card p-4",
|
|
166
|
-
children: [
|
|
167
|
-
/* @__PURE__ */ jsxs("div", {
|
|
168
|
-
className: "mb-2 flex justify-between gap-2",
|
|
169
|
-
children: [/* @__PURE__ */ jsx("code", { children: proposal.status }), /* @__PURE__ */ jsxs("span", {
|
|
170
|
-
className: "text-xs text-muted-foreground",
|
|
171
|
-
children: ["v", proposal.version]
|
|
172
|
-
})]
|
|
173
|
-
}),
|
|
174
|
-
proposal.status === "pending" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
175
|
-
/* @__PURE__ */ jsxs("label", { children: ["Proposed lesson", /* @__PURE__ */ jsx("textarea", {
|
|
176
|
-
rows: 3,
|
|
177
|
-
value: text,
|
|
178
|
-
onChange: (event) => setText(event.target.value)
|
|
179
|
-
})] }),
|
|
180
|
-
/* @__PURE__ */ jsxs("label", { children: ["Apply the approved lesson to", /* @__PURE__ */ jsxs("select", {
|
|
181
|
-
value: scope,
|
|
182
|
-
onChange: (event) => setScope(event.target.value),
|
|
183
|
-
children: [/* @__PURE__ */ jsx("option", {
|
|
184
|
-
value: "private",
|
|
185
|
-
children: "private Agent behavior"
|
|
186
|
-
}), /* @__PURE__ */ jsx("option", {
|
|
187
|
-
value: "shared",
|
|
188
|
-
children: "shared Team knowledge"
|
|
189
|
-
})]
|
|
190
|
-
})] }),
|
|
191
|
-
scope === "shared" && /* @__PURE__ */ jsx("p", {
|
|
192
|
-
className: "text-xs text-muted-foreground",
|
|
193
|
-
children: "Shared lessons become searchable Team memory. Stable facts about you belong in the Team's USER.md instead."
|
|
194
|
-
}),
|
|
195
|
-
/* @__PURE__ */ jsxs("div", {
|
|
196
|
-
className: "mt-3 flex flex-wrap gap-2",
|
|
197
|
-
children: [
|
|
198
|
-
/* @__PURE__ */ jsx(Button, {
|
|
199
|
-
variant: "ghost",
|
|
200
|
-
disabled: busy,
|
|
201
|
-
onClick: () => void act(base, {
|
|
202
|
-
method: "PATCH",
|
|
203
|
-
body: {
|
|
204
|
-
...version,
|
|
205
|
-
text,
|
|
206
|
-
scope
|
|
207
|
-
}
|
|
208
|
-
}).catch(() => {}),
|
|
209
|
-
children: "Save edit"
|
|
210
|
-
}),
|
|
211
|
-
/* @__PURE__ */ jsx(Button, {
|
|
212
|
-
variant: "primary",
|
|
213
|
-
disabled: busy,
|
|
214
|
-
onClick: () => void act(`${base}/approve`, { body: version }).catch(() => {}),
|
|
215
|
-
children: "Approve"
|
|
216
|
-
}),
|
|
217
|
-
/* @__PURE__ */ jsx(Button, {
|
|
218
|
-
variant: "danger",
|
|
219
|
-
disabled: busy,
|
|
220
|
-
onClick: () => setConfirm("reject"),
|
|
221
|
-
children: "Reject"
|
|
222
|
-
})
|
|
223
|
-
]
|
|
224
|
-
})
|
|
225
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("p", { children: proposal.text }), proposal.status === "approved" && /* @__PURE__ */ jsx("div", {
|
|
226
|
-
className: "mt-3",
|
|
227
|
-
children: /* @__PURE__ */ jsx(Button, {
|
|
228
|
-
variant: "danger",
|
|
229
|
-
disabled: busy,
|
|
230
|
-
onClick: () => setConfirm("revoke"),
|
|
231
|
-
children: "Revoke"
|
|
232
|
-
})
|
|
233
|
-
})] }),
|
|
234
|
-
/* @__PURE__ */ jsxs("div", {
|
|
235
|
-
className: "mt-3 text-xs text-muted-foreground",
|
|
236
|
-
children: [
|
|
237
|
-
"Evidence:",
|
|
238
|
-
" ",
|
|
239
|
-
proposal.evidence.length === 0 ? "none" : /* @__PURE__ */ jsx("ul", {
|
|
240
|
-
className: "mt-1 list-disc pl-5",
|
|
241
|
-
children: proposal.evidence.map((item) => /* @__PURE__ */ jsxs("li", { children: [/* @__PURE__ */ jsxs("code", { children: [
|
|
242
|
-
item.sessionId,
|
|
243
|
-
":",
|
|
244
|
-
item.entryOrdinal
|
|
245
|
-
] }), item.excerpt ? ` — ${item.excerpt}` : " — excerpt unavailable"] }, `${item.sessionId}:${item.entryOrdinal}`))
|
|
246
|
-
})
|
|
247
|
-
]
|
|
248
|
-
}),
|
|
249
|
-
confirm && /* @__PURE__ */ jsx(ConfirmDialog, {
|
|
250
|
-
open: true,
|
|
251
|
-
title: confirm === "reject" ? `Reject “${summary}”?` : `Revoke “${summary}”?`,
|
|
252
|
-
description: confirm === "reject" ? /* @__PURE__ */ jsx("p", { children: "The proposal is marked rejected and never changes the Agent's prompts or Team memory; unsaved edits are discarded. A rejected proposal cannot be edited or approved later." }) : proposal.scope === "shared" ? /* @__PURE__ */ jsx("p", { children: "The lesson note is removed from Team memory, so Team-memory search no longer finds it. The proposal stays in the review history." }) : /* @__PURE__ */ jsx("p", { children: "The lesson is removed from the Agent's future prompts; past conversations are not rewritten. The proposal stays in the review history." }),
|
|
253
|
-
confirmLabel: confirm === "reject" ? "Reject proposal" : "Revoke lesson",
|
|
254
|
-
onOpenChange: (open) => {
|
|
255
|
-
if (!open) setConfirm(null);
|
|
256
|
-
},
|
|
257
|
-
onConfirm: () => act(`${base}/${confirm}`, { body: version })
|
|
258
|
-
})
|
|
259
|
-
]
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
//#endregion
|
|
263
|
-
export { LearningPage as component };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { n as createServerFn } from "../server.js";
|
|
2
|
-
import { t as createServerRpc } from "./createServerRpc-B7Yr1K8i.js";
|
|
3
|
-
import { n as daemonClient } from "./daemon-client-DL2ik2Em.js";
|
|
4
|
-
//#region src/routes/agents/$id/learning.tsx?tss-serverfn-split
|
|
5
|
-
var fetchLearning_createServerFn_handler = createServerRpc({
|
|
6
|
-
id: "fcdd0f08b635c7c501caa840d01d1376ace6683e26cc5ac7dead28d7870f98b9",
|
|
7
|
-
name: "fetchLearning",
|
|
8
|
-
filename: "src/routes/agents/$id/learning.tsx"
|
|
9
|
-
}, (opts) => fetchLearning.__executeServer(opts));
|
|
10
|
-
var fetchLearning = createServerFn({ method: "GET" }).validator((data) => data).handler(fetchLearning_createServerFn_handler, async ({ data }) => {
|
|
11
|
-
const client = daemonClient();
|
|
12
|
-
const agent = `/api/agents/${encodeURIComponent(data.id)}`;
|
|
13
|
-
const [config, reviews, proposals] = await Promise.all([
|
|
14
|
-
client.get(`${agent}/review-config`),
|
|
15
|
-
client.get(`${agent}/reviews`),
|
|
16
|
-
client.get(`${agent}/lesson-proposals`)
|
|
17
|
-
]);
|
|
18
|
-
return {
|
|
19
|
-
config,
|
|
20
|
-
reviews: reviews.reviews,
|
|
21
|
-
proposals: proposals.proposals
|
|
22
|
-
};
|
|
23
|
-
});
|
|
24
|
-
//#endregion
|
|
25
|
-
export { fetchLearning_createServerFn_handler };
|