@overlordai/server 1.0.171 → 1.0.173

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.
Files changed (106) hide show
  1. package/package.json +4 -4
  2. package/public/assets/{AccessTokensPage-Bj3ysKAB.js → AccessTokensPage-DWRXad3x.js} +1 -1
  3. package/public/assets/{AdminPage-C539TbxG.js → AdminPage-BoIqMBJM.js} +1 -1
  4. package/public/assets/{AgentCliPage-BtkvkTMV.js → AgentCliPage-DDk8OWtX.js} +1 -1
  5. package/public/assets/{ApiReferencePage-6nqLrJAK.js → ApiReferencePage-Bv1wLy5b.js} +1 -1
  6. package/public/assets/{ArchitecturePage-bwnZkzu3.js → ArchitecturePage-CxP9hkhF.js} +1 -1
  7. package/public/assets/{AuditLogPage-CdVeWDly.js → AuditLogPage-B7QQ9hah.js} +1 -1
  8. package/public/assets/{AutomationCreatePage-Dbt7Xq9Q.js → AutomationCreatePage-ChPD2oTI.js} +1 -1
  9. package/public/assets/{AutomationDetailPage-DpA4rBIW.js → AutomationDetailPage-BY6bseqa.js} +1 -1
  10. package/public/assets/{AutomationEditPage-CXp0Mh0V.js → AutomationEditPage-BqeA3DXk.js} +1 -1
  11. package/public/assets/{AutomationListPage-hEqWh1ig.js → AutomationListPage-DkT1Yv4n.js} +1 -1
  12. package/public/assets/{AutomationRunDetailPage-DxAzCC9q.js → AutomationRunDetailPage-CWPGlBJd.js} +1 -1
  13. package/public/assets/{BindPlatformPage-np67mZPL.js → BindPlatformPage-DrCQMFXN.js} +1 -1
  14. package/public/assets/{BotIntegrationPage-CMCVcqvP.js → BotIntegrationPage-CFSmmRh1.js} +1 -1
  15. package/public/assets/{BotManage-DCY4ci_8.js → BotManage-C7o5dyKk.js} +1 -1
  16. package/public/assets/{BotSetupPage-CV6E3sLe.js → BotSetupPage-BgjGC1Ce.js} +1 -1
  17. package/public/assets/{ChangelogPage-C0DV_86Z.js → ChangelogPage-Bk6LcJiR.js} +1 -1
  18. package/public/assets/{Checkbox-DXBiglE2.js → Checkbox-BOX6FtEq.js} +1 -1
  19. package/public/assets/{CliReferencePage-CVrwNGMy.js → CliReferencePage-CtWMf_UQ.js} +1 -1
  20. package/public/assets/{ConfirmStageDialog-fdJXh3vD.js → ConfirmStageDialog-BtyVYk27.js} +1 -1
  21. package/public/assets/{DeploymentPage-0SnOwvZx.js → DeploymentPage-CsQj6iic.js} +1 -1
  22. package/public/assets/{DevWorkflowPage-ByX-y10Q.js → DevWorkflowPage-uy7WzcsE.js} +1 -1
  23. package/public/assets/{DeveloperManage-CApEiaHh.js → DeveloperManage-BI6Ajrgf.js} +1 -1
  24. package/public/assets/{DeveloperSetupPage-fbURtH8M.js → DeveloperSetupPage-D-iex6Or.js} +1 -1
  25. package/public/assets/{DocsIndexPage-DbqbocXN.js → DocsIndexPage-D-KxxA8_.js} +1 -1
  26. package/public/assets/{DocsLayout-gvYdBELt.js → DocsLayout-BCzKSMhE.js} +1 -1
  27. package/public/assets/{DocsPrimitives-0rbwNPdJ.js → DocsPrimitives-BzVDx2cs.js} +1 -1
  28. package/public/assets/{EditProjectPage-Dq8SvJ0e.js → EditProjectPage-BY-qZ5wL.js} +1 -1
  29. package/public/assets/{EmptyState-BqdymWlY.js → EmptyState-CqF5g3iI.js} +1 -1
  30. package/public/assets/{EnvVariablesPage-D6txC9fC.js → EnvVariablesPage-BYhrZ5C5.js} +1 -1
  31. package/public/assets/{HomePage-DEHVqmeo.js → HomePage-Bhanys0H.js} +1 -1
  32. package/public/assets/{InfoRow-LmWp744V.js → InfoRow-BxA58xIa.js} +1 -1
  33. package/public/assets/{InstallationPage-CxgPPzCx.js → InstallationPage-Cg1I_2Mi.js} +1 -1
  34. package/public/assets/{LandingPage-x9p9JIuL.js → LandingPage-JQqDMBvp.js} +1 -1
  35. package/public/assets/{LocalDevelopmentPage-Di4tHT8X.js → LocalDevelopmentPage-t1wS_JiB.js} +1 -1
  36. package/public/assets/{LoginPage-Stgm5fsG.js → LoginPage-CgGCdeF7.js} +1 -1
  37. package/public/assets/{MetricBar-CkZIfUq6.js → MetricBar-DfTk8Sjr.js} +1 -1
  38. package/public/assets/{MultiSelect-vUaG8I2g.js → MultiSelect-s1A3k8lX.js} +1 -1
  39. package/public/assets/{NotFoundPage-DotfKf-z.js → NotFoundPage-BcK6DhJP.js} +1 -1
  40. package/public/assets/{OnboardingGuide-GBu1WXvY.js → OnboardingGuide-CnEZNjMO.js} +1 -1
  41. package/public/assets/{PermissionsPage-CiYmP2Wj.js → PermissionsPage-DMhgJT_d.js} +1 -1
  42. package/public/assets/{PipelineConfigPage-BYjx1ouM.js → PipelineConfigPage-DLXm99KL.js} +1 -1
  43. package/public/assets/{PipelineEditorPage-Bgks5WU6.js → PipelineEditorPage-BVaO5u3d.js} +1 -1
  44. package/public/assets/{PlanPage-nl2u-0Pi.js → PlanPage-B3oI7rdU.js} +1 -1
  45. package/public/assets/{ProfilePage-Et9jbBjZ.js → ProfilePage-Bo77BD7U.js} +1 -1
  46. package/public/assets/{ProjectDetailPage-DI-y6wh8.js → ProjectDetailPage-BXap15n_.js} +1 -1
  47. package/public/assets/{ProjectListPage-CF5RsxEk.js → ProjectListPage-Bf5gQWll.js} +1 -1
  48. package/public/assets/{PtyTerminal-CGp0AVWL.js → PtyTerminal-Do7JUGQS.js} +1 -1
  49. package/public/assets/{QuickAuth-Dxrby18G.js → QuickAuth-EIbjxqlx.js} +1 -1
  50. package/public/assets/{RemoveMemberConfirmDialog-B_Wts2d_.js → RemoveMemberConfirmDialog-CGzHpvJv.js} +1 -1
  51. package/public/assets/{ReviewAggregatePage-BvfzhCsK.js → ReviewAggregatePage-Bvk901fs.js} +1 -1
  52. package/public/assets/{ReviewPage-pk0Wv8KH.js → ReviewPage-CBEbIkD3.js} +1 -1
  53. package/public/assets/{Select-D6NqBbsj.js → Select-BRJxl1YO.js} +1 -1
  54. package/public/assets/{SettingsPage-DLVlWCKf.js → SettingsPage-CUznfUgJ.js} +1 -1
  55. package/public/assets/{Skeleton-CGmOAlS2.js → Skeleton-CkmmCp2B.js} +1 -1
  56. package/public/assets/{SkillPage-C6CX9Bg_.js → SkillPage-DmMxzWHC.js} +1 -1
  57. package/public/assets/{TaskDetailPage-CENLCJst.js → TaskDetailPage-DF6j4ohL.js} +1 -1
  58. package/public/assets/{TaskGuidePage-3X9ztEXr.js → TaskGuidePage-1NpVzVqi.js} +1 -1
  59. package/public/assets/{TaskListPage-DxILG6Dr.js → TaskListPage-1_Fn21zu.js} +1 -1
  60. package/public/assets/{TaskStatusBadge-BzUl_Vhj.js → TaskStatusBadge-BldGSOah.js} +1 -1
  61. package/public/assets/{TerminalHomePage-B6ONgq8m.js → TerminalHomePage-BIk8jU04.js} +1 -1
  62. package/public/assets/{TokenManage-C9HNs2Y0.js → TokenManage-CMtAf7QR.js} +1 -1
  63. package/public/assets/{Tooltip-CcKi7kt4.js → Tooltip-EOsBLsZE.js} +1 -1
  64. package/public/assets/{TotpSetupPage-BokFT_bT.js → TotpSetupPage-C7oZEO7M.js} +1 -1
  65. package/public/assets/{WorkerDetailPage-DKe--j8i.js → WorkerDetailPage-DNUSVoN8.js} +1 -1
  66. package/public/assets/{WorkerListPage-CdHKiupA.js → WorkerListPage-Bkb8IGzC.js} +1 -1
  67. package/public/assets/{WorkerOperationsPage-z39aqpPg.js → WorkerOperationsPage-yH5f32ue.js} +1 -1
  68. package/public/assets/{WorkerSetupGuidePage-DdrUpofd.js → WorkerSetupGuidePage-DADwzbsf.js} +1 -1
  69. package/public/assets/{WorkerSetupPage-BmMDO6G3.js → WorkerSetupPage-DAGFtNCP.js} +1 -1
  70. package/public/assets/{agent-type-options-DIKwG8ov.js → agent-type-options-DXKoGpJI.js} +1 -1
  71. package/public/assets/{arrow-left-Dt8Fc2tT.js → arrow-left-DolNA3BD.js} +1 -1
  72. package/public/assets/{arrow-right-CtNX35j0.js → arrow-right-J0lJRpaW.js} +1 -1
  73. package/public/assets/{bot-F2LxwOEN.js → bot-Bf1PX7dx.js} +1 -1
  74. package/public/assets/{chevron-down-D7Ostzf1.js → chevron-down-Cm4So_5j.js} +1 -1
  75. package/public/assets/{chevron-left-CgtOoE0B.js → chevron-left-Cx2ByqjE.js} +1 -1
  76. package/public/assets/{chevron-right-D8nW44q3.js → chevron-right-D0k7WYYt.js} +1 -1
  77. package/public/assets/{chevron-up-DdMU1Eht.js → chevron-up-DVl3qTn3.js} +1 -1
  78. package/public/assets/{circle-alert-CLeTDF2i.js → circle-alert-BojCwibr.js} +1 -1
  79. package/public/assets/{clock-DCDEPUaH.js → clock-DQeHdtoa.js} +1 -1
  80. package/public/assets/{copy-C051Wr-d.js → copy-CHO7AsGy.js} +1 -1
  81. package/public/assets/{download-BXnPaTq3.js → download-D5cnbFDk.js} +1 -1
  82. package/public/assets/{external-link-B8hPJyFL.js → external-link-lvF-co6-.js} +1 -1
  83. package/public/assets/{git-fork-BD90ntZS.js → git-fork-DRlvwKYI.js} +1 -1
  84. package/public/assets/{index-B19uS9bj.js → index-D9synPeJ.js} +2 -2
  85. package/public/assets/{key-BZuQs2Pl.js → key-KezsYJ0O.js} +1 -1
  86. package/public/assets/{loader-circle-Bv_P4kd-.js → loader-circle--EO2iEyc.js} +1 -1
  87. package/public/assets/{pencil-DTse6lO8.js → pencil-DIvX1Xsb.js} +1 -1
  88. package/public/assets/{play-BtmqxS1O.js → play-BHrAGNju.js} +1 -1
  89. package/public/assets/{plus-gbieRhvw.js → plus-9sncIl_N.js} +1 -1
  90. package/public/assets/{rotate-ccw-C04sr08w.js → rotate-ccw-Dw8AxO4w.js} +1 -1
  91. package/public/assets/{scroll-text-BF_TwGla.js → scroll-text-CRQexw-n.js} +1 -1
  92. package/public/assets/{settings-C2xdeKAV.js → settings-CgXh3xHG.js} +1 -1
  93. package/public/assets/{skip-forward-NKQNYaFc.js → skip-forward-Q2vmwL9H.js} +1 -1
  94. package/public/assets/{status-colors-CbSft6mt.js → status-colors-CRgg1N4i.js} +1 -1
  95. package/public/assets/{task-agent-ByA3yTq4.js → task-agent-KZdZD5cO.js} +1 -1
  96. package/public/assets/{task-constants-Nz6YB543.js → task-constants-BiYtEhWG.js} +1 -1
  97. package/public/assets/{task.store-B7qvXDps.js → task.store-Ds-1t2to.js} +1 -1
  98. package/public/assets/{timer-DTjJ9vty.js → timer-ihiO0n04.js} +1 -1
  99. package/public/assets/{trash-2-RJiyWQaa.js → trash-2-Cb5-yglV.js} +1 -1
  100. package/public/assets/{useFetch-Bvarcx0Z.js → useFetch-Dj0ZN58I.js} +1 -1
  101. package/public/assets/{users-B0vZQYO0.js → users-MLpO39SG.js} +1 -1
  102. package/public/assets/{wifi-_nfqPpUk.js → wifi-SWAOT6IR.js} +1 -1
  103. package/public/assets/{workflow-DUZlRmfH.js → workflow-M2c7dT84.js} +1 -1
  104. package/public/assets/{zap-D628PASJ.js → zap-gd-vvEW3.js} +1 -1
  105. package/public/index.html +1 -1
  106. package/public/sw.js +1 -1
