@overlordai/server 1.0.76 → 1.0.78
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/database/repositories/task.repository.d.ts +1 -0
- package/dist/database/repositories/task.repository.d.ts.map +1 -1
- package/dist/database/repositories/task.repository.js +7 -0
- package/dist/database/repositories/task.repository.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/web/frame-handlers/progress.handler.d.ts.map +1 -1
- package/dist/web/frame-handlers/progress.handler.js +4 -0
- package/dist/web/frame-handlers/progress.handler.js.map +1 -1
- package/package.json +4 -4
- package/public/assets/{AccessTokensPage-HdCYJa75.js → AccessTokensPage-B6_fWEBP.js} +1 -1
- package/public/assets/{AdminPage-D0DGfKeC.js → AdminPage-C_v25c0x.js} +1 -1
- package/public/assets/{ApiReferencePage-CHgGzez9.js → ApiReferencePage-CYLRiFX7.js} +1 -1
- package/public/assets/{ArchitecturePage-BLaVm-RT.js → ArchitecturePage-BRhekDQJ.js} +1 -1
- package/public/assets/{AuditLogPage-ZQDfN6L2.js → AuditLogPage-odG3piBe.js} +2 -2
- package/public/assets/{BindPlatformPage-BlS6wVHU.js → BindPlatformPage-CLvh8Bp2.js} +1 -1
- package/public/assets/{BotIntegrationPage-huJbbEp5.js → BotIntegrationPage-DFIKhj9d.js} +1 -1
- package/public/assets/{BotManage-aUmSjI1o.js → BotManage-2HtDdVv1.js} +1 -1
- package/public/assets/{BotSetupPage-Cv9n4JE8.js → BotSetupPage-n8DW-JIc.js} +1 -1
- package/public/assets/{ChangelogPage-BEihl-PT.js → ChangelogPage-ljWPJI_C.js} +1 -1
- package/public/assets/{CliReferencePage-Bi4QqQW_.js → CliReferencePage-D6HE7aqg.js} +1 -1
- package/public/assets/{DeploymentPage-C13_DqXl.js → DeploymentPage-BkC2WS0X.js} +1 -1
- package/public/assets/{DevWorkflowPage-BN5U4PpB.js → DevWorkflowPage-Zjb_g_7T.js} +1 -1
- package/public/assets/{DeveloperManage-CVkEj-GC.js → DeveloperManage-C3yFOhR0.js} +2 -2
- package/public/assets/{DeveloperSetupPage-ee3KC_yg.js → DeveloperSetupPage-M6J5WtmL.js} +1 -1
- package/public/assets/{DocsIndexPage-CcQ47yH4.js → DocsIndexPage-BdYY0bOk.js} +4 -4
- package/public/assets/DocsLayout-BbAqJHIO.js +1 -0
- package/public/assets/{DocsPrimitives-D_xTbmba.js → DocsPrimitives-kq9vBAzD.js} +1 -1
- package/public/assets/{EditProjectPage-BoM1gu0v.js → EditProjectPage-DisNJeAg.js} +2 -2
- package/public/assets/{EmptyState-BQgUq8FU.js → EmptyState-BQVGct4g.js} +1 -1
- package/public/assets/{EnvVariablesPage-Cs_Vrd_A.js → EnvVariablesPage-CuHHcFKu.js} +1 -1
- package/public/assets/{HomePage-BV0m_XJd.js → HomePage-DdkVTsOL.js} +1 -1
- package/public/assets/{InfoRow-Co_nykFf.js → InfoRow-Dpfw3QiV.js} +1 -1
- package/public/assets/{InstallationPage-yO4Ok1ZK.js → InstallationPage-BKVql2sz.js} +1 -1
- package/public/assets/LandingPage-bv7kElRB.js +33 -0
- package/public/assets/{LocalDevelopmentPage-DnZwN8ps.js → LocalDevelopmentPage-CUkTIbZb.js} +1 -1
- package/public/assets/{LoginPage-CTqF4VQa.js → LoginPage-B3Rs6BOm.js} +1 -1
- package/public/assets/{MetricBar-DIYwY_X1.js → MetricBar-CfTtNirJ.js} +1 -1
- package/public/assets/{NotFoundPage-BYPR4ndS.js → NotFoundPage-DyPcvSl9.js} +1 -1
- package/public/assets/{OnboardingGuide-CJKcE06d.js → OnboardingGuide-C87ArIaT.js} +1 -1
- package/public/assets/{PermissionsPage-NyuAcw0g.js → PermissionsPage-M4x6R-By.js} +1 -1
- package/public/assets/{PipelineConfigPage-Bt4TM7LK.js → PipelineConfigPage-BcrMm1vI.js} +1 -1
- package/public/assets/{PipelineEditorPage-C0CaNfhQ.js → PipelineEditorPage-CAYiXX0V.js} +1 -1
- package/public/assets/{ProfilePage-BNcja3TW.js → ProfilePage-8l-iMHnM.js} +1 -1
- package/public/assets/{ProjectDetailPage-BZbRE6zC.js → ProjectDetailPage-33RT7os8.js} +3 -3
- package/public/assets/{ProjectListPage-B1sWLmSr.js → ProjectListPage-CUHo7VwS.js} +1 -1
- package/public/assets/{PtyTerminal-4TaY1kgl.js → PtyTerminal-GBlFxP4w.js} +12 -7
- package/public/assets/{QuickAuth-B9i5aIAm.js → QuickAuth-CKWWIMdj.js} +1 -1
- package/public/assets/{RemoveMemberConfirmDialog-PTZ4yZLA.js → RemoveMemberConfirmDialog-DebT7Iww.js} +1 -1
- package/public/assets/{Select-DzcHkMFW.js → Select-whtPZbZ2.js} +1 -1
- package/public/assets/{SettingsPage-cljP-LVJ.js → SettingsPage-C2Db7obY.js} +1 -1
- package/public/assets/{Skeleton-BR0DoH0N.js → Skeleton-CjvMhglG.js} +1 -1
- package/public/assets/{SkillPage-CNmqjhZ1.js → SkillPage-Cwg7zBb6.js} +1 -1
- package/public/assets/{TaskDetailPage-DVwaQllQ.js → TaskDetailPage-BLZqkopc.js} +2 -2
- package/public/assets/{TaskListPage-C7a89N4m.js → TaskListPage-CI9mCUsn.js} +1 -1
- package/public/assets/{TaskStatusBadge-D_Jw_cst.js → TaskStatusBadge-PdGq2XxP.js} +1 -1
- package/public/assets/{TerminalHomePage-CDy66NL4.js → TerminalHomePage-D-w4h3iq.js} +3 -8
- package/public/assets/{TokenManage-s1HsCpRE.js → TokenManage-COQZNfbz.js} +1 -1
- package/public/assets/{TotpSetupPage-BDbdnX4M.js → TotpSetupPage-ebavRpD7.js} +1 -1
- package/public/assets/WorkerDetailPage-DpFTilWr.js +1 -0
- package/public/assets/WorkerListPage-DoQxA9Md.js +6 -0
- package/public/assets/{WorkerOperationsPage-CMbnqwmO.js → WorkerOperationsPage-CN4pXG5t.js} +1 -1
- package/public/assets/{WorkerSetupGuidePage-Hu_9GEqj.js → WorkerSetupGuidePage-Wvck_cEr.js} +1 -1
- package/public/assets/{WorkerSetupPage-ykJJzCFL.js → WorkerSetupPage-CV35GYSK.js} +1 -1
- package/public/assets/{arrow-left-CDuSMrWp.js → arrow-left-XmcNxEPm.js} +1 -1
- package/public/assets/{arrow-right-3wSL_8gn.js → arrow-right-Bm7UfWKB.js} +1 -1
- package/public/assets/{bot-D_0cntUM.js → bot-DV0Ml0Pr.js} +1 -1
- package/public/assets/{chevron-right-BarF-1AB.js → chevron-right-BSazmjxp.js} +1 -1
- package/public/assets/{copy-Btb09PwL.js → copy-CX4krhaQ.js} +1 -1
- package/public/assets/{download-D9JgkXvp.js → download-DG52uO3H.js} +1 -1
- package/public/assets/{external-link-4_nsu_co.js → external-link-aIJ6uRqy.js} +1 -1
- package/public/assets/index-CB29rhot.css +1 -0
- package/public/assets/{index-XalE15Aa.js → index-y1Zb2xN4.js} +55 -45
- package/public/assets/{key-D4tKYtq0.js → key-DU4O771U.js} +1 -1
- package/public/assets/{loader-circle-D0LpN5IB.js → loader-circle-DzBlc5as.js} +1 -1
- package/public/assets/{pencil-UTucmT5t.js → pencil-Ca2CRHc2.js} +1 -1
- package/public/assets/{plus-CBPo9p9z.js → plus-QoSQh1Ci.js} +1 -1
- package/public/assets/{rotate-ccw-Dg7_RL_a.js → rotate-ccw-MV4xHG6J.js} +1 -1
- package/public/assets/{scroll-text-Dyl0Pr4m.js → scroll-text-BYr5IgPD.js} +1 -1
- package/public/assets/{settings-D3lyLPwd.js → settings-Dz3BpGMr.js} +1 -1
- package/public/assets/{status-colors-tZq0K5Ad.js → status-colors-DxwFeYp0.js} +1 -1
- package/public/assets/{task-constants-D7DvweHm.js → task-constants-DnSoMOPb.js} +1 -1
- package/public/assets/{trash-2-oqlQYQiX.js → trash-2-DH-jzGMr.js} +1 -1
- package/public/assets/{useFetch-rAH39ftj.js → useFetch-BuZrNB5l.js} +1 -1
- package/public/assets/{users-6K6_kLrk.js → users-Cs7l6K9q.js} +1 -1
- package/public/assets/{wifi-LKenGVZV.js → wifi-DssF_9t2.js} +1 -1
- package/public/assets/{workflow-Ck4Lwoo5.js → workflow-l3FdQ5M5.js} +1 -1
- package/public/index.html +3 -3
- package/public/sw.js +1 -1
- package/public/assets/DocsLayout-BbUFudE1.js +0 -1
- package/public/assets/LandingPage-BSagkLUI.js +0 -28
- package/public/assets/WorkerDetailPage-BwTlDQuc.js +0 -1
- package/public/assets/WorkerListPage-CWn51Nsl.js +0 -1
- package/public/assets/code-xml-BgTCXCKf.js +0 -6
- package/public/assets/index-CG1vw6aK.css +0 -1
- package/public/assets/layout-grid-SPgDVvMd.js +0 -6
- package/public/assets/message-square-RhP4vE3x.js +0 -6
- package/public/assets/zap-DHrFvUYe.js +0 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as I,D as C,a as D,r as l,j as e,X as
|
|
1
|
+
import{c as I,D as C,a as D,r as l,j as e,X as R,h as E,u as z,p as V,U as k}from"./index-y1Zb2xN4.js";import{S as O}from"./Select-whtPZbZ2.js";import{v as q}from"./password-CHk45-jw.js";import{E as $}from"./EmptyState-BQVGct4g.js";import{T as G}from"./Skeleton-CjvMhglG.js";import{u as H}from"./useFetch-BuZrNB5l.js";import{c as L}from"./status-colors-DxwFeYp0.js";import{P as B}from"./plus-QoSQh1Ci.js";import{U as J}from"./users-Cs7l6K9q.js";import{P as K}from"./pencil-Ca2CRHc2.js";import{R as Q}from"./rotate-ccw-MV4xHG6J.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -13,4 +13,4 @@ import{c as I,D as C,a as D,r as l,j as e,X as M,g as E,u as z,o as V,M as k}fro
|
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const Z=I("UserX",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]),P=Object.values(C).map(a=>({value:a,label:a}));function ee({isOpen:a,onClose:s,onCreated:n}){const{t:o}=D(),[r,i]=l.useState(""),[x,u]=l.useState(""),[m,b]=l.useState(""),[d,f]=l.useState(""),[h,y]=l.useState("developer"),[j,t]=l.useState(!1),[g,v]=l.useState("");function R(){i(""),u(""),b(""),f(""),y("developer"),v("")}function N(){R(),s()}async function U(){if(v(""),!r.trim()||!x.trim()||!m.trim()||!d.trim()){v(o("admin.all_fields_required"));return}const p=q(d);if(p){v(o(p));return}try{t(!0),await E.post("admin/developers",{json:{name:r.trim(),gitName:x.trim(),gitEmail:m.trim(),password:d,role:h}}).json(),N(),n()}catch(w){const c=w instanceof Error?w.message:o("admin.failed_to_create_developer");v(c)}finally{t(!1)}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:N}),e.jsxs("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// ",o("admin.create_developer_title")]}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:N,children:e.jsx(M,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[g&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:g}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("common.name")}),e.jsx("input",{type:"text",placeholder:"e.g. jdoe",value:r,onChange:p=>i(p.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("profile.git_name")}),e.jsx("input",{type:"text",placeholder:"e.g. John Doe",value:x,onChange:p=>u(p.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("profile.git_email")}),e.jsx("input",{type:"email",placeholder:"e.g. john@example.com",value:m,onChange:p=>b(p.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("auth.password")}),e.jsx("input",{type:"password",placeholder:"10-20 chars, letters + digits + special",value:d,onChange:p=>f(p.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:o("admin.password_hint")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("common.role")}),e.jsx(O,{value:h,onChange:y,options:P})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:N,children:o("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity disabled:opacity-50",disabled:j,onClick:U,children:o(j?"common.creating":"common.create")})]})]})]}):null}function te({isOpen:a,developer:s,onClose:n,onUpdated:o}){var p,w;const{t:r}=D(),i=z(c=>c.user),[x,u]=l.useState(s.name),[m,b]=l.useState(s.role),[d,f]=l.useState(((p=s.platformUids)==null?void 0:p.lark)??""),[h,y]=l.useState(((w=s.platformUids)==null?void 0:w.slack)??""),[j,t]=l.useState(!1),[g,v]=l.useState(""),N=s.id===(i==null?void 0:i.id)&&s.role===C.ADMIN&&m!==C.ADMIN;l.useEffect(()=>{var c,_;u(s.name),b(s.role),f(((c=s.platformUids)==null?void 0:c.lark)??""),y(((_=s.platformUids)==null?void 0:_.slack)??""),v("")},[s]);async function U(){var c,_;if(v(""),!x.trim()){v(r("admin.display_name_required"));return}N&&v(r("admin.demote_self_warning"));try{t(!0);const S={name:x.trim(),role:m},A=((c=s.platformUids)==null?void 0:c.lark)??"",F=((_=s.platformUids)==null?void 0:_.slack)??"";if(d.trim()!==A||h.trim()!==F){const T={};T.lark=d.trim(),T.slack=h.trim(),S.platformUids=T}await E.put(`admin/developers/${s.id}`,{json:S}).json(),n(),o()}catch(S){const A=S instanceof Error?S.message:r("admin.failed_to_update_developer");v(A)}finally{t(!1)}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:n}),e.jsxs("div",{className:"relative z-10 mx-2 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// ",r("admin.edit_developer_title")]}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:e.jsx(M,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[g&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:g}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("common.name")}),e.jsx("input",{type:"text",value:s.name,readOnly:!0,disabled:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-muted)] opacity-60"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("admin.display_name")}),e.jsx("input",{type:"text",value:x,onChange:c=>u(c.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("common.role")}),e.jsx(O,{value:m,onChange:b,options:P}),N&&e.jsx("div",{className:"mt-2 rounded-[4px] border border-[var(--warning)] bg-[var(--warning)]/10 px-3 py-2 text-xs text-[var(--warning)]",children:r("admin.demote_self_inline_warning")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("admin.platform_accounts")}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-muted)]",children:r("admin.lark_uid")}),e.jsx("input",{type:"text",value:d,onChange:c=>f(c.target.value),placeholder:"ou_xxxxxxxxxx",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-muted)]",children:r("admin.slack_uid")}),e.jsx("input",{type:"text",value:h,onChange:c=>y(c.target.value),placeholder:"U0XXXXXXXXX",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})]})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:r("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity disabled:opacity-50",disabled:j,onClick:U,children:r(j?"common.saving":"common.save_changes")})]})]})]}):null}function ae({isOpen:a,developer:s,onClose:n,onConfirmed:o}){const{t:r}=D(),[i,x]=l.useState(!1),[u,m]=l.useState("");async function b(){m("");try{x(!0),await E.put(`admin/developers/${s.id}/reset-totp`),n(),o()}catch(d){const f=d instanceof Error?d.message:r("admin.failed_to_reset_2fa");m(f)}finally{x(!1)}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:n}),e.jsxs("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{className:"h-4 w-4 text-yellow-400"}),e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// ",r("admin.reset_2fa")]})]}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:e.jsx(M,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-3 px-5 py-5",children:[u&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:u}),e.jsxs("p",{className:"text-xs text-[var(--text-primary)]",children:[r("admin.reset_2fa_confirm_message")," ",e.jsx("span",{className:"text-[var(--accent)]",children:s.name}),"?"]}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("admin.reset_2fa_audit_note")})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:r("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-yellow-600 px-3 py-1.5 text-xs text-white hover:opacity-90 transition-opacity disabled:opacity-50",disabled:i,onClick:b,children:r(i?"admin.resetting":"admin.reset_2fa")})]})]})]}):null}function L({dev:a,currentUserId:s,onEdit:n,onReset2fa:o,onToggleStatus:r}){const{t:i}=D();return e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-white/[0.05] transition-colors",title:i("common.edit"),onClick:()=>n(a),children:e.jsx(K,{className:"h-3.5 w-3.5"})}),a.id!==s&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-white/[0.05] transition-colors",title:i("admin.reset_2fa"),onClick:()=>o(a),children:e.jsx(Q,{className:"h-3.5 w-3.5"})}),e.jsx("button",{type:"button",className:`rounded-[4px] p-2.5 md:p-1.5 transition-colors hover:bg-white/[0.05] ${a.status===k.ACTIVE?"text-red-400 hover:text-red-300":"text-green-400 hover:text-green-300"}`,title:a.status===k.ACTIVE?i("admin.deactivate"):i("admin.activate"),onClick:()=>r(a),children:a.status===k.ACTIVE?e.jsx(Z,{className:"h-3.5 w-3.5"}):e.jsx(Y,{className:"h-3.5 w-3.5"})})]})]})}function ue(){const{t:a}=D(),s=z(t=>t.user),[n,o]=l.useState(""),[r,i]=l.useState(!1),[x,u]=l.useState(null),[m,b]=l.useState(null),{data:d,loading:f,refetch:h}=H(()=>{const t={};return n&&(t.q=n),E.get("admin/developers",{searchParams:t}).json()},[n]);async function y(t){const g=t.status===k.ACTIVE?k.DISABLED:k.ACTIVE;try{await E.put(`admin/developers/${t.id}`,{json:{status:g}}),h()}catch{}}function j(t){switch(t){case C.ADMIN:return"text-yellow-400";case C.DEVELOPER:return"text-blue-400";default:return"text-[var(--text-secondary)]"}}return e.jsxs("div",{className:"font-mono",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("admin.developers_title")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("admin.developers_subtitle")})]}),e.jsxs("button",{type:"button",className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity",onClick:()=>i(!0),children:[e.jsx(B,{className:"h-3.5 w-3.5"}),a("admin.create_developer")]})]}),e.jsx("div",{className:"mb-4",children:e.jsxs("div",{className:"relative w-full max-w-xs",children:[e.jsx(V,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[var(--text-muted)]"}),e.jsx("input",{type:"text",placeholder:a("admin.search_developers"),value:n,onChange:t=>o(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] py-1.5 pl-8 pr-3 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})}),f?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(G,{rows:4})}):!d||d.length===0?e.jsx($,{icon:J,title:a(n?"admin.no_matching_developers":"admin.no_developers_found"),description:a(n?"admin.try_adjusting_search":"admin.create_first_developer"),actionLabel:n?void 0:a("admin.create_developer"),onAction:n?void 0:()=>i(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-left text-[var(--text-muted)]",children:[e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.dev_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.display_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.role")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.status")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.totp")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("common.created_at")}),e.jsx("th",{className:"pb-2 font-normal",children:a("common.actions")})]})}),e.jsx("tbody",{children:d.map(t=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-primary)]",children:t.name}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:t.gitName}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:j(t.role),children:t.role})}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:X(t.status),children:t.status})}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:t.totpEnabled?"text-green-400":"text-[var(--text-muted)]",children:t.totpEnabled?a("common.enabled"):a("common.disabled")})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-muted)]",children:new Date(t.createdAt).toLocaleDateString()}),e.jsx("td",{className:"py-2.5",children:e.jsx(L,{dev:t,currentUserId:s==null?void 0:s.id,onEdit:u,onReset2fa:b,onToggleStatus:y})})]},t.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3",children:d.map(t=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)] font-medium",children:t.name}),e.jsx(L,{dev:t,currentUserId:s==null?void 0:s.id,onEdit:u,onReset2fa:b,onToggleStatus:y})]}),e.jsx("div",{className:"text-[11px] text-[var(--text-secondary)] mb-1",children:t.gitName}),e.jsxs("div",{className:"flex items-center gap-3 text-[11px]",children:[e.jsx("span",{className:j(t.role),children:t.role}),e.jsx("span",{className:X(t.status),children:t.status}),e.jsx("span",{className:t.totpEnabled?"text-green-400":"text-[var(--text-muted)]",children:t.totpEnabled?a("common.enabled"):a("common.disabled")})]})]},t.id))})]}),e.jsx(ee,{isOpen:r,onClose:()=>i(!1),onCreated:h}),x&&e.jsx(te,{isOpen:!!x,developer:x,onClose:()=>u(null),onUpdated:h}),m&&e.jsx(ae,{isOpen:!!m,developer:m,onClose:()=>b(null),onConfirmed:h})]})}export{ue as default};
|
|
16
|
+
*/const Z=I("UserX",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]),P=Object.values(C).map(a=>({value:a,label:a}));function ee({isOpen:a,onClose:s,onCreated:n}){const{t:o}=D(),[r,i]=l.useState(""),[x,u]=l.useState(""),[m,b]=l.useState(""),[d,f]=l.useState(""),[h,y]=l.useState("developer"),[j,t]=l.useState(!1),[g,v]=l.useState("");function X(){i(""),u(""),b(""),f(""),y("developer"),v("")}function N(){X(),s()}async function U(){if(v(""),!r.trim()||!x.trim()||!m.trim()||!d.trim()){v(o("admin.all_fields_required"));return}const p=q(d);if(p){v(o(p));return}try{t(!0),await E.post("admin/developers",{json:{name:r.trim(),gitName:x.trim(),gitEmail:m.trim(),password:d,role:h}}).json(),N(),n()}catch(w){const c=w instanceof Error?w.message:o("admin.failed_to_create_developer");v(c)}finally{t(!1)}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:N}),e.jsxs("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// ",o("admin.create_developer_title")]}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:N,children:e.jsx(R,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[g&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:g}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("common.name")}),e.jsx("input",{type:"text",placeholder:"e.g. jdoe",value:r,onChange:p=>i(p.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("profile.git_name")}),e.jsx("input",{type:"text",placeholder:"e.g. John Doe",value:x,onChange:p=>u(p.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("profile.git_email")}),e.jsx("input",{type:"email",placeholder:"e.g. john@example.com",value:m,onChange:p=>b(p.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("auth.password")}),e.jsx("input",{type:"password",placeholder:"10-20 chars, letters + digits + special",value:d,onChange:p=>f(p.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:o("admin.password_hint")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("common.role")}),e.jsx(O,{value:h,onChange:y,options:P})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:N,children:o("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity disabled:opacity-50",disabled:j,onClick:U,children:o(j?"common.creating":"common.create")})]})]})]}):null}function te({isOpen:a,developer:s,onClose:n,onUpdated:o}){var p,w;const{t:r}=D(),i=z(c=>c.user),[x,u]=l.useState(s.name),[m,b]=l.useState(s.role),[d,f]=l.useState(((p=s.platformUids)==null?void 0:p.lark)??""),[h,y]=l.useState(((w=s.platformUids)==null?void 0:w.slack)??""),[j,t]=l.useState(!1),[g,v]=l.useState(""),N=s.id===(i==null?void 0:i.id)&&s.role===C.ADMIN&&m!==C.ADMIN;l.useEffect(()=>{var c,_;u(s.name),b(s.role),f(((c=s.platformUids)==null?void 0:c.lark)??""),y(((_=s.platformUids)==null?void 0:_.slack)??""),v("")},[s]);async function U(){var c,_;if(v(""),!x.trim()){v(r("admin.display_name_required"));return}N&&v(r("admin.demote_self_warning"));try{t(!0);const S={name:x.trim(),role:m},A=((c=s.platformUids)==null?void 0:c.lark)??"",F=((_=s.platformUids)==null?void 0:_.slack)??"";if(d.trim()!==A||h.trim()!==F){const T={};T.lark=d.trim(),T.slack=h.trim(),S.platformUids=T}await E.put(`admin/developers/${s.id}`,{json:S}).json(),n(),o()}catch(S){const A=S instanceof Error?S.message:r("admin.failed_to_update_developer");v(A)}finally{t(!1)}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:n}),e.jsxs("div",{className:"relative z-10 mx-2 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// ",r("admin.edit_developer_title")]}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:e.jsx(R,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[g&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:g}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("common.name")}),e.jsx("input",{type:"text",value:s.name,readOnly:!0,disabled:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-muted)] opacity-60"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("admin.display_name")}),e.jsx("input",{type:"text",value:x,onChange:c=>u(c.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("common.role")}),e.jsx(O,{value:m,onChange:b,options:P}),N&&e.jsx("div",{className:"mt-2 rounded-[4px] border border-[var(--warning)] bg-[var(--warning)]/10 px-3 py-2 text-xs text-[var(--warning)]",children:r("admin.demote_self_inline_warning")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("admin.platform_accounts")}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-muted)]",children:r("admin.lark_uid")}),e.jsx("input",{type:"text",value:d,onChange:c=>f(c.target.value),placeholder:"ou_xxxxxxxxxx",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-muted)]",children:r("admin.slack_uid")}),e.jsx("input",{type:"text",value:h,onChange:c=>y(c.target.value),placeholder:"U0XXXXXXXXX",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})]})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:r("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity disabled:opacity-50",disabled:j,onClick:U,children:r(j?"common.saving":"common.save_changes")})]})]})]}):null}function ae({isOpen:a,developer:s,onClose:n,onConfirmed:o}){const{t:r}=D(),[i,x]=l.useState(!1),[u,m]=l.useState("");async function b(){m("");try{x(!0),await E.put(`admin/developers/${s.id}/reset-totp`),n(),o()}catch(d){const f=d instanceof Error?d.message:r("admin.failed_to_reset_2fa");m(f)}finally{x(!1)}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:n}),e.jsxs("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{className:"h-4 w-4 text-yellow-400"}),e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// ",r("admin.reset_2fa")]})]}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:e.jsx(R,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-3 px-5 py-5",children:[u&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:u}),e.jsxs("p",{className:"text-xs text-[var(--text-primary)]",children:[r("admin.reset_2fa_confirm_message")," ",e.jsx("span",{className:"text-[var(--accent)]",children:s.name}),"?"]}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("admin.reset_2fa_audit_note")})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:r("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-yellow-600 px-3 py-1.5 text-xs text-white hover:opacity-90 transition-opacity disabled:opacity-50",disabled:i,onClick:b,children:r(i?"admin.resetting":"admin.reset_2fa")})]})]})]}):null}function M({dev:a,currentUserId:s,onEdit:n,onReset2fa:o,onToggleStatus:r}){const{t:i}=D();return e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-white/[0.05] transition-colors",title:i("common.edit"),onClick:()=>n(a),children:e.jsx(K,{className:"h-3.5 w-3.5"})}),a.id!==s&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-white/[0.05] transition-colors",title:i("admin.reset_2fa"),onClick:()=>o(a),children:e.jsx(Q,{className:"h-3.5 w-3.5"})}),e.jsx("button",{type:"button",className:`rounded-[4px] p-2.5 md:p-1.5 transition-colors hover:bg-white/[0.05] ${a.status===k.ACTIVE?"text-red-400 hover:text-red-300":"text-green-400 hover:text-green-300"}`,title:a.status===k.ACTIVE?i("admin.deactivate"):i("admin.activate"),onClick:()=>r(a),children:a.status===k.ACTIVE?e.jsx(Z,{className:"h-3.5 w-3.5"}):e.jsx(Y,{className:"h-3.5 w-3.5"})})]})]})}function ue(){const{t:a}=D(),s=z(t=>t.user),[n,o]=l.useState(""),[r,i]=l.useState(!1),[x,u]=l.useState(null),[m,b]=l.useState(null),{data:d,loading:f,refetch:h}=H(()=>{const t={};return n&&(t.q=n),E.get("admin/developers",{searchParams:t}).json()},[n]);async function y(t){const g=t.status===k.ACTIVE?k.DISABLED:k.ACTIVE;try{await E.put(`admin/developers/${t.id}`,{json:{status:g}}),h()}catch{}}function j(t){switch(t){case C.ADMIN:return"text-yellow-400";case C.DEVELOPER:return"text-blue-400";default:return"text-[var(--text-secondary)]"}}return e.jsxs("div",{className:"font-mono",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("admin.developers_title")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("admin.developers_subtitle")})]}),e.jsxs("button",{type:"button",className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity",onClick:()=>i(!0),children:[e.jsx(B,{className:"h-3.5 w-3.5"}),a("admin.create_developer")]})]}),e.jsx("div",{className:"mb-4",children:e.jsxs("div",{className:"relative w-full max-w-xs",children:[e.jsx(V,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[var(--text-muted)]"}),e.jsx("input",{type:"text",placeholder:a("admin.search_developers"),value:n,onChange:t=>o(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] py-1.5 pl-8 pr-3 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})}),f?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(G,{rows:4})}):!d||d.length===0?e.jsx($,{icon:J,title:a(n?"admin.no_matching_developers":"admin.no_developers_found"),description:a(n?"admin.try_adjusting_search":"admin.create_first_developer"),actionLabel:n?void 0:a("admin.create_developer"),onAction:n?void 0:()=>i(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-left text-[var(--text-muted)]",children:[e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.dev_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.display_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.role")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.status")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.totp")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("common.created_at")}),e.jsx("th",{className:"pb-2 font-normal",children:a("common.actions")})]})}),e.jsx("tbody",{children:d.map(t=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-primary)]",children:t.name}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:t.gitName}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:j(t.role),children:t.role})}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:L(t.status),children:t.status})}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:t.totpEnabled?"text-green-400":"text-[var(--text-muted)]",children:t.totpEnabled?a("common.enabled"):a("common.disabled")})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-muted)]",children:new Date(t.createdAt).toLocaleDateString()}),e.jsx("td",{className:"py-2.5",children:e.jsx(M,{dev:t,currentUserId:s==null?void 0:s.id,onEdit:u,onReset2fa:b,onToggleStatus:y})})]},t.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3",children:d.map(t=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)] font-medium",children:t.name}),e.jsx(M,{dev:t,currentUserId:s==null?void 0:s.id,onEdit:u,onReset2fa:b,onToggleStatus:y})]}),e.jsx("div",{className:"text-[11px] text-[var(--text-secondary)] mb-1",children:t.gitName}),e.jsxs("div",{className:"flex items-center gap-3 text-[11px]",children:[e.jsx("span",{className:j(t.role),children:t.role}),e.jsx("span",{className:L(t.status),children:t.status}),e.jsx("span",{className:t.totpEnabled?"text-green-400":"text-[var(--text-muted)]",children:t.totpEnabled?a("common.enabled"):a("common.disabled")})]})]},t.id))})]}),e.jsx(ee,{isOpen:r,onClose:()=>i(!1),onCreated:h}),x&&e.jsx(te,{isOpen:!!x,developer:x,onClose:()=>u(null),onUpdated:h}),m&&e.jsx(ae,{isOpen:!!m,developer:m,onClose:()=>b(null),onConfirmed:h})]})}export{ue as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./index-
|
|
1
|
+
import{j as e}from"./index-y1Zb2xN4.js";import{I as s,a as t}from"./DocsPrimitives-kq9vBAzD.js";import"./copy-CX4krhaQ.js";function l(){return e.jsx("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// overview"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["the ",e.jsx("code",{className:"text-[var(--accent)]",children:"ov"})," cli is the developer-facing command-line tool for interacting with overlord. install it on your laptop or workstation to create tasks, attach to running sessions, and monitor progress from your terminal."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// installation"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"install the developer cli globally:"}),e.jsx(s,{code:"npm install -g @overlordai/developer-cli"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// connect to your server"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"authenticate with your overlord server using a personal access token:"}),e.jsx(s,{code:"ov login https://overlord.yourdomain.com"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["you'll be prompted for a personal access token (pat). generate one in the web dashboard under ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"profile → access tokens"}),"."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"alternatively, use the one-step setup wizard:"}),e.jsx(s,{code:"ov setup"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"this prompts for both the server url and token interactively."})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// verify"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"confirm your connection is working:"}),e.jsx(s,{code:"ov whoami"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"should display your username and role."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// quick start"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> create a task"}),e.jsx(s,{code:'ov task create -d "fix the login bug" -p my-project'})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> watch a running task"}),e.jsx(t,{code:`ov attach <task_id>
|
|
2
2
|
|
|
3
3
|
# use --watch for read-only mode
|
|
4
4
|
# use --takeover to take control of the terminal`})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> list tasks"}),e.jsx(s,{code:"ov task list --status RUNNING"})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// next steps"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"developer cli reference"})," — full command reference for the ov cli"]}),e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"development workflow"})," — end-to-end guide for creating and managing tasks"]})]})]})]})})}export{l as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as e,a as n,j as s,S as _,b as p,d as m,L as
|
|
1
|
+
import{c as e,a as n,j as s,J as t,S as _,b as p,M as h,d as m,L as y}from"./index-y1Zb2xN4.js";import{D as v}from"./download-DG52uO3H.js";import{B as x}from"./bot-DV0Ml0Pr.js";import{G as k,W as b}from"./workflow-l3FdQ5M5.js";import{S as g}from"./settings-Dz3BpGMr.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -8,12 +8,12 @@ import{c as e,a as n,j as s,S as _,b as p,d as m,L as h}from"./index-XalE15Aa.js
|
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const
|
|
11
|
+
*/const w=e("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
12
12
|
* @license lucide-react v0.469.0 - ISC
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const
|
|
16
|
+
*/const f=e("Laptop",[["path",{d:"M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16",key:"tarvll"}]]);/**
|
|
17
17
|
* @license lucide-react v0.469.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
@@ -28,4 +28,4 @@ import{c as e,a as n,j as s,S as _,b as p,d as m,L as h}from"./index-XalE15Aa.js
|
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const j=e("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),N=[{titleKey:"docs.docs_nav_getting_started",cards:[{to:"/docs/installation",label:"docs.docs_installation",descKey:"docs.docs_desc_installation",icon:
|
|
31
|
+
*/const j=e("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),N=[{titleKey:"docs.docs_nav_getting_started",cards:[{to:"/docs/installation",label:"docs.docs_installation",descKey:"docs.docs_desc_installation",icon:v},{to:"/docs/developer-setup",label:"docs.docs_developer_setup",descKey:"docs.docs_desc_developer_setup",icon:t},{to:"/docs/worker-setup",label:"docs.docs_worker_setup",descKey:"docs.docs_desc_worker_setup",icon:_},{to:"/docs/bot-setup",label:"docs.docs_bot_setup",descKey:"docs.docs_desc_bot_setup",icon:x}]},{titleKey:"docs.docs_nav_guides",cards:[{to:"/docs/local-development",label:"docs.docs_local_dev",descKey:"docs.docs_desc_local_dev",icon:f},{to:"/docs/worker-operations",label:"docs.docs_worker_ops",descKey:"docs.docs_desc_worker_ops",icon:u},{to:"/docs/deployment",label:"docs.docs_deployment",descKey:"docs.docs_desc_deployment",icon:M},{to:"/docs/pipeline-config",label:"docs.docs_pipeline",descKey:"docs.docs_desc_pipeline",icon:k},{to:"/docs/dev-workflow",label:"docs.docs_dev_workflow",descKey:"docs.docs_desc_dev_workflow",icon:b}]},{titleKey:"docs.docs_nav_reference",cards:[{to:"/docs/cli",label:"docs.docs_cli",descKey:"docs.docs_desc_cli",icon:p},{to:"/docs/api",label:"docs.docs_api",descKey:"docs.docs_desc_api",icon:t},{to:"/docs/bot",label:"docs.docs_bot_integration",descKey:"docs.docs_desc_bot_integration",icon:h},{to:"/docs/skill",label:"docs.docs_skill",descKey:"docs.docs_desc_skill",icon:j},{to:"/docs/permissions",label:"docs.docs_permissions",descKey:"docs.docs_desc_permissions",icon:m},{to:"/docs/env-variables",label:"docs.docs_env_vars",descKey:"docs.docs_desc_env_vars",icon:g}]},{titleKey:"docs.docs_nav_other",cards:[{to:"/docs/architecture",label:"docs.docs_architecture",descKey:"docs.docs_desc_architecture",icon:K},{to:"/docs/changelog",label:"docs.docs_changelog",descKey:"docs.docs_desc_changelog",icon:w}]}];function q(){const{t:c}=n();return s.jsxs("div",{className:"mx-auto max-w-4xl font-mono lowercase",children:[s.jsxs("div",{className:"mb-8",children:[s.jsx("h1",{className:"text-sm text-[var(--text-primary)]",children:c("docs.docs_all_title")}),s.jsx("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:c("docs.docs_all_subtitle")})]}),s.jsx("div",{className:"space-y-8",children:N.map(({titleKey:o,cards:a})=>s.jsxs("section",{children:[s.jsx("h2",{className:"mb-3 text-xs font-semibold text-[var(--accent)]",children:c(o)}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:a.map(({to:d,label:l,descKey:r,icon:i})=>s.jsxs(y,{to:d,className:"flex items-start gap-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 transition-colors hover:border-[var(--accent)]",children:[s.jsx(i,{size:16,className:"mt-0.5 shrink-0 text-[var(--accent)]"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm text-[var(--text-primary)]",children:c(l)}),s.jsx("p",{className:"mt-0.5 text-xs text-[var(--text-muted)]",children:c(r)})]})]},d))})]},o))})]})}export{q as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i,g as x,j as a,L as d,b as m,J as b,M as p,e as u,O as v,Q as f}from"./index-y1Zb2xN4.js";import{A as h}from"./arrow-left-XmcNxEPm.js";const o=[{to:"/docs/cli",label:"cli",icon:m},{to:"/docs/api",label:"api",icon:b},{to:"/docs/bot",label:"bot",icon:p},{to:"/docs/all",label:"all",icon:u}],j=new Set(o.map(e=>e.to));function y(){const{t:e}=i(),r=x(),t=!j.has(r.pathname);return a.jsxs("div",{className:"flex h-full flex-col",children:[a.jsxs("nav",{className:"flex items-center border-b border-[var(--border)] bg-[var(--bg-card)] px-4 md:px-6 overflow-x-auto no-scrollbar",children:[t&&a.jsxs(d,{to:"/docs/all",className:"mr-3 shrink-0 flex items-center gap-1 text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:[a.jsx(h,{size:12}),e("docs.docs_back")]}),o.map(({to:s,label:c,icon:l})=>a.jsxs(v,{to:s,className:({isActive:n})=>`flex items-center gap-1.5 px-3 py-3 text-xs lowercase border-b-2 transition-colors shrink-0 ${n||t&&s==="/docs/all"?"border-[var(--accent)] text-[var(--accent)]":"border-transparent text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:[a.jsx(l,{size:14}),a.jsx("span",{children:c})]},s))]}),a.jsx("main",{className:"flex-1 overflow-auto p-4 md:p-6",children:a.jsx(f,{})})]})}export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,a as i,r as s,C as x}from"./index-
|
|
1
|
+
import{j as e,a as i,r as s,C as x}from"./index-y1Zb2xN4.js";import{C as p}from"./copy-CX4krhaQ.js";function o({text:t}){const{t:c}=i(),[n,a]=s.useState(!1),r=s.useRef(void 0);return s.useEffect(()=>()=>clearTimeout(r.current),[]),e.jsx("button",{onClick:async()=>{await navigator.clipboard.writeText(t),a(!0),clearTimeout(r.current),r.current=setTimeout(()=>a(!1),2e3)},className:"rounded-[4px] p-1 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",title:c("common.copy"),children:n?e.jsx(x,{className:"h-3 w-3 text-[var(--accent)]"}):e.jsx(p,{className:"h-3 w-3"})})}function m({code:t}){return e.jsxs("div",{className:"relative rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 overflow-x-auto",children:[e.jsx("div",{className:"absolute right-2 top-2",children:e.jsx(o,{text:t})}),e.jsx("pre",{className:"text-xs text-[var(--text-secondary)] whitespace-pre-wrap pr-8",children:t})]})}function d({code:t}){return e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 overflow-x-auto",children:[e.jsx("code",{className:"text-xs text-[var(--accent)] whitespace-nowrap",children:t}),e.jsx(o,{text:t})]})}export{o as C,d as I,m as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
npm run build`,className:"w-full resize-y rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.post_command"),children:e.jsx("input",{type:"text",value:
|
|
1
|
+
import{w as me,f as be,a as ve,r as s,G as j,A as p,h as i,j as e,L as je,z as ee,t as c}from"./index-y1Zb2xN4.js";import{S as te}from"./Select-whtPZbZ2.js";import{U as he,A as ge,R as ye}from"./RemoveMemberConfirmDialog-DebT7Iww.js";import{P as fe}from"./plus-QoSQh1Ci.js";function Ce(){const{key:n}=me(),l=be(),{t:r}=ve(),[o,re]=s.useState(null),[h,se]=s.useState([]),[ae,oe]=s.useState(!0),[C,g]=s.useState(!1),[y,S]=s.useState(""),[f,T]=s.useState(""),[M,I]=s.useState(""),[A,R]=s.useState(j.GITHUB),[P,U]=s.useState(""),[O,G]=s.useState(p.CLAUDE),[E,$]=s.useState(""),[D,L]=s.useState("50"),[B,F]=s.useState(""),[J,z]=s.useState(""),[q,H]=s.useState(""),[K,W]=s.useState("0"),[x,N]=s.useState(""),[X,k]=s.useState(null),[u,_]=s.useState(""),[Q,m]=s.useState(!1),[ne,V]=s.useState(!1),[d,w]=s.useState(null),[le,Y]=s.useState(!1),b=s.useCallback(async()=>{if(n)try{const[t,v]=await Promise.all([i.get(`web/projects/${n}`).json(),i.get(`web/projects/${n}/members`).json().catch(()=>[])]);if(re(t),se(v),k(t.gitTokenMasked??null),S(t.name),T(t.repoUrl),I(t.sshUrl??""),R(t.gitPlatform),U(t.defaultBranch),G(t.agentType),$(t.agentCommand??""),L(String(t.maxTurns)),F(t.workspaceRoot??""),z(t.setupCommands??""),H(t.testCommand??""),W(String(t.ptyOutputFilter??0)),t.pipeline)try{N(JSON.stringify(JSON.parse(t.pipeline),null,2))}catch{N(t.pipeline)}}catch{}finally{oe(!1)}},[n]);s.useEffect(()=>{b()},[b]);async function ce(t){if(t.preventDefault(),!o)return;g(!0);let v=null;if(x.trim())try{JSON.parse(x),v=x.trim()}catch{c.error(r("projects.invalid_pipeline_json")),g(!1);return}try{await i.put(`web/projects/${o.key}`,{json:{name:y,repoUrl:f,sshUrl:M||null,defaultBranch:P,gitPlatform:A,agentType:O,agentCommand:E||null,maxTurns:parseInt(D,10)||50,workspaceRoot:B||null,setupCommands:J||null,testCommand:q||null,ptyOutputFilter:parseInt(K,10)||0,pipeline:v}}),c.success(r("projects.project_saved")),l(`/projects/${o.key}`)}catch(Z){const ue=Z instanceof Error?Z.message:r("projects.failed_to_save_project");c.error(ue)}finally{g(!1)}}function de(){l(`/projects/${n}`)}async function ie(){if(!(!o||!u.trim())){m(!0);try{const t=await i.put(`web/projects/${o.key}/git-token`,{json:{token:u.trim()}}).json();k(t.gitTokenMasked),_(""),c.success(r("projects.git_token_saved"))}catch{c.error(r("projects.git_token_failed"))}finally{m(!1)}}}async function pe(){if(o){m(!0);try{await i.delete(`web/projects/${o.key}/git-token`),k(null),_(""),c.success(r("projects.git_token_cleared"))}catch{c.error(r("projects.git_token_failed"))}finally{m(!1)}}}async function xe(){if(!(!o||!d)){Y(!0);try{await i.delete(`web/projects/${o.key}/members`,{searchParams:{developerId:String(d.developerId)}}),await b()}catch{}finally{Y(!1),w(null)}}}return ae?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})}):o?e.jsxs("form",{onSubmit:ce,className:"mx-auto max-w-6xl px-4 md:px-6 py-8",children:[e.jsxs("div",{className:"mb-2 text-xs text-[var(--text-muted)]",children:[e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l("/projects"),children:r("projects.title")})," / ",e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l(`/projects/${o.key}`),children:o.key})," / ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:r("common.edit")})]}),e.jsx("h1",{className:"text-lg font-bold text-[var(--text-primary)] mb-4",children:r("projects.edit_project_title")}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_400px]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.basic_info")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.key"),children:e.jsx("input",{type:"text",value:o.key,readOnly:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-muted)] outline-none opacity-60 cursor-not-allowed"})}),e.jsx(a,{label:r("projects.name"),children:e.jsx("input",{type:"text",value:y,onChange:t=>S(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.repo_url"),children:e.jsx("input",{type:"text",value:f,onChange:t=>T(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsxs(a,{label:r("projects.ssh_url"),children:[e.jsx("input",{type:"text",value:M,onChange:t=>I(t.target.value),placeholder:r("projects.ssh_url_placeholder"),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:r("projects.ssh_url_hint")})]}),e.jsx(a,{label:r("projects.git_platform"),children:e.jsx(te,{value:A,onChange:t=>R(t),options:[{value:j.GITHUB,label:r("projects.github")},{value:j.GITLAB,label:r("projects.gitlab")},{value:j.GITEA,label:r("projects.gitea")}]})}),e.jsx(a,{label:r("projects.default_branch"),children:e.jsx("input",{type:"text",value:P,onChange:t=>U(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.agent_config")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.agent_type"),children:e.jsx(te,{value:O,onChange:t=>G(t),options:[{value:p.CLAUDE,label:r("projects.claude")},{value:p.CURSOR,label:r("projects.cursor")},{value:p.CODEX,label:r("projects.codex")},{value:p.CUSTOM,label:r("projects.custom")}]})}),e.jsx(a,{label:r("projects.agent_command"),children:e.jsx("input",{type:"text",value:E,onChange:t=>$(t.target.value),placeholder:"custom agent command",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.max_turns"),children:e.jsx("input",{type:"number",value:D,onChange:t=>L(t.target.value),min:1,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.workspace_root"),children:e.jsx("input",{type:"text",value:B,onChange:t=>F(t.target.value),placeholder:"/path/to/workspace",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.environment")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.setup_commands"),children:e.jsx("textarea",{value:J,onChange:t=>z(t.target.value),rows:3,placeholder:`npm install
|
|
2
|
+
npm run build`,className:"w-full resize-y rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.post_command"),children:e.jsx("input",{type:"text",value:q,onChange:t=>H(t.target.value),placeholder:"npm test",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.security")}),e.jsx("div",{className:"space-y-3",children:e.jsx(a,{label:r("projects.pty_output_filter"),children:e.jsx("input",{type:"text",value:K,onChange:t=>W(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.git_token")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.git_token_label"),children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:X??r("common.not_set")})})}),e.jsxs(a,{label:r("projects.git_token_set"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"password",value:u,onChange:t=>_(t.target.value),placeholder:"ghp_xxxx...",className:"flex-1 rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("button",{type:"button",disabled:Q||!u.trim(),onClick:ie,className:"shrink-0 rounded-[4px] bg-[var(--accent)] px-3 py-2 text-xs font-medium text-black hover:opacity-90 transition-opacity disabled:opacity-50",children:r("common.save")})]}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:r("projects.git_token_hint")})]}),X&&e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{type:"button",disabled:Q,onClick:pe,className:"rounded-[4px] border border-[var(--destructive)] px-3 py-1.5 text-xs text-[var(--destructive)] hover:opacity-70 transition-opacity disabled:opacity-50",children:r("projects.git_token_clear")})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--accent)]",children:r("projects.pipeline_section")}),e.jsx(je,{to:"/projects/"+n+"/pipeline",className:"text-xs text-[var(--accent)] hover:underline",children:r("projects.edit_pipeline")})]}),e.jsx("textarea",{value:x,onChange:t=>N(t.target.value),rows:20,spellCheck:!1,placeholder:'{"stages": []}',className:"w-full resize-y rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]",style:{fontFamily:'"JetBrains Mono", monospace',textTransform:"none"}})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--accent)]",children:r("projects.members")}),e.jsxs("button",{type:"button",onClick:()=>V(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs font-medium text-black",children:[e.jsx(fe,{className:"h-3.5 w-3.5"}),r("projects.add_member")]})]}),h.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("projects.no_members_yet")})]}):e.jsx("div",{className:"space-y-2",children:h.map(t=>e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-[var(--accent)]/20 text-xs font-bold text-[var(--accent)]",children:(t.developerName??String(t.developerId)).charAt(0).toUpperCase()}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:t.developerName??`#${t.developerId}`}),e.jsx("span",{className:"ml-2 rounded-[4px] px-1.5 py-0.5 text-[11px] font-medium",style:{color:t.role===ee.MAINTAINER?"var(--warning)":"var(--text-secondary)",background:t.role===ee.MAINTAINER?"rgba(245,158,11,0.1)":"rgba(163,163,163,0.1)"},children:t.role})]})]}),e.jsx("button",{type:"button",onClick:()=>w(t),className:"text-[var(--destructive)] hover:opacity-70 transition-opacity","aria-label":r("projects.remove_member"),children:e.jsx(he,{className:"h-3.5 w-3.5"})})]},t.developerId))})]})]})]}),e.jsxs("div",{className:"mt-8 flex items-center justify-end gap-3 border-t border-[var(--border)] pt-6",children:[e.jsx("button",{type:"button",onClick:de,className:"rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("common.discard")}),e.jsx("button",{type:"submit",disabled:C||!y||!f,className:"rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-medium text-black hover:opacity-90 transition-opacity disabled:opacity-50",children:r(C?"common.saving":"projects.save_changes")})]}),e.jsx(ge,{isOpen:ne,onClose:()=>V(!1),projectKey:o.key,existingMemberIds:h.map(t=>t.developerId),onAdded:b}),e.jsx(ye,{isOpen:!!d,onClose:()=>w(null),onConfirm:xe,memberName:d?d.developerName??`#${d.developerId}`:"",loading:le})]}):e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 text-center",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:r("projects.project_not_found")}),e.jsx("button",{onClick:()=>l("/projects"),className:"mt-4 rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:r("projects.back_to_projects")})]})}function a({label:n,children:l}){return e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-1 sm:gap-3",children:[e.jsx("label",{className:"sm:w-36 shrink-0 sm:pt-2 text-xs text-[var(--text-muted)]",children:n}),e.jsx("div",{className:"flex-1",children:l})]})}export{Ce as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./index-XalE15Aa.js";function s(){return e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// environment variables"}),e.jsx("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:"configuration reference for server and worker environment variables."})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> server variables"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"server configuration is stored in ~/.overlord/.env. these variables are set during overlord install and can be manually edited."}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"default"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"SERVER_PORT"})}),e.jsx("td",{className:"py-2 pr-4",children:"9000"}),e.jsx("td",{className:"py-2",children:"http/ws port"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"DB_PATH"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord/data/overlord.db"}),e.jsx("td",{className:"py-2",children:"sqlite database path"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"REDIS_URL"})}),e.jsx("td",{className:"py-2 pr-4",children:"redis://localhost:6379"}),e.jsx("td",{className:"py-2",children:"redis connection url"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"JWT_SECRET"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"jwt signing secret (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"WORKER_JWT_SECRET"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"worker jwt signing secret (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"ENCRYPTION_KEY"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"encryption key for sensitive data at rest (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"CORS_ORIGIN"})}),e.jsx("td",{className:"py-2 pr-4",children:"*"}),e.jsx("td",{className:"py-2",children:"allowed cors origins (comma-separated)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WEB_URL"})}),e.jsx("td",{className:"py-2 pr-4",children:"http://localhost:5173"}),e.jsx("td",{className:"py-2",children:"public url for notification links and bot cards (configured during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"GIT_TOKEN"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"git platform authentication token for mr/pr operations"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"TUNNEL_TTL_HOURS"})}),e.jsx("td",{className:"py-2 pr-4",children:"4"}),e.jsx("td",{className:"py-2",children:"cursor tunnel expiration in hours (max 24)"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LOG_LEVEL"})}),e.jsx("td",{className:"py-2 pr-4",children:"info"}),e.jsx("td",{className:"py-2",children:"log level: fatal, error, warn, info, debug, trace"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"never expose JWT_SECRET, WORKER_JWT_SECRET, or ENCRYPTION_KEY. these are generated automatically during installation and should not be shared or committed to version control."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> log levels"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"level"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"fatal"})}),e.jsx("td",{className:"py-2",children:"critical errors causing shutdown"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"error"})}),e.jsx("td",{className:"py-2",children:"runtime errors"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"warn"})}),e.jsx("td",{className:"py-2",children:"warnings"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"info"})}),e.jsx("td",{className:"py-2",children:"general operational info"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"debug"})}),e.jsx("td",{className:"py-2",children:"detailed debugging info"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"trace"})}),e.jsx("td",{className:"py-2",children:"very verbose tracing"})]})]})]})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> worker variables"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"worker configuration is stored in ~/.overlord-worker/.env. these are set during overlord setup worker."}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"default"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_HOST"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"server url (required)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKER_TOKEN"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"one-time registration token"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKER_NAME"})}),e.jsx("td",{className:"py-2 pr-4",children:"hostname"}),e.jsx("td",{className:"py-2",children:"display name for this worker"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKSPACE_ROOT"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord-worker/workspaces"}),e.jsx("td",{className:"py-2",children:"directory for task workspaces"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_MAX_SLOTS"})}),e.jsx("td",{className:"py-2 pr-4",children:"2"}),e.jsx("td",{className:"py-2",children:"maximum concurrent tasks"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_DATA_DIR"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord-worker"}),e.jsx("td",{className:"py-2",children:"config and jwt storage directory"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_SSH_KEY_PATH"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"ssh key for git clone/push operations"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"OVERLORD_WORKER_TOKEN is consumed on first registration. after that, the worker uses a jwt for authentication. the token field can remain in the .env file but will not be used again."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> redis configuration"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"redis is required for the server (used for bullmq task queue and pub/sub). recommended setting:"}),e.jsx("pre",{className:"rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 text-xs text-[var(--text-secondary)] overflow-x-auto",children:"appendonly yes"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"redis must have aof persistence enabled to minimize queue data loss on restart."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> file locations"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"path"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord/"})}),e.jsx("td",{className:"py-2",children:"server configuration directory"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord/.env"})}),e.jsx("td",{className:"py-2",children:"server environment variables"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord/data/overlord.db"})}),e.jsx("td",{className:"py-2",children:"sqlite database"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord/logs/"})}),e.jsx("td",{className:"py-2",children:"server log files"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord-worker/"})}),e.jsx("td",{className:"py-2",children:"worker configuration directory"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord-worker/.env"})}),e.jsx("td",{className:"py-2",children:"worker environment variables"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord-worker/workspaces/"})}),e.jsx("td",{className:"py-2",children:"task workspace directory"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord-worker/jwt.json"})}),e.jsx("td",{className:"py-2",children:"worker jwt credentials"})]})]})]})})]})]})]})}export{s as default};
|
|
1
|
+
import{j as e}from"./index-y1Zb2xN4.js";function s(){return e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// environment variables"}),e.jsx("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:"configuration reference for server and worker environment variables."})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> server variables"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"server configuration is stored in ~/.overlord/.env. these variables are set during overlord install and can be manually edited."}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"default"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"SERVER_PORT"})}),e.jsx("td",{className:"py-2 pr-4",children:"9000"}),e.jsx("td",{className:"py-2",children:"http/ws port"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"DB_PATH"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord/data/overlord.db"}),e.jsx("td",{className:"py-2",children:"sqlite database path"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"REDIS_URL"})}),e.jsx("td",{className:"py-2 pr-4",children:"redis://localhost:6379"}),e.jsx("td",{className:"py-2",children:"redis connection url"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"JWT_SECRET"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"jwt signing secret (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"WORKER_JWT_SECRET"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"worker jwt signing secret (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"ENCRYPTION_KEY"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"encryption key for sensitive data at rest (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"CORS_ORIGIN"})}),e.jsx("td",{className:"py-2 pr-4",children:"*"}),e.jsx("td",{className:"py-2",children:"allowed cors origins (comma-separated)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WEB_URL"})}),e.jsx("td",{className:"py-2 pr-4",children:"http://localhost:5173"}),e.jsx("td",{className:"py-2",children:"public url for notification links and bot cards (configured during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"GIT_TOKEN"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"git platform authentication token for mr/pr operations"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"TUNNEL_TTL_HOURS"})}),e.jsx("td",{className:"py-2 pr-4",children:"4"}),e.jsx("td",{className:"py-2",children:"cursor tunnel expiration in hours (max 24)"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LOG_LEVEL"})}),e.jsx("td",{className:"py-2 pr-4",children:"info"}),e.jsx("td",{className:"py-2",children:"log level: fatal, error, warn, info, debug, trace"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"never expose JWT_SECRET, WORKER_JWT_SECRET, or ENCRYPTION_KEY. these are generated automatically during installation and should not be shared or committed to version control."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> log levels"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"level"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"fatal"})}),e.jsx("td",{className:"py-2",children:"critical errors causing shutdown"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"error"})}),e.jsx("td",{className:"py-2",children:"runtime errors"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"warn"})}),e.jsx("td",{className:"py-2",children:"warnings"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"info"})}),e.jsx("td",{className:"py-2",children:"general operational info"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"debug"})}),e.jsx("td",{className:"py-2",children:"detailed debugging info"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"trace"})}),e.jsx("td",{className:"py-2",children:"very verbose tracing"})]})]})]})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> worker variables"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"worker configuration is stored in ~/.overlord-worker/.env. these are set during overlord setup worker."}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"default"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_HOST"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"server url (required)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKER_TOKEN"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"one-time registration token"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKER_NAME"})}),e.jsx("td",{className:"py-2 pr-4",children:"hostname"}),e.jsx("td",{className:"py-2",children:"display name for this worker"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKSPACE_ROOT"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord-worker/workspaces"}),e.jsx("td",{className:"py-2",children:"directory for task workspaces"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_MAX_SLOTS"})}),e.jsx("td",{className:"py-2 pr-4",children:"2"}),e.jsx("td",{className:"py-2",children:"maximum concurrent tasks"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_DATA_DIR"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord-worker"}),e.jsx("td",{className:"py-2",children:"config and jwt storage directory"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_SSH_KEY_PATH"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"ssh key for git clone/push operations"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"OVERLORD_WORKER_TOKEN is consumed on first registration. after that, the worker uses a jwt for authentication. the token field can remain in the .env file but will not be used again."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> redis configuration"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"redis is required for the server (used for bullmq task queue and pub/sub). recommended setting:"}),e.jsx("pre",{className:"rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 text-xs text-[var(--text-secondary)] overflow-x-auto",children:"appendonly yes"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"redis must have aof persistence enabled to minimize queue data loss on restart."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> file locations"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"path"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord/"})}),e.jsx("td",{className:"py-2",children:"server configuration directory"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord/.env"})}),e.jsx("td",{className:"py-2",children:"server environment variables"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord/data/overlord.db"})}),e.jsx("td",{className:"py-2",children:"sqlite database"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord/logs/"})}),e.jsx("td",{className:"py-2",children:"server log files"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord-worker/"})}),e.jsx("td",{className:"py-2",children:"worker configuration directory"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord-worker/.env"})}),e.jsx("td",{className:"py-2",children:"worker environment variables"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord-worker/workspaces/"})}),e.jsx("td",{className:"py-2",children:"task workspace directory"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord-worker/jwt.json"})}),e.jsx("td",{className:"py-2",children:"worker jwt credentials"})]})]})]})})]})]})]})}export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as W,a as A,h as $,i as w,r as S,j as e,L as b,W as v,g as x}from"./index-XalE15Aa.js";import{T as L}from"./TaskStatusBadge-D_Jw_cst.js";import{T as u}from"./Skeleton-BR0DoH0N.js";import{O as B}from"./OnboardingGuide-CJKcE06d.js";import{f as j}from"./date-BdNtiQTP.js";import{t as D}from"./string-B39tzdVK.js";import{g as F}from"./status-colors-tZq0K5Ad.js";import{u as o}from"./useFetch-rAH39ftj.js";import{A as g}from"./arrow-right-3wSL_8gn.js";import"./chevron-right-BarF-1AB.js";const M=3e5,O=[{key:"active_tasks",labelKey:"dashboard.active_tasks"},{key:"queued_tasks",labelKey:"dashboard.queued_tasks"},{key:"online_workers",labelKey:"dashboard.online_workers"},{key:"completed_today",labelKey:"dashboard.completed_today"}],P=["mon","tue","wed","thu","fri","sat","sun"];function G({dailyRates:l,overallRate:t}){const{t:m}=A(),n=P.map((r,c)=>({label:r,value:l[c]??0})),i=Math.max(...n.map(r=>r.value),1);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 flex items-baseline gap-2",children:[e.jsxs("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:[t,"%"]}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:m("dashboard.last_7_days")})]}),e.jsx("div",{className:"flex gap-2",style:{height:80},children:n.map(r=>{const c=i>0?Math.max(r.value/i*100,4):4;return e.jsxs("div",{className:"flex flex-1 flex-col items-center gap-1",children:[e.jsx("div",{className:"relative w-full h-full rounded-[4px]",style:{backgroundColor:"rgba(34,197,94,0.1)"},children:e.jsx("div",{className:"absolute bottom-0 left-0 right-0 rounded-[4px]",style:{height:`${c}%`,backgroundColor:r.value>=80?"var(--accent)":r.value>=50?"var(--warning)":"var(--destructive)"}})}),e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:r.label})]},r.label)})})]})}function se(){const l=W(),{t}=A(),m=$(),n=w(s=>s.taskSeq),i=w(s=>s.workerSeq),[r,c]=S.useState(0),{data:a,loading:f}=o(()=>x.get("web/dashboard/stats").json(),[r,n,i]),{data:T,loading:R}=o(()=>x.get("web/dashboard/recent-tasks",{searchParams:{limit:"5"}}).json(),[r,n]),{data:C,loading:I}=o(()=>x.get("web/workers").json(),[r,i]),{data:E,loading:q}=o(()=>x.get("web/dashboard/recent-activity").json(),[]);S.useEffect(()=>{const s=setInterval(()=>{c(d=>d+1)},M);return()=>clearInterval(s)},[]);const N=(a==null?void 0:a.success_rate_daily)??null,y=(a==null?void 0:a.task_success_rate_7d)??0,k=T??[],h=C??[],_=E??[];function K(s){switch(s){case v.ONLINE:return t("dashboard.online");case v.DRAINING:return t("dashboard.idle");case v.OFFLINE:default:return t("dashboard.offline")}}return e.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-4 md:px-6 md:py-8 font-mono",children:[e.jsx("div",{className:"mb-4 md:hidden",children:e.jsxs("span",{className:"text-base font-bold text-[var(--accent)]",children:["// ",t("dashboard.title")]})}),e.jsx("div",{className:"mb-6 md:mb-8 grid grid-cols-2 gap-3 md:gap-4 lg:grid-cols-4",children:O.map(({key:s,labelKey:d})=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-4",children:[e.jsxs("span",{className:"text-[11px] md:text-xs text-[var(--text-muted)]",children:[t(d),":"]}),f?e.jsx("div",{className:"mt-1 h-6 md:h-8 w-12 md:w-16 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):e.jsx("div",{className:"mt-1 flex items-baseline gap-2",children:e.jsx("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:(a==null?void 0:a[s])??0})})]},s))}),e.jsx(B,{data:{activeTasks:((a==null?void 0:a.active_tasks)??0)+((a==null?void 0:a.queued_tasks)??0),totalWorkers:h.length,totalProjects:(a==null?void 0:a.project_count)??0,totalDevelopers:(a==null?void 0:a.developer_count)??0}}),e.jsxs("div",{className:"mb-6 grid gap-6 lg:grid-cols-3 items-stretch",children:[e.jsx("div",{className:"flex flex-col gap-6 lg:col-span-2",children:e.jsxs("div",{className:"flex flex-1 flex-col rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("div",{className:"border-b border-[var(--border)] px-5 py-3",children:e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.task_success_rate")})}),e.jsx("div",{className:"flex flex-1 flex-col justify-center p-5",children:f?e.jsx("div",{className:"h-24 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):N?e.jsx(G,{dailyRates:N,overallRate:y}):e.jsxs("div",{className:"flex flex-col items-center gap-2 py-6",children:[e.jsxs("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:[y,"%"]}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.daily_breakdown_not_available")})]})})]})}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:border",children:[e.jsxs("div",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.recent_tasks")}),e.jsxs(b,{to:"/tasks",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[t("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"flex md:hidden items-center justify-between px-3 py-3",children:e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:t("dashboard.recent_tasks")})}),e.jsx("div",{className:"px-3 pb-3 md:px-5 md:pb-4 md:pt-0",children:R?e.jsx(u,{rows:4}):k.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.no_tasks_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2 md:gap-0",children:k.map(s=>e.jsxs("div",{onClick:()=>l(`/tasks/${s.id}`),className:"flex cursor-pointer items-center gap-3 rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)] md:rounded-none md:border-0 md:border-b md:border-[var(--border-row)] md:p-0 md:py-2.5 last:md:border-b-0",children:[e.jsxs("div",{className:"flex-1 min-w-0 md:hidden",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("span",{className:"text-[11px] text-[var(--text-primary)] leading-tight",style:{wordBreak:"break-word"},children:["#",s.id," ",s.description]}),e.jsx("span",{className:"shrink-0",children:e.jsx(L,{status:s.status})})]}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)] mt-1 block",children:j(s.createdAt)})]}),e.jsxs("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:["#",s.id]}),e.jsx("span",{className:"hidden md:inline flex-1 text-xs text-[var(--text-primary)] truncate",children:D(s.description,40)}),e.jsx("span",{className:"hidden md:inline",children:e.jsx(L,{status:s.status})}),e.jsx("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:j(s.createdAt)})]},s.id))})})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.worker_status")}),e.jsxs(b,{to:"/workers",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[t("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:I?e.jsx(u,{rows:3}):h.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.no_workers_registered")})]}):e.jsx("div",{className:"flex flex-col",children:h.map(s=>e.jsxs("div",{onClick:()=>l(`/workers/${s.id}`),className:"flex cursor-pointer items-center justify-between border-b border-[var(--border-row)] py-2.5 transition-colors hover:bg-[var(--bg-input)] last:border-b-0",children:[e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:s.host??"--"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:[s.activeSlots,"/",s.maxSlots," ",t("dashboard.slots")]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs",style:{color:F(s.status)},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),K(s.status)]})]})]},s.id))})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.recent_activity")}),m&&e.jsxs(b,{to:"/admin/audit-logs",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[t("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:q?e.jsx(u,{rows:4}):_.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.no_recent_activity")})]}):e.jsx("div",{className:"flex flex-col",children:_.map(s=>{const d=s.message.match(/task\s*#?(\d+)/i),p=d?d[1]:null;return e.jsxs("div",{className:`flex items-start gap-3 border-b border-[var(--border-row)] py-2 last:border-b-0 ${p?"cursor-pointer hover:bg-[var(--bg-input)] transition-colors":""}`,onClick:()=>p&&l(`/tasks/${p}`),children:[e.jsx("span",{className:"shrink-0 text-xs text-[var(--text-muted)]",children:j(s.timestamp)}),e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:s.message})]},s.id)})})})]})]})]})}export{se as default};
|
|
1
|
+
import{f as W,a as A,i as $,k as w,r as S,j as e,L as b,W as v,h as x}from"./index-y1Zb2xN4.js";import{T as L}from"./TaskStatusBadge-PdGq2XxP.js";import{T as u}from"./Skeleton-CjvMhglG.js";import{O as B}from"./OnboardingGuide-C87ArIaT.js";import{f as j}from"./date-BdNtiQTP.js";import{t as D}from"./string-B39tzdVK.js";import{g as F}from"./status-colors-DxwFeYp0.js";import{u as o}from"./useFetch-BuZrNB5l.js";import{A as g}from"./arrow-right-Bm7UfWKB.js";import"./chevron-right-BSazmjxp.js";const M=3e5,O=[{key:"active_tasks",labelKey:"dashboard.active_tasks"},{key:"queued_tasks",labelKey:"dashboard.queued_tasks"},{key:"online_workers",labelKey:"dashboard.online_workers"},{key:"completed_today",labelKey:"dashboard.completed_today"}],P=["mon","tue","wed","thu","fri","sat","sun"];function G({dailyRates:l,overallRate:t}){const{t:m}=A(),n=P.map((r,c)=>({label:r,value:l[c]??0})),i=Math.max(...n.map(r=>r.value),1);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 flex items-baseline gap-2",children:[e.jsxs("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:[t,"%"]}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:m("dashboard.last_7_days")})]}),e.jsx("div",{className:"flex gap-2",style:{height:80},children:n.map(r=>{const c=i>0?Math.max(r.value/i*100,4):4;return e.jsxs("div",{className:"flex flex-1 flex-col items-center gap-1",children:[e.jsx("div",{className:"relative w-full h-full rounded-[4px]",style:{backgroundColor:"rgba(34,197,94,0.1)"},children:e.jsx("div",{className:"absolute bottom-0 left-0 right-0 rounded-[4px]",style:{height:`${c}%`,backgroundColor:r.value>=80?"var(--accent)":r.value>=50?"var(--warning)":"var(--destructive)"}})}),e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:r.label})]},r.label)})})]})}function se(){const l=W(),{t}=A(),m=$(),n=w(s=>s.taskSeq),i=w(s=>s.workerSeq),[r,c]=S.useState(0),{data:a,loading:f}=o(()=>x.get("web/dashboard/stats").json(),[r,n,i]),{data:T,loading:R}=o(()=>x.get("web/dashboard/recent-tasks",{searchParams:{limit:"5"}}).json(),[r,n]),{data:C,loading:I}=o(()=>x.get("web/workers").json(),[r,i]),{data:E,loading:q}=o(()=>x.get("web/dashboard/recent-activity").json(),[]);S.useEffect(()=>{const s=setInterval(()=>{c(d=>d+1)},M);return()=>clearInterval(s)},[]);const N=(a==null?void 0:a.success_rate_daily)??null,y=(a==null?void 0:a.task_success_rate_7d)??0,k=T??[],h=C??[],_=E??[];function K(s){switch(s){case v.ONLINE:return t("dashboard.online");case v.DRAINING:return t("dashboard.idle");case v.OFFLINE:default:return t("dashboard.offline")}}return e.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-4 md:px-6 md:py-8 font-mono",children:[e.jsx("div",{className:"mb-4 md:hidden",children:e.jsxs("span",{className:"text-base font-bold text-[var(--accent)]",children:["// ",t("dashboard.title")]})}),e.jsx("div",{className:"mb-6 md:mb-8 grid grid-cols-2 gap-3 md:gap-4 lg:grid-cols-4",children:O.map(({key:s,labelKey:d})=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-4",children:[e.jsxs("span",{className:"text-[11px] md:text-xs text-[var(--text-muted)]",children:[t(d),":"]}),f?e.jsx("div",{className:"mt-1 h-6 md:h-8 w-12 md:w-16 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):e.jsx("div",{className:"mt-1 flex items-baseline gap-2",children:e.jsx("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:(a==null?void 0:a[s])??0})})]},s))}),e.jsx(B,{data:{activeTasks:((a==null?void 0:a.active_tasks)??0)+((a==null?void 0:a.queued_tasks)??0),totalWorkers:h.length,totalProjects:(a==null?void 0:a.project_count)??0,totalDevelopers:(a==null?void 0:a.developer_count)??0}}),e.jsxs("div",{className:"mb-6 grid gap-6 lg:grid-cols-3 items-stretch",children:[e.jsx("div",{className:"flex flex-col gap-6 lg:col-span-2",children:e.jsxs("div",{className:"flex flex-1 flex-col rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("div",{className:"border-b border-[var(--border)] px-5 py-3",children:e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.task_success_rate")})}),e.jsx("div",{className:"flex flex-1 flex-col justify-center p-5",children:f?e.jsx("div",{className:"h-24 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):N?e.jsx(G,{dailyRates:N,overallRate:y}):e.jsxs("div",{className:"flex flex-col items-center gap-2 py-6",children:[e.jsxs("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:[y,"%"]}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.daily_breakdown_not_available")})]})})]})}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:border",children:[e.jsxs("div",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.recent_tasks")}),e.jsxs(b,{to:"/tasks",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[t("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"flex md:hidden items-center justify-between px-3 py-3",children:e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:t("dashboard.recent_tasks")})}),e.jsx("div",{className:"px-3 pb-3 md:px-5 md:pb-4 md:pt-0",children:R?e.jsx(u,{rows:4}):k.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.no_tasks_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2 md:gap-0",children:k.map(s=>e.jsxs("div",{onClick:()=>l(`/tasks/${s.id}`),className:"flex cursor-pointer items-center gap-3 rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)] md:rounded-none md:border-0 md:border-b md:border-[var(--border-row)] md:p-0 md:py-2.5 last:md:border-b-0",children:[e.jsxs("div",{className:"flex-1 min-w-0 md:hidden",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("span",{className:"text-[11px] text-[var(--text-primary)] leading-tight",style:{wordBreak:"break-word"},children:["#",s.id," ",s.description]}),e.jsx("span",{className:"shrink-0",children:e.jsx(L,{status:s.status})})]}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)] mt-1 block",children:j(s.createdAt)})]}),e.jsxs("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:["#",s.id]}),e.jsx("span",{className:"hidden md:inline flex-1 text-xs text-[var(--text-primary)] truncate",children:D(s.description,40)}),e.jsx("span",{className:"hidden md:inline",children:e.jsx(L,{status:s.status})}),e.jsx("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:j(s.createdAt)})]},s.id))})})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.worker_status")}),e.jsxs(b,{to:"/workers",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[t("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:I?e.jsx(u,{rows:3}):h.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.no_workers_registered")})]}):e.jsx("div",{className:"flex flex-col",children:h.map(s=>e.jsxs("div",{onClick:()=>l(`/workers/${s.id}`),className:"flex cursor-pointer items-center justify-between border-b border-[var(--border-row)] py-2.5 transition-colors hover:bg-[var(--bg-input)] last:border-b-0",children:[e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:s.host??"--"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:[s.activeSlots,"/",s.maxSlots," ",t("dashboard.slots")]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs",style:{color:F(s.status)},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),K(s.status)]})]})]},s.id))})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.recent_activity")}),m&&e.jsxs(b,{to:"/admin/audit-logs",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[t("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:q?e.jsx(u,{rows:4}):_.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.no_recent_activity")})]}):e.jsx("div",{className:"flex flex-col",children:_.map(s=>{const d=s.message.match(/task\s*#?(\d+)/i),p=d?d[1]:null;return e.jsxs("div",{className:`flex items-start gap-3 border-b border-[var(--border-row)] py-2 last:border-b-0 ${p?"cursor-pointer hover:bg-[var(--bg-input)] transition-colors":""}`,onClick:()=>p&&l(`/tasks/${p}`),children:[e.jsx("span",{className:"shrink-0 text-xs text-[var(--text-muted)]",children:j(s.timestamp)}),e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:s.message})]},s.id)})})})]})]})]})}export{se as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./index-
|
|
1
|
+
import{j as e}from"./index-y1Zb2xN4.js";function i({label:s,value:t,href:r,variant:n="between",labelWidth:a="w-20 md:w-28"}){return n==="fixed-label"?e.jsxs("div",{className:"flex min-w-0 flex-col sm:flex-row sm:items-center gap-0.5 sm:gap-3 py-1",children:[e.jsx("span",{className:`${a} shrink-0 text-xs text-[var(--text-muted)]`,children:s}),r?e.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"min-w-0 truncate text-sm text-[var(--accent)] hover:underline",children:t}):e.jsx("span",{className:"min-w-0 truncate text-sm text-[var(--text-primary)]",children:t})]}):e.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-4",children:[e.jsx("span",{className:"shrink-0 text-[var(--text-muted)]",children:s}),e.jsx("span",{className:"min-w-0 truncate text-[var(--text-primary)]",children:t})]})}export{i as I};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./index-
|
|
1
|
+
import{j as e}from"./index-y1Zb2xN4.js";import{I as s,a as t}from"./DocsPrimitives-kq9vBAzD.js";import"./copy-CX4krhaQ.js";function l(){return e.jsx("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// prerequisites"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"before installing overlord, make sure you have:"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"node.js"})," ",">="," 20"]}),e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"redis"})," (for the server — task queue and pub/sub)"]}),e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"git"})," ",">="," 2.20"]}),e.jsxs("li",{children:["— an ai agent cli installed on worker machines (one or more of: ",e.jsx("code",{className:"text-[var(--accent)]",children:"claude"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"cursor"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"codex"}),")"]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// server setup"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"install the overlord cli and server packages globally:"}),e.jsx(s,{code:"npm install -g @overlordai/cli @overlordai/server"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"run the interactive installation wizard:"}),e.jsx(s,{code:"overlord install"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"the wizard will:"}),e.jsxs("ol",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsx("li",{children:"1. check that all prerequisites are met (node, redis, git)"}),e.jsxs("li",{children:["2. generate secrets (",e.jsx("code",{className:"text-[var(--accent)]",children:"JWT_SECRET"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"WORKER_JWT_SECRET"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"ENCRYPTION_KEY"}),")"]}),e.jsxs("li",{children:["3. configure redis connection (default: ",e.jsx("code",{className:"text-[var(--text-muted)]",children:"redis://localhost:6379/0"}),")"]}),e.jsx("li",{children:"4. configure public url for notification links (optional — used in bot cards and email links)"}),e.jsx("li",{children:"5. initialize the sqlite database and run migrations"}),e.jsx("li",{children:"6. create your admin account (username, password, git name, git email)"})]}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["all configuration is written to ",e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord/.env"}),"."]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// start the server"}),e.jsx(t,{code:`overlord start # start services (systemd / launchd)
|
|
2
2
|
overlord status # verify everything is running
|
|
3
3
|
overlord doctor # run health check`}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["the ",e.jsx("code",{className:"text-[var(--accent)]",children:"overlord start"})," command automatically generates and registers system services (systemd on linux, launchd on macos)."]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// add worker machines"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"workers are the machines that actually run tasks. you need at least one worker to start using overlord."}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 1. generate a registration token"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["in the web dashboard, go to ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"admin → worker tokens → generate token"}),". each token registers exactly one worker."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 2. install worker on the target machine"}),e.jsx(s,{code:"npm install -g @overlordai/cli @overlordai/worker"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 3. run the setup wizard"}),e.jsx(s,{code:"overlord setup worker"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"the wizard will ask for your server url, the registration token, a machine name, and the number of concurrent task slots."}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2",children:e.jsx("p",{className:"text-xs text-[var(--text-secondary)]",children:"// for detailed worker configuration, ssh keys, non-interactive mode, and troubleshooting, see the full worker setup guide."})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 4. verify connection"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["once the worker starts, it will appear on the ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"machines"}),' page in the web dashboard with status "online".']})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// developer cli"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["developers interact with overlord through the ",e.jsx("code",{className:"text-[var(--accent)]",children:"ov"})," cli:"]}),e.jsx(t,{code:`npm install -g @overlordai/developer-cli
|
|
4
4
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import{c as n,u,a as b,j as e,N as _,r as x,T as f,L as l,S as j,b as y,d as N,e as w,P as k,C as K}from"./index-y1Zb2xN4.js";import{A as m}from"./arrow-right-Bm7UfWKB.js";import{B as z}from"./bot-DV0Ml0Pr.js";import{W as S,G as T}from"./workflow-l3FdQ5M5.js";import{U as L}from"./users-Cs7l6K9q.js";import{C as M}from"./copy-CX4krhaQ.js";/**
|
|
2
|
+
* @license lucide-react v0.469.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const C=n("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
7
|
+
* @license lucide-react v0.469.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const A=n("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
12
|
+
* @license lucide-react v0.469.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const I=n("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
|
|
17
|
+
* @license lucide-react v0.469.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const B=n("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
22
|
+
* @license lucide-react v0.469.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const E=n("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
27
|
+
* @license lucide-react v0.469.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const G=n("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),h=[{icon:j,titleKey:"landing.step_define",descKey:"landing.step_define_desc"},{icon:E,titleKey:"landing.step_dispatch",descKey:"landing.step_dispatch_desc"},{icon:C,titleKey:"landing.step_monitor",descKey:"landing.step_monitor_desc"}],F=[{icon:G,titleKey:"landing.feature_trigger",descKey:"landing.feature_trigger_desc"},{icon:A,titleKey:"landing.feature_remote",descKey:"landing.feature_remote_desc"},{icon:I,titleKey:"landing.feature_pool",descKey:"landing.feature_pool_desc"}],q=[{icon:y,titleKey:"landing.feature_terminal",descKey:"landing.feature_terminal_desc"},{icon:z,titleKey:"landing.feature_multi_agent",descKey:"landing.feature_multi_agent_desc"},{icon:S,titleKey:"landing.feature_pipeline",descKey:"landing.feature_pipeline_desc"},{icon:T,titleKey:"landing.feature_routing",descKey:"landing.feature_routing_desc"},{icon:L,titleKey:"landing.feature_collab",descKey:"landing.feature_collab_desc"},{icon:N,titleKey:"landing.feature_security",descKey:"landing.feature_security_desc"}],R=[{num:"01",titleKey:"landing.setup_step_1_title",descKey:"landing.setup_step_1_desc",commandKey:"landing.setup_step_1_command",linkLabel:"landing.setup_step_1_link",linkTo:"/docs/cli",icon:B},{num:"02",titleKey:"landing.setup_step_2_title",descKey:"landing.setup_step_2_desc",commandKey:"landing.setup_step_2_command",linkLabel:"landing.setup_step_2_link",linkTo:"/workers/setup",icon:w},{num:"03",titleKey:"landing.setup_step_3_title",descKey:"landing.setup_step_3_desc",commandKey:"landing.setup_step_3_command",linkLabel:"landing.setup_step_3_link",linkTo:"/docs/cli",icon:y}];function W({step:s,t}){const[r,c]=x.useState(!1),d=t(s.commandKey);async function p(){try{await navigator.clipboard.writeText(d),c(!0),setTimeout(()=>c(!1),2e3)}catch{}}return e.jsx("div",{className:"group rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] transition-shadow hover:shadow-md",children:e.jsxs("div",{className:"flex flex-col gap-4 p-5 sm:flex-row sm:items-start sm:gap-6",children:[e.jsxs("div",{className:"flex items-center gap-4 sm:w-56 sm:flex-shrink-0",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-[4px] bg-[var(--accent)]/10 text-[var(--accent)]",children:e.jsx(s.icon,{size:20})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[11px] font-semibold lowercase tracking-widest text-[var(--text-muted)]",children:t("landing.step_n",{n:s.num})}),e.jsx("h3",{className:"text-sm font-semibold text-[var(--text-primary)]",children:t(s.titleKey)})]})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-xs leading-relaxed text-[var(--text-secondary)]",children:t(s.descKey)}),e.jsxs("div",{className:"mt-3 flex items-center justify-between gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-4 py-2.5",children:[e.jsx("code",{className:"overflow-x-auto whitespace-pre text-[11px] text-[var(--text-primary)]",children:d.split(`
|
|
32
|
+
`).map((o,a)=>e.jsxs("span",{children:[a>0&&`
|
|
33
|
+
`,e.jsx("span",{className:"select-none text-[var(--text-muted)]",children:"$ "}),o]},a))}),e.jsx("button",{onClick:p,className:"ml-2 flex-shrink-0 rounded-[4px] p-1.5 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)]","aria-label":t("landing.copy_install_command"),children:r?e.jsx(K,{size:14,className:"text-[var(--accent)]"}):e.jsx(M,{size:14})})]}),e.jsx("div",{className:"mt-2",children:e.jsxs(l,{to:s.linkTo,className:"inline-flex items-center gap-1 text-[11px] text-[var(--accent)] transition-colors hover:brightness-110",children:[t(s.linkLabel),e.jsx(m,{size:12})]})})]})]})})}const g=["landing.hero_word_subscriptions","landing.hero_word_machines"];function Z(){const s=u(a=>a.user),{t}=b();if(s)return e.jsx(_,{to:"/home",replace:!0});const r="/login",[c,d]=x.useState(0),[p,o]=x.useState(!1);return x.useEffect(()=>{let a;const i=setInterval(()=>{o(!0),a=setTimeout(()=>{d(v=>(v+1)%g.length),o(!1)},200)},2e3);return()=>{clearInterval(i),clearTimeout(a)}},[]),e.jsxs("div",{className:"min-h-screen bg-[var(--bg-primary)]",children:[e.jsx("nav",{className:"sticky top-0 z-50 border-b border-[var(--border)] bg-[var(--bg-primary)]/80 backdrop-blur-md pt-[var(--safe-area-top,0px)]",children:e.jsxs("div",{className:"mx-auto flex h-14 max-w-6xl items-center justify-between px-4 sm:px-6",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-[4px] bg-[var(--accent)]","aria-hidden":!0,style:{fontFamily:"'JetBrains Mono', monospace"},children:e.jsx("span",{className:"text-xl font-semibold",style:{color:"#0C0C0C"},children:"~"})}),e.jsx("span",{className:"text-lg font-bold text-[var(--text-primary)]",style:{fontSize:"20px",fontFamily:"'JetBrains Mono', monospace"},children:t("landing.overlord")})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(f,{}),e.jsx(l,{to:r,className:"text-xs font-medium text-[var(--accent)] transition-colors hover:opacity-80",children:t("landing.go_to_app")})]})]})}),e.jsxs("section",{className:"relative overflow-hidden",children:[e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute -top-40 left-1/2 h-[600px] w-[900px] -translate-x-1/2 rounded-full opacity-20 blur-3xl",style:{background:"radial-gradient(ellipse at center, var(--accent), transparent 70%)"}}),e.jsxs("div",{className:"relative mx-auto max-w-5xl px-4 pb-20 pt-24 text-center sm:px-6 sm:pb-28 sm:pt-32",children:[e.jsx("div",{className:"mb-6 inline-flex items-center rounded-full border border-[var(--accent)]/20 bg-[var(--accent)]/5 px-4 py-1.5 text-xs text-[var(--accent)]",children:t("landing.version_badge")}),e.jsxs("h1",{className:"text-3xl font-extrabold leading-tight tracking-tight text-[var(--text-primary)] sm:text-4xl md:text-5xl",children:[t("landing.hero_turn_your")," ",e.jsx("span",{className:"inline-block text-[var(--accent)] transition-opacity duration-200",style:{opacity:p?0:1},children:t(g[c])})," ",t("landing.hero_into"),e.jsx("br",{}),e.jsx("span",{className:"text-[var(--accent)]",children:t("landing.hero_highlight")})]}),e.jsx("p",{className:"mx-auto mt-6 max-w-3xl text-sm leading-relaxed text-[var(--text-secondary)] sm:text-base",children:t("landing.hero_desc")}),e.jsxs("div",{className:"mt-10",children:[e.jsxs(l,{to:r,className:"inline-flex items-center gap-2 rounded-[4px] bg-[var(--accent)] px-8 py-3 text-sm font-semibold text-black shadow-lg shadow-[var(--accent)]/25 transition-all hover:brightness-110 active:scale-[0.98]",children:[t("landing.get_started"),e.jsx(m,{size:16})]}),e.jsxs(l,{to:"/docs/cli",className:"ml-4 inline-flex items-center gap-1 text-sm text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",children:[t("landing.read_docs")," ",e.jsx(m,{size:14})]})]})]})]}),e.jsx("section",{className:"border-t border-[var(--border)] bg-[var(--bg-card)]",children:e.jsxs("div",{className:"mx-auto max-w-5xl px-4 py-20 sm:px-6 sm:py-28",children:[e.jsx("h2",{className:"text-center text-xl font-bold text-[var(--text-primary)] sm:text-2xl",children:t("landing.how_it_works")}),e.jsx("p",{className:"mx-auto mt-3 max-w-xl text-center text-sm text-[var(--text-secondary)]",children:t("landing.three_steps")}),e.jsx("div",{className:"mt-14 grid gap-8 sm:grid-cols-3",children:h.map((a,i)=>e.jsxs("div",{className:"relative text-center",children:[i<h.length-1&&e.jsx("div",{"aria-hidden":!0,className:"absolute right-0 top-8 hidden h-px w-8 translate-x-full bg-[var(--border)] sm:block"}),e.jsx("div",{className:"mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-[var(--accent)]/10 text-[var(--accent)] text-sm font-bold",children:String(i+1).padStart(2,"0")}),e.jsx("div",{className:"mt-1 text-[11px] font-semibold lowercase tracking-widest text-[var(--text-muted)]",children:t("landing.step_n",{n:i+1})}),e.jsx("h3",{className:"mt-2 text-sm font-semibold text-[var(--text-primary)]",children:t(a.titleKey)}),e.jsx("p",{className:"mt-2 text-xs leading-relaxed text-[var(--text-secondary)]",children:t(a.descKey)})]},a.titleKey))})]})}),e.jsx("section",{className:"border-t border-[var(--border)]",children:e.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-20 sm:px-6 sm:py-28",children:[e.jsx("h2",{className:"text-center text-xl font-bold text-[var(--text-primary)] sm:text-2xl",children:t("landing.everything_you_need")}),e.jsx("p",{className:"mx-auto mt-3 max-w-xl text-center text-sm text-[var(--text-secondary)]",children:t("landing.complete_platform")}),e.jsx("div",{className:"mt-14 grid gap-6 sm:grid-cols-3",children:F.map(a=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--accent)]/20 bg-[var(--accent)]/5 p-6 transition-shadow hover:shadow-md",children:[e.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-[4px] bg-[var(--accent)]/15 text-[var(--accent)]",children:e.jsx(a.icon,{size:22})}),e.jsx("h3",{className:"mt-4 text-base font-semibold text-[var(--text-primary)]",children:t(a.titleKey)}),e.jsx("p",{className:"mt-2 text-sm leading-relaxed text-[var(--text-secondary)]",children:t(a.descKey)})]},a.titleKey))}),e.jsx("div",{className:"mt-6 grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:q.map(a=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5 transition-shadow hover:shadow-md",children:[e.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-[4px] bg-[var(--accent)]/10 text-[var(--accent)]",children:e.jsx(a.icon,{size:18})}),e.jsx("h3",{className:"mt-3 text-sm font-semibold text-[var(--text-primary)]",children:t(a.titleKey)}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-[var(--text-secondary)]",children:t(a.descKey)})]},a.titleKey))})]})}),e.jsx("section",{className:"border-t border-[var(--border)] bg-[var(--bg-card)]",children:e.jsxs("div",{className:"mx-auto max-w-5xl px-4 py-20 sm:px-6 sm:py-28",children:[e.jsx("h2",{className:"text-center text-xl font-bold text-[var(--text-primary)] sm:text-2xl",children:t("landing.install_title")}),e.jsx("p",{className:"mx-auto mt-3 max-w-xl text-center text-sm text-[var(--text-secondary)]",children:t("landing.install_desc")}),e.jsx("div",{className:"mt-14 space-y-4",children:R.map(a=>e.jsx(W,{step:a,t},a.num))}),e.jsx("div",{className:"mt-12 text-center",children:e.jsxs(l,{to:r,className:"inline-flex items-center gap-2 rounded-[4px] bg-[var(--accent)] px-8 py-3 text-sm font-semibold text-black shadow-lg shadow-[var(--accent)]/25 transition-all hover:brightness-110 active:scale-[0.98]",children:[t("landing.get_started"),e.jsx(m,{size:16})]})})]})}),e.jsx("footer",{className:"border-t border-[var(--border)]",children:e.jsxs("div",{className:"mx-auto flex max-w-6xl flex-col items-center gap-4 px-4 py-8 text-xs text-[var(--text-secondary)] sm:flex-row sm:justify-between sm:px-6",children:[e.jsxs("span",{children:["© ",new Date().getFullYear()," ",t("landing.overlord")]}),e.jsxs("div",{className:"flex gap-6",children:[e.jsx("a",{href:"/docs/cli",className:"transition-colors hover:text-[var(--text-primary)]",children:t("landing.documentation")}),e.jsx("a",{href:"/docs/api",className:"transition-colors hover:text-[var(--text-primary)]",children:t("landing.api")})]})]})}),e.jsx(k,{})]})}export{Z as default};
|