@overlordai/server 1.0.161 → 1.0.163
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/adapters/nlu-fallback.utils.d.ts.map +1 -1
- package/dist/adapters/nlu-fallback.utils.js +23 -1
- package/dist/adapters/nlu-fallback.utils.js.map +1 -1
- package/dist/adapters/nlu.service.js +3 -3
- package/dist/adapters/nlu.service.js.map +1 -1
- package/dist/database/repositories/automation.repository.d.ts +7 -1
- package/dist/database/repositories/automation.repository.d.ts.map +1 -1
- package/dist/database/repositories/automation.repository.js +21 -6
- package/dist/database/repositories/automation.repository.js.map +1 -1
- package/dist/web/automation.controller.d.ts +5 -1
- package/dist/web/automation.controller.d.ts.map +1 -1
- package/package.json +4 -4
- package/public/assets/{AccessTokensPage-lafHzdS7.js → AccessTokensPage-ldQyk5XS.js} +1 -1
- package/public/assets/{AdminPage-E1k_8cwn.js → AdminPage-B2nXMtQP.js} +1 -1
- package/public/assets/{AgentCliPage-D47m5vOi.js → AgentCliPage-DN6Sx2_W.js} +1 -1
- package/public/assets/{ApiReferencePage-BmOy--0F.js → ApiReferencePage-B63Cv6ev.js} +1 -1
- package/public/assets/{ArchitecturePage-Bl3bI0N5.js → ArchitecturePage-Bw1w2No4.js} +1 -1
- package/public/assets/{AuditLogPage-CsI3bO3u.js → AuditLogPage-DUrbtnap.js} +1 -1
- package/public/assets/{AutomationCreatePage-ri2A-CNJ.js → AutomationCreatePage-DaHeZycf.js} +1 -1
- package/public/assets/{AutomationDetailPage-DwNJFVCj.js → AutomationDetailPage-CMBHY3MX.js} +1 -1
- package/public/assets/{AutomationEditPage-C7Erq9DW.js → AutomationEditPage-Cjw5DRd6.js} +1 -1
- package/public/assets/AutomationListPage-Cj4cqINZ.js +26 -0
- package/public/assets/{AutomationRunDetailPage-BG6Cqkj-.js → AutomationRunDetailPage-CzcvwnZh.js} +1 -1
- package/public/assets/{BindPlatformPage-D7uHmPgN.js → BindPlatformPage-DSlnobHy.js} +1 -1
- package/public/assets/{BotIntegrationPage-C_PZlgOb.js → BotIntegrationPage-LIWwLiyv.js} +1 -1
- package/public/assets/BotManage-umHOH2yR.js +6 -0
- package/public/assets/{BotSetupPage-qTjxFSQi.js → BotSetupPage-DMdavNli.js} +1 -1
- package/public/assets/ChangelogPage-DMuOXPSB.js +1 -0
- package/public/assets/{CliReferencePage-CSY8cjmQ.js → CliReferencePage-Cj5J-5PY.js} +1 -1
- package/public/assets/{ConfirmStageDialog-Bn-dCp23.js → ConfirmStageDialog-Dl1_NcCr.js} +1 -1
- package/public/assets/{DeploymentPage-QJAgiKU8.js → DeploymentPage-BnJoRfc6.js} +1 -1
- package/public/assets/{DevWorkflowPage-DCzumMIC.js → DevWorkflowPage-Bh6iCSgz.js} +1 -1
- package/public/assets/{DeveloperManage-DpWen1LJ.js → DeveloperManage-DRktoKo0.js} +1 -1
- package/public/assets/{DeveloperSetupPage-DvPNRN1x.js → DeveloperSetupPage-CFJ_Diyi.js} +1 -1
- package/public/assets/{DocsIndexPage-BS5Ppp-Y.js → DocsIndexPage-DBQdb_iY.js} +1 -1
- package/public/assets/{DocsLayout-CdlGN8MT.js → DocsLayout-Cd956Abd.js} +1 -1
- package/public/assets/{DocsPrimitives-7fXGxzq1.js → DocsPrimitives-DxxQvd4A.js} +1 -1
- package/public/assets/{EditProjectPage-knNpD-6Q.js → EditProjectPage-BGNgVGl_.js} +1 -1
- package/public/assets/{EmptyState-HBgPBpjr.js → EmptyState-DQ0fOTKY.js} +1 -1
- package/public/assets/{EnvVariablesPage-DMJJwKrY.js → EnvVariablesPage-CelP_-SE.js} +1 -1
- package/public/assets/{HomePage-DxTGvKjU.js → HomePage-C3_hGl3i.js} +1 -1
- package/public/assets/{InfoRow-CTTO0UCT.js → InfoRow-ssnjkeJd.js} +1 -1
- package/public/assets/{InstallationPage-BKEAS8Td.js → InstallationPage-OvlJ5Fm1.js} +1 -1
- package/public/assets/{LandingPage-Ct_q1_6H.js → LandingPage-BNl9fFku.js} +1 -1
- package/public/assets/{LocalDevelopmentPage-CS-vxrGr.js → LocalDevelopmentPage-CXbkHbi0.js} +1 -1
- package/public/assets/{LoginPage-Cr9G-uZO.js → LoginPage-L_1SThps.js} +1 -1
- package/public/assets/{MetricBar-C2roX-7q.js → MetricBar-5mo0FTxI.js} +1 -1
- package/public/assets/{MultiSelect-DPaJC1DP.js → MultiSelect-4LelQ6vN.js} +1 -1
- package/public/assets/{NotFoundPage-cEUsX1Rk.js → NotFoundPage-Ht-8qf12.js} +1 -1
- package/public/assets/{OnboardingGuide-CpSdz1bh.js → OnboardingGuide-D9ui1dG9.js} +1 -1
- package/public/assets/{PermissionsPage-DEB4f4Cb.js → PermissionsPage-DbppdG6c.js} +1 -1
- package/public/assets/{PipelineConfigPage-CWFxpBM_.js → PipelineConfigPage-B1D2tEQK.js} +1 -1
- package/public/assets/{PipelineEditorPage-M60zBuOQ.js → PipelineEditorPage-s_YlfwwQ.js} +1 -1
- package/public/assets/{PlanPage-BXb36W0B.js → PlanPage-CuiDWL0h.js} +1 -1
- package/public/assets/{ProfilePage-CLgA4lzL.js → ProfilePage-BJdNfqJ8.js} +1 -1
- package/public/assets/{ProjectDetailPage-CdgLBerx.js → ProjectDetailPage-BKVdM9E_.js} +1 -1
- package/public/assets/{ProjectListPage-Bty8wJAo.js → ProjectListPage-DcENyE_f.js} +1 -1
- package/public/assets/{PtyTerminal-C5c80Mk8.js → PtyTerminal-6sH_Ru9B.js} +1 -1
- package/public/assets/{QuickAuth-CWDvvnTP.js → QuickAuth-BJQDPb8y.js} +1 -1
- package/public/assets/{RemoveMemberConfirmDialog-C2VkUVMv.js → RemoveMemberConfirmDialog-BeVfJj3-.js} +1 -1
- package/public/assets/{ReviewAggregatePage-U4GSbSXS.js → ReviewAggregatePage-D6_tkXWc.js} +1 -1
- package/public/assets/{ReviewPage-mcj8sHiD.js → ReviewPage-CWNJfYaM.js} +1 -1
- package/public/assets/{Select-DYoGoG5A.js → Select-Dgtvdi2n.js} +1 -1
- package/public/assets/{SettingsPage-CMMM4SH_.js → SettingsPage-0vk6NVVJ.js} +1 -1
- package/public/assets/{Skeleton-YxLLogK4.js → Skeleton-CwwH6ktS.js} +1 -1
- package/public/assets/{SkillPage-BV-57UR6.js → SkillPage-BrdGx8-d.js} +1 -1
- package/public/assets/{TaskDetailPage-D0us72ot.js → TaskDetailPage-BtWTrChF.js} +1 -1
- package/public/assets/{TaskGuidePage-BZgl39sy.js → TaskGuidePage-Bo0wdhb0.js} +1 -1
- package/public/assets/{TaskListPage-C_iN0T0V.js → TaskListPage-Cxk-Tici.js} +1 -1
- package/public/assets/{TaskStatusBadge-CvRR_2ds.js → TaskStatusBadge-B8MoEoLo.js} +1 -1
- package/public/assets/{TerminalHomePage-BUZOuMPU.js → TerminalHomePage-DR_ek5wb.js} +1 -1
- package/public/assets/{TokenManage-BjWADkxL.js → TokenManage-Ba4OjLdS.js} +1 -1
- package/public/assets/{Tooltip-CqGfu3a-.js → Tooltip-BsZZ0Gbx.js} +1 -1
- package/public/assets/{TotpSetupPage-DuCCt-vy.js → TotpSetupPage-IMrYjGAF.js} +1 -1
- package/public/assets/{WorkerDetailPage-BYSiRies.js → WorkerDetailPage-B9TiPkJ8.js} +1 -1
- package/public/assets/{WorkerListPage-BSTGesxp.js → WorkerListPage-Dm_zdLQH.js} +1 -1
- package/public/assets/{WorkerOperationsPage-BPPG9lOT.js → WorkerOperationsPage-BYBaNNVI.js} +1 -1
- package/public/assets/{WorkerSetupGuidePage-BrgtuI5g.js → WorkerSetupGuidePage-Xed2whgU.js} +1 -1
- package/public/assets/{WorkerSetupPage-CetmEJyM.js → WorkerSetupPage-y62Z3za_.js} +1 -1
- package/public/assets/{agent-type-options-cDW8GwHd.js → agent-type-options-Drj4kVJw.js} +1 -1
- package/public/assets/{arrow-left-CnVeKL9M.js → arrow-left-BcA9UMTL.js} +1 -1
- package/public/assets/{arrow-right-2N8HSM2i.js → arrow-right-BZXdY7kF.js} +1 -1
- package/public/assets/{bot-CU1FE6aR.js → bot-DcTSu6mF.js} +1 -1
- package/public/assets/{chevron-down-CAmZEYXZ.js → chevron-down-B-IybQE8.js} +1 -1
- package/public/assets/{chevron-left-CSWcz_5r.js → chevron-left-BoAE9yoT.js} +1 -1
- package/public/assets/{chevron-right-BZbzpWXN.js → chevron-right-DdNeU6u1.js} +1 -1
- package/public/assets/{chevron-up-CcAPSG40.js → chevron-up-C4VkqudN.js} +1 -1
- package/public/assets/{circle-alert-CVKJUhGD.js → circle-alert-BzDJW2uY.js} +1 -1
- package/public/assets/{clock-B06FHquf.js → clock-BF7qBFGO.js} +1 -1
- package/public/assets/{copy-DWmbt3u5.js → copy-BilNgG66.js} +1 -1
- package/public/assets/{download-BVZ9yayw.js → download-DyLe1gp-.js} +1 -1
- package/public/assets/{external-link-CzAmYpcP.js → external-link-C2lUBinm.js} +1 -1
- package/public/assets/{git-fork-BUH8Kkms.js → git-fork-DljHeJn2.js} +1 -1
- package/public/assets/{index-CHuch-Tb.js → index-DpFOWbFQ.js} +3 -3
- package/public/assets/index-pQSLMYLJ.css +1 -0
- package/public/assets/{key-C70dVFbt.js → key-CHQYfxWN.js} +1 -1
- package/public/assets/{loader-circle-C5T3J7As.js → loader-circle-DmxemZdl.js} +1 -1
- package/public/assets/{pencil-CRbtV3Ab.js → pencil-DMKsPe_A.js} +1 -1
- package/public/assets/{play-DtboRxSa.js → play-RH8-4UME.js} +1 -1
- package/public/assets/{plus-B-TXPjx1.js → plus-7GEqLtYy.js} +1 -1
- package/public/assets/{rotate-ccw-DSGO2DfJ.js → rotate-ccw-Jtcupri2.js} +1 -1
- package/public/assets/{scroll-text-BAefM1lo.js → scroll-text-tbcoJ-t_.js} +1 -1
- package/public/assets/{settings-c0ay9170.js → settings-D0aqv-8_.js} +1 -1
- package/public/assets/{skip-forward-5uQlHvbV.js → skip-forward-BHfCjKv2.js} +1 -1
- package/public/assets/{status-colors-DqGwLP3p.js → status-colors-_SUaojQM.js} +1 -1
- package/public/assets/{task-agent-DdaZOjeh.js → task-agent-Rpiyr0sB.js} +1 -1
- package/public/assets/{task-constants-DYetbhd8.js → task-constants-BAM6BP3N.js} +1 -1
- package/public/assets/{task.store-pSu-32fL.js → task.store-BMOVGyvP.js} +1 -1
- package/public/assets/{timer-iriu8OXp.js → timer-LF3nKAXi.js} +1 -1
- package/public/assets/{trash-2-DHxbaPwD.js → trash-2-CfHTaDgU.js} +1 -1
- package/public/assets/{useFetch-CSkZlgaA.js → useFetch-Sdr634q_.js} +1 -1
- package/public/assets/{users-CQ7FFL3m.js → users-DUHEmaaK.js} +1 -1
- package/public/assets/{wifi-X-F6YIFU.js → wifi-DR2_OBUt.js} +1 -1
- package/public/assets/{workflow-YoWYtExV.js → workflow-uVJjw4HD.js} +1 -1
- package/public/assets/{zap-C6pt7pdv.js → zap-BH9B1NGV.js} +1 -1
- package/public/index.html +2 -2
- package/public/sw.js +1 -1
- package/public/assets/AutomationListPage-DwZAlNEL.js +0 -26
- package/public/assets/BotManage-DtCgf_zl.js +0 -6
- package/public/assets/ChangelogPage-C_Wm5MId.js +0 -1
- package/public/assets/index-CULr4DFs.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as z,a as K,i as H,k as D,r as $,j as e,L as p,l as I,m as B,W as w,h}from"./index-CHuch-Tb.js";import{T as R}from"./TaskStatusBadge-CvRR_2ds.js";import{T as g}from"./Skeleton-YxLLogK4.js";import{O as G}from"./OnboardingGuide-CpSdz1bh.js";import{f as _}from"./date-CmcdoD87.js";import{g as V}from"./status-colors-DqGwLP3p.js";import{u as b}from"./useFetch-CSkZlgaA.js";import{T as q}from"./Tooltip-CqGfu3a-.js";import{A as v}from"./arrow-right-2N8HSM2i.js";import"./chevron-right-BZbzpWXN.js";const Y=3e5,J=[{type:"fraction",numerator:"active_tasks",denominator:"queued_tasks",labelKey:"dashboard.tasks_active_queued"},{type:"simple",key:"online_workers",labelKey:"dashboard.online_workers"},{type:"simple",key:"completed_today",labelKey:"dashboard.completed_all_today"},{type:"simple",key:"completed_by_user_today",labelKey:"dashboard.completed_by_you_today"}],Q=["sun","mon","tue","wed","thu","fri","sat"];function U(){const n=new Date;return Array.from({length:7},(a,i)=>{const r=new Date(n);r.setDate(r.getDate()-(6-i));const c=String(r.getMonth()+1).padStart(2,"0"),l=String(r.getDate()).padStart(2,"0");return{label:Q[r.getDay()],date:`${c}/${l}`}})}function X({dailyRates:n,dailyCounts:a,overallRate:i}){const{t:r}=K(),c=U(),l=a.reduce((t,o)=>t+o,0),u=Math.max(...a,1);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 flex items-baseline gap-2",children:[e.jsx("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:l}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("dashboard.last_7_days")}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"·"}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:[r("dashboard.success_rate"),": ",i,"%"]})]}),e.jsx("div",{className:"flex gap-2",style:{height:80},children:c.map(({label:t,date:o},j)=>{const x=a[j]??0,m=n[j]??0,f=r(x===1?"dashboard.task_total":"dashboard.tasks_total"),N=u>0?Math.max(x/u*100,4):4;return e.jsxs(q,{content:`${t} ${o} — ${x} ${f} (${m}%)`,className:"flex flex-1 flex-col items-center gap-1",children:[e.jsx("div",{className:"relative w-full h-full rounded-[4px] cursor-default",style:{backgroundColor:"rgba(34,197,94,0.1)"},children:e.jsx("div",{className:"absolute bottom-0 left-0 right-0 rounded-[4px]",style:{height:`${N}%`,backgroundColor:m>=80?"var(--accent)":m>=50?"var(--warning)":"var(--destructive)"}})}),e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:t})]},t)})})]})}function oe(){const n=z(),{t:a}=K(),i=H(),r=D(s=>s.taskSeq),c=D(s=>s.workerSeq),[l,u]=$.useState(0),{data:t,loading:o}=b(()=>h.get("web/dashboard/stats",{searchParams:{tz:String(new Date().getTimezoneOffset())}}).json(),[l,r,c]),{data:j,loading:x}=b(()=>h.get("web/dashboard/recent-tasks",{searchParams:{limit:"5"}}).json(),[l,r]),{data:m,loading:f}=b(()=>h.get("web/workers").json(),[l,c]),{data:N,loading:E}=b(()=>h.get("web/projects").json(),[l]),{data:O,loading:M}=b(()=>h.get("web/dashboard/recent-activity").json(),[]);$.useEffect(()=>{const s=setInterval(()=>{u(d=>d+1)},Y);return()=>clearInterval(s)},[]);const S=(t==null?void 0:t.success_rate_daily)??null,T=(t==null?void 0:t.task_count_daily)??[],W=(t==null?void 0:t.task_success_rate_7d)??0,L=j??[],y=m??[],C=N??[],A=O??[];function F(s){switch(s){case w.ONLINE:return a("dashboard.online");case w.DRAINING:return a("dashboard.idle");case w.OFFLINE:default:return a("dashboard.offline")}}function P(s){return a(s===1?"dashboard.task_total":"dashboard.tasks_total")}return e.jsxs("div",{className:"mx-auto max-w-6xl overflow-hidden px-2 py-4 md:px-4 md:py-6 font-mono",children:[e.jsx("div",{className:"mb-6 md:mb-8 grid grid-cols-2 gap-3 md:gap-4 lg:grid-cols-4",children:J.map(s=>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:[a(s.labelKey),":"]}),o?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:s.type==="fraction"?e.jsxs("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:[(t==null?void 0:t[s.numerator])??0,e.jsx("span",{className:"text-base md:text-lg font-normal text-[var(--text-muted)]",children:"/"}),(t==null?void 0:t[s.denominator])??0]}):e.jsx("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:(t==null?void 0:t[s.key])??0})})]},s.labelKey))}),e.jsx(G,{data:{activeTasks:((t==null?void 0:t.active_tasks)??0)+((t==null?void 0:t.queued_tasks)??0),totalWorkers:y.length,totalProjects:(t==null?void 0:t.project_count)??0,totalDevelopers:(t==null?void 0:t.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:a("dashboard.task_count")})}),e.jsx("div",{className:"flex flex-1 flex-col justify-center p-5",children:o?e.jsx("div",{className:"h-24 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):S?e.jsx(X,{dailyRates:S,dailyCounts:T,overallRate:W}):e.jsxs("div",{className:"flex flex-col items-center gap-2 py-6",children:[e.jsx("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:T.reduce((s,d)=>s+d,0)}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("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:a("dashboard.recent_tasks")}),e.jsxs(p,{to:"/tasks",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{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:a("dashboard.recent_tasks")})}),e.jsx("div",{className:"px-3 pb-3 md:px-5 md:pb-4 md:pt-0",children:x?e.jsx(g,{rows:4}):L.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:a("dashboard.no_tasks_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2 md:gap-0",children:L.map(s=>e.jsxs("div",{onClick:()=>n(`/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 line-clamp-2 preserve-case",title:B(s),children:["#",s.id," ",I(s)]}),e.jsx("span",{className:"shrink-0",children:e.jsx(R,{status:s.status})})]}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)] mt-1 block",children:_(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 preserve-case",children:e.jsx(q,{content:s.description,children:I(s,40)})}),e.jsx("span",{className:"hidden md:inline",children:e.jsx(R,{status:s.status})}),e.jsx("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:_(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:"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:a("dashboard.workers")}),e.jsxs(p,{to:"/workers",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsxs("div",{className:"flex md:hidden items-center justify-between border-b border-[var(--border)] px-3 py-3",children:[e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.workers")}),e.jsxs(p,{to:"/workers",className:"flex items-center gap-1 text-[11px] text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:f?e.jsx(g,{rows:3}):y.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:a("dashboard.no_workers_registered")})]}):e.jsx("div",{className:"flex flex-col",children:y.map(s=>e.jsxs("div",{onClick:()=>n(`/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:"min-w-0 flex-1 flex flex-col gap-0.5",children:[e.jsx("span",{className:"truncate text-xs text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"truncate text-xs text-[var(--text-muted)]",children:s.host??"--"})]}),e.jsxs("div",{className:"shrink-0 flex items-center gap-3",children:[e.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:[s.activeSlots,"/",s.maxSlots," ",a("dashboard.slots")]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs",style:{color:V(s.status)},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),F(s.status)]})]})]},s.id))})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:hidden",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-3 py-3",children:[e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.projects")}),e.jsxs(p,{to:"/projects",className:"flex items-center gap-1 text-[11px] text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-3",children:E?e.jsx(g,{rows:3}):C.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:a("projects.no_projects_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2",children:C.map(s=>{const d=s.taskCount??0;return e.jsxs("div",{onClick:()=>n(`/projects/${s.key}`),className:"cursor-pointer rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)]",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-[var(--accent)]",children:s.key}),e.jsxs("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:[d," ",P(d)]})]}),e.jsx("span",{className:"mt-1 block text-[11px] text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"mt-0.5 block text-[11px] text-[var(--text-muted)]",children:s.agentType})]},s.key)})})})]}),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:a("dashboard.recent_activity")}),i&&e.jsxs(p,{to:"/admin/audit-logs",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-3 md:p-4",children:M?e.jsx(g,{rows:4}):A.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:a("dashboard.no_recent_activity")})]}):e.jsx("div",{className:"flex flex-col",children:A.map(s=>{const d=s.message.match(/task\s*#?(\d+)/i),k=d?d[1]:null;return e.jsxs("div",{className:`flex min-w-0 flex-col gap-1 rounded-[4px] border-b border-[var(--border-row)] px-2 py-2 transition-colors last:border-b-0 md:flex-row md:items-start md:gap-3 md:rounded-none md:px-0 ${k?"cursor-pointer hover:bg-[var(--bg-input)]":""}`,onClick:()=>k&&n(`/tasks/${k}`),children:[e.jsx("span",{className:"shrink-0 whitespace-nowrap text-[11px] text-[var(--text-muted)] md:text-xs",children:_(s.timestamp)}),e.jsx("span",{className:"min-w-0 break-words text-[11px] leading-relaxed text-[var(--text-secondary)] md:truncate md:text-xs md:leading-normal",children:s.message})]},s.id)})})})]})]})]})}export{oe as default};
|
|
1
|
+
import{f as z,a as K,i as H,k as D,r as $,j as e,L as p,l as I,m as B,W as w,h}from"./index-DpFOWbFQ.js";import{T as R}from"./TaskStatusBadge-B8MoEoLo.js";import{T as g}from"./Skeleton-CwwH6ktS.js";import{O as G}from"./OnboardingGuide-D9ui1dG9.js";import{f as _}from"./date-CmcdoD87.js";import{g as V}from"./status-colors-_SUaojQM.js";import{u as b}from"./useFetch-Sdr634q_.js";import{T as q}from"./Tooltip-BsZZ0Gbx.js";import{A as v}from"./arrow-right-BZXdY7kF.js";import"./chevron-right-DdNeU6u1.js";const Y=3e5,J=[{type:"fraction",numerator:"active_tasks",denominator:"queued_tasks",labelKey:"dashboard.tasks_active_queued"},{type:"simple",key:"online_workers",labelKey:"dashboard.online_workers"},{type:"simple",key:"completed_today",labelKey:"dashboard.completed_all_today"},{type:"simple",key:"completed_by_user_today",labelKey:"dashboard.completed_by_you_today"}],Q=["sun","mon","tue","wed","thu","fri","sat"];function U(){const n=new Date;return Array.from({length:7},(a,i)=>{const r=new Date(n);r.setDate(r.getDate()-(6-i));const c=String(r.getMonth()+1).padStart(2,"0"),l=String(r.getDate()).padStart(2,"0");return{label:Q[r.getDay()],date:`${c}/${l}`}})}function X({dailyRates:n,dailyCounts:a,overallRate:i}){const{t:r}=K(),c=U(),l=a.reduce((t,o)=>t+o,0),u=Math.max(...a,1);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 flex items-baseline gap-2",children:[e.jsx("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:l}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("dashboard.last_7_days")}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"·"}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:[r("dashboard.success_rate"),": ",i,"%"]})]}),e.jsx("div",{className:"flex gap-2",style:{height:80},children:c.map(({label:t,date:o},j)=>{const x=a[j]??0,m=n[j]??0,f=r(x===1?"dashboard.task_total":"dashboard.tasks_total"),N=u>0?Math.max(x/u*100,4):4;return e.jsxs(q,{content:`${t} ${o} — ${x} ${f} (${m}%)`,className:"flex flex-1 flex-col items-center gap-1",children:[e.jsx("div",{className:"relative w-full h-full rounded-[4px] cursor-default",style:{backgroundColor:"rgba(34,197,94,0.1)"},children:e.jsx("div",{className:"absolute bottom-0 left-0 right-0 rounded-[4px]",style:{height:`${N}%`,backgroundColor:m>=80?"var(--accent)":m>=50?"var(--warning)":"var(--destructive)"}})}),e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:t})]},t)})})]})}function oe(){const n=z(),{t:a}=K(),i=H(),r=D(s=>s.taskSeq),c=D(s=>s.workerSeq),[l,u]=$.useState(0),{data:t,loading:o}=b(()=>h.get("web/dashboard/stats",{searchParams:{tz:String(new Date().getTimezoneOffset())}}).json(),[l,r,c]),{data:j,loading:x}=b(()=>h.get("web/dashboard/recent-tasks",{searchParams:{limit:"5"}}).json(),[l,r]),{data:m,loading:f}=b(()=>h.get("web/workers").json(),[l,c]),{data:N,loading:E}=b(()=>h.get("web/projects").json(),[l]),{data:O,loading:M}=b(()=>h.get("web/dashboard/recent-activity").json(),[]);$.useEffect(()=>{const s=setInterval(()=>{u(d=>d+1)},Y);return()=>clearInterval(s)},[]);const S=(t==null?void 0:t.success_rate_daily)??null,T=(t==null?void 0:t.task_count_daily)??[],W=(t==null?void 0:t.task_success_rate_7d)??0,L=j??[],y=m??[],C=N??[],A=O??[];function F(s){switch(s){case w.ONLINE:return a("dashboard.online");case w.DRAINING:return a("dashboard.idle");case w.OFFLINE:default:return a("dashboard.offline")}}function P(s){return a(s===1?"dashboard.task_total":"dashboard.tasks_total")}return e.jsxs("div",{className:"mx-auto max-w-6xl overflow-hidden px-2 py-4 md:px-4 md:py-6 font-mono",children:[e.jsx("div",{className:"mb-6 md:mb-8 grid grid-cols-2 gap-3 md:gap-4 lg:grid-cols-4",children:J.map(s=>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:[a(s.labelKey),":"]}),o?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:s.type==="fraction"?e.jsxs("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:[(t==null?void 0:t[s.numerator])??0,e.jsx("span",{className:"text-base md:text-lg font-normal text-[var(--text-muted)]",children:"/"}),(t==null?void 0:t[s.denominator])??0]}):e.jsx("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:(t==null?void 0:t[s.key])??0})})]},s.labelKey))}),e.jsx(G,{data:{activeTasks:((t==null?void 0:t.active_tasks)??0)+((t==null?void 0:t.queued_tasks)??0),totalWorkers:y.length,totalProjects:(t==null?void 0:t.project_count)??0,totalDevelopers:(t==null?void 0:t.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:a("dashboard.task_count")})}),e.jsx("div",{className:"flex flex-1 flex-col justify-center p-5",children:o?e.jsx("div",{className:"h-24 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):S?e.jsx(X,{dailyRates:S,dailyCounts:T,overallRate:W}):e.jsxs("div",{className:"flex flex-col items-center gap-2 py-6",children:[e.jsx("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:T.reduce((s,d)=>s+d,0)}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("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:a("dashboard.recent_tasks")}),e.jsxs(p,{to:"/tasks",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{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:a("dashboard.recent_tasks")})}),e.jsx("div",{className:"px-3 pb-3 md:px-5 md:pb-4 md:pt-0",children:x?e.jsx(g,{rows:4}):L.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:a("dashboard.no_tasks_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2 md:gap-0",children:L.map(s=>e.jsxs("div",{onClick:()=>n(`/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 line-clamp-2 preserve-case",title:B(s),children:["#",s.id," ",I(s)]}),e.jsx("span",{className:"shrink-0",children:e.jsx(R,{status:s.status})})]}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)] mt-1 block",children:_(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 preserve-case",children:e.jsx(q,{content:s.description,children:I(s,40)})}),e.jsx("span",{className:"hidden md:inline",children:e.jsx(R,{status:s.status})}),e.jsx("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:_(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:"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:a("dashboard.workers")}),e.jsxs(p,{to:"/workers",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsxs("div",{className:"flex md:hidden items-center justify-between border-b border-[var(--border)] px-3 py-3",children:[e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.workers")}),e.jsxs(p,{to:"/workers",className:"flex items-center gap-1 text-[11px] text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:f?e.jsx(g,{rows:3}):y.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:a("dashboard.no_workers_registered")})]}):e.jsx("div",{className:"flex flex-col",children:y.map(s=>e.jsxs("div",{onClick:()=>n(`/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:"min-w-0 flex-1 flex flex-col gap-0.5",children:[e.jsx("span",{className:"truncate text-xs text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"truncate text-xs text-[var(--text-muted)]",children:s.host??"--"})]}),e.jsxs("div",{className:"shrink-0 flex items-center gap-3",children:[e.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:[s.activeSlots,"/",s.maxSlots," ",a("dashboard.slots")]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs",style:{color:V(s.status)},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),F(s.status)]})]})]},s.id))})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:hidden",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-3 py-3",children:[e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.projects")}),e.jsxs(p,{to:"/projects",className:"flex items-center gap-1 text-[11px] text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-3",children:E?e.jsx(g,{rows:3}):C.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:a("projects.no_projects_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2",children:C.map(s=>{const d=s.taskCount??0;return e.jsxs("div",{onClick:()=>n(`/projects/${s.key}`),className:"cursor-pointer rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)]",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-[var(--accent)]",children:s.key}),e.jsxs("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:[d," ",P(d)]})]}),e.jsx("span",{className:"mt-1 block text-[11px] text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"mt-0.5 block text-[11px] text-[var(--text-muted)]",children:s.agentType})]},s.key)})})})]}),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:a("dashboard.recent_activity")}),i&&e.jsxs(p,{to:"/admin/audit-logs",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-3 md:p-4",children:M?e.jsx(g,{rows:4}):A.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:a("dashboard.no_recent_activity")})]}):e.jsx("div",{className:"flex flex-col",children:A.map(s=>{const d=s.message.match(/task\s*#?(\d+)/i),k=d?d[1]:null;return e.jsxs("div",{className:`flex min-w-0 flex-col gap-1 rounded-[4px] border-b border-[var(--border-row)] px-2 py-2 transition-colors last:border-b-0 md:flex-row md:items-start md:gap-3 md:rounded-none md:px-0 ${k?"cursor-pointer hover:bg-[var(--bg-input)]":""}`,onClick:()=>k&&n(`/tasks/${k}`),children:[e.jsx("span",{className:"shrink-0 whitespace-nowrap text-[11px] text-[var(--text-muted)] md:text-xs",children:_(s.timestamp)}),e.jsx("span",{className:"min-w-0 break-words text-[11px] leading-relaxed text-[var(--text-secondary)] md:truncate md:text-xs md:leading-normal",children:s.message})]},s.id)})})})]})]})]})}export{oe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./index-
|
|
1
|
+
import{j as e}from"./index-DpFOWbFQ.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-DpFOWbFQ.js";import{I as s,a as t}from"./DocsPrimitives-DxxQvd4A.js";import"./copy-BilNgG66.js";function n(){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.jsx("li",{children:"7. configure ai task naming (optional — uses any openai-compatible llm api)"})]}),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
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as m,u,a as b,r as o,j as e,N as _,T as f,L as i,S as j,E as N,b as v,d as w,e as K,P as k,C as S}from"./index-
|
|
1
|
+
import{c as m,u,a as b,r as o,j as e,N as _,T as f,L as i,S as j,E as N,b as v,d as w,e as K,P as k,C as S}from"./index-DpFOWbFQ.js";import{A as x}from"./arrow-right-BZXdY7kF.js";import{Z as z}from"./zap-BH9B1NGV.js";import{B as T}from"./bot-DcTSu6mF.js";import{W as L,G as C}from"./workflow-uVJjw4HD.js";import{U as M}from"./users-DUHEmaaK.js";import{C as I}from"./copy-BilNgG66.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./index-
|
|
1
|
+
import{j as e}from"./index-DpFOWbFQ.js";import{I as s,a as t}from"./DocsPrimitives-DxxQvd4A.js";import"./copy-BilNgG66.js";function d(){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.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"this guide covers setting up a local overlord development environment for contributing to the project. it walks through cloning the repo, installing dependencies, building packages, seeding test data, and running the dev servers."})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// prerequisites"}),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:"pnpm"})," ",">="," 9"]}),e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"redis"})," running locally (default: ",e.jsx("code",{className:"text-[var(--text-muted)]",children:"redis://localhost:6379/0"}),")"]}),e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"git"})," ",">="," 2.20"]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// clone and install"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 1. clone the repository"}),e.jsx(s,{code:"git clone git@github.com:overlord-run/overlord.git && cd overlord"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 2. install dependencies"}),e.jsx(s,{code:"pnpm install"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 3. build packages"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"the protocol package must be built first — other packages depend on its types:"}),e.jsx(t,{code:`pnpm --filter @overlordai/protocol build
|
|
2
2
|
pnpm --filter @overlordai/server build`})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// seed test data"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"populate the database with test users, projects, and sample tasks:"}),e.jsx(s,{code:"pnpm dev:seed"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"this creates the following test accounts:"}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] 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)] bg-[var(--bg-card)]",children:[e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"username"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"password"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"role"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"admin"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--text-muted)]",children:"test-password-123"})}),e.jsx("td",{className:"px-3 py-2",children:"admin"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"alice"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--text-muted)]",children:"test-password-123"})}),e.jsx("td",{className:"px-3 py-2",children:"lead"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"bob"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--text-muted)]",children:"test-password-123"})}),e.jsx("td",{className:"px-3 py-2",children:"developer"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"carol"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--text-muted)]",children:"test-password-123"})}),e.jsx("td",{className:"px-3 py-2",children:"developer"})]})]})]})}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2",children:e.jsxs("p",{className:"text-xs text-[var(--text-secondary)]",children:["// all seed accounts have totp enabled. use the shared totp secret ",e.jsx("code",{className:"text-[var(--accent)]",children:"JBSWY3DPEHPK3PXP"})," with any totp generator to get a 6-digit code for login."]})})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// run dev servers"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> backend server (port 9000)"}),e.jsx(s,{code:"pnpm dev"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> web frontend (port 5173)"}),e.jsx(s,{code:"pnpm dev:web"})]}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["the web dev server proxies api requests to the backend on port 9000. open ",e.jsx("code",{className:"text-[var(--accent)]",children:"http://localhost:5173"})," in your browser."]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// rebuilding after changes"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"when modifying shared types in the protocol package, rebuild before the server picks up changes:"}),e.jsx(t,{code:`pnpm --filter @overlordai/protocol build # after type changes
|
|
3
3
|
pnpm --filter @overlordai/server build # rebuild server`})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// running tests"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"overlord uses vitest for all tests:"}),e.jsx(s,{code:"pnpm test"}),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:"// do not use jest — the project uses vitest exclusively. do not use axios — use ky for http requests. do not use typeorm or prisma — use raw better-sqlite3 queries."})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// project structure"}),e.jsx(t,{code:`overlord/
|
|
4
4
|
apps/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as E,g as I,u as g,a as W,r as m,j as t,N as B}from"./index-
|
|
1
|
+
import{f as E,g as I,u as g,a as W,r as m,j as t,N as B}from"./index-DpFOWbFQ.js";function v(i){const a=i==null?void 0:i.from,s=a==null?void 0:a.pathname;return!s||s==="/totp-setup"||s==="/login"?"/home":`${s}${(a==null?void 0:a.search)??""}`}function q(i,a,s){const p=i==null?void 0:i.from;return p?{from:p}:{from:{pathname:a,search:s}}}function A(){const i=E(),a=I(),s=g(e=>e.login),p=g(e=>e.requireTotpSetup),_=g(e=>e.user),{t:n}=W(),[C,S]=m.useState("credentials"),[f,k]=m.useState(""),[h,F]=m.useState(""),[l,x]=m.useState(""),[d,y]=m.useState(!1),[j,c]=m.useState(""),b=m.useRef([]);if(_&&!p)return t.jsx(B,{to:v(a.state),replace:!0});if(p){const e=q(a.state,a.pathname,a.search);return e.from.pathname==="/bind"&&sessionStorage.setItem("overlord_bind_redirect",JSON.stringify(e.from)),t.jsx(B,{to:"/totp-setup",state:e,replace:!0})}async function z(e){if(e.preventDefault(),c(""),!f.trim()||!h.trim()){c(n("auth.username_and_password_required"));return}y(!0);try{await s({username:f.trim(),password:h});const r=g.getState();if(r.requireTotpSetup)return;r.user&&i(v(a.state),{replace:!0})}catch(r){const o=r instanceof Error?r.message:n("auth.login_failed");o==="TOTP_REQUIRED"?(S("totp"),c("")):c(o)}finally{y(!1)}}async function M(e){if(e.preventDefault(),c(""),!l.trim()||l.trim().length!==6){c(n("auth.please_enter_valid_6_digit_code"));return}y(!0);try{await s({username:f.trim(),password:h,totpCode:l.trim()}),g.getState().user&&i(v(a.state),{replace:!0})}catch(r){const o=r instanceof Error?r.message:n("auth.invalid_totp_code");c(o)}finally{y(!1)}}function J(){S("credentials"),x(""),c("")}function R(e,r){var w;const o=r.replace(/\D/g,"").slice(-1),u=l.split("");for(;u.length<6;)u.push("");u[e]=o,x(u.join("")),o&&e<5&&((w=b.current[e+1])==null||w.focus())}function T(e,r){var o;r.key==="Backspace"&&!l[e]&&e>0&&((o=b.current[e-1])==null||o.focus())}function D(e){var u;e.preventDefault();const r=e.clipboardData.getData("text").replace(/\D/g,"").slice(0,6);x(r);const o=Math.min(r.length,5);(u=b.current[o])==null||u.focus()}return t.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--bg-primary)",padding:"1rem",fontFamily:"'JetBrains Mono', monospace"},children:t.jsxs("div",{style:{width:"100%",maxWidth:"400px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"2rem"},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"0.625rem",marginBottom:"0.25rem"},children:[t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"2rem",height:"2rem",borderRadius:"4px",backgroundColor:"var(--accent)",fontFamily:"'JetBrains Mono', monospace"},"aria-hidden":!0,children:t.jsx("span",{style:{fontSize:"1.25rem",fontWeight:600,color:"#0C0C0C"},children:"~"})}),t.jsx("span",{style:{fontSize:"1.25rem",fontWeight:700,color:"var(--text-primary)",fontFamily:"'JetBrains Mono', monospace"},children:n("landing.overlord")})]}),t.jsx("div",{style:{textAlign:"center",color:"var(--text-muted)",fontSize:"0.75rem",marginBottom:"2rem",fontFamily:"'JetBrains Mono', monospace"},children:n(C==="credentials"?"auth.ai_powered_development_system":"auth.two_factor_verification")}),j&&t.jsx("div",{style:{marginBottom:"1rem",padding:"0.5rem 0.75rem",borderRadius:"4px",backgroundColor:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)",color:"var(--destructive)",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",overflowWrap:"break-word",wordBreak:"break-word"},children:j}),C==="credentials"?t.jsxs("form",{onSubmit:z,style:{display:"flex",flexDirection:"column",gap:"1rem"},children:[t.jsxs("div",{children:[t.jsx("label",{style:{display:"block",color:"var(--text-secondary)",fontSize:"0.75rem",marginBottom:"0.375rem",fontFamily:"'JetBrains Mono', monospace"},children:n("auth.username")}),t.jsx("input",{type:"text",placeholder:n("auth.enter_username"),value:f,onChange:e=>k(e.target.value),autoFocus:!0,autoComplete:"username",required:!0,style:{width:"100%",padding:"0.625rem 0.75rem",backgroundColor:"var(--bg-input)",border:"1px solid var(--border)",borderRadius:"4px",color:"var(--text-primary)",fontSize:"0.875rem",fontFamily:"'JetBrains Mono', monospace",outline:"none",boxSizing:"border-box"},onFocus:e=>e.target.style.borderColor="var(--accent)",onBlur:e=>e.target.style.borderColor="var(--border)"})]}),t.jsxs("div",{children:[t.jsx("label",{style:{display:"block",color:"var(--text-secondary)",fontSize:"0.75rem",marginBottom:"0.375rem",fontFamily:"'JetBrains Mono', monospace"},children:n("auth.password")}),t.jsx("input",{type:"password",placeholder:n("auth.enter_password"),value:h,onChange:e=>F(e.target.value),autoComplete:"current-password",required:!0,style:{width:"100%",padding:"0.625rem 0.75rem",backgroundColor:"var(--bg-input)",border:"1px solid var(--border)",borderRadius:"4px",color:"var(--text-primary)",fontSize:"0.875rem",fontFamily:"'JetBrains Mono', monospace",outline:"none",boxSizing:"border-box"},onFocus:e=>e.target.style.borderColor="var(--accent)",onBlur:e=>e.target.style.borderColor="var(--border)"})]}),t.jsx("button",{type:"submit",disabled:d,style:{width:"100%",padding:"0.625rem",backgroundColor:"var(--accent)",color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.875rem",fontWeight:600,fontFamily:"'JetBrains Mono', monospace",cursor:d?"not-allowed":"pointer",opacity:d?.7:1,marginTop:"0.5rem"},children:n(d?"common.signing_in":"auth.sign_in")}),t.jsx("button",{type:"button",onClick:()=>i("/"),style:{width:"100%",padding:"0.5rem",backgroundColor:"transparent",border:"none",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",cursor:"pointer"},className:"text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:n("common.back")})]},"credentials"):t.jsxs("form",{onSubmit:M,style:{display:"flex",flexDirection:"column",gap:"1rem"},children:[t.jsxs("div",{children:[t.jsx("label",{style:{display:"block",color:"var(--text-secondary)",fontSize:"0.75rem",marginBottom:"0.5rem",fontFamily:"'JetBrains Mono', monospace",textAlign:"center"},children:n("auth.enter_totp_code")}),t.jsx("div",{style:{display:"flex",gap:"0.5rem",justifyContent:"center"},onPaste:D,children:Array.from({length:6}).map((e,r)=>t.jsx("input",{ref:o=>{b.current[r]=o},type:"text",inputMode:"numeric",maxLength:1,value:l[r]||"",onChange:o=>R(r,o.target.value),onKeyDown:o=>T(r,o),autoFocus:r===0,autoComplete:r===0?"one-time-code":"off",style:{width:"2.75rem",height:"3rem",textAlign:"center",backgroundColor:"var(--bg-input)",border:"1px solid var(--border)",borderRadius:"4px",color:"var(--text-primary)",fontSize:"1.25rem",fontFamily:"'JetBrains Mono', monospace",fontWeight:600,outline:"none",boxSizing:"border-box"},onFocus:o=>o.target.style.borderColor="var(--accent)",onBlur:o=>o.target.style.borderColor="var(--border)"},r))})]}),t.jsx("button",{type:"submit",disabled:d||l.length!==6,style:{width:"100%",padding:"0.625rem",backgroundColor:"var(--accent)",color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.875rem",fontWeight:600,fontFamily:"'JetBrains Mono', monospace",cursor:d||l.length!==6?"not-allowed":"pointer",opacity:d||l.length!==6?.7:1,marginTop:"0.5rem"},children:n(d?"common.verifying":"auth.verify")}),t.jsx("button",{type:"button",onClick:J,style:{width:"100%",padding:"0.5rem",backgroundColor:"transparent",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:"4px",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",cursor:"pointer"},children:n("common.back")})]},"totp")]})})}export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./index-
|
|
1
|
+
import{j as s}from"./index-DpFOWbFQ.js";import{b as a}from"./status-colors-_SUaojQM.js";function x({label:r,value:t,variant:n="stacked"}){const e=Math.round(t*100);return n==="inline"?s.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[s.jsx("span",{className:"w-8 text-[var(--text-muted)]",children:r}),s.jsx("div",{className:"h-1.5 flex-1 rounded-[2px] bg-[var(--bg-input)]",children:s.jsx("div",{className:"h-full rounded-[2px] transition-all",style:{width:`${e}%`,backgroundColor:a(t)}})}),s.jsxs("span",{className:"w-8 text-right text-[var(--text-secondary)]",children:[e,"%"]})]}):s.jsxs("div",{children:[s.jsxs("div",{className:"mb-1 flex items-center justify-between text-xs",children:[s.jsx("span",{className:"text-[var(--text-secondary)]",children:r}),s.jsxs("span",{className:"text-[var(--text-primary)]",children:[e,"%"]})]}),s.jsx("div",{className:"h-1.5 w-full rounded-[2px] bg-[var(--bg-input)]",children:s.jsx("div",{className:"h-full rounded-[2px] transition-all",style:{width:`${e}%`,backgroundColor:a(t)}})})]})}export{x as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as r}from"./index-
|
|
1
|
+
import{r as s,j as r}from"./index-DpFOWbFQ.js";import{C as p}from"./chevron-down-B-IybQE8.js";function b(t,a){return t.length===0?a:t.length<=2?t.join(", "):`${t.slice(0,2).join(", ")} +${t.length-2}`}function g({values:t,onChange:a,options:c,placeholder:u="select",disabled:l=!1,className:d=""}){const[o,x]=s.useState(!1),i=s.useRef(null),m=s.useMemo(()=>c.filter(e=>t.includes(e.value)).map(e=>e.label),[c,t]);s.useEffect(()=>{function e(n){i.current&&!i.current.contains(n.target)&&x(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);const f=e=>{t.includes(e)?a(t.filter(n=>n!==e)):a([...t,e])};return r.jsxs("div",{ref:i,className:`relative ${d}`,children:[r.jsxs("button",{type:"button",disabled:l,onClick:()=>!l&&x(e=>!e),"aria-expanded":o,"aria-haspopup":"listbox",className:`flex w-full items-center justify-between rounded-[4px] border bg-[var(--bg-input)] px-3 py-2 font-mono text-xs outline-none transition-colors ${o?"border-[var(--accent)] text-[var(--text-primary)]":"border-[var(--border)] text-[var(--text-primary)] hover:border-[var(--text-muted)]"} ${l?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[r.jsx("span",{className:t.length>0?"":"text-[var(--text-muted)]",children:b(m,u)}),r.jsx(p,{size:12,className:`ml-2 shrink-0 text-[var(--text-muted)] transition-transform ${o?"rotate-180":""}`})]}),o&&r.jsx("div",{role:"listbox","aria-multiselectable":"true",className:"absolute right-0 z-50 mt-1 max-h-56 min-w-full w-max max-w-[calc(100vw-2rem)] overflow-auto rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] py-1 shadow-lg",children:c.map(e=>{const n=t.includes(e.value);return r.jsxs("button",{type:"button",role:"option","aria-selected":n,onClick:()=>f(e.value),className:`flex w-full items-center gap-2 px-3 py-1.5 text-left font-mono text-xs transition-colors ${n?"bg-[var(--accent)]/10 text-[var(--accent)]":"text-[var(--text-secondary)] hover:bg-[var(--bg-input)] hover:text-[var(--text-primary)]"}`,children:[r.jsx("span",{className:`flex h-3.5 w-3.5 items-center justify-center rounded-[3px] border text-[9px] ${n?"border-[var(--accent)] bg-[var(--accent)]/10 text-[var(--accent)]":"border-[var(--border)] text-transparent"}`,children:"✓"}),r.jsx("span",{children:e.label})]},e.value)})})]})}export{g as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as a,a as n,j as e,L as o}from"./index-
|
|
1
|
+
import{f as a,a as n,j as e,L as o}from"./index-DpFOWbFQ.js";function x(){const r=a(),{t}=n();return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--bg-primary)] p-8 font-mono",children:e.jsxs("div",{className:"flex flex-col items-center justify-center gap-5 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-12 py-16",children:[e.jsx("span",{className:"text-7xl font-bold text-[var(--border)]",children:t("common.not_found")}),e.jsx("span",{className:"text-base font-bold text-red-500",children:t("common.page_not_found")}),e.jsx("span",{className:"max-w-[340px] text-center text-xs text-[var(--text-muted)]",children:t("common.the_page_does_not_exist")}),e.jsxs("div",{className:"w-full max-w-[380px] rounded-[4px] bg-[#0C0C0C] px-4 py-3",children:[e.jsxs("p",{className:"font-mono text-xs leading-relaxed text-[var(--text-muted)]",children:[e.jsx("span",{className:"text-[var(--accent)]",children:"> overlord $"})," ",e.jsx("span",{className:"text-[#e4e4e4]",children:"page --get /unknown"})]}),e.jsx("p",{className:"mt-1 font-mono text-xs leading-relaxed text-red-500",children:t("common.not_found_terminal_error")})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(o,{to:"/",className:"rounded-[4px] bg-[var(--accent)] px-5 py-2 text-[11px] font-bold text-black transition-all hover:brightness-110",children:t("common.go_home")}),e.jsx("button",{type:"button",onClick:()=>r(-1),className:"rounded-[4px] border border-[var(--border)] bg-transparent px-5 py-2 text-[11px] font-bold text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)] hover:text-[var(--text-primary)]",children:t("common.go_back")})]})]})})}export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as j,r as a,a as w,j as t,X as N,C as L,L as D,D as m}from"./index-
|
|
1
|
+
import{u as j,r as a,a as w,j as t,X as N,C as L,L as D,D as m}from"./index-DpFOWbFQ.js";import{C as S}from"./chevron-right-DdNeU6u1.js";function y(e){return[{id:"admin_create_project",title:e("onboarding.admin_create_project_title"),description:e("onboarding.admin_create_project_desc"),link:"/projects",linkLabel:e("onboarding.go_to_projects"),autoDetect:!0},{id:"admin_register_worker",title:e("onboarding.admin_register_worker_title"),description:e("onboarding.admin_register_worker_desc"),link:"/workers",linkLabel:e("onboarding.go_to_workers"),autoDetect:!0},{id:"admin_create_developer",title:e("onboarding.admin_create_developer_title"),description:e("onboarding.admin_create_developer_desc"),link:"/admin/developers",linkLabel:e("onboarding.manage_developers"),autoDetect:!0},{id:"admin_configure_bot",title:e("onboarding.admin_configure_bot_title"),description:e("onboarding.admin_configure_bot_desc"),link:"/admin/bots",linkLabel:e("onboarding.go_to_bots")},{id:"dev_link_chat",title:e("onboarding.dev_link_chat_title"),description:e("onboarding.dev_link_chat_desc")},{id:"admin_first_task",title:e("onboarding.admin_first_task_title"),description:e("onboarding.admin_first_task_desc"),link:"/tasks",linkLabel:e("onboarding.go_to_tasks"),autoDetect:!0}]}function C(e){return[{id:"lead_view_projects",title:e("onboarding.lead_view_projects_title"),description:e("onboarding.lead_view_projects_desc"),link:"/projects",linkLabel:e("onboarding.go_to_projects")},{id:"dev_link_chat",title:e("onboarding.dev_link_chat_title"),description:e("onboarding.dev_link_chat_desc")},{id:"lead_configure_pipeline",title:e("onboarding.lead_configure_pipeline_title"),description:e("onboarding.lead_configure_pipeline_desc"),link:"/projects",linkLabel:e("onboarding.go_to_projects")},{id:"lead_add_member",title:e("onboarding.lead_add_member_title"),description:e("onboarding.lead_add_member_desc"),link:"/projects",linkLabel:e("onboarding.go_to_projects")},{id:"lead_first_task",title:e("onboarding.lead_first_task_title"),description:e("onboarding.lead_first_task_desc"),link:"/tasks",linkLabel:e("onboarding.go_to_tasks")}]}function E(e){return[{id:"dev_install_cli",title:e("onboarding.dev_install_cli_title"),description:e("onboarding.dev_install_cli_desc"),link:"/docs/cli",linkLabel:e("onboarding.cli")},{id:"dev_setup_cli",title:e("onboarding.dev_setup_cli_title"),description:e("onboarding.dev_setup_cli_desc"),link:"/docs/cli",linkLabel:e("onboarding.setup_guide")},{id:"dev_link_chat",title:e("onboarding.dev_link_chat_title"),description:e("onboarding.dev_link_chat_desc")},{id:"dev_view_projects",title:e("onboarding.dev_view_projects_title"),description:e("onboarding.dev_view_projects_desc"),link:"/projects",linkLabel:e("onboarding.go_to_projects")},{id:"dev_first_task",title:e("onboarding.dev_first_task_title"),description:e("onboarding.dev_first_task_desc"),link:"/tasks",linkLabel:e("onboarding.go_to_tasks"),autoDetect:!0}]}const p="overlord_onboarding";function v(){try{const e=localStorage.getItem(p);if(e)return JSON.parse(e)}catch{}return{dismissed:!1,completed:{}}}function R(){return v().dismissed}function u(e){localStorage.setItem(p,JSON.stringify(e))}function $({data:e}){const l=j(i=>{var n;return(n=i.user)==null?void 0:n.role}),[s,c]=a.useState(v),{t:r}=w();function x(){return l===m.ADMIN?y(r):l===m.LEAD?C(r):E(r)}const o=x(),_=a.useCallback(i=>{if(s.completed[i.id])return!0;if(!i.autoDetect)return!1;switch(i.id){case"admin_create_project":return e.totalProjects>0;case"admin_register_worker":return e.totalWorkers>0;case"admin_create_developer":return e.totalDevelopers>1;case"admin_first_task":case"dev_first_task":return e.activeTasks>0;default:return!1}},[s.completed,e]),d=o.filter(_).length,k=d===o.length,h=a.useCallback(i=>{c(n=>{const g={...n,completed:{...n.completed,[i]:!n.completed[i]}};return u(g),g})},[]),b=a.useCallback(()=>{c(i=>{const n={...i,dismissed:!0};return u(n),window.dispatchEvent(new Event("onboarding-dismissed")),n})},[]);if(s.dismissed)return null;const f=Math.round(d/o.length*100);return t.jsxs("div",{className:"mb-6 md:mb-8 rounded-[4px] border border-[var(--accent)]/30 bg-[var(--bg-card)]",children:[t.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("span",{className:"text-xs font-bold text-[var(--accent)]",children:r("onboarding.getting_started")}),t.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:[d,"/",o.length," completed"]})]}),t.jsx("button",{onClick:b,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",title:r("onboarding.dismiss"),children:t.jsx(N,{className:"h-3.5 w-3.5"})})]}),t.jsx("div",{className:"h-0.5 bg-[var(--border)]",children:t.jsx("div",{className:"h-full bg-[var(--accent)] transition-all duration-500",style:{width:`${f}%`}})}),t.jsx("div",{className:"divide-y divide-[var(--border)]",children:o.map(i=>{const n=_(i);return t.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 transition-colors hover:bg-[var(--bg-input)]",children:[t.jsx("button",{onClick:()=>!i.autoDetect&&h(i.id),className:`flex h-4 w-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors ${n?"border-[var(--accent)] bg-[var(--accent)]":"border-[var(--border)] hover:border-[var(--text-muted)]"} ${i.autoDetect?"cursor-default":"cursor-pointer"}`,children:n&&t.jsx(L,{className:"h-2.5 w-2.5 text-black"})}),t.jsxs("div",{className:"flex flex-1 items-center justify-between min-w-0 overflow-hidden",children:[t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:`text-xs truncate ${n?"text-[var(--text-muted)] line-through":"text-[var(--text-primary)]"}`,children:i.title}),t.jsx("p",{className:"text-[11px] text-[var(--text-muted)] truncate",children:i.description})]}),i.link&&!n&&t.jsxs(D,{to:i.link,className:"ml-3 flex shrink-0 items-center gap-1 whitespace-nowrap text-[11px] text-[var(--accent)] hover:underline",children:[i.linkLabel," ",t.jsx(S,{className:"h-3 w-3"})]})]})]},i.id)})}),k&&t.jsxs("div",{className:"border-t border-[var(--border)] px-4 py-3 text-center",children:[t.jsx("span",{className:"text-xs text-[var(--accent)]",children:r("onboarding.all_done")}),t.jsx("button",{onClick:b,className:"ml-3 text-[11px] text-[var(--text-muted)] underline hover:text-[var(--text-primary)]",children:r("onboarding.dismiss")})]})]})}export{$ as O,R as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./index-CHuch-Tb.js";function r(){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:"// permissions & roles"}),e.jsx("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:"overlord uses role-based access control (rbac) with two layers: system roles that govern global permissions, and project roles that scope access within individual projects. roles are hierarchical — higher roles inherit all permissions from lower ones."})]}),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:"> system roles"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"system roles are assigned to developer accounts and determine what actions they can perform across the entire overlord instance."}),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:"role"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"inherits"}),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:"developer"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"base role for all users"})]}),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:"lead"})}),e.jsx("td",{className:"py-2 pr-4",children:"developer"}),e.jsx("td",{className:"py-2",children:"team lead with worker management capabilities"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"admin"})}),e.jsx("td",{className:"py-2 pr-4",children:"all"}),e.jsx("td",{className:"py-2",children:"full system access"})]})]})]})})]}),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:"> permissions matrix"}),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:"permission"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"developer"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"lead"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"admin"})]})}),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:"create & view tasks"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"attach to terminals"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"manage own profile"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"view assigned projects"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"view all workers"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"drain / undrain workers"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"manage developers"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"manage projects"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"manage bots"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"manage worker tokens"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"view audit logs"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:"system settings"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]})]})]})})]}),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:"> project roles"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"project roles control what a developer can do within a specific project. these are assigned per project and are independent of system roles."}),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:"role"}),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:"member"})}),e.jsx("td",{className:"py-2",children:"read access to project, can create tasks"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"maintainer"})}),e.jsx("td",{className:"py-2",children:"full project management"})]})]})]})}),e.jsx("p",{className:"mt-3 text-[11px] uppercase tracking-wider text-[var(--text-muted)]",children:"project permissions"}),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:"permission"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"member"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"maintainer"})]})}),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:"view project"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"create tasks in project"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"update project config"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"manage project members"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:"manage git tokens"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"admins can access all projects without explicit membership. the project role check is bypassed entirely for admin system role."})]}),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:"> authentication"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"overlord supports three authentication methods:"}),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:"method"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"lifetime"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"use case"})]})}),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:"jwt"})}),e.jsx("td",{className:"py-2 pr-4",children:"access: 15 min, refresh: 7 days"}),e.jsx("td",{className:"py-2",children:"web dashboard, api sessions"})]}),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:"pat"})}),e.jsx("td",{className:"py-2 pr-4",children:"no expiry (until revoked)"}),e.jsx("td",{className:"py-2",children:"cli tools, scripts, integrations"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"totp 2fa"})}),e.jsx("td",{className:"py-2 pr-4",children:"30s codes"}),e.jsx("td",{className:"py-2",children:"optional second factor on login"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"jwt authentication uses a rotating refresh token — each refresh request issues a new access token and a new refresh token, invalidating the previous refresh token. pats authenticate with the same authorization: bearer header format as jwts."}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"totp 2fa is optional per account. once enabled, the totpcode field is required on login. use any standard authenticator app to generate codes."})]}),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:"> audit logging"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"all privileged actions (developer management, project changes, worker operations, system settings) are recorded in the audit log. audit entries include the actor, action, target resource, and timestamp. only admins can view audit logs via the web dashboard or api."})]})]})]})}export{r as default};
|
|
1
|
+
import{j as e}from"./index-DpFOWbFQ.js";function r(){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:"// permissions & roles"}),e.jsx("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:"overlord uses role-based access control (rbac) with two layers: system roles that govern global permissions, and project roles that scope access within individual projects. roles are hierarchical — higher roles inherit all permissions from lower ones."})]}),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:"> system roles"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"system roles are assigned to developer accounts and determine what actions they can perform across the entire overlord instance."}),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:"role"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"inherits"}),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:"developer"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"base role for all users"})]}),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:"lead"})}),e.jsx("td",{className:"py-2 pr-4",children:"developer"}),e.jsx("td",{className:"py-2",children:"team lead with worker management capabilities"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"admin"})}),e.jsx("td",{className:"py-2 pr-4",children:"all"}),e.jsx("td",{className:"py-2",children:"full system access"})]})]})]})})]}),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:"> permissions matrix"}),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:"permission"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"developer"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"lead"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"admin"})]})}),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:"create & view tasks"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"attach to terminals"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"manage own profile"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"view assigned projects"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"view all workers"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"drain / undrain workers"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"manage developers"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"manage projects"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"manage bots"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"manage worker tokens"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"view audit logs"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:"system settings"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]})]})]})})]}),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:"> project roles"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"project roles control what a developer can do within a specific project. these are assigned per project and are independent of system roles."}),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:"role"}),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:"member"})}),e.jsx("td",{className:"py-2",children:"read access to project, can create tasks"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"maintainer"})}),e.jsx("td",{className:"py-2",children:"full project management"})]})]})]})}),e.jsx("p",{className:"mt-3 text-[11px] uppercase tracking-wider text-[var(--text-muted)]",children:"project permissions"}),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:"permission"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"member"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"maintainer"})]})}),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:"view project"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"create tasks in project"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--accent)]",children:"yes"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"update project config"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"manage project members"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:"manage git tokens"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--accent)]",children:"yes"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"admins can access all projects without explicit membership. the project role check is bypassed entirely for admin system role."})]}),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:"> authentication"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"overlord supports three authentication methods:"}),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:"method"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"lifetime"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"use case"})]})}),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:"jwt"})}),e.jsx("td",{className:"py-2 pr-4",children:"access: 15 min, refresh: 7 days"}),e.jsx("td",{className:"py-2",children:"web dashboard, api sessions"})]}),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:"pat"})}),e.jsx("td",{className:"py-2 pr-4",children:"no expiry (until revoked)"}),e.jsx("td",{className:"py-2",children:"cli tools, scripts, integrations"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"totp 2fa"})}),e.jsx("td",{className:"py-2 pr-4",children:"30s codes"}),e.jsx("td",{className:"py-2",children:"optional second factor on login"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"jwt authentication uses a rotating refresh token — each refresh request issues a new access token and a new refresh token, invalidating the previous refresh token. pats authenticate with the same authorization: bearer header format as jwts."}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"totp 2fa is optional per account. once enabled, the totpcode field is required on login. use any standard authenticator app to generate codes."})]}),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:"> audit logging"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"all privileged actions (developer management, project changes, worker operations, system settings) are recorded in the audit log. audit entries include the actor, action, target resource, and timestamp. only admins can view audit logs via the web dashboard or api."})]})]})]})}export{r as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./index-
|
|
1
|
+
import{j as e}from"./index-DpFOWbFQ.js";import{a}from"./DocsPrimitives-DxxQvd4A.js";import"./copy-BilNgG66.js";const c=`[
|
|
2
2
|
{
|
|
3
3
|
"name": "develop",
|
|
4
4
|
"command": "/develop {description}",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as g,r as p,j as e,a0 as $,B as I,f as M,h as S,t as y}from"./index-
|
|
1
|
+
import{a as g,r as p,j as e,a0 as $,B as I,f as M,h as S,t as y}from"./index-DpFOWbFQ.js";import{S as C}from"./Select-Dgtvdi2n.js";import"./chevron-down-B-IybQE8.js";const O={stages:[]};function q(){return{name:"",prompt:""}}function b({children:t}){return e.jsx("label",{className:"mb-1 block font-mono text-[11px] text-[var(--text-secondary)]",children:t})}function j({value:t,onChange:o,placeholder:a,type:r="text",className:c=""}){return e.jsx("input",{type:r,value:t,onChange:s=>o(s.target.value),placeholder:a,className:`w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-2.5 py-1.5 font-mono text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:border-[var(--accent)] focus:outline-none ${c}`})}function J({checked:t,onChange:o}){return e.jsx("button",{type:"button",role:"switch","aria-checked":t,onClick:()=>o(!t),className:`relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-[var(--border)] transition-colors ${t?"bg-[var(--accent)]":"bg-[var(--bg-primary)]"}`,children:e.jsx("span",{className:`inline-block h-3.5 w-3.5 rounded-full bg-white shadow transition-transform ${t?"translate-x-[18px]":"translate-x-[2px]"}`})})}function N({value:t,onChange:o,placeholder:a,rows:r=4}){return e.jsx("textarea",{value:t,onChange:c=>o(c.target.value),placeholder:a,rows:r,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-2.5 py-1.5 font-mono text-xs leading-relaxed text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:border-[var(--accent)] focus:outline-none"})}function T({stage:t,index:o,selected:a,onSelect:r,onDelete:c}){const{t:s}=g(),i=t.prompt?$(t.prompt,60):"";return e.jsxs("div",{role:"button",tabIndex:0,onClick:r,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),r())},className:`group relative flex w-full items-start gap-3 rounded-[4px] border px-4 py-3 text-left transition-colors ${a?"border-[var(--accent)] bg-[var(--bg-card)]":"border-[var(--border)] bg-[var(--bg-card)] hover:border-[var(--text-muted)]"}`,style:{borderLeftWidth:3,borderLeftColor:"var(--accent)"},children:[e.jsx("span",{className:"mt-0.5 shrink-0 font-mono text-[11px] text-[var(--text-muted)]",children:String(o+1).padStart(2,"0")}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs font-bold text-[var(--text-primary)]",children:t.name||"unnamed"}),t.label&&e.jsx("span",{className:"truncate font-mono text-[11px] text-[var(--text-muted)]",children:t.label})]}),i&&e.jsxs("div",{className:"mt-0.5 truncate font-mono text-[11px] text-[var(--text-muted)]",children:["// ",i]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2 font-mono text-[11px] text-[var(--text-muted)]",children:[t.gate&&e.jsx("span",{children:"gate"}),t.requireConfirm&&e.jsx("span",{children:"confirm"}),t.timeout!=null&&e.jsxs("span",{children:["timeout:",t.timeout,"s"]})]})]}),e.jsx("button",{type:"button",onClick:d=>{d.stopPropagation(),c()},className:"mt-0.5 shrink-0 rounded-[4px] p-0.5 text-[var(--text-muted)] opacity-0 transition-opacity hover:text-[var(--destructive)] group-hover:opacity-100","aria-label":s("pipeline.delete_stage"),children:e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("polyline",{points:"3 6 5 6 21 6"}),e.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})})]})}function _({stage:t,onChange:o,allStageNames:a}){const{t:r}=g(),c=p.useMemo(()=>{const s=[{value:"",label:"-- select --"}];for(const i of a)i&&i!==t.name&&s.push({value:i,label:i});return s},[a,t.name]);return e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"font-mono text-sm font-semibold text-[var(--accent)]",children:r("pipeline.stage_properties")}),e.jsx("p",{className:"font-mono text-[11px] text-[var(--text-muted)]",children:r("pipeline.editing",{name:t.name||r("pipeline.unnamed")})}),e.jsxs("div",{children:[e.jsxs(b,{children:[r("pipeline.name")," *"]}),e.jsx(j,{value:t.name,onChange:s=>o({name:s}),placeholder:r("pipeline.stage_name")})]}),e.jsxs("div",{children:[e.jsx(b,{children:"label"}),e.jsx(j,{value:t.label??"",onChange:s=>o({label:s||void 0}),placeholder:"optional display label"})]}),e.jsxs("div",{children:[e.jsx(b,{children:"prompt *"}),e.jsx(N,{value:t.prompt,onChange:s=>o({prompt:s}),placeholder:"instructions for the agent...",rows:8})]}),e.jsxs("div",{children:[e.jsx(b,{children:"gate"}),e.jsx(j,{value:t.gate??"",onChange:s=>o({gate:s||void 0}),placeholder:"Pass condition, e.g.: no P1-P3 issues"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(b,{children:r("pipeline.confirm_required")}),e.jsx(J,{checked:t.requireConfirm??!1,onChange:s=>o({requireConfirm:s})})]}),e.jsxs("div",{children:[e.jsx(b,{children:r("pipeline.timeout")}),e.jsx(j,{type:"number",value:String(t.timeout??""),onChange:s=>o({timeout:s?parseInt(s,10):void 0}),placeholder:"600"})]}),e.jsxs("div",{className:"border-t border-[var(--border)] pt-3",children:[e.jsx("p",{className:"mb-3 font-mono text-[11px] text-[var(--text-muted)]",children:r("pipeline.on_failure_section")}),e.jsxs("div",{className:"mb-3",children:[e.jsx(b,{children:r("pipeline.on_failure")}),e.jsx(C,{value:t.onFailure?"goto":"stop",onChange:s=>{o(s==="stop"?{onFailure:void 0}:{onFailure:{goto:"",maxLoops:3}})},options:[{value:"stop",label:r("pipeline.stop")},{value:"goto",label:r("pipeline.goto_stage")}]})]}),t.onFailure&&e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(b,{children:r("pipeline.goto")}),e.jsx(C,{value:t.onFailure.goto,onChange:s=>{var i;return o({onFailure:{goto:s,maxLoops:((i=t.onFailure)==null?void 0:i.maxLoops)??3}})},options:c})]}),e.jsxs("div",{children:[e.jsx(b,{children:r("pipeline.max_loops")}),e.jsx(j,{type:"number",value:String(t.onFailure.maxLoops),onChange:s=>{var i;return o({onFailure:{goto:((i=t.onFailure)==null?void 0:i.goto)??"",maxLoops:s?parseInt(s,10):3}})},placeholder:"3"})]})]})]}),e.jsxs("div",{className:"border-t border-[var(--border)] pt-3",children:[e.jsx("h4",{className:"mb-2 font-mono text-xs font-semibold text-[var(--accent)]",children:"params"}),e.jsx(N,{value:t.params?Object.entries(t.params).map(([s,i])=>`${s}=${i}`).join(`
|
|
2
2
|
`):"",onChange:s=>{if(!s.trim()){o({params:void 0});return}const i={};s.split(`
|
|
3
3
|
`).forEach(d=>{const l=d.indexOf("=");l>0&&(i[d.slice(0,l).trim()]=d.slice(l+1).trim())}),o({params:i})},placeholder:"KEY=value (one per line)",rows:3})]})]})}function B({value:t,onChange:o}){const[a,r]=p.useState(t.trim().length>0);return p.useEffect(()=>{!a&&t.trim().length>0&&r(!0)},[t,a]),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("button",{type:"button",onClick:()=>r(c=>!c),className:"flex w-full items-center justify-between px-4 py-3 text-left font-mono text-xs font-semibold text-[var(--accent)]",children:[e.jsx("span",{children:"preamble"}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a?"[-]":"[+]"})]}),a&&e.jsx("div",{className:"border-t border-[var(--border)] px-4 py-3",children:e.jsx(N,{value:t,onChange:o,placeholder:"Global pre-prompt injected before all stages",rows:4})})]})}function D({value:t,onChange:o}){const{t:a}=g(),[r,c]=p.useState(null),[s,i]=p.useState(!1),d=p.useMemo(()=>t??O,[t]),l=d.stages,h=r!=null?l[r]??null:null,f=p.useMemo(()=>l.map(n=>n.name),[l]),v=p.useCallback(n=>{o({...d,stages:n})},[o,d]),F=p.useCallback(()=>{const n=[...l,q()];v(n),c(n.length-1)},[l,v]),E=p.useCallback(n=>{const x=l.filter((m,u)=>u!==n);v(x),r===n?c(x.length>0?Math.min(n,x.length-1):null):r!=null&&r>n&&c(r-1)},[l,r,v]),w=p.useCallback((n,x)=>{const m=l.map((u,P)=>P===n?{...u,...x}:u);v(m)},[l,v]),k=p.useCallback((n,x)=>{const m=x==="up"?n-1:n+1;if(m<0||m>=l.length)return;const u=[...l];[u[n],u[m]]=[u[m],u[n]],v(u),r===n?c(m):r===m&&c(n)},[l,r,v]),L=p.useMemo(()=>JSON.stringify(d,null,2),[d]);return e.jsxs("div",{className:"flex flex-col gap-0",children:[e.jsx("div",{className:"mb-4 flex items-center gap-2",children:e.jsxs("button",{type:"button",onClick:()=>i(n=>!n),className:`rounded-[4px] border px-2 py-1 font-mono text-[11px] transition-colors ${s?"border-[var(--accent)] text-[var(--accent)]":"border-[var(--border)] text-[var(--text-muted)] hover:text-[var(--text-primary)]"}`,children:[a("pipeline.json_toggle")," ⇅"]})}),s&&e.jsx("pre",{className:"mb-4 max-h-[400px] overflow-auto rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] p-3 font-mono text-[11px] leading-relaxed text-[var(--text-primary)]",children:L}),e.jsx("div",{className:"mb-4",children:e.jsx(B,{value:d.preamble??"",onChange:n=>o({...d,preamble:n||void 0})})}),e.jsxs("div",{className:"flex gap-6",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[l.map((n,x)=>{var m;return e.jsxs("div",{children:[e.jsx(T,{stage:n,index:x,selected:r===x,onSelect:()=>c(x),onDelete:()=>E(x)}),x<l.length-1&&e.jsxs("div",{className:"flex items-center justify-center gap-2 py-2",children:[e.jsx("div",{className:"h-6 w-px bg-[var(--border)]"}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:"▼"}),e.jsx("div",{className:"h-6 w-px bg-[var(--border)]"})]}),((m=n.onFailure)==null?void 0:m.goto)&&e.jsx("div",{className:"flex items-center justify-center gap-1.5 py-1",children:e.jsxs("span",{className:"text-[11px] text-[var(--warning)]",children:["↺ loop → ",n.onFailure.goto," (max ",n.onFailure.maxLoops,")"]})})]},`${x}-${n.name}`)}),r!=null&&l.length>1&&e.jsxs("div",{className:"flex items-center gap-1 pl-7 pt-2",children:[e.jsxs("button",{type:"button",disabled:r===0,onClick:()=>k(r,"up"),className:"rounded-[4px] border border-[var(--border)] px-2 py-0.5 font-mono text-[11px] text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)] disabled:opacity-30",children:["▲ ",a("pipeline.up")]}),e.jsxs("button",{type:"button",disabled:r===l.length-1,onClick:()=>k(r,"down"),className:"rounded-[4px] border border-[var(--border)] px-2 py-0.5 font-mono text-[11px] text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)] disabled:opacity-30",children:["▼ ",a("pipeline.down")]})]}),e.jsx("div",{className:"flex items-center justify-center py-3",children:e.jsxs("button",{type:"button",onClick:F,className:"flex items-center gap-1.5 rounded-[4px] border border-dashed border-[var(--border)] px-4 py-2 font-mono text-xs text-[var(--accent)] transition-colors hover:border-[var(--accent)] hover:bg-[var(--bg-secondary)]",children:[e.jsx("span",{className:"text-sm leading-none",children:"+"})," ",a("pipeline.add_stage")]})}),h&&e.jsxs("div",{className:"mt-4 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 lg:hidden",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsx("span",{className:"font-mono text-xs font-semibold text-[var(--accent)]",children:a("pipeline.stage_properties")}),e.jsx("button",{type:"button",onClick:()=>c(null),className:"rounded-[4px] border border-[var(--border)] px-2 py-1 font-mono text-[11px] text-[var(--text-muted)]",children:"x"})]}),e.jsx(_,{stage:h,onChange:n=>w(r,n),allStageNames:f})]})]}),e.jsx("div",{className:"hidden w-[360px] shrink-0 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5 lg:block",style:{alignSelf:"flex-start",position:"sticky",top:0},children:h?e.jsx(_,{stage:h,onChange:n=>w(r,n),allStageNames:f}):e.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:e.jsx("p",{className:"font-mono text-xs text-[var(--text-muted)]",children:a("pipeline.select_stage")})})})]})]})}function W(){const{key:t}=I(),o=M(),{t:a}=g(),[r,c]=p.useState(null),[s,i]=p.useState(!0),[d,l]=p.useState(!1);p.useEffect(()=>{t&&S.get(`web/projects/${t}`).json().then(f=>{if(f.pipeline)try{c(JSON.parse(f.pipeline))}catch{c(null)}}).catch(()=>y.error(a("pipeline.failed_to_load_project"))).finally(()=>i(!1))},[t,a]);const h=p.useCallback(async()=>{if(t){l(!0);try{await S.put(`web/projects/${t}`,{json:{pipeline:r?JSON.stringify(r):null}}),y.success(a("pipeline.saved"))}catch{y.error(a("pipeline.failed_to_save"))}finally{l(!1)}}},[t,r,a]);return s?e.jsx("div",{className:"flex h-full items-center justify-center font-mono",children:e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:a("pipeline.loading_pipeline")})}):e.jsxs("div",{className:"flex h-full flex-col font-mono lowercase",children:[e.jsxs("div",{className:"flex flex-col gap-3 border-b border-[var(--border)] px-4 md:px-8 py-5 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("span",{className:"text-base font-medium text-[var(--text-primary)] shrink-0",children:a("pipeline.title")}),e.jsx("span",{className:"text-sm text-[var(--text-muted)] truncate",children:a("pipeline.subtitle",{key:t??""})})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsx("button",{type:"button",onClick:h,disabled:d,className:"rounded-[4px] bg-[var(--accent)] px-4 py-1.5 text-xs font-bold text-black disabled:opacity-50",children:a(d?"common.saving":"pipeline.save")}),e.jsx("button",{type:"button",onClick:()=>o(`/projects/${t}`),className:"rounded-[4px] border border-[var(--border)] px-4 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:a("pipeline.cancel")})]})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto p-4 md:p-8",children:e.jsx(D,{value:r,onChange:c})})]})}export{W as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as ee,a as te,k as se,r as s,h as b,o as a,t as N,x as re,j as t,K as ae,l as ne,I as oe}from"./index-
|
|
1
|
+
import{f as ee,a as te,k as se,r as s,h as b,o as a,t as N,x as re,j as t,K as ae,l as ne,I as oe}from"./index-DpFOWbFQ.js";import{E as ce}from"./EmptyState-DQ0fOTKY.js";import{T as ie}from"./Skeleton-CwwH6ktS.js";import{C as le}from"./ConfirmStageDialog-Dl1_NcCr.js";import{f as de}from"./date-CmcdoD87.js";import{S as pe}from"./Select-Dgtvdi2n.js";import{P as ue}from"./plus-7GEqLtYy.js";import{E as me}from"./external-link-C2lUBinm.js";import{C as xe}from"./chevron-left-BoAE9yoT.js";import{C as fe}from"./chevron-right-DdNeU6u1.js";import"./clock-BF7qBFGO.js";import"./chevron-down-B-IybQE8.js";const be=[a.QUEUED,a.ASSIGNED,a.RUNNING,a.SUSPENDED],ge=20;function he(c,n){if(!c)return null;const y=c.repoUrl.replace(/\.git$/,"").replace(/\/+$/,""),i=n.split("/").map(encodeURIComponent).join("/");return c.gitPlatform===oe.GITLAB?`${y}/-/tree/${i}/docs/specs`:`${y}/tree/${i}/docs/specs`}function ve(c){switch(c){case a.RUNNING:return"bg-[var(--accent)]";case a.QUEUED:return"bg-[var(--warning)]";case a.ASSIGNED:return"bg-[var(--info)]";case a.SUSPENDED:return"bg-[var(--warning)]";case a.COMPLETED:return"bg-[var(--accent)]";case a.FAILED:return"bg-[var(--destructive)]";case a.CANCELLED:return"bg-[#525252]";default:return"bg-[#525252]"}}function Le(){const c=ee(),{t:n}=te(),y=se(e=>e.taskSeq),[i,Q]=s.useState("in_progress"),[E,I]=s.useState([]),[L,U]=s.useState(!0),[g,_]=s.useState(void 0),[p,w]=s.useState(void 0),[u,k]=s.useState([]),[j,$]=s.useState({}),[H,A]=s.useState(new Set),[M,D]=s.useState(null),[h,P]=s.useState(null),[l,J]=s.useState([]),[m,O]=s.useState(""),[v,R]=s.useState(""),[T,G]=s.useState(!1),V=s.useMemo(()=>{const e={};for(const r of l)e[r.key]=r;return e},[l]);s.useEffect(()=>{let e=!1;return b.get("web/projects").json().then(r=>{e||J(r)}).catch(()=>{}),()=>{e=!0}},[]),s.useEffect(()=>{l.length>0&&!m&&O(l[0].key)},[l]);const C=s.useCallback(async e=>{U(!0);try{const r=new URLSearchParams({taskMode:"plan",limit:String(ge)});i==="in_progress"?r.set("status",be.join(",")):r.set("status",a.COMPLETED+","+a.FAILED+","+a.CANCELLED),e&&r.set("cursor",e);const S=await b.get(`web/tasks?${r}`).json(),x=S.data??[];I(x),_(S.nextCursor);const d=x.filter(o=>o.status===a.SUSPENDED).map(o=>o.id);if(d.length>0){const o=new Set;await Promise.all(d.map(async f=>{try{(await b.get(`web/tasks/${f}/pending-confirm`).json()).confirm&&o.add(f)}catch{}})),A(o)}else A(new Set);const q=x.filter(o=>o.status===a.COMPLETED).map(o=>o.id);if(q.length>0){const o={};await Promise.all(q.map(async f=>{try{const F=await b.get(`web/tasks?${new URLSearchParams({sourceTaskId:String(f),limit:"100"})}`).json();o[f]=(F.data??[]).length}catch{o[f]=0}})),$(o)}else $({})}catch{I([]),_(void 0)}finally{U(!1)}},[i]);s.useEffect(()=>{C(p)},[C,p,y]),s.useEffect(()=>{w(void 0),k([])},[i]);const Z=s.useCallback(()=>{g&&(k(e=>[...e,p??""]),w(g))},[g,p]),z=s.useCallback(()=>{u.length!==0&&(w(u.at(-1)||void 0),k(e=>e.slice(0,-1)))},[u]),W=u.length+1,K=s.useCallback(async()=>{if(!m||!v.trim()){N.error("project and description are required.");return}G(!0);try{const e=await b.post("web/tasks",{json:{projectKey:m,description:v.trim(),taskMode:"plan"}}).json();R(""),c(`/tasks/${e.task.id}`)}catch(e){const r=e instanceof Error?e.message:String(e);N.error(r)}finally{G(!1)}},[m,v,c]),X=s.useCallback(async e=>{try{const r=await b.get(`web/tasks/${e}/pending-confirm`).json();r.confirm?(D(e),P(r.confirm)):N.error(n("tasks.confirm_failed"))}catch{N.error(n("tasks.confirm_failed"))}},[n]),Y=s.useCallback(()=>{D(null),P(null),C(p)},[C,p]),B=s.useMemo(()=>l.map(e=>({value:e.key,label:e.name})),[l]);return re(null),t.jsxs("div",{className:"mx-auto max-w-6xl px-2 py-4 md:px-4 md:py-6 font-mono",children:[t.jsx("h1",{className:"sr-only",children:n("plan.title")}),t.jsxs("div",{className:"mb-6 flex flex-col gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:flex-row md:items-center md:gap-3",children:[t.jsx(pe,{value:m,onChange:O,options:B.length>0?B:[{value:"",label:"loading..."}],className:"md:w-44 shrink-0"}),t.jsx("input",{type:"text",placeholder:n("plan.description_placeholder"),value:v,onChange:e=>R(e.target.value),onKeyDown:e=>{e.key==="Enter"&&!T&&K()},className:"flex-1 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)] outline-none focus:border-[var(--accent)]"}),t.jsxs("button",{onClick:K,disabled:T||!m||!v.trim(),className:"flex shrink-0 items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-mono text-black transition-opacity hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed",children:[t.jsx(ue,{className:"h-3.5 w-3.5"}),n(T?"common.creating":"plan.create")]})]}),t.jsx("div",{className:"mb-4 flex items-center gap-1 overflow-x-auto pb-1 no-scrollbar",children:["in_progress","completed"].map(e=>t.jsx("button",{onClick:()=>Q(e),className:`shrink-0 rounded-[4px] px-3 py-2 h-8 text-xs transition-colors ${i===e?"text-[var(--accent)] bg-[var(--bg-input)]":"text-[var(--text-muted)] bg-[var(--bg-card)] hover:text-[var(--text-secondary)]"}`,children:n(e==="in_progress"?"review.in_progress":"tasks.tab_completed")},e))}),t.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[L&&E.length===0&&t.jsx("div",{className:"p-4",children:t.jsx(ie,{rows:4})}),!L&&E.length===0&&t.jsx(ce,{icon:ae,title:n("plan.no_plans"),description:n("plan.description_placeholder")}),E.map(e=>t.jsxs("div",{onClick:()=>c(`/tasks/${e.id}`),className:"flex cursor-pointer items-center gap-3 border-b border-[var(--border)] px-4 py-3 last:border-b-0 hover:bg-[var(--bg-input)] transition-colors",children:[t.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full ${ve(e.status)}`}),t.jsxs("span",{className:"flex-1 truncate text-xs text-[var(--text-primary)] preserve-case",children:["#",e.id," ",ne(e)]}),e.status===a.SUSPENDED&&H.has(e.id)&&t.jsx("button",{onClick:r=>{r.stopPropagation(),X(e.id)},className:"shrink-0 rounded-[4px] px-2 py-0.5 text-[10px] font-bold text-black bg-[var(--warning)] hover:opacity-90 transition-opacity",children:n("tasks.pending_confirmation")}),e.status===a.COMPLETED&&j[e.id]!=null&&j[e.id]>0&&t.jsxs("span",{className:"shrink-0 rounded-[4px] px-2 py-0.5 text-[10px] font-bold",style:{color:"#3b82f6",backgroundColor:"rgba(59,130,246,0.12)"},title:`${j[e.id]} downstream task(s)`,children:[j[e.id]," tasks"]}),e.status===a.COMPLETED&&(()=>{const r=V[e.projectKey];if(!r)return null;let S="main";if(e.configSnapshot)try{const d=JSON.parse(e.configSnapshot);d.defaultBranch&&(S=d.defaultBranch)}catch{}const x=he(r,S);return x?t.jsxs("a",{href:x,target:"_blank",rel:"noopener noreferrer",onClick:d=>d.stopPropagation(),className:"shrink-0 flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2 py-0.5 text-[10px] text-[var(--text-muted)] hover:text-[var(--info)] hover:border-[var(--info)] transition-colors",title:n("plan.view_spec"),children:[t.jsx(me,{className:"h-2.5 w-2.5"}),n("plan.view_spec")]}):null})(),t.jsx("span",{className:"shrink-0 rounded-[4px] border border-[var(--border)] px-2 py-0.5 text-[11px] text-[var(--text-muted)]",children:e.projectKey}),t.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:e.status.toLowerCase()}),t.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:de(e.createdAt)})]},e.id))]}),(u.length>0||g)&&t.jsxs("div",{className:"mt-6 flex items-center justify-between",children:[t.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["// page ",W]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:z,disabled:u.length===0,className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:[t.jsx(xe,{className:"h-3.5 w-3.5"}),n("tasks.prev")]}),t.jsxs("button",{onClick:Z,disabled:!g,className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:[n("common.next"),t.jsx(fe,{className:"h-3.5 w-3.5"})]})]})]}),M!=null&&h&&t.jsx(le,{isOpen:!0,onClose:()=>{D(null),P(null)},taskId:M,stageName:h.stageName,timeoutSeconds:h.timeout,confirmType:h.confirmType,prompt:h.prompt,onSubmitted:Y})]})}export{Le as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as A,u as F,f as T,r as s,j as e,L as z,a6 as I,a7 as $,s as K,h as p,t as c}from"./index-
|
|
1
|
+
import{a as A,u as F,f as T,r as s,j as e,L as z,a6 as I,a7 as $,s as K,h as p,t as c}from"./index-DpFOWbFQ.js";import{v as M}from"./password-CHk45-jw.js";import{I as o}from"./InfoRow-ssnjkeJd.js";import{u as V}from"./useFetch-Sdr634q_.js";function Q(){var y,k,C,P;const{t:r}=A(),{logout:L}=F(),E=T(),[S,m]=s.useState(!1),{data:t,loading:U,refetch:D}=V(()=>p.get("web/profile").json(),[]),[x,u]=s.useState(""),[d,b]=s.useState(""),[f,v]=s.useState(""),[g,h]=s.useState(!1),[j,n]=s.useState(""),[i,_]=s.useState(""),[w,N]=s.useState(!1);async function O(){if(n(""),!x){n(r("profile.current_password_required"));return}if(!d){n(r("profile.new_password_required"));return}const a=M(d);if(a){n(r(a));return}if(d!==f){n(r("profile.passwords_do_not_match"));return}try{h(!0),await p.put("web/profile/password",{json:{currentPassword:x,newPassword:d}}),c.success(r("profile.password_changed")),u(""),b(""),v("")}catch(l){const q=l instanceof Error?l.message:r("profile.failed_to_change_password");n(q)}finally{h(!1)}}async function R(){if(!i||i.length!==6){c.error(r("profile.totp_code_required"));return}try{N(!0),await p.post("web/profile/totp/regenerate",{json:{code:i}}),c.success(r("profile.two_fa_regenerated")),_(""),D()}catch(a){const l=a instanceof Error?a.message:r("profile.totp_code_invalid");c.error(l)}finally{N(!1)}}return U?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})}):e.jsxs("div",{className:"mx-auto max-w-xl space-y-8 px-4 md:px-6 py-8 font-mono lowercase",children:[e.jsxs("h1",{className:"text-lg text-[var(--text-primary)]",children:[r("profile.title")," ",e.jsx("span",{className:"text-[var(--text-muted)]",children:r("profile.personal_settings")})]}),e.jsxs("section",{className:"rounded-[4px] bg-[var(--bg-card)] border border-[var(--border)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("profile.profile_info")}),t?e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{variant:"fixed-label",label:r("profile.username"),value:t.name}),e.jsx(o,{variant:"fixed-label",label:r("common.role"),value:t.role}),e.jsx(o,{variant:"fixed-label",label:r("profile.git_name"),value:t.gitName||r("common.not_set")}),e.jsx(o,{variant:"fixed-label",label:r("profile.git_email"),value:t.gitEmail||r("common.not_set")}),e.jsx(o,{variant:"fixed-label",label:r("profile.status"),value:t.status}),e.jsx(o,{variant:"fixed-label",label:r("profile.created_at"),value:new Date(t.createdAt).toLocaleDateString()})]}):e.jsx("p",{className:"text-sm text-[var(--text-secondary)]",children:r("profile.unable_to_load_profile")})]}),e.jsxs("section",{className:"rounded-[4px] bg-[var(--bg-card)] border border-[var(--border)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("profile.platform_accounts")}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{variant:"fixed-label",label:"lark",value:(y=t==null?void 0:t.platformUids)!=null&&y.lark?`${t.platformUids.lark.slice(0,12)}... ✓`:r("profile.not_linked")}),e.jsx(o,{variant:"fixed-label",label:"slack",value:(k=t==null?void 0:t.platformUids)!=null&&k.slack?`${t.platformUids.slack.slice(0,12)}... ✓`:r("profile.not_linked")})]}),(!((C=t==null?void 0:t.platformUids)!=null&&C.lark)||!((P=t==null?void 0:t.platformUids)!=null&&P.slack))&&e.jsx("p",{className:"mt-3 text-xs text-[var(--text-muted)]",children:r("profile.bind_hint")})]}),e.jsxs("section",{className:"rounded-[4px] bg-[var(--bg-card)] border border-[var(--border)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("profile.change_password")}),e.jsxs("div",{className:"space-y-4",children:[j&&e.jsx("div",{className:"rounded-[4px] border border-[var(--destructive)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--destructive)]",children:j}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-secondary)]",children:r("profile.current_password")}),e.jsx("input",{type:"password",value:x,onChange:a=>u(a.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-secondary)]",children:r("profile.new_password")}),e.jsx("input",{type:"password",value:d,onChange:a=>b(a.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:r("profile.password_hint_10_20")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-secondary)]",children:r("profile.confirm_password")}),e.jsx("input",{type:"password",value:f,onChange:a=>v(a.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{onClick:O,disabled:g,className:"rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-medium text-black disabled:opacity-50",children:r(g?"common.updating":"profile.update_password")})})]})]}),e.jsxs("section",{className:"rounded-[4px] bg-[var(--bg-card)] border border-[var(--border)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("profile.two_factor_auth")}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex items-center gap-2 text-sm",children:t!=null&&t.totpEnabled?e.jsxs("span",{className:"text-[var(--accent)]",children:["● ",r("profile.two_fa_enabled")]}):e.jsxs("span",{className:"text-[var(--text-muted)]",children:["● ",r("profile.two_fa_not_setup")]})}),(t==null?void 0:t.totpEnabled)&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("profile.regenerate_2fa_warning")}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-secondary)]",children:r("profile.current_totp_code")}),e.jsx("input",{type:"text",inputMode:"numeric",maxLength:6,placeholder:r("profile.totp_code_placeholder"),value:i,onChange:a=>{const l=a.target.value.replace(/\D/g,"").slice(0,6);_(l)},className:"w-full max-w-xs rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--text-primary)] outline-none focus:border-[var(--accent)] font-mono tracking-widest"})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{onClick:R,disabled:w||i.length!==6,className:"rounded-[4px] border border-[var(--warning)] bg-transparent px-4 py-2 text-xs font-medium text-[var(--warning)] hover:bg-[var(--warning)] hover:text-black disabled:opacity-50 transition-colors",children:r(w?"profile.regenerating":"profile.regenerate_2fa")})})]})]})]}),e.jsxs(z,{to:"/access-tokens",className:"flex items-center gap-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 transition-colors hover:border-[var(--accent)]",children:[e.jsx(I,{size:16,className:"text-[var(--accent)]"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-[var(--text-primary)]",children:r("profile.access_tokens")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("profile.access_tokens_desc")})]})]}),e.jsxs("button",{onClick:()=>m(!0),className:"flex w-full items-center gap-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 transition-colors hover:border-[var(--destructive)] text-left",children:[e.jsx($,{size:16,className:"text-[var(--destructive)]"}),e.jsx("span",{className:"text-sm text-[var(--destructive)]",children:r("common.log_out")})]}),e.jsxs("div",{className:"pt-2 pb-4 text-center text-xs text-[var(--text-muted)]",children:["overlord v","1.0.163"]}),e.jsx(K,{isOpen:S,onClose:()=>m(!1),onConfirm:()=>{L(),E("/login")},title:r("common.logout_title"),message:r("common.logout_message"),confirmLabel:r("common.logout"),confirmVariant:"warning"})]})}export{Q as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as R,a as $,j as e,s as q,B,f as K,u as H,i as J,r as x,Z as k,x as V,l as D,_ as Z,h}from"./index-
|
|
1
|
+
import{c as R,a as $,j as e,s as q,B,f as K,u as H,i as J,r as x,Z as k,x as V,l as D,_ as Z,h}from"./index-DpFOWbFQ.js";import{U as P,A as z,R as G}from"./RemoveMemberConfirmDialog-BeVfJj3-.js";import{T as Q}from"./Tooltip-BsZZ0Gbx.js";import{c as _}from"./date-CmcdoD87.js";import{t as T}from"./status-colors-_SUaojQM.js";import{I as o}from"./InfoRow-ssnjkeJd.js";import{u as X}from"./useFetch-Sdr634q_.js";import{P as Y}from"./pencil-DMKsPe_A.js";import{T as ee}from"./trash-2-CfHTaDgU.js";import{A as te}from"./arrow-left-BcA9UMTL.js";import{P as re}from"./plus-7GEqLtYy.js";import"./Select-Dgtvdi2n.js";import"./chevron-down-B-IybQE8.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as R,a as P,v as G,r as o,I as x,Q as z,j as e,h as E,f as H,x as M}from"./index-
|
|
1
|
+
import{c as R,a as P,v as G,r as o,I as x,Q as z,j as e,h as E,f as H,x as M}from"./index-DpFOWbFQ.js";import{S as U}from"./Select-Dgtvdi2n.js";import{a as D}from"./agent-type-options-Drj4kVJw.js";import{E as J}from"./EmptyState-DQ0fOTKY.js";import{T as O}from"./Skeleton-CwwH6ktS.js";import{t as q}from"./date-CmcdoD87.js";import{u as W}from"./useFetch-Sdr634q_.js";import{P as $}from"./plus-7GEqLtYy.js";import{A as K}from"./arrow-left-BcA9UMTL.js";import"./chevron-down-B-IybQE8.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|