@@ -1,4 +1,4 @@
1
- import{j as e,L as t}from"./index-B19uS9bj.js";import{I as s,a}from"./DocsPrimitives-0rbwNPdJ.js";import"./copy-C051Wr-d.js";function o(){return e.jsx("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// overview"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["the ",e.jsx("code",{className:"text-[var(--accent)]",children:"ov"})," cli is the developer-facing command-line tool for interacting with overlord. install it on your laptop or workstation to create tasks, attach to running sessions, and monitor progress from your terminal."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// installation"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"install the developer cli globally:"}),e.jsx(s,{code:"npm install -g @overlordai/developer-cli"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// connect to your server"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"authenticate with your overlord server using a personal access token:"}),e.jsx(s,{code:"ov login https://overlord.yourdomain.com"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["you'll be prompted for a personal access token (pat). generate one in the web dashboard under ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"profile → access tokens"}),"."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"alternatively, use the one-step setup wizard:"}),e.jsx(s,{code:"ov setup"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"this prompts for both the server url and token interactively."})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// verify"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"confirm your connection is working:"}),e.jsx(s,{code:"ov whoami"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"should display your username and role."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// quick start"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> create a task"}),e.jsx(s,{code:'ov task create -d "fix the login bug" -p my-project'})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> watch a running task"}),e.jsx(a,{code:`ov attach <task_id>
1
+ import{j as e,L as t}from"./index-D9synPeJ.js";import{I as s,a}from"./DocsPrimitives-BzVDx2cs.js";import"./copy-CHO7AsGy.js";function o(){return e.jsx("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// overview"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["the ",e.jsx("code",{className:"text-[var(--accent)]",children:"ov"})," cli is the developer-facing command-line tool for interacting with overlord. install it on your laptop or workstation to create tasks, attach to running sessions, and monitor progress from your terminal."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// installation"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"install the developer cli globally:"}),e.jsx(s,{code:"npm install -g @overlordai/developer-cli"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// connect to your server"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"authenticate with your overlord server using a personal access token:"}),e.jsx(s,{code:"ov login https://overlord.yourdomain.com"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["you'll be prompted for a personal access token (pat). generate one in the web dashboard under ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"profile → access tokens"}),"."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"alternatively, use the one-step setup wizard:"}),e.jsx(s,{code:"ov setup"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"this prompts for both the server url and token interactively."})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// verify"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"confirm your connection is working:"}),e.jsx(s,{code:"ov whoami"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"should display your username and role."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// quick start"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> create a task"}),e.jsx(s,{code:'ov task create -d "fix the login bug" -p my-project'})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> watch a running task"}),e.jsx(a,{code:`ov attach <task_id>
2
2
 
3
3
  # use --watch for read-only mode
4
4
  # use --takeover to take control of the terminal`})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> list tasks"}),e.jsx(s,{code:"ov task list --status RUNNING"})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// next steps"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsxs("li",{children:["— ",e.jsx(t,{to:"/docs/cli",className:"text-[var(--accent)] hover:underline",children:"developer cli reference"})," — full command reference for the ov cli"]}),e.jsxs("li",{children:["— ",e.jsx(t,{to:"/docs/dev-workflow",className:"text-[var(--accent)] hover:underline",children:"development workflow"})," — end-to-end guide for creating and managing tasks"]})]})]})]})})}export{o as default};
@@ -1,4 +1,4 @@
1
- import{c,a as _,j as s,G as p,M as t,S as h,b as m,O as y,a5 as x,d as v,L as k}from"./index-B19uS9bj.js";import{D as b}from"./download-BXnPaTq3.js";import{B as g}from"./bot-F2LxwOEN.js";import{G as a,W as u}from"./workflow-DUZlRmfH.js";import{S as w}from"./settings-C2xdeKAV.js";/**
1
+ import{c,a as _,j as s,G as p,M as t,S as h,b as m,O as y,a5 as x,d as v,L as k}from"./index-D9synPeJ.js";import{D as b}from"./download-D5cnbFDk.js";import{B as g}from"./bot-Bf1PX7dx.js";import{G as a,W as u}from"./workflow-M2c7dT84.js";import{S as w}from"./settings-CgXh3xHG.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{a as i,g as x,j as a,L as d,G as m,b,M as p,O as h,a5 as u,e as v,a9 as f,aa as g}from"./index-B19uS9bj.js";import{A as j}from"./arrow-left-Dt8Fc2tT.js";const t=[{to:"/docs/changelog",label:"changelog",icon:m},{to:"/docs/cli",label:"cli",icon:b},{to:"/docs/api",label:"api",icon:p},{to:"/docs/bot",label:"bot",icon:h},{to:"/docs/skill",label:"skill",icon:u},{to:"/docs/all",label:"all",icon:v}],k=new Set(t.map(e=>e.to));function N(){const{t:e}=i(),r=x(),o=!k.has(r.pathname);return a.jsxs("div",{className:"flex h-full flex-col",children:[a.jsxs("nav",{className:"flex items-center border-b border-[var(--border)] bg-[var(--bg-card)] px-4 md:px-6 overflow-x-auto no-scrollbar",children:[o&&a.jsxs(d,{to:"/docs/all",className:"mr-3 shrink-0 flex items-center gap-1 text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:[a.jsx(j,{size:12}),e("docs.docs_back")]}),t.map(({to:s,label:l,icon:c})=>a.jsxs(f,{to:s,className:({isActive:n})=>`flex items-center gap-1.5 px-3 py-3 text-xs lowercase border-b-2 transition-colors shrink-0 ${n||o&&s==="/docs/all"?"border-[var(--accent)] text-[var(--accent)]":"border-transparent text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:[a.jsx(c,{size:14}),a.jsx("span",{children:l})]},s))]}),a.jsx("main",{className:"flex-1 overflow-auto p-4 md:p-6",children:a.jsx(g,{})})]})}export{N as default};
1
+ import{a as i,g as x,j as a,L as d,G as m,b,M as p,O as h,a5 as u,e as v,a9 as f,aa as g}from"./index-D9synPeJ.js";import{A as j}from"./arrow-left-DolNA3BD.js";const t=[{to:"/docs/changelog",label:"changelog",icon:m},{to:"/docs/cli",label:"cli",icon:b},{to:"/docs/api",label:"api",icon:p},{to:"/docs/bot",label:"bot",icon:h},{to:"/docs/skill",label:"skill",icon:u},{to:"/docs/all",label:"all",icon:v}],k=new Set(t.map(e=>e.to));function N(){const{t:e}=i(),r=x(),o=!k.has(r.pathname);return a.jsxs("div",{className:"flex h-full flex-col",children:[a.jsxs("nav",{className:"flex items-center border-b border-[var(--border)] bg-[var(--bg-card)] px-4 md:px-6 overflow-x-auto no-scrollbar",children:[o&&a.jsxs(d,{to:"/docs/all",className:"mr-3 shrink-0 flex items-center gap-1 text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:[a.jsx(j,{size:12}),e("docs.docs_back")]}),t.map(({to:s,label:l,icon:c})=>a.jsxs(f,{to:s,className:({isActive:n})=>`flex items-center gap-1.5 px-3 py-3 text-xs lowercase border-b-2 transition-colors shrink-0 ${n||o&&s==="/docs/all"?"border-[var(--accent)] text-[var(--accent)]":"border-transparent text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:[a.jsx(c,{size:14}),a.jsx("span",{children:l})]},s))]}),a.jsx("main",{className:"flex-1 overflow-auto p-4 md:p-6",children:a.jsx(g,{})})]})}export{N as default};
@@ -1 +1 @@
1
- import{a as i,r as s,j as e,C as x}from"./index-B19uS9bj.js";import{C as p}from"./copy-C051Wr-d.js";function o({text:t}){const{t:c}=i(),[n,a]=s.useState(!1),r=s.useRef(void 0);return s.useEffect(()=>()=>clearTimeout(r.current),[]),e.jsx("button",{onClick:async()=>{await navigator.clipboard.writeText(t),a(!0),clearTimeout(r.current),r.current=setTimeout(()=>a(!1),2e3)},className:"rounded-[4px] p-1 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",title:c("common.copy"),children:n?e.jsx(x,{className:"h-3 w-3 text-[var(--accent)]"}):e.jsx(p,{className:"h-3 w-3"})})}function m({code:t}){return e.jsxs("div",{className:"relative rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 overflow-x-auto",children:[e.jsx("div",{className:"absolute right-2 top-2",children:e.jsx(o,{text:t})}),e.jsx("pre",{className:"text-xs text-[var(--text-secondary)] whitespace-pre-wrap pr-8",children:t})]})}function d({code:t}){return e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 overflow-x-auto",children:[e.jsx("code",{className:"text-xs text-[var(--accent)] whitespace-nowrap",children:t}),e.jsx(o,{text:t})]})}export{o as C,d as I,m as a};
1
+ import{a as i,r as s,j as e,C as x}from"./index-D9synPeJ.js";import{C as p}from"./copy-CHO7AsGy.js";function o({text:t}){const{t:c}=i(),[n,a]=s.useState(!1),r=s.useRef(void 0);return s.useEffect(()=>()=>clearTimeout(r.current),[]),e.jsx("button",{onClick:async()=>{await navigator.clipboard.writeText(t),a(!0),clearTimeout(r.current),r.current=setTimeout(()=>a(!1),2e3)},className:"rounded-[4px] p-1 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",title:c("common.copy"),children:n?e.jsx(x,{className:"h-3 w-3 text-[var(--accent)]"}):e.jsx(p,{className:"h-3 w-3"})})}function m({code:t}){return e.jsxs("div",{className:"relative rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 overflow-x-auto",children:[e.jsx("div",{className:"absolute right-2 top-2",children:e.jsx(o,{text:t})}),e.jsx("pre",{className:"text-xs text-[var(--text-secondary)] whitespace-pre-wrap pr-8",children:t})]})}function d({code:t}){return e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 overflow-x-auto",children:[e.jsx("code",{className:"text-xs text-[var(--accent)] whitespace-nowrap",children:t}),e.jsx(o,{text:t})]})}export{o as C,d as I,m as a};
@@ -1,2 +1,2 @@
1
- import{B as xe,f as ue,a as me,r as s,I as v,Q as be,h as d,j as e,L as ve,Z as V,t as c}from"./index-B19uS9bj.js";import{S as X}from"./Select-D6NqBbsj.js";import{U as je,A as he,R as ge}from"./RemoveMemberConfirmDialog-B_Wts2d_.js";import{a as ye}from"./agent-type-options-DIKwG8ov.js";import{P as fe}from"./plus-gbieRhvw.js";import"./chevron-down-D7Ostzf1.js";function Te(){const{key:o}=xe(),l=ue(),{t:r}=me(),Y=ye(t=>t),[a,ee]=s.useState(null),[j,te]=s.useState([]),[re,se]=s.useState(!0),[w,h]=s.useState(!1),[g,C]=s.useState(""),[y,S]=s.useState(""),[T,I]=s.useState(""),[M,P]=s.useState(v.GITHUB),[A,R]=s.useState(""),[O,U]=s.useState(be.CLAUDE),[G,$]=s.useState("50"),[E,B]=s.useState(""),[D,L]=s.useState(""),[F,J]=s.useState(""),[q,z]=s.useState("0"),[p,f]=s.useState(""),[H,N]=s.useState(null),[x,k]=s.useState(""),[K,u]=s.useState(!1),[ae,Q]=s.useState(!1),[i,_]=s.useState(null),[ne,W]=s.useState(!1),m=s.useCallback(async()=>{if(o)try{const[t,b]=await Promise.all([d.get(`web/projects/${o}`).json(),d.get(`web/projects/${o}/members`).json().catch(()=>[])]);if(ee(t),te(b),N(t.gitTokenMasked??null),C(t.name),S(t.repoUrl),I(t.sshUrl??""),P(t.gitPlatform),R(t.defaultBranch),U(t.agentType),$(String(t.maxTurns)),B(t.workspaceRoot??""),L(t.setupCommands??""),J(t.testCommand??""),z(String(t.ptyOutputFilter??0)),t.pipeline)try{f(JSON.stringify(JSON.parse(t.pipeline),null,2))}catch{f(t.pipeline)}}catch{}finally{se(!1)}},[o]);s.useEffect(()=>{m()},[m]);async function oe(t){if(t.preventDefault(),!a)return;h(!0);let b=null;if(p.trim())try{JSON.parse(p),b=p.trim()}catch{c.error(r("projects.invalid_pipeline_json")),h(!1);return}try{await d.put(`web/projects/${a.key}`,{json:{name:g,repoUrl:y,sshUrl:T||null,defaultBranch:A,gitPlatform:M,agentType:O,maxTurns:parseInt(G,10)||50,workspaceRoot:E||null,setupCommands:D||null,testCommand:F||null,ptyOutputFilter:parseInt(q,10)||0,pipeline:b}}),c.success(r("projects.project_saved")),l(`/projects/${a.key}`)}catch(Z){const pe=Z instanceof Error?Z.message:r("projects.failed_to_save_project");c.error(pe)}finally{h(!1)}}function le(){l(`/projects/${o}`)}async function ce(){if(!(!a||!x.trim())){u(!0);try{const t=await d.put(`web/projects/${a.key}/git-token`,{json:{token:x.trim()}}).json();N(t.gitTokenMasked),k(""),c.success(r("projects.git_token_saved"))}catch{c.error(r("projects.git_token_failed"))}finally{u(!1)}}}async function ie(){if(a){u(!0);try{await d.delete(`web/projects/${a.key}/git-token`),N(null),k(""),c.success(r("projects.git_token_cleared"))}catch{c.error(r("projects.git_token_failed"))}finally{u(!1)}}}async function de(){if(!(!a||!i)){W(!0);try{await d.delete(`web/projects/${a.key}/members`,{searchParams:{developerId:String(i.developerId)}}),await m()}catch{}finally{W(!1),_(null)}}}return re?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})}):a?e.jsxs("form",{onSubmit:oe,className:"mx-auto max-w-6xl px-4 md:px-6 py-8",children:[e.jsxs("div",{className:"mb-2 text-xs text-[var(--text-muted)]",children:[e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l("/projects"),children:r("projects.title")})," / ",e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l(`/projects/${a.key}`),children:a.key})," / ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:r("common.edit")})]}),e.jsx("h1",{className:"text-lg font-bold text-[var(--text-primary)] mb-4",children:r("projects.edit_project_title")}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_400px]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.basic_info")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{label:r("projects.key"),children:e.jsx("input",{type:"text",value:a.key,readOnly:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-muted)] outline-none opacity-60 cursor-not-allowed"})}),e.jsx(n,{label:r("projects.name"),children:e.jsx("input",{type:"text",value:g,onChange:t=>C(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(n,{label:r("projects.repo_url"),children:e.jsx("input",{type:"text",value:y,onChange:t=>S(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsxs(n,{label:r("projects.ssh_url"),children:[e.jsx("input",{type:"text",value:T,onChange:t=>I(t.target.value),placeholder:r("projects.ssh_url_placeholder"),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:r("projects.ssh_url_hint")})]}),e.jsx(n,{label:r("projects.git_platform"),children:e.jsx(X,{value:M,onChange:t=>P(t),options:[{value:v.GITHUB,label:r("projects.github")},{value:v.GITLAB,label:r("projects.gitlab")},{value:v.GITEA,label:r("projects.gitea")}]})}),e.jsx(n,{label:r("projects.default_branch"),children:e.jsx("input",{type:"text",value:A,onChange:t=>R(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.agent_config")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{label:r("projects.agent_type"),children:e.jsx(X,{value:O,onChange:t=>U(t),options:Y})}),e.jsx(n,{label:r("projects.max_turns"),children:e.jsx("input",{type:"number",value:G,onChange:t=>$(t.target.value),min:1,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(n,{label:r("projects.workspace_root"),children:e.jsx("input",{type:"text",value:E,onChange:t=>B(t.target.value),placeholder:"/path/to/workspace",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.environment")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{label:r("projects.setup_commands"),children:e.jsx("textarea",{value:D,onChange:t=>L(t.target.value),rows:3,placeholder:`npm install
1
+ import{B as xe,f as ue,a as me,r as s,I as v,Q as be,h as d,j as e,L as ve,Z as V,t as c}from"./index-D9synPeJ.js";import{S as X}from"./Select-BRJxl1YO.js";import{U as je,A as he,R as ge}from"./RemoveMemberConfirmDialog-CGzHpvJv.js";import{a as ye}from"./agent-type-options-DXKoGpJI.js";import{P as fe}from"./plus-9sncIl_N.js";import"./chevron-down-Cm4So_5j.js";function Te(){const{key:o}=xe(),l=ue(),{t:r}=me(),Y=ye(t=>t),[a,ee]=s.useState(null),[j,te]=s.useState([]),[re,se]=s.useState(!0),[w,h]=s.useState(!1),[g,C]=s.useState(""),[y,S]=s.useState(""),[T,I]=s.useState(""),[M,P]=s.useState(v.GITHUB),[A,R]=s.useState(""),[O,U]=s.useState(be.CLAUDE),[G,$]=s.useState("50"),[E,B]=s.useState(""),[D,L]=s.useState(""),[F,J]=s.useState(""),[q,z]=s.useState("0"),[p,f]=s.useState(""),[H,N]=s.useState(null),[x,k]=s.useState(""),[K,u]=s.useState(!1),[ae,Q]=s.useState(!1),[i,_]=s.useState(null),[ne,W]=s.useState(!1),m=s.useCallback(async()=>{if(o)try{const[t,b]=await Promise.all([d.get(`web/projects/${o}`).json(),d.get(`web/projects/${o}/members`).json().catch(()=>[])]);if(ee(t),te(b),N(t.gitTokenMasked??null),C(t.name),S(t.repoUrl),I(t.sshUrl??""),P(t.gitPlatform),R(t.defaultBranch),U(t.agentType),$(String(t.maxTurns)),B(t.workspaceRoot??""),L(t.setupCommands??""),J(t.testCommand??""),z(String(t.ptyOutputFilter??0)),t.pipeline)try{f(JSON.stringify(JSON.parse(t.pipeline),null,2))}catch{f(t.pipeline)}}catch{}finally{se(!1)}},[o]);s.useEffect(()=>{m()},[m]);async function oe(t){if(t.preventDefault(),!a)return;h(!0);let b=null;if(p.trim())try{JSON.parse(p),b=p.trim()}catch{c.error(r("projects.invalid_pipeline_json")),h(!1);return}try{await d.put(`web/projects/${a.key}`,{json:{name:g,repoUrl:y,sshUrl:T||null,defaultBranch:A,gitPlatform:M,agentType:O,maxTurns:parseInt(G,10)||50,workspaceRoot:E||null,setupCommands:D||null,testCommand:F||null,ptyOutputFilter:parseInt(q,10)||0,pipeline:b}}),c.success(r("projects.project_saved")),l(`/projects/${a.key}`)}catch(Z){const pe=Z instanceof Error?Z.message:r("projects.failed_to_save_project");c.error(pe)}finally{h(!1)}}function le(){l(`/projects/${o}`)}async function ce(){if(!(!a||!x.trim())){u(!0);try{const t=await d.put(`web/projects/${a.key}/git-token`,{json:{token:x.trim()}}).json();N(t.gitTokenMasked),k(""),c.success(r("projects.git_token_saved"))}catch{c.error(r("projects.git_token_failed"))}finally{u(!1)}}}async function ie(){if(a){u(!0);try{await d.delete(`web/projects/${a.key}/git-token`),N(null),k(""),c.success(r("projects.git_token_cleared"))}catch{c.error(r("projects.git_token_failed"))}finally{u(!1)}}}async function de(){if(!(!a||!i)){W(!0);try{await d.delete(`web/projects/${a.key}/members`,{searchParams:{developerId:String(i.developerId)}}),await m()}catch{}finally{W(!1),_(null)}}}return re?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})}):a?e.jsxs("form",{onSubmit:oe,className:"mx-auto max-w-6xl px-4 md:px-6 py-8",children:[e.jsxs("div",{className:"mb-2 text-xs text-[var(--text-muted)]",children:[e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l("/projects"),children:r("projects.title")})," / ",e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l(`/projects/${a.key}`),children:a.key})," / ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:r("common.edit")})]}),e.jsx("h1",{className:"text-lg font-bold text-[var(--text-primary)] mb-4",children:r("projects.edit_project_title")}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_400px]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.basic_info")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{label:r("projects.key"),children:e.jsx("input",{type:"text",value:a.key,readOnly:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-muted)] outline-none opacity-60 cursor-not-allowed"})}),e.jsx(n,{label:r("projects.name"),children:e.jsx("input",{type:"text",value:g,onChange:t=>C(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(n,{label:r("projects.repo_url"),children:e.jsx("input",{type:"text",value:y,onChange:t=>S(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsxs(n,{label:r("projects.ssh_url"),children:[e.jsx("input",{type:"text",value:T,onChange:t=>I(t.target.value),placeholder:r("projects.ssh_url_placeholder"),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:r("projects.ssh_url_hint")})]}),e.jsx(n,{label:r("projects.git_platform"),children:e.jsx(X,{value:M,onChange:t=>P(t),options:[{value:v.GITHUB,label:r("projects.github")},{value:v.GITLAB,label:r("projects.gitlab")},{value:v.GITEA,label:r("projects.gitea")}]})}),e.jsx(n,{label:r("projects.default_branch"),children:e.jsx("input",{type:"text",value:A,onChange:t=>R(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.agent_config")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{label:r("projects.agent_type"),children:e.jsx(X,{value:O,onChange:t=>U(t),options:Y})}),e.jsx(n,{label:r("projects.max_turns"),children:e.jsx("input",{type:"number",value:G,onChange:t=>$(t.target.value),min:1,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(n,{label:r("projects.workspace_root"),children:e.jsx("input",{type:"text",value:E,onChange:t=>B(t.target.value),placeholder:"/path/to/workspace",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.environment")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{label:r("projects.setup_commands"),children:e.jsx("textarea",{value:D,onChange:t=>L(t.target.value),rows:3,placeholder:`npm install
2
2
  npm run build`,className:"w-full resize-y rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(n,{label:r("projects.post_command"),children:e.jsx("input",{type:"text",value:F,onChange:t=>J(t.target.value),placeholder:"npm test",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.security")}),e.jsx("div",{className:"space-y-3",children:e.jsx(n,{label:r("projects.pty_output_filter"),children:e.jsx("input",{type:"text",value:q,onChange:t=>z(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.git_token")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{label:r("projects.git_token_label"),children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:H??r("common.not_set")})})}),e.jsxs(n,{label:r("projects.git_token_set"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"password",value:x,onChange:t=>k(t.target.value),placeholder:"ghp_xxxx...",className:"min-w-0 flex-1 rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("button",{type:"button",disabled:K||!x.trim(),onClick:ce,className:"shrink-0 rounded-[4px] bg-[var(--accent)] px-3 py-2 text-xs font-medium text-black hover:opacity-90 transition-opacity disabled:opacity-50",children:r("common.save")})]}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:r("projects.git_token_hint")})]}),H&&e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{type:"button",disabled:K,onClick:ie,className:"rounded-[4px] border border-[var(--destructive)] px-3 py-1.5 text-xs text-[var(--destructive)] hover:opacity-70 transition-opacity disabled:opacity-50",children:r("projects.git_token_clear")})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--accent)]",children:r("projects.pipeline_section")}),e.jsx(ve,{to:"/projects/"+o+"/pipeline",className:"text-xs text-[var(--accent)] hover:underline",children:r("projects.edit_pipeline")})]}),e.jsx("textarea",{value:p,onChange:t=>f(t.target.value),rows:20,spellCheck:!1,placeholder:'{"stages": []}',className:"w-full resize-y rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]",style:{fontFamily:'"JetBrains Mono", monospace',textTransform:"none"}})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--accent)]",children:r("projects.members")}),e.jsxs("button",{type:"button",onClick:()=>Q(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs font-medium text-black",children:[e.jsx(fe,{className:"h-3.5 w-3.5"}),r("projects.add_member")]})]}),j.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("projects.no_members_yet")})]}):e.jsx("div",{className:"space-y-2",children:j.map(t=>e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-[var(--accent)]/20 text-xs font-bold text-[var(--accent)]",children:(t.developerName??String(t.developerId)).charAt(0).toUpperCase()}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:t.developerName??`#${t.developerId}`}),e.jsx("span",{className:"ml-2 rounded-[4px] px-1.5 py-0.5 text-[11px] font-medium",style:{color:t.role===V.MAINTAINER?"var(--warning)":"var(--text-secondary)",background:t.role===V.MAINTAINER?"rgba(245,158,11,0.1)":"rgba(163,163,163,0.1)"},children:t.role})]})]}),e.jsx("button",{type:"button",onClick:()=>_(t),className:"text-[var(--destructive)] hover:opacity-70 transition-opacity","aria-label":r("projects.remove_member"),children:e.jsx(je,{className:"h-3.5 w-3.5"})})]},t.developerId))})]})]})]}),e.jsxs("div",{className:"mt-8 flex items-center justify-end gap-3 border-t border-[var(--border)] pt-6",children:[e.jsx("button",{type:"button",onClick:le,className:"rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("common.discard")}),e.jsx("button",{type:"submit",disabled:w||!g||!y,className:"rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-medium text-black hover:opacity-90 transition-opacity disabled:opacity-50",children:r(w?"common.saving":"projects.save_changes")})]}),e.jsx(he,{isOpen:ae,onClose:()=>Q(!1),projectKey:a.key,existingMemberIds:j.map(t=>t.developerId),onAdded:m}),e.jsx(ge,{isOpen:!!i,onClose:()=>_(null),onConfirm:de,memberName:i?i.developerName??`#${i.developerId}`:"",loading:ne})]}):e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 text-center",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:r("projects.project_not_found")}),e.jsx("button",{onClick:()=>l("/projects"),className:"mt-4 rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:r("projects.back_to_projects")})]})}function n({label:o,children:l}){return e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-1 sm:gap-3",children:[e.jsx("label",{className:"sm:w-36 shrink-0 sm:pt-2 text-xs text-[var(--text-muted)]",children:o}),e.jsx("div",{className:"min-w-0 flex-1",children:l})]})}export{Te as default};
@@ -1,4 +1,4 @@
1
- import{c as o,j as e}from"./index-B19uS9bj.js";/**
1
+ import{c as o,j as e}from"./index-D9synPeJ.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-B19uS9bj.js";import{a as r}from"./DocsPrimitives-0rbwNPdJ.js";import"./copy-C051Wr-d.js";function d(){return e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// environment variables"}),e.jsx("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:"configuration reference for server and worker environment variables."})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> server variables"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"server configuration is stored in ~/.overlord/.env. these variables are set during overlord install and can be manually edited."}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"default"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"SERVER_PORT"})}),e.jsx("td",{className:"py-2 pr-4",children:"9000"}),e.jsx("td",{className:"py-2",children:"http/ws port"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"DB_PATH"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord/data/overlord.db"}),e.jsx("td",{className:"py-2",children:"sqlite database path"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"REDIS_URL"})}),e.jsx("td",{className:"py-2 pr-4",children:"redis://localhost:6379"}),e.jsx("td",{className:"py-2",children:"redis connection url"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"JWT_SECRET"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"jwt signing secret (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"WORKER_JWT_SECRET"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"worker jwt signing secret (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"ENCRYPTION_KEY"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"encryption key for sensitive data at rest (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"CORS_ORIGIN"})}),e.jsx("td",{className:"py-2 pr-4",children:"*"}),e.jsx("td",{className:"py-2",children:"allowed cors origins (comma-separated)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WEB_URL"})}),e.jsx("td",{className:"py-2 pr-4",children:"http://localhost:9000"}),e.jsx("td",{className:"py-2",children:"public url for notification links and bot cards (configured during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"GIT_TOKEN"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"git platform authentication token for mr/pr operations"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"TUNNEL_TTL_HOURS"})}),e.jsx("td",{className:"py-2 pr-4",children:"4"}),e.jsx("td",{className:"py-2",children:"cursor tunnel expiration in hours (max 24)"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LOG_LEVEL"})}),e.jsx("td",{className:"py-2 pr-4",children:"info"}),e.jsx("td",{className:"py-2",children:"log level: fatal, error, warn, info, debug, trace"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"never expose JWT_SECRET, WORKER_JWT_SECRET, or ENCRYPTION_KEY. these are generated automatically during installation and should not be shared or committed to version control."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> log levels"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"level"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"fatal"})}),e.jsx("td",{className:"py-2",children:"critical errors causing shutdown"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"error"})}),e.jsx("td",{className:"py-2",children:"runtime errors"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"warn"})}),e.jsx("td",{className:"py-2",children:"warnings"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"info"})}),e.jsx("td",{className:"py-2",children:"general operational info"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"debug"})}),e.jsx("td",{className:"py-2",children:"detailed debugging info"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"trace"})}),e.jsx("td",{className:"py-2",children:"very verbose tracing"})]})]})]})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> worker variables"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"worker configuration is stored in ~/.overlord-worker/.env. these are set during overlord setup worker."}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"default"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_HOST"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"server url (required)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKER_TOKEN"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"one-time registration token"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKER_NAME"})}),e.jsx("td",{className:"py-2 pr-4",children:"hostname"}),e.jsx("td",{className:"py-2",children:"display name for this worker"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKSPACE_ROOT"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord-worker/workspaces"}),e.jsx("td",{className:"py-2",children:"directory for task workspaces"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_MAX_SLOTS"})}),e.jsx("td",{className:"py-2 pr-4",children:"2"}),e.jsx("td",{className:"py-2",children:"maximum concurrent tasks"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_DATA_DIR"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord-worker"}),e.jsx("td",{className:"py-2",children:"config and jwt storage directory"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_SSH_KEY_PATH"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"ssh key for git clone/push operations"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"OVERLORD_WORKER_TOKEN is consumed on first registration. after that, the worker uses a jwt for authentication. the token field can remain in the .env file but will not be used again."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> redis configuration"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"redis is required for the server (used for bullmq task queue and pub/sub). recommended setting:"}),e.jsx("pre",{className:"rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 text-xs text-[var(--text-secondary)] overflow-x-auto",children:"appendonly yes"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"redis must have aof persistence enabled to minimize queue data loss on restart."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> llm configuration"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"optional llm integration that powers two features: (1) auto-generating concise task names and branch slugs from descriptions, and (2) natural language command parsing (nlu) — when a bot message doesn't match any structured command, the llm classifies the intent and extracts parameters. supports anthropic native api and any openai-compatible provider. without these variables, both features are disabled."}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"required"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"default"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LLM_BASE_URL"})}),e.jsx("td",{className:"py-2 pr-4",children:"optional"}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:'llm api base url. supports anthropic native api (url contains "anthropic") and openai-compatible format. leave empty to disable both task naming and nlu.'})]}),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:"LLM_API_KEY"})}),e.jsx("td",{className:"py-2 pr-4",children:"optional"}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"api key for the llm service. required when LLM_BASE_URL is set."})]}),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:"LLM_MODEL"})}),e.jsx("td",{className:"py-2 pr-4",children:"optional"}),e.jsx("td",{className:"py-2 pr-4",children:"claude-haiku-4-5-20251001"}),e.jsx("td",{className:"py-2",children:"model identifier used for both task naming and nlu."})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LLM_MAX_DESCRIPTION_LENGTH"})}),e.jsx("td",{className:"py-2 pr-4",children:"optional"}),e.jsx("td",{className:"py-2 pr-4",children:"4000"}),e.jsx("td",{className:"py-2",children:"max description chars sent to llm for task naming; nlu uses a separate internal cap."})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)] mt-2",children:"provider examples:"}),e.jsx(r,{code:`# anthropic (claude) — native messages api, auto-detected
1
+ import{j as e}from"./index-D9synPeJ.js";import{a as r}from"./DocsPrimitives-BzVDx2cs.js";import"./copy-CHO7AsGy.js";function d(){return e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// environment variables"}),e.jsx("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:"configuration reference for server and worker environment variables."})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> server variables"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"server configuration is stored in ~/.overlord/.env. these variables are set during overlord install and can be manually edited."}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"default"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"SERVER_PORT"})}),e.jsx("td",{className:"py-2 pr-4",children:"9000"}),e.jsx("td",{className:"py-2",children:"http/ws port"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"DB_PATH"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord/data/overlord.db"}),e.jsx("td",{className:"py-2",children:"sqlite database path"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"REDIS_URL"})}),e.jsx("td",{className:"py-2 pr-4",children:"redis://localhost:6379"}),e.jsx("td",{className:"py-2",children:"redis connection url"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"JWT_SECRET"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"jwt signing secret (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"WORKER_JWT_SECRET"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"worker jwt signing secret (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"ENCRYPTION_KEY"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"encryption key for sensitive data at rest (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"CORS_ORIGIN"})}),e.jsx("td",{className:"py-2 pr-4",children:"*"}),e.jsx("td",{className:"py-2",children:"allowed cors origins (comma-separated)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WEB_URL"})}),e.jsx("td",{className:"py-2 pr-4",children:"http://localhost:9000"}),e.jsx("td",{className:"py-2",children:"public url for notification links and bot cards (configured during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"GIT_TOKEN"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"git platform authentication token for mr/pr operations"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"TUNNEL_TTL_HOURS"})}),e.jsx("td",{className:"py-2 pr-4",children:"4"}),e.jsx("td",{className:"py-2",children:"cursor tunnel expiration in hours (max 24)"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LOG_LEVEL"})}),e.jsx("td",{className:"py-2 pr-4",children:"info"}),e.jsx("td",{className:"py-2",children:"log level: fatal, error, warn, info, debug, trace"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"never expose JWT_SECRET, WORKER_JWT_SECRET, or ENCRYPTION_KEY. these are generated automatically during installation and should not be shared or committed to version control."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> log levels"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"level"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"fatal"})}),e.jsx("td",{className:"py-2",children:"critical errors causing shutdown"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"error"})}),e.jsx("td",{className:"py-2",children:"runtime errors"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"warn"})}),e.jsx("td",{className:"py-2",children:"warnings"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"info"})}),e.jsx("td",{className:"py-2",children:"general operational info"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"debug"})}),e.jsx("td",{className:"py-2",children:"detailed debugging info"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"trace"})}),e.jsx("td",{className:"py-2",children:"very verbose tracing"})]})]})]})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> worker variables"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"worker configuration is stored in ~/.overlord-worker/.env. these are set during overlord setup worker."}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"default"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_HOST"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"server url (required)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKER_TOKEN"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"one-time registration token"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKER_NAME"})}),e.jsx("td",{className:"py-2 pr-4",children:"hostname"}),e.jsx("td",{className:"py-2",children:"display name for this worker"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKSPACE_ROOT"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord-worker/workspaces"}),e.jsx("td",{className:"py-2",children:"directory for task workspaces"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_MAX_SLOTS"})}),e.jsx("td",{className:"py-2 pr-4",children:"2"}),e.jsx("td",{className:"py-2",children:"maximum concurrent tasks"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_DATA_DIR"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord-worker"}),e.jsx("td",{className:"py-2",children:"config and jwt storage directory"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_SSH_KEY_PATH"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"ssh key for git clone/push operations"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"OVERLORD_WORKER_TOKEN is consumed on first registration. after that, the worker uses a jwt for authentication. the token field can remain in the .env file but will not be used again."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> redis configuration"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"redis is required for the server (used for bullmq task queue and pub/sub). recommended setting:"}),e.jsx("pre",{className:"rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 text-xs text-[var(--text-secondary)] overflow-x-auto",children:"appendonly yes"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"redis must have aof persistence enabled to minimize queue data loss on restart."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> llm configuration"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"optional llm integration that powers two features: (1) auto-generating concise task names and branch slugs from descriptions, and (2) natural language command parsing (nlu) — when a bot message doesn't match any structured command, the llm classifies the intent and extracts parameters. supports anthropic native api and any openai-compatible provider. without these variables, both features are disabled."}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"required"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"default"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LLM_BASE_URL"})}),e.jsx("td",{className:"py-2 pr-4",children:"optional"}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:'llm api base url. supports anthropic native api (url contains "anthropic") and openai-compatible format. leave empty to disable both task naming and nlu.'})]}),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:"LLM_API_KEY"})}),e.jsx("td",{className:"py-2 pr-4",children:"optional"}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"api key for the llm service. required when LLM_BASE_URL is set."})]}),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:"LLM_MODEL"})}),e.jsx("td",{className:"py-2 pr-4",children:"optional"}),e.jsx("td",{className:"py-2 pr-4",children:"claude-haiku-4-5-20251001"}),e.jsx("td",{className:"py-2",children:"model identifier used for both task naming and nlu."})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LLM_MAX_DESCRIPTION_LENGTH"})}),e.jsx("td",{className:"py-2 pr-4",children:"optional"}),e.jsx("td",{className:"py-2 pr-4",children:"4000"}),e.jsx("td",{className:"py-2",children:"max description chars sent to llm for task naming; nlu uses a separate internal cap."})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)] mt-2",children:"provider examples:"}),e.jsx(r,{code:`# anthropic (claude) — native messages api, auto-detected
2
2
  LLM_BASE_URL=https://api.anthropic.com
3
3
  LLM_API_KEY=sk-ant-api03-...
4
4
  LLM_MODEL=claude-haiku-4-5-20251001
@@ -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-B19uS9bj.js";import{T as R}from"./TaskStatusBadge-BzUl_Vhj.js";import{T as g}from"./Skeleton-CGmOAlS2.js";import{O as G}from"./OnboardingGuide-GBu1WXvY.js";import{f as _}from"./date-CmcdoD87.js";import{g as V}from"./status-colors-CbSft6mt.js";import{u as b}from"./useFetch-Bvarcx0Z.js";import{T as q}from"./Tooltip-CcKi7kt4.js";import{A as v}from"./arrow-right-CtNX35j0.js";import"./chevron-right-D8nW44q3.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-D9synPeJ.js";import{T as R}from"./TaskStatusBadge-BldGSOah.js";import{T as g}from"./Skeleton-CkmmCp2B.js";import{O as G}from"./OnboardingGuide-CnEZNjMO.js";import{f as _}from"./date-CmcdoD87.js";import{g as V}from"./status-colors-CRgg1N4i.js";import{u as b}from"./useFetch-Dj0ZN58I.js";import{T as q}from"./Tooltip-EOsBLsZE.js";import{A as v}from"./arrow-right-J0lJRpaW.js";import"./chevron-right-D0k7WYYt.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-B19uS9bj.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
+ import{j as e}from"./index-D9synPeJ.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-B19uS9bj.js";import{I as s,a as t}from"./DocsPrimitives-0rbwNPdJ.js";import"./copy-C051Wr-d.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)
1
+ import{j as e}from"./index-D9synPeJ.js";import{I as s,a as t}from"./DocsPrimitives-BzVDx2cs.js";import"./copy-CHO7AsGy.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-B19uS9bj.js";import{A as x}from"./arrow-right-CtNX35j0.js";import{Z as z}from"./zap-D628PASJ.js";import{B as T}from"./bot-F2LxwOEN.js";import{W as L,G as C}from"./workflow-DUZlRmfH.js";import{U as M}from"./users-B0vZQYO0.js";import{C as I}from"./copy-C051Wr-d.js";/**
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-D9synPeJ.js";import{A as x}from"./arrow-right-J0lJRpaW.js";import{Z as z}from"./zap-gd-vvEW3.js";import{B as T}from"./bot-Bf1PX7dx.js";import{W as L,G as C}from"./workflow-M2c7dT84.js";import{U as M}from"./users-MLpO39SG.js";import{C as I}from"./copy-CHO7AsGy.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-B19uS9bj.js";import{I as s,a as t}from"./DocsPrimitives-0rbwNPdJ.js";import"./copy-C051Wr-d.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
1
+ import{j as e}from"./index-D9synPeJ.js";import{I as s,a as t}from"./DocsPrimitives-BzVDx2cs.js";import"./copy-CHO7AsGy.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-B19uS9bj.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
+ import{f as E,g as I,u as g,a as W,r as m,j as t,N as B}from"./index-D9synPeJ.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-B19uS9bj.js";import{b as a}from"./status-colors-CbSft6mt.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
+ import{j as s}from"./index-D9synPeJ.js";import{b as a}from"./status-colors-CRgg1N4i.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-B19uS9bj.js";import{C as p}from"./chevron-down-D7Ostzf1.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
+ import{r as s,j as r}from"./index-D9synPeJ.js";import{C as p}from"./chevron-down-Cm4So_5j.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-B19uS9bj.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
+ import{f as a,a as n,j as e,L as o}from"./index-D9synPeJ.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-B19uS9bj.js";import{C as S}from"./chevron-right-D8nW44q3.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
+ 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-D9synPeJ.js";import{C as S}from"./chevron-right-D0k7WYYt.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};