bazilion 0.25.0 → 0.26.1
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/README.md +41 -140
- package/dist/cli.js +5001 -2
- package/dist/cli.js.map +1 -0
- package/dist/daemon.js +17836 -2
- package/dist/daemon.js.map +1 -0
- package/dist/schema.sql +382 -0
- package/dist/web/client/assets/{AgentAvatar-JYijLvZ2.js → AgentAvatar-DWx-bM6n.js} +1 -1
- package/dist/web/client/assets/ChatPane-DOV_HJg-.js +72 -0
- package/dist/web/client/assets/ConfigPage-Dfu9DzFX.js +1 -0
- package/dist/web/client/assets/ConfirmDialog-536ziJ5P.js +1 -0
- package/dist/web/client/assets/FieldRow-z1JqCdqn.js +1 -0
- package/dist/web/client/assets/ModelSelect-CvOHjUyB.js +1 -0
- package/dist/web/client/assets/ResultCard-X4nTbjYY.js +1 -0
- package/dist/web/client/assets/SectionTabs-DXHzXmmb.js +1 -0
- package/dist/web/client/assets/SkillFindings-8LX6bYf_.js +1 -0
- package/dist/web/client/assets/SkillsPicker-Cr87y_W-.js +1 -0
- package/dist/web/client/assets/SpawnDialog-DoZl-yes.js +1 -0
- package/dist/web/client/assets/SpawnTeamModal-C638hEoN.js +1 -0
- package/dist/web/client/assets/Tabs-D0LgBNIk.js +1 -0
- package/dist/web/client/assets/TeamForm-C-WzvOl4.js +1 -0
- package/dist/web/client/assets/TeamPolicyEditor-CSKBx0oK.js +7 -0
- package/dist/web/client/assets/UnsavedChangesGuard-GC-vzw7h.js +1 -0
- package/dist/web/client/assets/_id-BKLynswT.js +1 -0
- package/dist/web/client/assets/_id-BYM_NORr.js +1 -0
- package/dist/web/client/assets/_id-Cxa98a9m.js +1 -0
- package/dist/web/client/assets/_id-D4hV1U1t.js +1 -0
- package/dist/web/client/assets/agent-actions-CXQCoxKO.js +1 -0
- package/dist/web/client/assets/agents-BxPS1_Bp.js +1 -0
- package/dist/web/client/assets/agents-GozAWW-l.js +1 -0
- package/dist/web/client/assets/attention-Cz9rZcrr.js +1 -0
- package/dist/web/client/assets/chevron-right-CPAb1zac.js +1 -0
- package/dist/web/client/assets/config-9vv9Lipb.js +3 -0
- package/dist/web/client/assets/entities-xVoB-p2j.js +1 -0
- package/dist/web/client/assets/inbox-DHLArXxl.js +1 -0
- package/dist/web/client/assets/index-1YXquAq8.js +52 -0
- package/dist/web/client/assets/jsx-runtime-bzQ4Vb5N.js +1 -0
- package/dist/web/client/assets/learning-PvtXm8Ne.js +1 -0
- package/dist/web/client/assets/login-DIJpNQFo.js +1 -0
- package/dist/web/client/assets/mcp-pKBL0xIf.js +1 -0
- package/dist/web/client/assets/members-DHWsgsEs.js +1 -0
- package/dist/web/client/assets/memory-CEVppPyU.js +1 -0
- package/dist/web/client/assets/plus-BaIRdB10.js +1 -0
- package/dist/web/client/assets/policy-DEh4BLSw.js +1 -0
- package/dist/web/client/assets/preload-helper-eUUcpe2S.js +1 -0
- package/dist/web/client/assets/results-DgJPjEZF.js +1 -0
- package/dist/web/client/assets/review-BbshafTQ.js +1 -0
- package/dist/web/client/assets/route-Ccb8v41z.js +1 -0
- package/dist/web/client/assets/route-D1d6kCEV.js +1 -0
- package/dist/web/client/assets/routes-g7V4ru7T.js +1 -0
- package/dist/web/client/assets/services-B2f7e5jV.js +1 -0
- package/dist/web/client/assets/settings-B6elpcYm.js +1 -0
- package/dist/web/client/assets/skills-CngE7TF8.js +1 -0
- package/dist/web/client/assets/styles-xUnZ-ep_.css +2 -0
- package/dist/web/client/assets/teams-BdJZXOan.js +1 -0
- package/dist/web/client/assets/teams-c496ISsT.js +1 -0
- package/dist/web/client/assets/telegram-B_-hK6EC.js +1 -0
- package/dist/web/client/assets/tokens-CKz8gx4-.js +1 -0
- package/dist/web/client/assets/triggers-DCEPciGW.js +1 -0
- package/dist/web/client/assets/welcome-D-zVOLGA.js +1 -0
- package/dist/web/client/baziu.svg +176 -7
- package/dist/web/server/assets/ChatPane-De_FPEoD.js +1887 -0
- package/dist/web/server/assets/ConfigPage-CGld_wCK.js +28 -0
- package/dist/web/server/assets/ConfirmDialog-LdVlEanK.js +132 -0
- package/dist/web/server/assets/{FieldRow-DPO8x_le.js → FieldRow-Dah2KKqo.js} +8 -15
- package/dist/web/server/assets/ModelSelect-Vwro6OkL.js +43 -0
- package/dist/web/server/assets/{Page-DJNoI4Gn.js → Page-CMSYKXWJ.js} +51 -2
- package/dist/web/server/assets/ResultCard-CZn1w4KA.js +97 -0
- package/dist/web/server/assets/SectionTabs-CqFg9Vwx.js +53 -0
- package/dist/web/server/assets/Sidebar-puq47KyR.js +430 -0
- package/dist/web/server/assets/SkillFindings-Bd6e81Wu.js +46 -0
- package/dist/web/server/assets/SkillsPicker-DlqEfRWh.js +67 -0
- package/dist/web/server/assets/SpawnDialog-BGNaMfFb.js +111 -0
- package/dist/web/server/assets/SpawnTeamModal-C6GbfScI.js +97 -0
- package/dist/web/server/assets/Tabs-BhF41MfQ.js +20 -0
- package/dist/web/server/assets/TeamForm-C93tpn9r.js +96 -0
- package/dist/web/server/assets/TeamPolicyEditor-BHS3J0R9.js +738 -0
- package/dist/web/server/assets/{UnsavedChangesGuard-BfSyMhiD.js → UnsavedChangesGuard-Dm4a27_5.js} +1 -1
- package/dist/web/server/assets/_id-B0x1ffz3.js +12 -0
- package/dist/web/server/assets/_id-BR6tnR6I.js +23 -0
- package/dist/web/server/assets/_id-Bdf_Rg62.js +19 -0
- package/dist/web/server/assets/_id-Bm611NQz.js +13 -0
- package/dist/web/server/assets/{_id-4fEeAcp0.js → _id-ByiXeIPS.js} +9 -8
- package/dist/web/server/assets/_id-D5UCoyES.js +359 -0
- package/dist/web/server/assets/_id-DHx5UmmL.js +12 -0
- package/dist/web/server/assets/_id-DLpGmOVm.js +19 -0
- package/dist/web/server/assets/_id-Y5ctILG2.js +13 -0
- package/dist/web/server/assets/_id-dDA0pdVo.js +54 -0
- package/dist/web/server/assets/_id-lOVnT5sS.js +383 -0
- package/dist/web/server/assets/{_id-BhJCnRR1.js → _id-sW6zXrTP.js} +4 -4
- package/dist/web/server/assets/_tanstack-start-manifest_v-B8u80HjK.js +292 -0
- package/dist/web/server/assets/agent-actions-BBdFVdoa.js +20 -0
- package/dist/web/server/assets/{agents-Cmw-sUUD.js → agents-BK8OmB8g.js} +7 -6
- package/dist/web/server/assets/{agents-DOrzqCXg.js → agents-BNPkidbH.js} +8 -10
- package/dist/web/server/assets/{agents-BitDk_C5.js → agents-Cn9GkXFX.js} +1 -3
- package/dist/web/server/assets/agents-D4tqK1kH.js +131 -0
- package/dist/web/server/assets/agents-DycxHDt8.js +327 -0
- package/dist/web/server/assets/{agents-DmmuOHw8.js → agents-lOqc6VGd.js} +4 -4
- package/dist/web/server/assets/api-WWxPqx67.js +85 -0
- package/dist/web/server/assets/attention-BIm455bC.js +216 -0
- package/dist/web/server/assets/{attention-Cy3Xu-Su.js → attention-DULVjdmF.js} +2 -4
- package/dist/web/server/assets/{attention-CsYqmV0L.js → attention-YWnLKA2E.js} +4 -2
- package/dist/web/server/assets/{auth-DChuQIh4.js → auth-DiN92ydD.js} +7 -8
- package/dist/web/server/assets/{config-0_5yhRKg.js → config-BNEgu7WG.js} +141 -432
- package/dist/web/server/assets/{config-VsmvCulS.js → config-C1VB28se.js} +1 -1
- package/dist/web/server/assets/{config-CpHD812q.js → config-TdVqnqNL.js} +3 -7
- package/dist/web/server/assets/cookies-HnTYjKRp.js +17 -0
- package/dist/web/server/assets/daemon-client-DL2ik2Em.js +146 -0
- package/dist/web/server/assets/entities-Dn2xzKIw.js +16 -0
- package/dist/web/server/assets/inbox-4Vj5jTT8.js +245 -0
- package/dist/web/server/assets/inbox-D4IqUv3l.js +38 -0
- package/dist/web/server/assets/inbox-Dle24AfV.js +23 -0
- package/dist/web/server/assets/learning-BScq7VbO.js +12 -0
- package/dist/web/server/assets/learning-CBWFEnhg.js +263 -0
- package/dist/web/server/assets/{learning-BuL0c1vH.js → learning-DWAKevhF.js} +6 -14
- package/dist/web/server/assets/{login-rDox7PRD.js → login-JoIjlcmu.js} +2 -5
- package/dist/web/server/assets/{login-B_-9L8TU.js → login-VV10kZBl.js} +15 -17
- package/dist/web/server/assets/mcp-B09_O05r.js +250 -0
- package/dist/web/server/assets/{mcp-B8ErRiR_.js → mcp-BwmpNQPN.js} +1 -1
- package/dist/web/server/assets/{mcp-BEdnl_TT.js → mcp-CqdTfXcn.js} +1 -3
- package/dist/web/server/assets/members-B8QBF6TF.js +12 -0
- package/dist/web/server/assets/{members-DFLi2nQg.js → members-DsF02Wp7.js} +2 -2
- package/dist/web/server/assets/members-tWZA9b15.js +36 -0
- package/dist/web/server/assets/memory-BNN0b-0x.js +12 -0
- package/dist/web/server/assets/memory-CTl1E1Rm.js +267 -0
- package/dist/web/server/assets/memory-CV5uCBb2.js +12 -0
- package/dist/web/server/assets/policy-C9M6zV6w.js +79 -0
- package/dist/web/server/assets/policy-h-6NpU3m.js +19 -0
- package/dist/web/server/assets/policy-xEw9X0DK.js +12 -0
- package/dist/web/server/assets/public-origin-BpDkdS5Q.js +34 -0
- package/dist/web/server/assets/results-D3A3UA4d.js +182 -0
- package/dist/web/server/assets/results-D6Ui5S8D.js +12 -0
- package/dist/web/server/assets/results-DWmxvfyn.js +15 -0
- package/dist/web/server/assets/review-CyQky-WQ.js +40 -0
- package/dist/web/server/assets/review-Sq0GGcPV.js +322 -0
- package/dist/web/server/assets/review-XWbSF8cF.js +12 -0
- package/dist/web/server/assets/route-BErtkz6t.js +19 -0
- package/dist/web/server/assets/route-CLoV-An_.js +48 -0
- package/dist/web/server/assets/route-WQ19JkBa.js +19 -0
- package/dist/web/server/assets/route-dEK_2GLj.js +203 -0
- package/dist/web/server/assets/route-iHTkhO81.js +16 -0
- package/dist/web/server/assets/route-zs8uUQtB.js +16 -0
- package/dist/web/server/assets/router-BI9gmY3S.js +751 -0
- package/dist/web/server/assets/routes-081s4n24.js +45 -0
- package/dist/web/server/assets/routes-CWo5WPsr.js +15 -0
- package/dist/web/server/assets/routes-Cqp1ufHm.js +56 -0
- package/dist/web/server/assets/{services-ZeEIgTn0.js → services-BLvAvb8g.js} +1 -1
- package/dist/web/server/assets/{services-UL_2b8PP.js → services-Q9HYQXXB.js} +2 -8
- package/dist/web/server/assets/{services-T8adll3y.js → services-tCfB1B83.js} +21 -38
- package/dist/web/server/assets/settings-CVaGv-xF.js +12 -0
- package/dist/web/server/assets/settings-D9viV-86.js +561 -0
- package/dist/web/server/assets/settings-DaZNZ_CC.js +27 -0
- package/dist/web/server/assets/{skills-D1oy3JAH.js → skills-BZg_txbf.js} +1 -3
- package/dist/web/server/assets/skills-C7fqRPna.js +275 -0
- package/dist/web/server/assets/{skills-kfqhxYmf.js → skills-C_g8IKag.js} +1 -1
- package/dist/web/server/assets/start-DTX6aKCi.js +100 -0
- package/dist/web/server/assets/teams-BHkhnt6b.js +12 -0
- package/dist/web/server/assets/teams-BS-oweRl.js +80 -0
- package/dist/web/server/assets/teams-BSflKBP8.js +108 -0
- package/dist/web/server/assets/teams-CNyB5nM9.js +12 -0
- package/dist/web/server/assets/{teams-BW2ARIvk.js → teams-D4CaU76n.js} +3 -5
- package/dist/web/server/assets/teams-DX2HmKqi.js +21 -0
- package/dist/web/server/assets/{telegram-U9UAdUEx.js → telegram-BUdnc8oF.js} +1 -1
- package/dist/web/server/assets/{telegram-ByHqeAGC.js → telegram-C4v1HhyJ.js} +1 -1
- package/dist/web/server/assets/{telegram-IMfV34-w.js → telegram-CrJiygCX.js} +223 -471
- package/dist/web/server/assets/{tokens-CiThDMwM.js → tokens-B1twAJdd.js} +5 -5
- package/dist/web/server/assets/tokens-DdjEyALj.js +232 -0
- package/dist/web/server/assets/tokens-DqldzPUq.js +14 -0
- package/dist/web/server/assets/triggers-B7LW784F.js +214 -0
- package/dist/web/server/assets/triggers-C5sMCZXv2.js +12 -0
- package/dist/web/server/assets/triggers-DMfVdImD.js +12 -0
- package/dist/web/server/assets/{welcome-BFWKx138.js → welcome-D0d38Pzx.js} +5 -6
- package/dist/web/server/server.js +55 -159
- package/dist/web-server.js +3 -3
- package/dist/worker.js +1692 -6375
- package/dist/worker.js.map +1 -1
- package/package.json +8 -18
- package/dist/browser-keychain.js +0 -83
- package/dist/browser-keychain.js.map +0 -1
- package/dist/cli-main.js +0 -9211
- package/dist/cli-main.js.map +0 -1
- package/dist/daemon-main.js +0 -50664
- package/dist/daemon-main.js.map +0 -1
- package/dist/migrations/0001_init.sql +0 -1103
- package/dist/migrations/0002_device_token_scopes.sql +0 -8
- package/dist/migrations/0003_web_pairing_tokens.sql +0 -18
- package/dist/migrations/0004_image_generation.sql +0 -25
- package/dist/native-darwin-entry.js +0 -692
- package/dist/native-darwin-entry.js.map +0 -1
- package/dist/native-linux-entry.js +0 -60
- package/dist/native-linux-entry.js.map +0 -1
- package/dist/runtime-version.js +0 -28
- package/dist/runtime-version.js.map +0 -1
- package/dist/web/client/assets/AgentTabs-kEd-oDRM.js +0 -1
- package/dist/web/client/assets/ChatPane-DhvlzNPJ.js +0 -76
- package/dist/web/client/assets/ConfigPage-CMKsWDjh.js +0 -1
- package/dist/web/client/assets/ConfirmDialog-DpAzoNG8.js +0 -1
- package/dist/web/client/assets/FieldRow-OQ-Ezw5t.js +0 -1
- package/dist/web/client/assets/ProductionTeamPolicyEditor-DhT-Q13a.js +0 -7
- package/dist/web/client/assets/ProfileCommunicationEditor-CnQIp4e6.js +0 -1
- package/dist/web/client/assets/RecoveryState-B4Rne9N_.js +0 -1
- package/dist/web/client/assets/ResultCard-BxAlMky1.js +0 -1
- package/dist/web/client/assets/ResultSourceConversation-BzIw43-r.js +0 -1
- package/dist/web/client/assets/SectionTabs-D3M6F_HR.js +0 -1
- package/dist/web/client/assets/TeamTabs-BZbg-UFx.js +0 -1
- package/dist/web/client/assets/TemplatesTabs-D8geEOte.js +0 -1
- package/dist/web/client/assets/UnsavedChangesGuard-CPQe9VLw.js +0 -1
- package/dist/web/client/assets/_id-1RIodFdi.js +0 -1
- package/dist/web/client/assets/_id-BV3w2kDj.js +0 -1
- package/dist/web/client/assets/_id-C9zxKqvQ.js +0 -1
- package/dist/web/client/assets/_id-CLG_POnZ.js +0 -1
- package/dist/web/client/assets/_id-Cha845UH.js +0 -1
- package/dist/web/client/assets/_id-DssxcwBl.js +0 -1
- package/dist/web/client/assets/_id-IDHR-MEm.js +0 -1
- package/dist/web/client/assets/_id-SGs5zOcT.js +0 -1
- package/dist/web/client/assets/activity-0srO4qbd.js +0 -1
- package/dist/web/client/assets/activity-DxQGr6eP.js +0 -1
- package/dist/web/client/assets/agents-CVTYoXKu.js +0 -1
- package/dist/web/client/assets/agents-DPTu6Sm_.js +0 -1
- package/dist/web/client/assets/agents-nHiIbumu.js +0 -1
- package/dist/web/client/assets/approvals-Di_Bux_Q.js +0 -1
- package/dist/web/client/assets/approvals-ScNrQg7q.js +0 -1
- package/dist/web/client/assets/attention-BF-Llt9z.js +0 -1
- package/dist/web/client/assets/attention-D7xB17sN.js +0 -1
- package/dist/web/client/assets/chevron-right-CJ2wat15.js +0 -1
- package/dist/web/client/assets/config-BOuIcP1T.js +0 -3
- package/dist/web/client/assets/context-wo9lNjHx.js +0 -1
- package/dist/web/client/assets/git-review-presentation-CzHQulDk.js +0 -1
- package/dist/web/client/assets/inbox-CNLmz0Jp.js +0 -1
- package/dist/web/client/assets/inbox-De6HOll3.js +0 -1
- package/dist/web/client/assets/index-CjI7_vB3.js +0 -52
- package/dist/web/client/assets/jsx-runtime-DGeXAQPT.js +0 -1
- package/dist/web/client/assets/learning-591SFAKg.js +0 -1
- package/dist/web/client/assets/learning-D6bO0NeB.js +0 -1
- package/dist/web/client/assets/login-Q7uP-v0M.js +0 -1
- package/dist/web/client/assets/mcp-BGy64VOv.js +0 -1
- package/dist/web/client/assets/mcp-DSCjhc5I.js +0 -1
- package/dist/web/client/assets/members-CBVor-P4.js +0 -1
- package/dist/web/client/assets/members-CCcecjC3.js +0 -1
- package/dist/web/client/assets/memory-CSE8EQ48.js +0 -1
- package/dist/web/client/assets/memory-DgGz0wh4.js +0 -1
- package/dist/web/client/assets/policy-6j-NQvBj.js +0 -1
- package/dist/web/client/assets/policy-Do0TvNWc.js +0 -1
- package/dist/web/client/assets/preload-helper-bztXdkDj.js +0 -1
- package/dist/web/client/assets/react-3W8R1pOO.js +0 -1
- package/dist/web/client/assets/results-CCQGn0dE.js +0 -1
- package/dist/web/client/assets/results-Cx6_ChIY.js +0 -1
- package/dist/web/client/assets/review-CyS5b0fz.js +0 -1
- package/dist/web/client/assets/review-qG-2gqEp.js +0 -1
- package/dist/web/client/assets/routes-DRic0xNy.js +0 -1
- package/dist/web/client/assets/services-B_7lf-mx.js +0 -1
- package/dist/web/client/assets/services-ByBA_yA-.js +0 -1
- package/dist/web/client/assets/skills--lnDzPWe.js +0 -1
- package/dist/web/client/assets/skills-C70btgIg.js +0 -1
- package/dist/web/client/assets/styles-e_ADuRbs.css +0 -2
- package/dist/web/client/assets/team-policy-D0jpnn2b.js +0 -1
- package/dist/web/client/assets/teams-BL-Fr2xF.js +0 -1
- package/dist/web/client/assets/teams-BeoxArzy.js +0 -1
- package/dist/web/client/assets/teams-C4mb790r.js +0 -1
- package/dist/web/client/assets/teams-DHStw3OS.js +0 -1
- package/dist/web/client/assets/telegram-BIMiebJl.js +0 -1
- package/dist/web/client/assets/templates-CzHXXiA_.js +0 -1
- package/dist/web/client/assets/tokens-B9ehOc1o.js +0 -1
- package/dist/web/client/assets/tokens-DhaMzFWK.js +0 -1
- package/dist/web/client/assets/triggers--xMpHFW7.js +0 -1
- package/dist/web/client/assets/triggers-DLzZu8bB.js +0 -1
- package/dist/web/client/assets/verifications-FzypGVwW.js +0 -2
- package/dist/web/client/assets/verifications-fR9W-adv.js +0 -1
- package/dist/web/client/assets/welcome-pjZD7pq4.js +0 -1
- package/dist/web/client/assets/wire-constants-CBD-lTaa.js +0 -1
- package/dist/web/client/assets/x-CZxV4X-6.js +0 -1
- package/dist/web/server/assets/AgentTabs-DVVkxBks.js +0 -49
- package/dist/web/server/assets/ChatPane-CeDUEjmn.js +0 -2962
- package/dist/web/server/assets/ConfigPage-J3s_PX4o.js +0 -69
- package/dist/web/server/assets/ConfirmDialog-C-2cbcmQ.js +0 -99
- package/dist/web/server/assets/ProductionTeamPolicyEditor-DNtdMn2a.js +0 -1026
- package/dist/web/server/assets/ProfileCommunicationEditor-C2RU-2QB.js +0 -107
- package/dist/web/server/assets/RecoveryState-DFPWxMIo.js +0 -37
- package/dist/web/server/assets/ResultCard-BtVFqdRU.js +0 -162
- package/dist/web/server/assets/ResultSourceConversation-xn4EKjaP.js +0 -64
- package/dist/web/server/assets/SectionTabs-DQWPEk1x.js +0 -8
- package/dist/web/server/assets/Sidebar-Dk9bErQV.js +0 -1243
- package/dist/web/server/assets/TeamTabs-XybMRm3w.js +0 -59
- package/dist/web/server/assets/TemplatesTabs-BiJt7Fjx.js +0 -31
- package/dist/web/server/assets/WorkspaceRecoveryCard-B-6gfg0D.js +0 -18
- package/dist/web/server/assets/_id-6aGxCNlp.js +0 -37
- package/dist/web/server/assets/_id-BJeSZ4DF.js +0 -11
- package/dist/web/server/assets/_id-BSkg6FJC.js +0 -45
- package/dist/web/server/assets/_id-BfT3umhN.js +0 -14
- package/dist/web/server/assets/_id-Bk4SHXs4.js +0 -626
- package/dist/web/server/assets/_id-C0C6wOt8.js +0 -42
- package/dist/web/server/assets/_id-CAxK6pln.js +0 -6
- package/dist/web/server/assets/_id-CGMvV1p5.js +0 -1183
- package/dist/web/server/assets/_id-CI33J2xv.js +0 -11
- package/dist/web/server/assets/_id-C_FnWQ61.js +0 -11
- package/dist/web/server/assets/_id-CmS2d0me.js +0 -17
- package/dist/web/server/assets/_id-D9VWEfdp.js +0 -28
- package/dist/web/server/assets/_id-DhheAcWL.js +0 -1035
- package/dist/web/server/assets/_id-t8AepTB2.js +0 -26
- package/dist/web/server/assets/_id-ujm4R5OF.js +0 -18
- package/dist/web/server/assets/_tanstack-start-manifest_v-CXwNJhX2.js +0 -376
- package/dist/web/server/assets/activity-BKb_BIx7.js +0 -168
- package/dist/web/server/assets/activity-CDNYyLBC.js +0 -11
- package/dist/web/server/assets/activity-DhzxlXUk.js +0 -12
- package/dist/web/server/assets/activity-lf7L7wiL.js +0 -14
- package/dist/web/server/assets/agents-BzJDqrC8.js +0 -11
- package/dist/web/server/assets/agents-C65TunMF.js +0 -505
- package/dist/web/server/assets/agents-uXBu1F5L.js +0 -387
- package/dist/web/server/assets/approvals-CcU_pIWW.js +0 -11
- package/dist/web/server/assets/approvals-CpDs6ASO.js +0 -14
- package/dist/web/server/assets/approvals-FyuTjfdY.js +0 -332
- package/dist/web/server/assets/approvals-szknIxB6.js +0 -12
- package/dist/web/server/assets/attention-BeA3zGve.js +0 -268
- package/dist/web/server/assets/attention-jtJ9PIMp.js +0 -11
- package/dist/web/server/assets/browser-BiDvr0fy.js +0 -66
- package/dist/web/server/assets/context-DuxjdpaW.js +0 -11
- package/dist/web/server/assets/daemon-client-C-RlJHYO.js +0 -301
- package/dist/web/server/assets/git-review-BB3M9nYg.js +0 -26
- package/dist/web/server/assets/git-review-CqZTrIWS.js +0 -179
- package/dist/web/server/assets/git-review-presentation-TJiHJhen.js +0 -81
- package/dist/web/server/assets/inbox-Be3CUU4o.js +0 -11
- package/dist/web/server/assets/inbox-D1ROE7jB.js +0 -44
- package/dist/web/server/assets/inbox-DsH5oRK0.js +0 -168
- package/dist/web/server/assets/inbox-qKMkeprB.js +0 -29
- package/dist/web/server/assets/learning-BYCwIOzZ.js +0 -18
- package/dist/web/server/assets/learning-C3pqLE5b.js +0 -11
- package/dist/web/server/assets/learning-D7jWRhqD.js +0 -365
- package/dist/web/server/assets/mcp-BQ4KvXp1.js +0 -11
- package/dist/web/server/assets/mcp-Dhryb75M.js +0 -328
- package/dist/web/server/assets/members-8aWhtn4G.js +0 -100
- package/dist/web/server/assets/members-Cjpysp35.js +0 -14
- package/dist/web/server/assets/members-DWedYCMh.js +0 -11
- package/dist/web/server/assets/memory-BH7L-l65.js +0 -11
- package/dist/web/server/assets/memory-Bq0s1fr7.js +0 -18
- package/dist/web/server/assets/memory-CS-9Bb6q.js +0 -28
- package/dist/web/server/assets/memory-DN5iMDQL.js +0 -389
- package/dist/web/server/assets/policy-CK3VuVuv.js +0 -11
- package/dist/web/server/assets/policy-DDi8AjcD.js +0 -21
- package/dist/web/server/assets/policy-DcYIJaHW.js +0 -490
- package/dist/web/server/assets/policy-JF7ZI2-i.js +0 -40
- package/dist/web/server/assets/public-origin-xV0lm0Ty.js +0 -25
- package/dist/web/server/assets/publications-DV2uRrvJ.js +0 -57
- package/dist/web/server/assets/results-CkNoVDrY.js +0 -362
- package/dist/web/server/assets/results-DSGwi3vj.js +0 -14
- package/dist/web/server/assets/results-DlOsdBE7.js +0 -11
- package/dist/web/server/assets/results-vtkmZPro.js +0 -12
- package/dist/web/server/assets/review-BG71IaCa.js +0 -1061
- package/dist/web/server/assets/review-Bs6AbrSn.js +0 -40
- package/dist/web/server/assets/review-CPmUi4PR.js +0 -11
- package/dist/web/server/assets/review-packets-CO69K-FK.js +0 -172
- package/dist/web/server/assets/router-BFqyjkYu.js +0 -921
- package/dist/web/server/assets/routes-B6TnJyQ8.js +0 -57
- package/dist/web/server/assets/routes-BfEa101d.js +0 -14
- package/dist/web/server/assets/routes-pUMIGzyy.js +0 -53
- package/dist/web/server/assets/services-Ba6tFlZz.js +0 -16
- package/dist/web/server/assets/skills-CGvPejPD.js +0 -11
- package/dist/web/server/assets/skills-cVlLDnvf.js +0 -399
- package/dist/web/server/assets/start-D4Wq9iTa.js +0 -70
- package/dist/web/server/assets/team-policy-vPG01onj.js +0 -180
- package/dist/web/server/assets/teams-6c5B9wnI.js +0 -11
- package/dist/web/server/assets/teams-BEIUG9fI.js +0 -112
- package/dist/web/server/assets/teams-Bi3CeEM5.js +0 -11
- package/dist/web/server/assets/teams-C9tfV3IC.js +0 -12
- package/dist/web/server/assets/teams-DKROLgw-.js +0 -36
- package/dist/web/server/assets/teams-DLt48Vxw.js +0 -284
- package/dist/web/server/assets/teams-DuhXk1M5.js +0 -14
- package/dist/web/server/assets/templates-CuqFhsiO.js +0 -11
- package/dist/web/server/assets/tokens-DDJYBy6R.js +0 -16
- package/dist/web/server/assets/tokens-qVijmBxr.js +0 -11
- package/dist/web/server/assets/tokens-zSK57Trr.js +0 -452
- package/dist/web/server/assets/triggers-B9CIl4Co.js +0 -27
- package/dist/web/server/assets/triggers-Cr9af7Xw.js +0 -367
- package/dist/web/server/assets/triggers-DIruOyMb.js +0 -18
- package/dist/web/server/assets/triggers-x_OA9u5f.js +0 -11
- package/dist/web/server/assets/utils-ySbqTi3g.js +0 -24
- package/dist/web/server/assets/verification-DBsJYadO.js +0 -97
- package/dist/web/server/assets/verifications-DjZsx65b.js +0 -12
- package/dist/web/server/assets/verifications-DvOyI3Mr.js +0 -28
- package/dist/web/server/assets/verifications-YrEdiZmk.js +0 -326
- package/dist/web/server/assets/web-search-dgw10fLn.js +0 -12
- package/dist/web/server/assets/wire-constants-C8nBJcU3.js +0 -16
- /package/{LICENSE → dist/LICENSE} +0 -0
- /package/dist/web/client/assets/{ProductionTeamPolicyEditor-DLioOiRN.css → TeamPolicyEditor-DLioOiRN.css} +0 -0
|
@@ -1,1183 +0,0 @@
|
|
|
1
|
-
import { n as createServerFn } from "../server.js";
|
|
2
|
-
import { n as Button } from "./utils-ySbqTi3g.js";
|
|
3
|
-
import { i as SectionCard, r as PageShell } from "./Page-DJNoI4Gn.js";
|
|
4
|
-
import { t as createSsrRpc } from "./createSsrRpc-6LHNEsSK.js";
|
|
5
|
-
import { t as Route } from "./_id-t8AepTB2.js";
|
|
6
|
-
import { t as AgentTabs } from "./AgentTabs-DVVkxBks.js";
|
|
7
|
-
import { t as AgentAvatar } from "./AgentAvatar-8gTAy_tP.js";
|
|
8
|
-
import { t as ConfirmDialog } from "./ConfirmDialog-C-2cbcmQ.js";
|
|
9
|
-
import { t as ChatPane } from "./ChatPane-CeDUEjmn.js";
|
|
10
|
-
import { t as ResultSourceConversation } from "./ResultSourceConversation-xn4EKjaP.js";
|
|
11
|
-
import { r as REASONING_LEVELS } from "./wire-constants-C8nBJcU3.js";
|
|
12
|
-
import { useCallback, useEffect, useState } from "react";
|
|
13
|
-
import { useRouter } from "@tanstack/react-router";
|
|
14
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
-
import { ArrowLeft } from "lucide-react";
|
|
16
|
-
//#region src/lib/browser.ts
|
|
17
|
-
var fetchAgentBrowser = createServerFn({ method: "POST" }).validator((input) => input).handler(createSsrRpc("f2e22e5bff21237425b6e52cfd3a5c496451c7358d29fdbf980cd806b455132e"));
|
|
18
|
-
var stopAgentBrowser = createServerFn({ method: "POST" }).validator((input) => input).handler(createSsrRpc("d9f4821fb42488b35bdf71885072200bb48ce2697d960ca87166586a18ae45b2"));
|
|
19
|
-
var resetAgentBrowser = createServerFn({ method: "POST" }).validator((input) => input).handler(createSsrRpc("8e9d45197cb5ece3030d58cee285b83debbe8fa1544130e02e2049aac8ce5165"));
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/components/AgentBrowserCard.tsx
|
|
22
|
-
function StateLine({ status }) {
|
|
23
|
-
const availability = status.availability === "configured" ? "Browser configured" : status.availability === "disabled" ? "Browser tools disabled" : "Browser unavailable";
|
|
24
|
-
const selected = status.selectedBrowser;
|
|
25
|
-
return /* @__PURE__ */ jsxs("dl", {
|
|
26
|
-
className: "grid min-w-0 grid-cols-1 gap-x-4 gap-y-2 text-sm sm:grid-cols-[max-content_minmax(0,1fr)]",
|
|
27
|
-
children: [
|
|
28
|
-
/* @__PURE__ */ jsx("dt", {
|
|
29
|
-
className: "font-medium text-mocha",
|
|
30
|
-
children: "Availability"
|
|
31
|
-
}),
|
|
32
|
-
/* @__PURE__ */ jsx("dd", { children: availability }),
|
|
33
|
-
/* @__PURE__ */ jsx("dt", {
|
|
34
|
-
className: "font-medium text-mocha",
|
|
35
|
-
children: "Session"
|
|
36
|
-
}),
|
|
37
|
-
/* @__PURE__ */ jsx("dd", { children: status.state }),
|
|
38
|
-
/* @__PURE__ */ jsx("dt", {
|
|
39
|
-
className: "font-medium text-mocha",
|
|
40
|
-
children: "Profile"
|
|
41
|
-
}),
|
|
42
|
-
/* @__PURE__ */ jsx("dd", { children: status.profilePresent ? "Persistent profile exists" : "No profile slot" }),
|
|
43
|
-
/* @__PURE__ */ jsx("dt", {
|
|
44
|
-
className: "font-medium text-mocha",
|
|
45
|
-
children: "Selected browser"
|
|
46
|
-
}),
|
|
47
|
-
/* @__PURE__ */ jsx("dd", {
|
|
48
|
-
className: "break-words",
|
|
49
|
-
children: selected ? `${selected.name} · ${selected.source} · ${selected.mode}${selected.version ? ` · ${selected.version}` : ""}` : "No usable browser selection"
|
|
50
|
-
}),
|
|
51
|
-
status.reasonCode && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("dt", {
|
|
52
|
-
className: "font-medium text-mocha",
|
|
53
|
-
children: "State code"
|
|
54
|
-
}), /* @__PURE__ */ jsx("dd", {
|
|
55
|
-
className: "break-words font-mono text-xs",
|
|
56
|
-
children: status.reasonCode
|
|
57
|
-
})] })
|
|
58
|
-
]
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
function AgentBrowserCard({ agentId }) {
|
|
62
|
-
const [view, setView] = useState(null);
|
|
63
|
-
const [loading, setLoading] = useState(true);
|
|
64
|
-
const [pending, setPending] = useState(null);
|
|
65
|
-
const [error, setError] = useState(null);
|
|
66
|
-
const [confirmReset, setConfirmReset] = useState(false);
|
|
67
|
-
const refresh = useCallback(async () => {
|
|
68
|
-
setLoading(true);
|
|
69
|
-
try {
|
|
70
|
-
setView(await fetchAgentBrowser({ data: { agentId } }));
|
|
71
|
-
} catch (err) {
|
|
72
|
-
setView({
|
|
73
|
-
status: null,
|
|
74
|
-
unavailable: { message: err instanceof Error ? err.message : String(err) }
|
|
75
|
-
});
|
|
76
|
-
} finally {
|
|
77
|
-
setLoading(false);
|
|
78
|
-
}
|
|
79
|
-
}, [agentId]);
|
|
80
|
-
useEffect(() => {
|
|
81
|
-
refresh();
|
|
82
|
-
}, [refresh]);
|
|
83
|
-
async function stop() {
|
|
84
|
-
setPending("stop");
|
|
85
|
-
setError(null);
|
|
86
|
-
try {
|
|
87
|
-
const result = await stopAgentBrowser({ data: { agentId } });
|
|
88
|
-
if (!result.ok) setError(`${result.failure.message}${result.failure.code ? ` (${result.failure.code})` : ""}`);
|
|
89
|
-
} catch (err) {
|
|
90
|
-
setError(err instanceof Error ? err.message : String(err));
|
|
91
|
-
} finally {
|
|
92
|
-
await refresh();
|
|
93
|
-
setPending(null);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
async function reset() {
|
|
97
|
-
setPending("reset");
|
|
98
|
-
setError(null);
|
|
99
|
-
try {
|
|
100
|
-
const result = await resetAgentBrowser({ data: { agentId } });
|
|
101
|
-
if (!result.ok) throw new Error(`${result.failure.message}${result.failure.code ? ` (${result.failure.code})` : ""}`);
|
|
102
|
-
} finally {
|
|
103
|
-
await refresh();
|
|
104
|
-
setPending(null);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
const status = view?.status ?? null;
|
|
108
|
-
const unavailable = view?.unavailable ?? null;
|
|
109
|
-
const busy = pending !== null || loading;
|
|
110
|
-
return /* @__PURE__ */ jsxs(SectionCard, {
|
|
111
|
-
title: "Managed browser",
|
|
112
|
-
description: "Isolated persistent browser session. Availability does not guarantee that a particular site will load.",
|
|
113
|
-
actions: /* @__PURE__ */ jsx(Button, {
|
|
114
|
-
variant: "ghost",
|
|
115
|
-
disabled: busy,
|
|
116
|
-
onClick: () => void refresh(),
|
|
117
|
-
children: loading ? "refreshing…" : "refresh status"
|
|
118
|
-
}),
|
|
119
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
120
|
-
className: "space-y-4",
|
|
121
|
-
children: [
|
|
122
|
-
loading && !view && /* @__PURE__ */ jsx("p", {
|
|
123
|
-
role: "status",
|
|
124
|
-
children: "Loading browser status…"
|
|
125
|
-
}),
|
|
126
|
-
unavailable && /* @__PURE__ */ jsxs("div", {
|
|
127
|
-
role: "alert",
|
|
128
|
-
className: "rounded-md border border-warning/30 bg-fawn/30 p-3 text-sm",
|
|
129
|
-
children: [/* @__PURE__ */ jsx("strong", { children: unavailable.code ? `${unavailable.code}: ` : "" }), unavailable.message]
|
|
130
|
-
}),
|
|
131
|
-
status && /* @__PURE__ */ jsx(StateLine, { status }),
|
|
132
|
-
status?.remedy && /* @__PURE__ */ jsx("p", {
|
|
133
|
-
className: "break-words rounded-md bg-fawn/35 p-3 text-sm text-chocolate",
|
|
134
|
-
children: status.remedy
|
|
135
|
-
}),
|
|
136
|
-
error && /* @__PURE__ */ jsx("p", {
|
|
137
|
-
role: "alert",
|
|
138
|
-
className: "err break-words",
|
|
139
|
-
children: error
|
|
140
|
-
}),
|
|
141
|
-
/* @__PURE__ */ jsxs("div", {
|
|
142
|
-
className: "flex flex-wrap gap-2",
|
|
143
|
-
children: [/* @__PURE__ */ jsx(Button, {
|
|
144
|
-
variant: "ghost",
|
|
145
|
-
disabled: busy || status?.state !== "running",
|
|
146
|
-
onClick: () => void stop(),
|
|
147
|
-
children: pending === "stop" ? "stopping…" : "Stop session"
|
|
148
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
149
|
-
variant: "danger",
|
|
150
|
-
disabled: busy || !status?.profilePresent && status?.state !== "running",
|
|
151
|
-
onClick: () => setConfirmReset(true),
|
|
152
|
-
children: "Reset profile"
|
|
153
|
-
})]
|
|
154
|
-
}),
|
|
155
|
-
/* @__PURE__ */ jsx("p", {
|
|
156
|
-
className: "text-xs leading-5 text-mocha-light",
|
|
157
|
-
children: "Stop and archive preserve the profile. Reset and Team transfer remove it (cookies and logins are lost). Browser state is excluded from backup. A site may still block or challenge an otherwise available browser."
|
|
158
|
-
})
|
|
159
|
-
]
|
|
160
|
-
}), /* @__PURE__ */ jsx(ConfirmDialog, {
|
|
161
|
-
open: confirmReset,
|
|
162
|
-
onOpenChange: setConfirmReset,
|
|
163
|
-
title: "Reset this Agent’s browser profile?",
|
|
164
|
-
description: /* @__PURE__ */ jsx("p", { children: "This stops the session and permanently removes this Agent’s isolated profile, including cookies and logins. This cannot be undone. Stop preserves the profile; use reset only when you intend to discard that site state." }),
|
|
165
|
-
confirmLabel: pending === "reset" ? "resetting…" : "delete profile",
|
|
166
|
-
onConfirm: reset
|
|
167
|
-
})]
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
//#endregion
|
|
171
|
-
//#region src/lib/web-search.ts
|
|
172
|
-
var fetchAgentSearchStatus = createServerFn({ method: "POST" }).validator((input) => input).handler(createSsrRpc("80ba6720c4e6bcc7b042fccbc78a7f2aeafd75e7914a99c9edaf91403470c93e"));
|
|
173
|
-
//#endregion
|
|
174
|
-
//#region src/components/AgentSearchCard.tsx
|
|
175
|
-
function AgentSearchCard({ agentId, model }) {
|
|
176
|
-
const [status, setStatus] = useState(null);
|
|
177
|
-
const [error, setError] = useState(false);
|
|
178
|
-
const [refresh, setRefresh] = useState(0);
|
|
179
|
-
useEffect(() => {
|
|
180
|
-
let current = true;
|
|
181
|
-
setStatus(null);
|
|
182
|
-
setError(false);
|
|
183
|
-
fetchAgentSearchStatus({ data: { agentId } }).then((value) => {
|
|
184
|
-
if (current) setStatus(value);
|
|
185
|
-
}, () => {
|
|
186
|
-
if (current) setError(true);
|
|
187
|
-
});
|
|
188
|
-
return () => {
|
|
189
|
-
current = false;
|
|
190
|
-
};
|
|
191
|
-
}, [
|
|
192
|
-
agentId,
|
|
193
|
-
model,
|
|
194
|
-
refresh
|
|
195
|
-
]);
|
|
196
|
-
return /* @__PURE__ */ jsx(SectionCard, {
|
|
197
|
-
title: "Web discovery",
|
|
198
|
-
description: "Configuration only, not proof of search execution or source reading. Ordinary interactive turns only; browser reading is separate.",
|
|
199
|
-
actions: /* @__PURE__ */ jsx(Button, {
|
|
200
|
-
variant: "ghost",
|
|
201
|
-
onClick: () => setRefresh((value) => value + 1),
|
|
202
|
-
children: "Refresh status"
|
|
203
|
-
}),
|
|
204
|
-
children: error ? /* @__PURE__ */ jsx("p", {
|
|
205
|
-
role: "alert",
|
|
206
|
-
children: "Search readiness unavailable."
|
|
207
|
-
}) : status ? /* @__PURE__ */ jsxs("div", {
|
|
208
|
-
className: "space-y-2 text-sm",
|
|
209
|
-
children: [
|
|
210
|
-
/* @__PURE__ */ jsxs("p", { children: [
|
|
211
|
-
status.state,
|
|
212
|
-
" · ",
|
|
213
|
-
status.route ?? "no route",
|
|
214
|
-
" · ",
|
|
215
|
-
status.account ?? "no account",
|
|
216
|
-
status.model ? ` · ${status.model}` : ""
|
|
217
|
-
] }),
|
|
218
|
-
/* @__PURE__ */ jsx("p", {
|
|
219
|
-
className: "break-words",
|
|
220
|
-
children: status.message
|
|
221
|
-
}),
|
|
222
|
-
/* @__PURE__ */ jsx("p", { children: "Change route, mode or disablement in Config → Web Search. Native routes are experimental until live qualification." })
|
|
223
|
-
]
|
|
224
|
-
}) : /* @__PURE__ */ jsx("p", {
|
|
225
|
-
role: "status",
|
|
226
|
-
children: "Loading search readiness…"
|
|
227
|
-
})
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
//#endregion
|
|
231
|
-
//#region src/components/CopyButton.tsx
|
|
232
|
-
function CopyButton({ value, className, ariaLabel = "Copy to clipboard", title = "Copy to clipboard" }) {
|
|
233
|
-
const [copied, setCopied] = useState(false);
|
|
234
|
-
async function copy() {
|
|
235
|
-
if (!value) return;
|
|
236
|
-
let ok = false;
|
|
237
|
-
try {
|
|
238
|
-
if (navigator.clipboard?.writeText) {
|
|
239
|
-
await navigator.clipboard.writeText(value);
|
|
240
|
-
ok = true;
|
|
241
|
-
}
|
|
242
|
-
} catch {}
|
|
243
|
-
if (!ok) {
|
|
244
|
-
const ta = document.createElement("textarea");
|
|
245
|
-
ta.value = value;
|
|
246
|
-
ta.setAttribute("readonly", "");
|
|
247
|
-
ta.style.position = "fixed";
|
|
248
|
-
ta.style.opacity = "0";
|
|
249
|
-
document.body.appendChild(ta);
|
|
250
|
-
ta.select();
|
|
251
|
-
try {
|
|
252
|
-
ok = document.execCommand("copy");
|
|
253
|
-
} catch {}
|
|
254
|
-
ta.remove();
|
|
255
|
-
}
|
|
256
|
-
if (ok) {
|
|
257
|
-
setCopied(true);
|
|
258
|
-
setTimeout(() => setCopied(false), 1e3);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
return /* @__PURE__ */ jsx("button", {
|
|
262
|
-
type: "button",
|
|
263
|
-
onClick: copy,
|
|
264
|
-
title,
|
|
265
|
-
"aria-label": ariaLabel,
|
|
266
|
-
className: `inline-flex h-[1.3rem] w-[1.6rem] items-center justify-center rounded-sm border border-transparent text-mocha-light transition-colors hover:border-frost hover:bg-snow hover:text-mocha ${copied ? "border-[#bcd9bc] bg-[#eef7ee] text-[#3b7a3b] hover:border-[#bcd9bc] hover:bg-[#eef7ee] hover:text-[#3b7a3b]" : ""} ${className ?? ""}`,
|
|
267
|
-
children: copied ? "✓" : "⧉"
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
//#endregion
|
|
271
|
-
//#region src/routes/agents/$id/index.tsx?tsr-split=component
|
|
272
|
-
function AgentDetailPage() {
|
|
273
|
-
const { resolved, initialMessages, sessionHead, teams, skills, modelGroups, telegramConfigured } = Route.useLoaderData();
|
|
274
|
-
const search = Route.useSearch();
|
|
275
|
-
const router = useRouter();
|
|
276
|
-
const [confirmAction, setConfirmAction] = useState(null);
|
|
277
|
-
const [actionError, setActionError] = useState(null);
|
|
278
|
-
const settingsMode = search.mode === "settings";
|
|
279
|
-
async function archive() {
|
|
280
|
-
const response = await fetch(`/api/agents/${encodeURIComponent(resolved.agent.id)}/archive`, { method: "POST" });
|
|
281
|
-
if (!response.ok && response.status !== 204) {
|
|
282
|
-
const body = await response.json().catch(() => null);
|
|
283
|
-
throw new Error(body?.error ?? `Could not archive Agent (${response.status})`);
|
|
284
|
-
}
|
|
285
|
-
await router.invalidate();
|
|
286
|
-
}
|
|
287
|
-
async function unarchive() {
|
|
288
|
-
setActionError(null);
|
|
289
|
-
try {
|
|
290
|
-
const response = await fetch(`/api/agents/${encodeURIComponent(resolved.agent.id)}/unarchive`, { method: "POST" });
|
|
291
|
-
if (!response.ok && response.status !== 204) {
|
|
292
|
-
const body = await response.json().catch(() => null);
|
|
293
|
-
throw new Error(body?.error ?? `Could not restore Agent (${response.status})`);
|
|
294
|
-
}
|
|
295
|
-
await router.invalidate();
|
|
296
|
-
} catch (error) {
|
|
297
|
-
setActionError(error instanceof Error ? error.message : String(error));
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
async function del() {
|
|
301
|
-
const policyResponse = await fetch(`/api/teams/${encodeURIComponent(resolved.team.id)}/policy`);
|
|
302
|
-
if (!policyResponse.ok) throw new Error("The current Team policy is unavailable. Nothing was deleted.");
|
|
303
|
-
const current = await policyResponse.json();
|
|
304
|
-
const res = await fetch(`/api/agents/${resolved.agent.id}?expectedTeamRevision=${current.teamPolicy.revision}`, { method: "DELETE" });
|
|
305
|
-
if (res.ok || res.status === 204) window.location.assign("/agents");
|
|
306
|
-
else {
|
|
307
|
-
const body = await res.json().catch(() => null);
|
|
308
|
-
throw new Error(body?.error ?? `Could not delete Agent (${res.status})`);
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
return /* @__PURE__ */ jsxs(PageShell, { children: [
|
|
312
|
-
/* @__PURE__ */ jsxs("header", {
|
|
313
|
-
className: "mb-8",
|
|
314
|
-
children: [
|
|
315
|
-
search.teamPolicy && /* @__PURE__ */ jsxs("div", {
|
|
316
|
-
className: "mb-4 flex flex-wrap items-center gap-2",
|
|
317
|
-
children: [/* @__PURE__ */ jsxs("a", {
|
|
318
|
-
href: `/teams/${encodeURIComponent(search.teamPolicy)}/policy?view=${search.view ?? "flow"}&selected=${encodeURIComponent(search.selected ?? "")}&vx=${search.vx ?? 0}&vy=${search.vy ?? 0}&vz=${search.vz ?? .9}`,
|
|
319
|
-
className: "ghost-btn",
|
|
320
|
-
children: [/* @__PURE__ */ jsx(ArrowLeft, { className: "h-4 w-4" }), " back to Team policy"]
|
|
321
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
322
|
-
className: "text-xs text-mocha-light",
|
|
323
|
-
children: "Returns to the same projection, viewport, and selection."
|
|
324
|
-
})]
|
|
325
|
-
}),
|
|
326
|
-
/* @__PURE__ */ jsxs("div", {
|
|
327
|
-
className: "flex min-w-0 items-center gap-3",
|
|
328
|
-
children: [/* @__PURE__ */ jsx(AgentAvatar, {
|
|
329
|
-
identity: resolved.agent.identity,
|
|
330
|
-
size: 44
|
|
331
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
332
|
-
className: "min-w-0",
|
|
333
|
-
children: [/* @__PURE__ */ jsx("h1", {
|
|
334
|
-
className: "mb-0 break-words",
|
|
335
|
-
children: resolved.agent.name
|
|
336
|
-
}), (resolved.agent.identity?.creature || resolved.agent.identity?.vibe) && /* @__PURE__ */ jsx("p", {
|
|
337
|
-
className: "muted mt-0.5 text-sm",
|
|
338
|
-
children: [resolved.agent.identity?.creature, resolved.agent.identity?.vibe].filter(Boolean).join(" · ")
|
|
339
|
-
})]
|
|
340
|
-
})]
|
|
341
|
-
}),
|
|
342
|
-
/* @__PURE__ */ jsxs("div", {
|
|
343
|
-
className: "mt-2 flex flex-wrap items-center gap-x-5 gap-y-2",
|
|
344
|
-
children: [
|
|
345
|
-
/* @__PURE__ */ jsxs(Tag, { children: [/* @__PURE__ */ jsx("span", {
|
|
346
|
-
className: "min-w-0 break-all px-1.5 font-mono text-[0.95em] text-mocha select-all",
|
|
347
|
-
children: resolved.agent.id
|
|
348
|
-
}), /* @__PURE__ */ jsx(CopyButton, {
|
|
349
|
-
value: resolved.agent.id,
|
|
350
|
-
ariaLabel: "Copy agent UUID",
|
|
351
|
-
title: "Copy UUID to clipboard"
|
|
352
|
-
})] }),
|
|
353
|
-
/* @__PURE__ */ jsxs(Tag, { children: ["status: ", /* @__PURE__ */ jsx("span", {
|
|
354
|
-
className: "ml-1",
|
|
355
|
-
children: resolved.agent.status
|
|
356
|
-
})] }),
|
|
357
|
-
/* @__PURE__ */ jsxs(Tag, { children: [
|
|
358
|
-
"profile:",
|
|
359
|
-
" ",
|
|
360
|
-
/* @__PURE__ */ jsx("code", {
|
|
361
|
-
className: "ml-1 min-w-0 break-all bg-transparent px-0",
|
|
362
|
-
children: resolved.profile.id
|
|
363
|
-
})
|
|
364
|
-
] }),
|
|
365
|
-
/* @__PURE__ */ jsxs(Tag, { children: [
|
|
366
|
-
"team:",
|
|
367
|
-
" ",
|
|
368
|
-
/* @__PURE__ */ jsx("a", {
|
|
369
|
-
href: `/teams/${encodeURIComponent(resolved.team.id)}`,
|
|
370
|
-
className: "ml-1 min-w-0 break-all bg-transparent px-0 font-mono underline",
|
|
371
|
-
children: resolved.team.id
|
|
372
|
-
}),
|
|
373
|
-
" ",
|
|
374
|
-
"·",
|
|
375
|
-
" ",
|
|
376
|
-
/* @__PURE__ */ jsx("a", {
|
|
377
|
-
href: `/teams/${encodeURIComponent(resolved.team.id)}/memory`,
|
|
378
|
-
className: "ml-0.5 underline",
|
|
379
|
-
children: "shared memory →"
|
|
380
|
-
})
|
|
381
|
-
] }),
|
|
382
|
-
/* @__PURE__ */ jsxs(Tag, { children: [
|
|
383
|
-
"model:",
|
|
384
|
-
" ",
|
|
385
|
-
/* @__PURE__ */ jsx("code", {
|
|
386
|
-
className: "ml-1 min-w-0 break-all bg-transparent px-0",
|
|
387
|
-
children: resolved.model
|
|
388
|
-
})
|
|
389
|
-
] }),
|
|
390
|
-
/* @__PURE__ */ jsxs(Tag, { children: [
|
|
391
|
-
"reasoning:",
|
|
392
|
-
" ",
|
|
393
|
-
/* @__PURE__ */ jsx("code", {
|
|
394
|
-
className: "ml-1 bg-transparent px-0",
|
|
395
|
-
children: resolved.reasoningLevel
|
|
396
|
-
})
|
|
397
|
-
] })
|
|
398
|
-
]
|
|
399
|
-
}),
|
|
400
|
-
/* @__PURE__ */ jsxs("div", {
|
|
401
|
-
className: "mt-3 flex flex-wrap gap-2",
|
|
402
|
-
children: [resolved.agent.status === "archived" ? /* @__PURE__ */ jsx(Button, {
|
|
403
|
-
variant: "ghost",
|
|
404
|
-
onClick: () => void unarchive(),
|
|
405
|
-
children: "Restore"
|
|
406
|
-
}) : /* @__PURE__ */ jsx(Button, {
|
|
407
|
-
variant: "ghost",
|
|
408
|
-
onClick: () => setConfirmAction("archive"),
|
|
409
|
-
children: "Archive"
|
|
410
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
411
|
-
variant: "danger",
|
|
412
|
-
onClick: () => setConfirmAction("delete"),
|
|
413
|
-
children: "Delete permanently"
|
|
414
|
-
})]
|
|
415
|
-
})
|
|
416
|
-
]
|
|
417
|
-
}),
|
|
418
|
-
actionError && /* @__PURE__ */ jsx("p", {
|
|
419
|
-
role: "alert",
|
|
420
|
-
className: "err",
|
|
421
|
-
children: actionError
|
|
422
|
-
}),
|
|
423
|
-
resolved.agent.status === "archived" && /* @__PURE__ */ jsxs("div", {
|
|
424
|
-
className: "mb-4 rounded-md border border-frost bg-fawn/35 px-4 py-2 text-[0.9em] text-chocolate",
|
|
425
|
-
children: [
|
|
426
|
-
/* @__PURE__ */ jsx("strong", {
|
|
427
|
-
className: "text-warning",
|
|
428
|
-
children: "This agent is archived."
|
|
429
|
-
}),
|
|
430
|
-
" It's hidden from the default agent list; use ",
|
|
431
|
-
/* @__PURE__ */ jsx("em", { children: "unarchive" }),
|
|
432
|
-
" above to bring it back, or",
|
|
433
|
-
" ",
|
|
434
|
-
/* @__PURE__ */ jsx("em", { children: "delete permanently" }),
|
|
435
|
-
" to remove its data entirely."
|
|
436
|
-
]
|
|
437
|
-
}),
|
|
438
|
-
/* @__PURE__ */ jsx(AgentTabs, {
|
|
439
|
-
agentId: resolved.agent.id,
|
|
440
|
-
active: settingsMode ? "settings" : "chat",
|
|
441
|
-
archived: resolved.agent.status === "archived"
|
|
442
|
-
}),
|
|
443
|
-
search.resultSource ? /* @__PURE__ */ jsx(ResultSourceConversation, {
|
|
444
|
-
resultId: search.resultSource,
|
|
445
|
-
agentId: resolved.agent.id
|
|
446
|
-
}) : !settingsMode ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
447
|
-
/* @__PURE__ */ jsx(SectionTitle, { children: "Chat" }),
|
|
448
|
-
/* @__PURE__ */ jsx("div", {
|
|
449
|
-
className: "h-[70vh]",
|
|
450
|
-
children: /* @__PURE__ */ jsx(ChatPane, {
|
|
451
|
-
agentId: resolved.agent.id,
|
|
452
|
-
agentName: resolved.agent.name,
|
|
453
|
-
initialMessages,
|
|
454
|
-
initialSessionHead: sessionHead
|
|
455
|
-
})
|
|
456
|
-
}),
|
|
457
|
-
/* @__PURE__ */ jsx("p", {
|
|
458
|
-
className: "mt-2 text-[0.82em] text-mocha-light",
|
|
459
|
-
children: "chat history persists in bazilion across navigation and restarts."
|
|
460
|
-
})
|
|
461
|
-
] }) : /* @__PURE__ */ jsxs("div", {
|
|
462
|
-
className: "space-y-6",
|
|
463
|
-
children: [
|
|
464
|
-
/* @__PURE__ */ jsx(AgentSearchCard, {
|
|
465
|
-
agentId: resolved.agent.id,
|
|
466
|
-
model: resolved.model
|
|
467
|
-
}),
|
|
468
|
-
/* @__PURE__ */ jsx(AgentBrowserCard, { agentId: resolved.agent.id }),
|
|
469
|
-
/* @__PURE__ */ jsx(SettingsDetails, {
|
|
470
|
-
agentId: resolved.agent.id,
|
|
471
|
-
currentModelOverride: resolved.agent.modelOverride ?? null,
|
|
472
|
-
profileDefaultModel: resolved.profile.defaultModel,
|
|
473
|
-
currentReasoning: resolved.reasoningLevel,
|
|
474
|
-
modelGroups
|
|
475
|
-
}),
|
|
476
|
-
/* @__PURE__ */ jsxs(SectionCard, {
|
|
477
|
-
title: "Team",
|
|
478
|
-
description: "Move this permanent Agent between Team workspaces with an exact policy preview.",
|
|
479
|
-
children: [
|
|
480
|
-
/* @__PURE__ */ jsx(SectionTitle, { children: "Team" }),
|
|
481
|
-
/* @__PURE__ */ jsxs("p", {
|
|
482
|
-
className: "text-[0.9em] text-mocha-light",
|
|
483
|
-
children: [
|
|
484
|
-
"Current team: ",
|
|
485
|
-
/* @__PURE__ */ jsx("code", { children: resolved.team.id }),
|
|
486
|
-
" (",
|
|
487
|
-
resolved.team.name,
|
|
488
|
-
") —",
|
|
489
|
-
" ",
|
|
490
|
-
/* @__PURE__ */ jsx("code", { children: resolved.team.path }),
|
|
491
|
-
".",
|
|
492
|
-
" ",
|
|
493
|
-
/* @__PURE__ */ jsx("a", {
|
|
494
|
-
href: `/teams/${resolved.team.id}`,
|
|
495
|
-
children: "view / edit USER.md"
|
|
496
|
-
})
|
|
497
|
-
]
|
|
498
|
-
}),
|
|
499
|
-
/* @__PURE__ */ jsx(MoveGroupForm, {
|
|
500
|
-
agentId: resolved.agent.id,
|
|
501
|
-
currentTeamId: resolved.team.id,
|
|
502
|
-
teams
|
|
503
|
-
})
|
|
504
|
-
]
|
|
505
|
-
}),
|
|
506
|
-
/* @__PURE__ */ jsx(SectionCard, {
|
|
507
|
-
title: "Skills",
|
|
508
|
-
description: "Attach or detach prompt skills for this Agent.",
|
|
509
|
-
children: /* @__PURE__ */ jsx(SkillsTable, {
|
|
510
|
-
agentId: resolved.agent.id,
|
|
511
|
-
attached: new Set(resolved.skills),
|
|
512
|
-
all: skills
|
|
513
|
-
})
|
|
514
|
-
}),
|
|
515
|
-
telegramConfigured && /* @__PURE__ */ jsx(SectionCard, {
|
|
516
|
-
title: "Telegram",
|
|
517
|
-
description: "Bind this Agent to its Telegram topic and control mirroring.",
|
|
518
|
-
children: /* @__PURE__ */ jsx(TelegramSection, { agent: resolved.agent })
|
|
519
|
-
})
|
|
520
|
-
]
|
|
521
|
-
}),
|
|
522
|
-
/* @__PURE__ */ jsx(ConfirmDialog, {
|
|
523
|
-
open: confirmAction !== null,
|
|
524
|
-
onOpenChange: (open) => {
|
|
525
|
-
if (!open) setConfirmAction(null);
|
|
526
|
-
},
|
|
527
|
-
title: confirmAction === "delete" ? `Delete ${resolved.agent.name} permanently?` : `Archive ${resolved.agent.name}?`,
|
|
528
|
-
description: confirmAction === "delete" ? /* @__PURE__ */ jsx("p", { children: "This permanently removes messages, triggers, skill attachments, sessions, and the Agent's private on-disk directory. This cannot be undone." }) : /* @__PURE__ */ jsx("p", { children: "The Agent will stop receiving normal work and disappear from current lists. You can restore it later from “Show archived”." }),
|
|
529
|
-
confirmLabel: confirmAction === "delete" ? "Delete permanently" : "Archive Agent",
|
|
530
|
-
confirmVariant: confirmAction === "delete" ? "danger" : "primary",
|
|
531
|
-
onConfirm: async () => {
|
|
532
|
-
setActionError(null);
|
|
533
|
-
try {
|
|
534
|
-
if (confirmAction === "delete") await del();
|
|
535
|
-
else await archive();
|
|
536
|
-
} catch (error) {
|
|
537
|
-
setActionError(error instanceof Error ? error.message : String(error));
|
|
538
|
-
throw error;
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
})
|
|
542
|
-
] });
|
|
543
|
-
}
|
|
544
|
-
function SectionTitle({ children }) {
|
|
545
|
-
return /* @__PURE__ */ jsx("h3", {
|
|
546
|
-
className: "mb-3 font-body text-[0.85em] font-semibold uppercase tracking-wider text-mocha-light",
|
|
547
|
-
children
|
|
548
|
-
});
|
|
549
|
-
}
|
|
550
|
-
function Tag({ children }) {
|
|
551
|
-
return /* @__PURE__ */ jsx("span", {
|
|
552
|
-
className: "inline-flex max-w-full min-w-0 flex-wrap items-center gap-1 break-all rounded-full border border-frost bg-ivory px-3 py-0.5 text-[0.84em] text-mocha-light",
|
|
553
|
-
children
|
|
554
|
-
});
|
|
555
|
-
}
|
|
556
|
-
function SettingsDetails({ agentId, currentModelOverride, profileDefaultModel, currentReasoning, modelGroups }) {
|
|
557
|
-
const router = useRouter();
|
|
558
|
-
const [modelOverride, setModelOverride] = useState(currentModelOverride ?? "");
|
|
559
|
-
const [reasoning, setReasoning] = useState(currentReasoning);
|
|
560
|
-
const [saving, setSaving] = useState(false);
|
|
561
|
-
const [savedFlash, setSavedFlash] = useState(false);
|
|
562
|
-
const [error, setError] = useState(null);
|
|
563
|
-
const currentInGroups = currentModelOverride !== null && modelGroups.some((g) => g.models.some((m) => `${g.provider}:${m}` === currentModelOverride));
|
|
564
|
-
async function save(e) {
|
|
565
|
-
e.preventDefault();
|
|
566
|
-
setSaving(true);
|
|
567
|
-
setError(null);
|
|
568
|
-
try {
|
|
569
|
-
const res = await fetch(`/api/agents/${encodeURIComponent(agentId)}`, {
|
|
570
|
-
method: "PATCH",
|
|
571
|
-
headers: { "content-type": "application/json" },
|
|
572
|
-
body: JSON.stringify({
|
|
573
|
-
modelOverride: modelOverride === "" ? null : modelOverride,
|
|
574
|
-
reasoningLevel: reasoning
|
|
575
|
-
})
|
|
576
|
-
});
|
|
577
|
-
if (!res.ok) {
|
|
578
|
-
const body = await res.json().catch(() => null);
|
|
579
|
-
throw new Error(body?.error ?? res.statusText);
|
|
580
|
-
}
|
|
581
|
-
setSavedFlash(true);
|
|
582
|
-
setTimeout(() => setSavedFlash(false), 1500);
|
|
583
|
-
await router.invalidate();
|
|
584
|
-
} catch (err) {
|
|
585
|
-
setError(err.message);
|
|
586
|
-
} finally {
|
|
587
|
-
setSaving(false);
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
return /* @__PURE__ */ jsx(SectionCard, {
|
|
591
|
-
title: "Model and reasoning",
|
|
592
|
-
description: "Override the Agent template defaults for this Agent only.",
|
|
593
|
-
children: /* @__PURE__ */ jsxs("form", {
|
|
594
|
-
onSubmit: save,
|
|
595
|
-
className: "grid gap-4 sm:grid-cols-2",
|
|
596
|
-
children: [
|
|
597
|
-
/* @__PURE__ */ jsxs("label", {
|
|
598
|
-
className: "m-0 flex min-w-0 flex-col gap-1 text-sm text-foreground",
|
|
599
|
-
children: ["Model override", /* @__PURE__ */ jsxs("select", {
|
|
600
|
-
name: "modelOverride",
|
|
601
|
-
value: modelOverride,
|
|
602
|
-
onChange: (e) => setModelOverride(e.target.value),
|
|
603
|
-
className: "min-w-0",
|
|
604
|
-
children: [
|
|
605
|
-
/* @__PURE__ */ jsxs("option", {
|
|
606
|
-
value: "",
|
|
607
|
-
children: [
|
|
608
|
-
"inherit from profile (",
|
|
609
|
-
profileDefaultModel,
|
|
610
|
-
")"
|
|
611
|
-
]
|
|
612
|
-
}),
|
|
613
|
-
currentModelOverride !== null && !currentInGroups && /* @__PURE__ */ jsxs("option", {
|
|
614
|
-
value: currentModelOverride,
|
|
615
|
-
children: [currentModelOverride, " (not in curated list)"]
|
|
616
|
-
}),
|
|
617
|
-
modelGroups.map((g) => /* @__PURE__ */ jsx("optgroup", {
|
|
618
|
-
label: g.provider,
|
|
619
|
-
children: g.models.map((m) => {
|
|
620
|
-
const value = `${g.provider}:${m}`;
|
|
621
|
-
return /* @__PURE__ */ jsx("option", {
|
|
622
|
-
value,
|
|
623
|
-
children: value
|
|
624
|
-
}, value);
|
|
625
|
-
})
|
|
626
|
-
}, g.provider))
|
|
627
|
-
]
|
|
628
|
-
})]
|
|
629
|
-
}),
|
|
630
|
-
/* @__PURE__ */ jsxs("label", {
|
|
631
|
-
className: "m-0 flex min-w-0 flex-col gap-1 text-sm text-foreground",
|
|
632
|
-
children: ["Reasoning level", /* @__PURE__ */ jsx("select", {
|
|
633
|
-
name: "reasoningLevel",
|
|
634
|
-
value: reasoning,
|
|
635
|
-
onChange: (e) => setReasoning(e.target.value),
|
|
636
|
-
className: "min-w-0",
|
|
637
|
-
children: REASONING_LEVELS.map((lvl) => /* @__PURE__ */ jsx("option", {
|
|
638
|
-
value: lvl,
|
|
639
|
-
children: lvl
|
|
640
|
-
}, lvl))
|
|
641
|
-
})]
|
|
642
|
-
}),
|
|
643
|
-
/* @__PURE__ */ jsxs("div", {
|
|
644
|
-
className: "flex flex-wrap items-center gap-3 sm:col-span-2",
|
|
645
|
-
children: [
|
|
646
|
-
/* @__PURE__ */ jsx(Button, {
|
|
647
|
-
variant: "primary",
|
|
648
|
-
type: "submit",
|
|
649
|
-
disabled: saving,
|
|
650
|
-
children: saving ? "Saving…" : "Save model settings"
|
|
651
|
-
}),
|
|
652
|
-
savedFlash && /* @__PURE__ */ jsx("span", {
|
|
653
|
-
role: "status",
|
|
654
|
-
className: "text-sm text-success",
|
|
655
|
-
children: "Saved"
|
|
656
|
-
}),
|
|
657
|
-
error && /* @__PURE__ */ jsx("span", {
|
|
658
|
-
role: "alert",
|
|
659
|
-
className: "text-sm text-danger",
|
|
660
|
-
children: error
|
|
661
|
-
})
|
|
662
|
-
]
|
|
663
|
-
})
|
|
664
|
-
]
|
|
665
|
-
})
|
|
666
|
-
});
|
|
667
|
-
}
|
|
668
|
-
function MoveGroupForm({ agentId, currentTeamId, teams }) {
|
|
669
|
-
const router = useRouter();
|
|
670
|
-
const [teamId, setTeamId] = useState(currentTeamId);
|
|
671
|
-
const [moving, setMoving] = useState(false);
|
|
672
|
-
const [placement, setPlacement] = useState("profile_defaults");
|
|
673
|
-
const [err, setErr] = useState(null);
|
|
674
|
-
const [preview, setPreview] = useState(null);
|
|
675
|
-
async function move(e) {
|
|
676
|
-
e.preventDefault();
|
|
677
|
-
if (teamId === currentTeamId) return;
|
|
678
|
-
setMoving(true);
|
|
679
|
-
setErr(null);
|
|
680
|
-
try {
|
|
681
|
-
const [sourceResponse, destinationResponse] = await Promise.all([fetch(`/api/teams/${encodeURIComponent(currentTeamId)}/policy`), fetch(`/api/teams/${encodeURIComponent(teamId)}/policy`)]);
|
|
682
|
-
if (!sourceResponse.ok || !destinationResponse.ok) throw new Error("A Team policy is unavailable. Nothing was moved.");
|
|
683
|
-
const source = await sourceResponse.json();
|
|
684
|
-
const destination = await destinationResponse.json();
|
|
685
|
-
const request = {
|
|
686
|
-
teamId,
|
|
687
|
-
sourceExpectedRevision: source.teamPolicy.revision,
|
|
688
|
-
destinationExpectedRevision: destination.teamPolicy.revision,
|
|
689
|
-
placement
|
|
690
|
-
};
|
|
691
|
-
if (!preview) {
|
|
692
|
-
const response = await fetch(`/api/agents/${encodeURIComponent(agentId)}/team/preview`, {
|
|
693
|
-
method: "POST",
|
|
694
|
-
headers: { "content-type": "application/json" },
|
|
695
|
-
body: JSON.stringify(request)
|
|
696
|
-
});
|
|
697
|
-
if (!response.ok) {
|
|
698
|
-
const body = await response.json().catch(() => null);
|
|
699
|
-
throw new Error(body?.error ?? response.statusText);
|
|
700
|
-
}
|
|
701
|
-
setPreview(await response.json());
|
|
702
|
-
return;
|
|
703
|
-
}
|
|
704
|
-
const res = await fetch(`/api/agents/${encodeURIComponent(agentId)}/team`, {
|
|
705
|
-
method: "PATCH",
|
|
706
|
-
headers: { "content-type": "application/json" },
|
|
707
|
-
body: JSON.stringify({
|
|
708
|
-
...request,
|
|
709
|
-
sourceExpectedRevision: preview.source.currentRevision,
|
|
710
|
-
destinationExpectedRevision: preview.destination.currentRevision
|
|
711
|
-
})
|
|
712
|
-
});
|
|
713
|
-
if (!res.ok) {
|
|
714
|
-
const body = await res.json().catch(() => null);
|
|
715
|
-
throw new Error(body?.error ?? res.statusText);
|
|
716
|
-
}
|
|
717
|
-
await router.invalidate();
|
|
718
|
-
} catch (e2) {
|
|
719
|
-
setErr(e2.message);
|
|
720
|
-
} finally {
|
|
721
|
-
setMoving(false);
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
return /* @__PURE__ */ jsxs("form", {
|
|
725
|
-
onSubmit: move,
|
|
726
|
-
className: "mt-2 flex flex-wrap items-end gap-2",
|
|
727
|
-
children: [
|
|
728
|
-
/* @__PURE__ */ jsxs("label", {
|
|
729
|
-
className: "flex min-w-0 flex-1 flex-col gap-1 text-[0.85em] text-mocha-light",
|
|
730
|
-
children: ["move to:", /* @__PURE__ */ jsx("select", {
|
|
731
|
-
value: teamId,
|
|
732
|
-
onChange: (e) => {
|
|
733
|
-
setTeamId(e.target.value);
|
|
734
|
-
setPreview(null);
|
|
735
|
-
},
|
|
736
|
-
className: "w-full min-w-0 rounded-sm border border-frost bg-snow px-2 py-1.5 sm:min-w-[18rem]",
|
|
737
|
-
children: teams.map((g) => /* @__PURE__ */ jsxs("option", {
|
|
738
|
-
value: g.id,
|
|
739
|
-
children: [
|
|
740
|
-
g.id,
|
|
741
|
-
" — ",
|
|
742
|
-
g.path
|
|
743
|
-
]
|
|
744
|
-
}, g.id))
|
|
745
|
-
})]
|
|
746
|
-
}),
|
|
747
|
-
/* @__PURE__ */ jsxs("label", {
|
|
748
|
-
className: "flex flex-col gap-1 text-[0.85em] text-mocha-light",
|
|
749
|
-
children: ["destination placement:", /* @__PURE__ */ jsxs("select", {
|
|
750
|
-
value: placement,
|
|
751
|
-
onChange: (e) => {
|
|
752
|
-
setPlacement(e.target.value);
|
|
753
|
-
setPreview(null);
|
|
754
|
-
},
|
|
755
|
-
className: "rounded-sm border border-frost bg-snow px-2 py-1.5",
|
|
756
|
-
children: [/* @__PURE__ */ jsx("option", {
|
|
757
|
-
value: "profile_defaults",
|
|
758
|
-
children: "Agent-template defaults"
|
|
759
|
-
}), /* @__PURE__ */ jsx("option", {
|
|
760
|
-
value: "isolated",
|
|
761
|
-
children: "isolated"
|
|
762
|
-
})]
|
|
763
|
-
})]
|
|
764
|
-
}),
|
|
765
|
-
/* @__PURE__ */ jsx(Button, {
|
|
766
|
-
variant: "primary",
|
|
767
|
-
type: "submit",
|
|
768
|
-
disabled: moving || teamId === currentTeamId,
|
|
769
|
-
children: moving ? "working…" : preview ? "commit reviewed move" : "review move"
|
|
770
|
-
}),
|
|
771
|
-
err && /* @__PURE__ */ jsx("span", {
|
|
772
|
-
role: "alert",
|
|
773
|
-
className: "basis-full text-[0.85em] text-danger",
|
|
774
|
-
children: err
|
|
775
|
-
}),
|
|
776
|
-
preview && /* @__PURE__ */ jsxs("div", {
|
|
777
|
-
className: "basis-full rounded-md border border-sapphire-light bg-sapphire-glow p-3 text-sm",
|
|
778
|
-
children: [/* @__PURE__ */ jsxs("p", { children: [
|
|
779
|
-
"Source revision ",
|
|
780
|
-
preview.source.currentRevision,
|
|
781
|
-
" → ",
|
|
782
|
-
/* @__PURE__ */ jsx("strong", { children: preview.source.resultingRevision }),
|
|
783
|
-
", removing ",
|
|
784
|
-
preview.source.removedEdges.length,
|
|
785
|
-
" incident edges. Destination revision ",
|
|
786
|
-
preview.destination.currentRevision,
|
|
787
|
-
" → ",
|
|
788
|
-
/* @__PURE__ */ jsx("strong", { children: preview.destination.resultingRevision }),
|
|
789
|
-
", adding ",
|
|
790
|
-
preview.destination.addedEdges.length,
|
|
791
|
-
" edges to ",
|
|
792
|
-
preview.destination.existingEdges.length,
|
|
793
|
-
" existing edges."
|
|
794
|
-
] }), /* @__PURE__ */ jsx("p", {
|
|
795
|
-
className: "mt-1 muted",
|
|
796
|
-
children: preview.lineage
|
|
797
|
-
})]
|
|
798
|
-
})
|
|
799
|
-
]
|
|
800
|
-
});
|
|
801
|
-
}
|
|
802
|
-
function SkillsTable({ agentId, attached, all }) {
|
|
803
|
-
const router = useRouter();
|
|
804
|
-
const [pending, setPending] = useState(null);
|
|
805
|
-
const [err, setErr] = useState(null);
|
|
806
|
-
const [riskySkill, setRiskySkill] = useState(null);
|
|
807
|
-
const [detachSkill, setDetachSkill] = useState(null);
|
|
808
|
-
async function attach(skill, findingsConfirmed = false) {
|
|
809
|
-
const findings = skill.scanFindings ?? [];
|
|
810
|
-
if (findings.length > 0 && !findingsConfirmed) {
|
|
811
|
-
setRiskySkill(skill);
|
|
812
|
-
return;
|
|
813
|
-
}
|
|
814
|
-
setPending(skill.name);
|
|
815
|
-
setErr(null);
|
|
816
|
-
try {
|
|
817
|
-
const res = await fetch(`/api/agents/${encodeURIComponent(agentId)}/skills`, {
|
|
818
|
-
method: "POST",
|
|
819
|
-
headers: { "content-type": "application/json" },
|
|
820
|
-
body: JSON.stringify({
|
|
821
|
-
skill: skill.name,
|
|
822
|
-
allowFindings: findings.length > 0
|
|
823
|
-
})
|
|
824
|
-
});
|
|
825
|
-
if (!res.ok) {
|
|
826
|
-
const body = await res.json().catch(() => null);
|
|
827
|
-
throw new Error(body?.error ?? res.statusText);
|
|
828
|
-
}
|
|
829
|
-
await router.invalidate();
|
|
830
|
-
} catch (e) {
|
|
831
|
-
setErr(e instanceof Error ? e.message : String(e));
|
|
832
|
-
throw e;
|
|
833
|
-
} finally {
|
|
834
|
-
setPending(null);
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
async function detach(name) {
|
|
838
|
-
setPending(name);
|
|
839
|
-
setErr(null);
|
|
840
|
-
try {
|
|
841
|
-
const res = await fetch(`/api/agents/${encodeURIComponent(agentId)}/skills/${encodeURIComponent(name)}`, { method: "DELETE" });
|
|
842
|
-
if (!res.ok && res.status !== 204) {
|
|
843
|
-
const body = await res.json().catch(() => null);
|
|
844
|
-
throw new Error(body?.error ?? res.statusText);
|
|
845
|
-
}
|
|
846
|
-
await router.invalidate();
|
|
847
|
-
} catch (e) {
|
|
848
|
-
setErr(e.message);
|
|
849
|
-
throw e;
|
|
850
|
-
} finally {
|
|
851
|
-
setPending(null);
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
if (all.length === 0) return /* @__PURE__ */ jsx("p", {
|
|
855
|
-
className: "text-[0.9em] text-mocha-light",
|
|
856
|
-
children: "no skills installed"
|
|
857
|
-
});
|
|
858
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
859
|
-
err && /* @__PURE__ */ jsx("p", {
|
|
860
|
-
role: "alert",
|
|
861
|
-
className: "mb-2 text-[0.85em] text-danger",
|
|
862
|
-
children: err
|
|
863
|
-
}),
|
|
864
|
-
/* @__PURE__ */ jsxs("table", {
|
|
865
|
-
className: "hidden md:table",
|
|
866
|
-
children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
867
|
-
/* @__PURE__ */ jsx("th", { children: "name" }),
|
|
868
|
-
/* @__PURE__ */ jsx("th", { children: "description" }),
|
|
869
|
-
/* @__PURE__ */ jsx("th", { children: "scan" }),
|
|
870
|
-
/* @__PURE__ */ jsx("th", {})
|
|
871
|
-
] }) }), /* @__PURE__ */ jsx("tbody", { children: all.map((s) => {
|
|
872
|
-
const isAttached = attached.has(s.name);
|
|
873
|
-
const busy = pending === s.name;
|
|
874
|
-
return /* @__PURE__ */ jsxs("tr", { children: [
|
|
875
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("code", { children: s.name }) }),
|
|
876
|
-
/* @__PURE__ */ jsx("td", { children: s.description || /* @__PURE__ */ jsx("span", {
|
|
877
|
-
className: "text-mocha-light",
|
|
878
|
-
children: "—"
|
|
879
|
-
}) }),
|
|
880
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(SkillFindingSummary, { findings: s.scanFindings ?? [] }) }),
|
|
881
|
-
/* @__PURE__ */ jsx("td", { children: isAttached ? /* @__PURE__ */ jsx(Button, {
|
|
882
|
-
variant: "ghost",
|
|
883
|
-
disabled: busy,
|
|
884
|
-
onClick: () => setDetachSkill(s.name),
|
|
885
|
-
children: busy ? "…" : "detach"
|
|
886
|
-
}) : /* @__PURE__ */ jsx(Button, {
|
|
887
|
-
variant: "ghost",
|
|
888
|
-
disabled: busy,
|
|
889
|
-
onClick: () => void attach(s).catch(() => {}),
|
|
890
|
-
children: busy ? "…" : "attach"
|
|
891
|
-
}) })
|
|
892
|
-
] }, s.name);
|
|
893
|
-
}) })]
|
|
894
|
-
}),
|
|
895
|
-
/* @__PURE__ */ jsx("div", {
|
|
896
|
-
className: "grid gap-3 md:hidden",
|
|
897
|
-
children: all.map((skill) => {
|
|
898
|
-
const isAttached = attached.has(skill.name);
|
|
899
|
-
const busy = pending === skill.name;
|
|
900
|
-
return /* @__PURE__ */ jsxs("article", {
|
|
901
|
-
className: "min-w-0 rounded-xl border border-border bg-muted/20 p-4",
|
|
902
|
-
children: [
|
|
903
|
-
/* @__PURE__ */ jsxs("div", {
|
|
904
|
-
className: "flex min-w-0 items-start justify-between gap-3",
|
|
905
|
-
children: [/* @__PURE__ */ jsx("code", {
|
|
906
|
-
className: "min-w-0 break-all font-mono text-sm",
|
|
907
|
-
children: skill.name
|
|
908
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
909
|
-
className: `shrink-0 text-xs font-semibold ${isAttached ? "text-success" : "text-muted-foreground"}`,
|
|
910
|
-
children: isAttached ? "Attached" : "Available"
|
|
911
|
-
})]
|
|
912
|
-
}),
|
|
913
|
-
/* @__PURE__ */ jsx("p", {
|
|
914
|
-
className: "mt-2 text-sm text-muted-foreground",
|
|
915
|
-
children: skill.description || "No description provided."
|
|
916
|
-
}),
|
|
917
|
-
/* @__PURE__ */ jsx("div", {
|
|
918
|
-
className: "mt-2",
|
|
919
|
-
children: /* @__PURE__ */ jsx(SkillFindingSummary, { findings: skill.scanFindings ?? [] })
|
|
920
|
-
}),
|
|
921
|
-
/* @__PURE__ */ jsx("div", {
|
|
922
|
-
className: "mt-3",
|
|
923
|
-
children: isAttached ? /* @__PURE__ */ jsx(Button, {
|
|
924
|
-
variant: "ghost",
|
|
925
|
-
disabled: busy,
|
|
926
|
-
onClick: () => setDetachSkill(skill.name),
|
|
927
|
-
children: busy ? "Detaching…" : "Detach"
|
|
928
|
-
}) : /* @__PURE__ */ jsx(Button, {
|
|
929
|
-
variant: "ghost",
|
|
930
|
-
disabled: busy,
|
|
931
|
-
onClick: () => void attach(skill).catch(() => {}),
|
|
932
|
-
children: busy ? "Attaching…" : "Attach"
|
|
933
|
-
})
|
|
934
|
-
})
|
|
935
|
-
]
|
|
936
|
-
}, skill.name);
|
|
937
|
-
})
|
|
938
|
-
}),
|
|
939
|
-
/* @__PURE__ */ jsx(ConfirmDialog, {
|
|
940
|
-
open: riskySkill !== null,
|
|
941
|
-
onOpenChange: (open) => {
|
|
942
|
-
if (!open) setRiskySkill(null);
|
|
943
|
-
},
|
|
944
|
-
title: `Attach ${riskySkill?.name ?? "skill"} despite scan findings?`,
|
|
945
|
-
description: /* @__PURE__ */ jsxs("div", {
|
|
946
|
-
className: "space-y-2",
|
|
947
|
-
children: [/* @__PURE__ */ jsxs("p", { children: [
|
|
948
|
-
"Static scanning found ",
|
|
949
|
-
riskySkill?.scanFindings?.length ?? 0,
|
|
950
|
-
" potentially unsafe instruction",
|
|
951
|
-
riskySkill?.scanFindings?.length === 1 ? "" : "s",
|
|
952
|
-
". Review the findings before allowing this skill into the Agent's prompt."
|
|
953
|
-
] }), /* @__PURE__ */ jsx(SkillFindingSummary, { findings: riskySkill?.scanFindings ?? [] })]
|
|
954
|
-
}),
|
|
955
|
-
confirmLabel: "Attach despite findings",
|
|
956
|
-
onConfirm: async () => {
|
|
957
|
-
if (riskySkill) await attach(riskySkill, true);
|
|
958
|
-
}
|
|
959
|
-
}),
|
|
960
|
-
/* @__PURE__ */ jsx(ConfirmDialog, {
|
|
961
|
-
open: detachSkill !== null,
|
|
962
|
-
onOpenChange: (open) => {
|
|
963
|
-
if (!open) setDetachSkill(null);
|
|
964
|
-
},
|
|
965
|
-
title: `Detach ${detachSkill ?? "skill"}?`,
|
|
966
|
-
description: /* @__PURE__ */ jsx("p", { children: "This removes the skill's instructions from this Agent's future turns. It does not uninstall the skill, and you can attach it again later." }),
|
|
967
|
-
confirmLabel: "Detach skill",
|
|
968
|
-
onConfirm: async () => {
|
|
969
|
-
if (detachSkill) await detach(detachSkill);
|
|
970
|
-
}
|
|
971
|
-
})
|
|
972
|
-
] });
|
|
973
|
-
}
|
|
974
|
-
function SkillFindingSummary({ findings }) {
|
|
975
|
-
if (findings.length === 0) return /* @__PURE__ */ jsx("span", {
|
|
976
|
-
className: "text-mocha-light",
|
|
977
|
-
children: "clean"
|
|
978
|
-
});
|
|
979
|
-
return /* @__PURE__ */ jsxs("details", {
|
|
980
|
-
className: "text-[0.82em]",
|
|
981
|
-
children: [/* @__PURE__ */ jsxs("summary", {
|
|
982
|
-
className: findings.some((f) => f.severity === "danger") ? "cursor-pointer text-danger" : "cursor-pointer text-mocha",
|
|
983
|
-
children: [
|
|
984
|
-
findings.length,
|
|
985
|
-
" finding",
|
|
986
|
-
findings.length === 1 ? "" : "s"
|
|
987
|
-
]
|
|
988
|
-
}), /* @__PURE__ */ jsx("ul", {
|
|
989
|
-
className: "m-0 list-disc pl-4",
|
|
990
|
-
children: findings.map((f, i) => /* @__PURE__ */ jsxs("li", { children: [
|
|
991
|
-
/* @__PURE__ */ jsx("span", {
|
|
992
|
-
className: "font-mono",
|
|
993
|
-
children: f.severity
|
|
994
|
-
}),
|
|
995
|
-
": ",
|
|
996
|
-
f.code,
|
|
997
|
-
f.line ? ` line ${f.line}` : "",
|
|
998
|
-
" - ",
|
|
999
|
-
f.message
|
|
1000
|
-
] }, `${f.code}-${f.line ?? 0}-${i}`))
|
|
1001
|
-
})]
|
|
1002
|
-
});
|
|
1003
|
-
}
|
|
1004
|
-
function TelegramSection({ agent }) {
|
|
1005
|
-
const router = useRouter();
|
|
1006
|
-
const [busy, setBusy] = useState(false);
|
|
1007
|
-
const [error, setError] = useState(null);
|
|
1008
|
-
const [mirrorMode, setMirrorMode] = useState(agent.telegramMirrorMode);
|
|
1009
|
-
const [iconEmoji, setIconEmoji] = useState(agent.telegramIconEmoji ?? "");
|
|
1010
|
-
const [confirmUnbind, setConfirmUnbind] = useState(false);
|
|
1011
|
-
const isBound = agent.telegramTopicId !== null;
|
|
1012
|
-
async function bind() {
|
|
1013
|
-
setBusy(true);
|
|
1014
|
-
setError(null);
|
|
1015
|
-
try {
|
|
1016
|
-
const res = await fetch(`/api/agents/${encodeURIComponent(agent.id)}/telegram/bind`, { method: "POST" });
|
|
1017
|
-
if (!res.ok) {
|
|
1018
|
-
const body = await res.json().catch(() => null);
|
|
1019
|
-
throw new Error(body?.error ?? res.statusText);
|
|
1020
|
-
}
|
|
1021
|
-
const result = await res.json();
|
|
1022
|
-
window.open(result.deepLink, "_blank", "noopener");
|
|
1023
|
-
await router.invalidate();
|
|
1024
|
-
} catch (e) {
|
|
1025
|
-
setError(e.message);
|
|
1026
|
-
} finally {
|
|
1027
|
-
setBusy(false);
|
|
1028
|
-
}
|
|
1029
|
-
}
|
|
1030
|
-
async function unbind() {
|
|
1031
|
-
setBusy(true);
|
|
1032
|
-
setError(null);
|
|
1033
|
-
try {
|
|
1034
|
-
const res = await fetch(`/api/agents/${encodeURIComponent(agent.id)}/telegram/binding`, { method: "DELETE" });
|
|
1035
|
-
if (!res.ok && res.status !== 204) {
|
|
1036
|
-
const body = await res.json().catch(() => null);
|
|
1037
|
-
throw new Error(body?.error ?? `Could not unbind Telegram topic (${res.status})`);
|
|
1038
|
-
}
|
|
1039
|
-
await router.invalidate();
|
|
1040
|
-
} catch (e) {
|
|
1041
|
-
setError(e instanceof Error ? e.message : String(e));
|
|
1042
|
-
throw e;
|
|
1043
|
-
} finally {
|
|
1044
|
-
setBusy(false);
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
async function saveMirrorMode(next) {
|
|
1048
|
-
setMirrorMode(next);
|
|
1049
|
-
try {
|
|
1050
|
-
const res = await fetch(`/api/agents/${encodeURIComponent(agent.id)}`, {
|
|
1051
|
-
method: "PATCH",
|
|
1052
|
-
headers: { "content-type": "application/json" },
|
|
1053
|
-
body: JSON.stringify({ telegramMirrorMode: next })
|
|
1054
|
-
});
|
|
1055
|
-
if (!res.ok) throw new Error(res.statusText);
|
|
1056
|
-
await router.invalidate();
|
|
1057
|
-
} catch (e) {
|
|
1058
|
-
setMirrorMode(agent.telegramMirrorMode);
|
|
1059
|
-
setError(e.message);
|
|
1060
|
-
}
|
|
1061
|
-
}
|
|
1062
|
-
async function saveIcon() {
|
|
1063
|
-
setError(null);
|
|
1064
|
-
try {
|
|
1065
|
-
const res = await fetch(`/api/agents/${encodeURIComponent(agent.id)}`, {
|
|
1066
|
-
method: "PATCH",
|
|
1067
|
-
headers: { "content-type": "application/json" },
|
|
1068
|
-
body: JSON.stringify({ telegramIconEmoji: iconEmoji.trim() || null })
|
|
1069
|
-
});
|
|
1070
|
-
if (!res.ok) throw new Error(res.statusText);
|
|
1071
|
-
await router.invalidate();
|
|
1072
|
-
} catch (e) {
|
|
1073
|
-
setError(e.message);
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
1077
|
-
className: "text-[0.9em]",
|
|
1078
|
-
children: [
|
|
1079
|
-
/* @__PURE__ */ jsx("div", {
|
|
1080
|
-
className: "mb-3 flex flex-wrap items-center gap-3",
|
|
1081
|
-
children: isBound ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1082
|
-
/* @__PURE__ */ jsx("span", {
|
|
1083
|
-
className: "rounded-full bg-success/10 px-2 py-0.5 text-xs font-semibold text-success",
|
|
1084
|
-
children: "bound"
|
|
1085
|
-
}),
|
|
1086
|
-
/* @__PURE__ */ jsxs("span", {
|
|
1087
|
-
className: "font-mono text-mocha",
|
|
1088
|
-
children: ["topic #", agent.telegramTopicId]
|
|
1089
|
-
}),
|
|
1090
|
-
/* @__PURE__ */ jsx("button", {
|
|
1091
|
-
type: "button",
|
|
1092
|
-
onClick: bind,
|
|
1093
|
-
disabled: busy,
|
|
1094
|
-
className: "ghost-btn",
|
|
1095
|
-
title: "Open the topic in Telegram (works on desktop/Android; iOS shows the topic list)",
|
|
1096
|
-
children: "open in Telegram"
|
|
1097
|
-
}),
|
|
1098
|
-
/* @__PURE__ */ jsx(Button, {
|
|
1099
|
-
variant: "danger",
|
|
1100
|
-
onClick: () => setConfirmUnbind(true),
|
|
1101
|
-
disabled: busy,
|
|
1102
|
-
children: "Unbind"
|
|
1103
|
-
})
|
|
1104
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
1105
|
-
className: "rounded-full bg-warning/10 px-2 py-0.5 text-xs font-semibold text-warning",
|
|
1106
|
-
children: "unbound"
|
|
1107
|
-
}), /* @__PURE__ */ jsx("button", {
|
|
1108
|
-
type: "button",
|
|
1109
|
-
onClick: bind,
|
|
1110
|
-
disabled: busy,
|
|
1111
|
-
className: "ghost-btn",
|
|
1112
|
-
title: "Create a Telegram topic for this agent",
|
|
1113
|
-
children: busy ? "binding…" : "bind a topic"
|
|
1114
|
-
})] })
|
|
1115
|
-
}),
|
|
1116
|
-
/* @__PURE__ */ jsxs("div", {
|
|
1117
|
-
className: "flex flex-col gap-1 sm:flex-row sm:items-center sm:gap-2",
|
|
1118
|
-
children: [/* @__PURE__ */ jsx("label", {
|
|
1119
|
-
htmlFor: "mirror-mode",
|
|
1120
|
-
className: "m-0 text-mocha-light",
|
|
1121
|
-
children: "Mirror mode"
|
|
1122
|
-
}), /* @__PURE__ */ jsxs("select", {
|
|
1123
|
-
id: "mirror-mode",
|
|
1124
|
-
value: mirrorMode,
|
|
1125
|
-
onChange: (e) => void saveMirrorMode(e.target.value),
|
|
1126
|
-
className: "rounded-md border bg-background px-2 py-1 font-mono text-sm",
|
|
1127
|
-
disabled: busy,
|
|
1128
|
-
children: [/* @__PURE__ */ jsx("option", {
|
|
1129
|
-
value: "minimal",
|
|
1130
|
-
children: "minimal — assistant messages only"
|
|
1131
|
-
}), /* @__PURE__ */ jsx("option", {
|
|
1132
|
-
value: "verbose",
|
|
1133
|
-
children: "verbose — also tool calls"
|
|
1134
|
-
})]
|
|
1135
|
-
})]
|
|
1136
|
-
}),
|
|
1137
|
-
/* @__PURE__ */ jsxs("div", {
|
|
1138
|
-
className: "mt-3 flex flex-wrap items-end gap-2",
|
|
1139
|
-
children: [
|
|
1140
|
-
/* @__PURE__ */ jsx("label", {
|
|
1141
|
-
htmlFor: "topic-icon",
|
|
1142
|
-
className: "m-0 text-mocha-light",
|
|
1143
|
-
children: "Topic icon"
|
|
1144
|
-
}),
|
|
1145
|
-
/* @__PURE__ */ jsx("input", {
|
|
1146
|
-
id: "topic-icon",
|
|
1147
|
-
value: iconEmoji,
|
|
1148
|
-
onChange: (e) => setIconEmoji(e.target.value),
|
|
1149
|
-
placeholder: "(profile default)",
|
|
1150
|
-
maxLength: 8,
|
|
1151
|
-
className: "w-32 rounded-md border bg-background px-2 py-1 font-mono text-sm",
|
|
1152
|
-
disabled: busy
|
|
1153
|
-
}),
|
|
1154
|
-
/* @__PURE__ */ jsx("button", {
|
|
1155
|
-
type: "button",
|
|
1156
|
-
onClick: () => void saveIcon(),
|
|
1157
|
-
disabled: busy || iconEmoji === (agent.telegramIconEmoji ?? ""),
|
|
1158
|
-
className: "ghost-btn",
|
|
1159
|
-
children: "save icon"
|
|
1160
|
-
})
|
|
1161
|
-
]
|
|
1162
|
-
}),
|
|
1163
|
-
error && /* @__PURE__ */ jsx("p", {
|
|
1164
|
-
role: "alert",
|
|
1165
|
-
className: "mt-2 text-sm text-danger",
|
|
1166
|
-
children: error
|
|
1167
|
-
}),
|
|
1168
|
-
/* @__PURE__ */ jsx("p", {
|
|
1169
|
-
className: "mt-3 text-[0.85em] text-mocha-light",
|
|
1170
|
-
children: "When bound, every assistant turn for this agent gets mirrored to the topic. Typing in the topic triggers a new turn. iOS Telegram clients have a known limitation that prevents inline link deep-links from opening directly into a topic — bound state is still functional; navigate via the topic list manually."
|
|
1171
|
-
})
|
|
1172
|
-
]
|
|
1173
|
-
}), /* @__PURE__ */ jsx(ConfirmDialog, {
|
|
1174
|
-
open: confirmUnbind,
|
|
1175
|
-
onOpenChange: setConfirmUnbind,
|
|
1176
|
-
title: `Unbind ${agent.name} from Telegram?`,
|
|
1177
|
-
description: /* @__PURE__ */ jsx("p", { children: "Telegram ingress and mirroring stop for this Agent. The existing forum topic remains in Telegram as an orphan until you remove it there." }),
|
|
1178
|
-
confirmLabel: "Unbind Telegram topic",
|
|
1179
|
-
onConfirm: unbind
|
|
1180
|
-
})] });
|
|
1181
|
-
}
|
|
1182
|
-
//#endregion
|
|
1183
|
-
export { AgentDetailPage as component };
|