@overlordai/server 1.0.68 → 1.0.69

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 (93) hide show
  1. package/dist/dispatcher/pty-relay.service.d.ts.map +1 -1
  2. package/dist/dispatcher/pty-relay.service.js +19 -0
  3. package/dist/dispatcher/pty-relay.service.js.map +1 -1
  4. package/package.json +4 -4
  5. package/public/assets/{AccessTokensPage-DcOzH6vQ.js → AccessTokensPage-iDZ6rZhl.js} +1 -1
  6. package/public/assets/AdminPage-CIVF_6oN.js +1 -0
  7. package/public/assets/{ApiReferencePage-Cn1nZmYJ.js → ApiReferencePage-DdBJhmX5.js} +1 -1
  8. package/public/assets/ArchitecturePage-BWQACk_w.js +47 -0
  9. package/public/assets/{AuditLogPage-CkE1EJZh.js → AuditLogPage-DTZL5_x5.js} +2 -2
  10. package/public/assets/{BindPlatformPage-DYNztOnJ.js → BindPlatformPage-DR0wVGmo.js} +1 -1
  11. package/public/assets/BotIntegrationPage-BsClXkLN.js +1 -0
  12. package/public/assets/BotManage-CNZfkmIJ.js +6 -0
  13. package/public/assets/BotSetupPage-Bcfnysyl.js +33 -0
  14. package/public/assets/ChangelogPage-DpiKKuMW.js +1 -0
  15. package/public/assets/{CliReferencePage-DyfbBqGH.js → CliReferencePage-3PUTVc7V.js} +1 -1
  16. package/public/assets/DeploymentPage-CKZ4SJGu.js +34 -0
  17. package/public/assets/DevWorkflowPage-3C2oScnn.js +6 -0
  18. package/public/assets/{DeveloperManage-DgwZWjLh.js → DeveloperManage-wTnur24N.js} +2 -2
  19. package/public/assets/DeveloperSetupPage-BMm9F-Bb.js +4 -0
  20. package/public/assets/DocsLayout-Db02r7be.js +41 -0
  21. package/public/assets/DocsPrimitives-DS0DquzY.js +1 -0
  22. package/public/assets/{EditProjectPage-DjGCEool.js → EditProjectPage-f_umSRE8.js} +1 -1
  23. package/public/assets/{EmptyState-C7-kuf8X.js → EmptyState-CF1knXIb.js} +1 -1
  24. package/public/assets/EnvVariablesPage-BG-6sXnf.js +1 -0
  25. package/public/assets/{HomePage-CWYmPB1e.js → HomePage-Dx-CsXKm.js} +1 -1
  26. package/public/assets/InfoRow-DSmNnnLr.js +1 -0
  27. package/public/assets/InstallationPage-BNHwwjLf.js +7 -0
  28. package/public/assets/{LandingPage-ZuEWmIZL.js → LandingPage-D58CYxTa.js} +8 -18
  29. package/public/assets/LocalDevelopmentPage-CyUsNaWH.js +11 -0
  30. package/public/assets/{LoginPage-ZN3nJzEX.js → LoginPage-BkBq-gI2.js} +1 -1
  31. package/public/assets/{MetricBar-CH5ccxZr.js → MetricBar-CTJw2-TT.js} +1 -1
  32. package/public/assets/{NotFoundPage-DkoNgmQ4.js → NotFoundPage-DQOZcvon.js} +1 -1
  33. package/public/assets/{OnboardingGuide-dk4OyOgV.js → OnboardingGuide-CsX3AAYe.js} +1 -1
  34. package/public/assets/PermissionsPage-DV1jB5wk.js +1 -0
  35. package/public/assets/PipelineConfigPage-DWTyDQIr.js +28 -0
  36. package/public/assets/{PipelineEditorPage-CtUnQDef.js → PipelineEditorPage-D3LWtMr2.js} +1 -1
  37. package/public/assets/{ProfilePage-B0CWDm55.js → ProfilePage-BcJ4dzzZ.js} +1 -1
  38. package/public/assets/{ProjectDetailPage-BbOgUrnR.js → ProjectDetailPage-CfnwUUSo.js} +3 -3
  39. package/public/assets/{ProjectListPage-CtGknAYM.js → ProjectListPage-CNotLnBe.js} +1 -1
  40. package/public/assets/{PtyTerminal-C28RQ62I.js → PtyTerminal-BIf7o9cl.js} +12 -7
  41. package/public/assets/{QuickAuth-8eT76fKz.js → QuickAuth-C2UsxqX9.js} +1 -1
  42. package/public/assets/{RemoveMemberConfirmDialog-Ctyx8n2a.js → RemoveMemberConfirmDialog-BX3zkPVv.js} +1 -1
  43. package/public/assets/{Select-8MUED_Fj.js → Select-BaCTjbpe.js} +1 -1
  44. package/public/assets/{SettingsPage-CXDXq71S.js → SettingsPage-DwbzfiSN.js} +1 -1
  45. package/public/assets/{Skeleton-B0x9oN6a.js → Skeleton-wnwOeI39.js} +1 -1
  46. package/public/assets/SkillPage-BLEt2rMu.js +1 -0
  47. package/public/assets/TaskDetailPage-DtwpHF_O.js +21 -0
  48. package/public/assets/{TaskListPage-DMYTWhw_.js → TaskListPage-sy7iLza2.js} +1 -1
  49. package/public/assets/{TaskStatusBadge-yU5DIpkP.js → TaskStatusBadge-Cf0DzE71.js} +1 -1
  50. package/public/assets/TerminalHomePage-BTqi9Axa.js +11 -0
  51. package/public/assets/{TokenManage-NYgoI8yJ.js → TokenManage-DWMXnCDJ.js} +1 -1
  52. package/public/assets/{TotpSetupPage-lw418pBO.js → TotpSetupPage-DHdTMjpN.js} +1 -1
  53. package/public/assets/{WorkerDetailPage-CF7FWzQn.js → WorkerDetailPage-YJUVETFW.js} +1 -1
  54. package/public/assets/WorkerListPage-B-D7X_b1.js +1 -0
  55. package/public/assets/WorkerOperationsPage-BBxYUgIw.js +1 -0
  56. package/public/assets/{WorkerSetupGuidePage-dRLxcC1D.js → WorkerSetupGuidePage-ChzKuXQZ.js} +2 -7
  57. package/public/assets/WorkerSetupPage-B4jlXCjH.js +5 -0
  58. package/public/assets/{arrow-left-D3hlGpFa.js → arrow-left-CclYAeLg.js} +1 -1
  59. package/public/assets/{arrow-right-DbRiIkn5.js → arrow-right-BVGnZmSj.js} +1 -1
  60. package/public/assets/{bot-DJcm4TDu.js → bot-D9xi44vN.js} +1 -1
  61. package/public/assets/{chevron-right-Cz1_0u26.js → chevron-right-BagQ0WTS.js} +1 -1
  62. package/public/assets/{copy-BSpogfAn.js → copy-CFKtBHG3.js} +1 -1
  63. package/public/assets/download-CTnOMUpx.js +6 -0
  64. package/public/assets/{external-link-BYnHDfTq.js → external-link-Bdlp6eLv.js} +1 -1
  65. package/public/assets/index-CVFlBK8x.css +1 -0
  66. package/public/assets/index-uDLAla67.js +225 -0
  67. package/public/assets/{key-B7y18xnM.js → key-9SBu60Mo.js} +1 -1
  68. package/public/assets/{loader-circle-j2WCDelv.js → loader-circle-C3TDU6pb.js} +1 -1
  69. package/public/assets/message-square-CqYt8K2i.js +6 -0
  70. package/public/assets/{pencil-CkuHyqYU.js → pencil-CrcM0dgK.js} +1 -1
  71. package/public/assets/{plus-DETa4kg0.js → plus-DnDLd-iP.js} +1 -1
  72. package/public/assets/{rotate-ccw-oPqSTHU8.js → rotate-ccw-BS27hgv2.js} +1 -1
  73. package/public/assets/{scroll-text--ZQgIRbt.js → scroll-text-BLE2ARXF.js} +1 -1
  74. package/public/assets/{settings-COdENdI-.js → settings-pymAAKeG.js} +1 -1
  75. package/public/assets/{status-colors-C_xltR1x.js → status-colors-BcGt1oBU.js} +1 -1
  76. package/public/assets/{task-constants-BisV3uAk.js → task-constants-G2j8o2ma.js} +1 -1
  77. package/public/assets/{trash-2-BLxwKGg4.js → trash-2-BmckJ_Dj.js} +1 -1
  78. package/public/assets/{useFetch-CKA2R0HW.js → useFetch-DPbqlqsl.js} +1 -1
  79. package/public/assets/{users-Cm06VaAm.js → users-DFQbCvYm.js} +1 -1
  80. package/public/assets/{wifi-CoOrgHWP.js → wifi-DrZKx701.js} +1 -1
  81. package/public/assets/workflow-DTNRYvFx.js +11 -0
  82. package/public/assets/{zap-CZBm69SW.js → zap-D3sq7Jac.js} +1 -1
  83. package/public/index.html +2 -2
  84. package/public/sw.js +1 -1
  85. package/public/assets/AdminPage-DjzkTi-Z.js +0 -1
  86. package/public/assets/BotManage-B4YAKqEk.js +0 -6
  87. package/public/assets/InfoRow-DGZv5P3m.js +0 -1
  88. package/public/assets/SkillPage-CeTlmMdA.js +0 -1
  89. package/public/assets/TaskDetailPage-jyeOPtsb.js +0 -31
  90. package/public/assets/TerminalHomePage-D3Z-uJUx.js +0 -16
  91. package/public/assets/WorkerListPage-Dd6P84ye.js +0 -6
  92. package/public/assets/index-C5ry7bCb.js +0 -225
  93. package/public/assets/index-DBZN6iTO.css +0 -1
@@ -0,0 +1 @@
1
+ import{j as e}from"./index-uDLAla67.js";function s(){return e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// changelog"}),e.jsx("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:"release history and notable changes."})]}),e.jsx("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.jsxs("div",{className:"flex items-baseline gap-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> v1.0.28"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"2026-03-13"})]}),e.jsx("h3",{className:"text-xs text-[var(--text-primary)]",children:"initial public release"}),e.jsxs("div",{className:"space-y-1 text-xs text-[var(--text-secondary)]",children:[e.jsx("p",{children:"- full task orchestration platform with multi-agent support (claude code, cursor, codex)"}),e.jsx("p",{children:"- real-time pty terminal streaming via xterm.js in web dashboard"}),e.jsx("p",{children:"- skill pipeline system with confirmation, choice, and input stages"}),e.jsx("p",{children:"- multi-machine worker fleet with intelligent task routing"}),e.jsx("p",{children:"- lark bot integration with interactive message cards"}),e.jsx("p",{children:"- developer cli (ov) for task management and terminal attachment"}),e.jsx("p",{children:"- operations cli (overlord) for server/worker lifecycle management"}),e.jsx("p",{children:"- role-based access control (developer, lead, admin)"}),e.jsx("p",{children:"- totp two-factor authentication"}),e.jsx("p",{children:"- personal access tokens for api/cli authentication"}),e.jsx("p",{children:"- cursor remote tunnel support for workspace access"}),e.jsx("p",{children:"- project-level configuration with pipeline definitions"}),e.jsx("p",{children:"- audit logging for all administrative actions"}),e.jsx("p",{children:"- cloudflare zero trust deployment support"}),e.jsx("p",{children:"- sqlite database with wal mode"}),e.jsx("p",{children:"- redis-backed task queue via bullmq"}),e.jsx("p",{children:"- comprehensive web dashboard with dark/light theme"})]})]})})]})}export{s as default};
@@ -1,4 +1,4 @@
1
- import{e as l,a as n,n as p,r as d,j as e,C as m}from"./index-C5ry7bCb.js";import{Q as x}from"./QuickAuth-8eT76fKz.js";import{P as u}from"./plus-DETa4kg0.js";import{C as v}from"./copy-BSpogfAn.js";const g=[{command:"ov setup",description:"quick setup — configure server connection and authenticate in one step",usage:"ov setup [--server <url>] [--token <token>]",flags:[{flag:"--server <url>",desc:"overlord server url"},{flag:"--token <token>",desc:"personal access token (skips prompt)"}],example:`ov setup
1
+ import{e as l,a as n,n as p,r as d,j as e,C as m}from"./index-uDLAla67.js";import{Q as x}from"./QuickAuth-C2UsxqX9.js";import{P as u}from"./plus-DnDLd-iP.js";import{C as v}from"./copy-CFKtBHG3.js";const g=[{command:"ov setup",description:"quick setup — configure server connection and authenticate in one step",usage:"ov setup [--server <url>] [--token <token>]",flags:[{flag:"--server <url>",desc:"overlord server url"},{flag:"--token <token>",desc:"personal access token (skips prompt)"}],example:`ov setup
2
2
  > Overlord server URL: http://localhost:9000
3
3
  > Personal Access Token: ov_pat_xxxxx
4
4
  ✓ Connected to http://localhost:9000
@@ -0,0 +1,34 @@
1
+ import{j as e}from"./index-uDLAla67.js";import{a as s}from"./DocsPrimitives-DS0DquzY.js";import"./copy-CFKtBHG3.js";function c(){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:"// architecture"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"deploy overlord on an ubuntu server (main server + worker) and additional machines (workers), exposed via cloudflare zero trust."}),e.jsx(s,{code:`internet
2
+ |
3
+ v
4
+ cloudflare zero trust (access + tunnel)
5
+ |
6
+ +-- overlord.yourdomain.com --> ubuntu server :9000 (overlord server)
7
+ | +-- worker 1 (local)
8
+ |
9
+ +-- (outbound only)
10
+ mac mini --> worker 2 (connects to server via tunnel)`})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// prerequisites"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs text-[var(--accent)]",children:"> on all machines:"}),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.jsx("span",{className:"text-[var(--accent)]",children:"git"})," ",">="," 2.20"]}),e.jsxs("li",{children:["— ai agent cli installed (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-2",children:[e.jsx("p",{className:"text-xs text-[var(--accent)]",children:"> ubuntu server only:"}),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:"redis"})]}),e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"systemd"})," (standard on ubuntu)"]})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// step 1: set up ubuntu server"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 1.1 install overlord"}),e.jsx(s,{code:`npm install -g @overlordai/cli @overlordai/server
11
+
12
+ 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 prerequisites"}),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 url (default: ",e.jsx("code",{className:"text-[var(--text-muted)]",children:"redis://localhost:6379/0"}),")"]}),e.jsx("li",{children:"4. initialize the sqlite database"}),e.jsx("li",{children:"5. create your admin account"})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 1.2 start the server"}),e.jsx(s,{code:`overlord start # start services (systemd / launchd)
13
+ overlord status # verify it's running
14
+ overlord doctor # 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 generates systemd user services automatically."]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// step 2: set up cloudflare zero trust"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"set up the tunnel before configuring workers — workers connect to the server via the public url."}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 2.1 create a tunnel"}),e.jsxs("ol",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsxs("li",{children:["1. ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"networks → tunnels → create a tunnel"})]}),e.jsxs("li",{children:["2. choose ",e.jsx("span",{className:"text-[var(--accent)]",children:"cloudflared"})," connector type"]}),e.jsxs("li",{children:["3. name: ",e.jsx("code",{className:"text-[var(--text-muted)]",children:"overlord"})]}),e.jsx("li",{children:"4. install and run the connector on your ubuntu server using the command provided by cloudflare"})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 2.2 configure public hostname"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"in the tunnel settings, add a public hostname:"}),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:"field"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"value"})]})}),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:"subdomain"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"overlord"})})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:"domain"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"yourdomain.com"})})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:"service type"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"HTTP"})})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2",children:"url"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"localhost:9000"})})]})]})]})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 2.3 configure access policy"}),e.jsxs("ol",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsxs("li",{children:["1. ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"access → applications → add application → self-hosted"}),", domain: ",e.jsx("code",{className:"text-[var(--text-muted)]",children:"overlord.yourdomain.com"})]}),e.jsxs("li",{children:["2. add policy: action ",e.jsx("span",{className:"text-[var(--accent)]",children:"allow"}),", include emails ending in ",e.jsx("code",{className:"text-[var(--text-muted)]",children:"@yourdomain.com"})]}),e.jsx("li",{children:"3. bypass api/websocket/webhook paths (these have their own auth):"})]}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-4",children:[e.jsxs("li",{children:["— path starts with ",e.jsx("code",{className:"text-[var(--accent)]",children:"/api/"})," (rest api — jwt auth)"]}),e.jsxs("li",{children:["— path starts with ",e.jsx("code",{className:"text-[var(--accent)]",children:"/ws/"})," (websocket — jwt auth)"]}),e.jsxs("li",{children:["— path starts with ",e.jsx("code",{className:"text-[var(--accent)]",children:"/webhook/"})," (bot webhooks — platform signature verification)"]})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// step 3: configure workers"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["each worker machine needs the ",e.jsx("code",{className:"text-[var(--accent)]",children:"@overlordai/cli"})," and ",e.jsx("code",{className:"text-[var(--accent)]",children:"@overlordai/worker"})," packages and a registration token (one per machine, generated in admin → settings → tokens)."]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> option a: cli setup wizard"}),e.jsx(s,{code:`npm install -g @overlordai/cli @overlordai/worker
15
+
16
+ overlord setup worker`}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["the wizard prompts for server url (use ",e.jsx("code",{className:"text-[var(--text-muted)]",children:"https://overlord.yourdomain.com"}),"), token, machine name, and max slots, then writes config and starts the service."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> option b: web ui guided setup"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["open ",e.jsx("code",{className:"text-[var(--accent)]",children:"https://overlord.yourdomain.com/workers/setup"})," in a browser and follow the step-by-step guide. it provides the exact commands to run on the worker machine."]})]}),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:"// each worker needs its own unique registration token. generate one per machine in admin → settings → tokens."})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// step 4: verify"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> browser"}),e.jsxs("ol",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsxs("li",{children:["1. go to ",e.jsx("code",{className:"text-[var(--text-muted)]",children:"https://overlord.yourdomain.com"})]}),e.jsx("li",{children:"2. log in with admin credentials"}),e.jsx("li",{children:'3. check machines page — both workers should show "online"'})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> developer cli"}),e.jsx(s,{code:`npm install -g @overlordai/developer-cli
17
+
18
+ ov setup --server https://overlord.yourdomain.com
19
+ ov whoami
20
+ ov worker list # should show ubuntu-server and mac-mini`})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> test task"}),e.jsx(s,{code:`ov task create -d "echo hello world" -p YOUR_PROJECT
21
+ ov attach <taskId>`})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// logging"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> viewing logs"}),e.jsx(s,{code:`# via overlord cli
22
+ overlord logs server # tail server logs
23
+ overlord logs worker # tail worker logs
24
+ overlord logs server -n 200 # show last 200 lines
25
+
26
+ # via systemd (linux)
27
+ journalctl --user-unit overlord-server -f
28
+ journalctl --user-unit overlord-worker --since today
29
+
30
+ # via launchd (macos)
31
+ tail -f ~/.overlord/logs/server.log`})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> log levels"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["set the ",e.jsx("code",{className:"text-[var(--accent)]",children:"LOG_LEVEL"})," environment variable in your ",e.jsx("code",{className:"text-[var(--accent)]",children:".env"})," file:"]}),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:"level"}),e.jsx("th",{className:"px-3 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:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"fatal"})}),e.jsx("td",{className:"px-3 py-2",children:"critical errors causing shutdown"})]}),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:"error"})}),e.jsx("td",{className:"px-3 py-2",children:"runtime errors"})]}),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:"warn"})}),e.jsx("td",{className:"px-3 py-2",children:"warnings"})]}),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:"info"})}),e.jsx("td",{className:"px-3 py-2",children:"general operational info (default)"})]}),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:"debug"})}),e.jsx("td",{className:"px-3 py-2",children:"detailed debugging info"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"trace"})}),e.jsx("td",{className:"px-3 py-2",children:"very verbose tracing"})]})]})]})})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// troubleshooting"}),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:"symptom"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"check"})]})}),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:'worker shows "offline"'}),e.jsxs("td",{className:"px-3 py-2",children:["check ",e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_HOST"})," and token in worker logs"]})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:"websocket disconnects"}),e.jsx("td",{className:"px-3 py-2",children:"cloudflare tunnel config — ensure no timeout on long-lived connections"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:'"not authenticated" on cli'}),e.jsxs("td",{className:"px-3 py-2",children:[e.jsx("code",{className:"text-[var(--accent)]",children:"ov login"})," again — token may have expired"]})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:"server won't start"}),e.jsxs("td",{className:"px-3 py-2",children:[e.jsx("code",{className:"text-[var(--accent)]",children:"overlord doctor"})," — checks redis, db, ports"]})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:"pty terminal blank"}),e.jsxs("td",{className:"px-3 py-2",children:["check worker has ",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"})," cli installed"]})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:"cloudflare 403"}),e.jsxs("td",{className:"px-3 py-2",children:["check access bypass rules for ",e.jsx("code",{className:"text-[var(--accent)]",children:"/api/*"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"/ws/*"}),", and ",e.jsx("code",{className:"text-[var(--accent)]",children:"/webhook/*"})]})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2",children:"service not starting"}),e.jsxs("td",{className:"px-3 py-2",children:[e.jsx("code",{className:"text-[var(--accent)]",children:"systemctl --user status overlord-server"})," — check for config errors"]})]})]})]})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// updating"}),e.jsx(s,{code:`npm update -g @overlordai/cli @overlordai/server
32
+
33
+ overlord restart server
34
+ overlord restart worker`})]})]})})}export{c as default};
@@ -0,0 +1,6 @@
1
+ import{j as e}from"./index-uDLAla67.js";import{a as s}from"./DocsPrimitives-DS0DquzY.js";import"./copy-CFKtBHG3.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:"// development workflow"}),e.jsx("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:"this guide is for contributing to overlord's source code. if you're looking to use overlord, see the getting started guide."})]}),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:"> prerequisites"}),e.jsxs("div",{className:"space-y-1 text-xs text-[var(--text-secondary)]",children:[e.jsx("p",{children:"- node.js >= 20"}),e.jsx("p",{children:"- pnpm >= 9"}),e.jsx("p",{children:"- redis (running locally)"}),e.jsx("p",{children:"- git >= 2.20"})]})]}),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:"> development setup"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"clone the repository and install dependencies:"}),e.jsx(s,{code:`git clone https://github.com/overlord-run/overlord.git
2
+ cd overlord
3
+ pnpm install`}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"build the shared protocol package and server:"}),e.jsx(s,{code:`pnpm --filter @overlordai/protocol build
4
+ pnpm --filter @overlordai/server build`})]}),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:"> seed test data"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"populate the database with sample developers, projects, and machines:"}),e.jsx(s,{code:"pnpm dev:seed"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"this creates the following test accounts:"}),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:"username"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"role"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"password"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"totp secret"})]})}),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:"admin"})}),e.jsx("td",{className:"py-2 pr-4",children:"admin"}),e.jsx("td",{className:"py-2 pr-4",children:"test-password-123"}),e.jsx("td",{className:"py-2",children:"JBSWY3DPEHPK3PXP"})]}),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:"alice"})}),e.jsx("td",{className:"py-2 pr-4",children:"lead"}),e.jsx("td",{className:"py-2 pr-4",children:"test-password-123"}),e.jsx("td",{className:"py-2",children:"JBSWY3DPEHPK3PXP"})]}),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:"bob"})}),e.jsx("td",{className:"py-2 pr-4",children:"developer"}),e.jsx("td",{className:"py-2 pr-4",children:"test-password-123"}),e.jsx("td",{className:"py-2",children:"JBSWY3DPEHPK3PXP"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"carol"})}),e.jsx("td",{className:"py-2 pr-4",children:"developer"}),e.jsx("td",{className:"py-2 pr-4",children:"test-password-123"}),e.jsx("td",{className:"py-2",children:"JBSWY3DPEHPK3PXP"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"use any totp authenticator app with the secret JBSWY3DPEHPK3PXP to generate 2fa codes for login."})]}),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:"> start development servers"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"open two terminals:"}),e.jsx(s,{code:`# terminal 1: start the backend server on port 9000
5
+ pnpm dev`}),e.jsx(s,{code:`# terminal 2: start the web dev server on port 5173
6
+ pnpm dev:web`}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"the vite dev server proxies /api/* and /ws/* requests to the backend server on port 9000. open http://localhost:5173 in your browser and log in with any of the seed credentials."})]}),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:"> npm scripts"}),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:"script"}),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:"pnpm dev"})}),e.jsx("td",{className:"py-2",children:"start the server"})]}),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:"pnpm dev:web"})}),e.jsx("td",{className:"py-2",children:"vite dev server (port 5173)"})]}),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:"pnpm dev:seed"})}),e.jsx("td",{className:"py-2",children:"seed test data"})]}),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:"pnpm build"})}),e.jsx("td",{className:"py-2",children:"build all packages"})]}),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:"pnpm test"})}),e.jsx("td",{className:"py-2",children:"run unit tests"})]}),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:"pnpm test:all"})}),e.jsx("td",{className:"py-2",children:"run all tests including playwright e2e"})]}),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:"pnpm test:coverage"})}),e.jsx("td",{className:"py-2",children:"run tests with v8 coverage reports"})]}),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:"pnpm lint"})}),e.jsx("td",{className:"py-2",children:"type-check all packages"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"pnpm publish:all"})}),e.jsx("td",{className:"py-2",children:"publish all packages to npm"})]})]})]})})]}),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:"> after protocol changes"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"whenever you modify types in packages/protocol, rebuild:"}),e.jsx(s,{code:"pnpm --filter @overlordai/protocol build"})]})]})]})}export{d as default};
@@ -1,4 +1,4 @@
1
- import{c as I,D as C,a as D,r as l,j as e,X as R,g as E,u as z,o as V,F as k}from"./index-C5ry7bCb.js";import{S as O}from"./Select-8MUED_Fj.js";import{v as q}from"./password-CHk45-jw.js";import{E as $}from"./EmptyState-C7-kuf8X.js";import{T as G}from"./Skeleton-B0x9oN6a.js";import{u as H}from"./useFetch-CKA2R0HW.js";import{c as L}from"./status-colors-C_xltR1x.js";import{P as B}from"./plus-DETa4kg0.js";import{U as J}from"./users-Cm06VaAm.js";import{P as K}from"./pencil-CkuHyqYU.js";import{R as Q}from"./rotate-ccw-oPqSTHU8.js";/**
1
+ import{c as I,D as C,a as D,r as l,j as e,X as R,g as E,u as z,o as V,J as k}from"./index-uDLAla67.js";import{S as O}from"./Select-BaCTjbpe.js";import{v as q}from"./password-CHk45-jw.js";import{E as $}from"./EmptyState-CF1knXIb.js";import{T as G}from"./Skeleton-wnwOeI39.js";import{u as H}from"./useFetch-DPbqlqsl.js";import{c as L}from"./status-colors-BcGt1oBU.js";import{P as J}from"./plus-DnDLd-iP.js";import{U as B}from"./users-DFQbCvYm.js";import{P as K}from"./pencil-CrcM0dgK.js";import{R as Q}from"./rotate-ccw-BS27hgv2.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -13,4 +13,4 @@ import{c as I,D as C,a as D,r as l,j as e,X as R,g as E,u as z,o as V,F as k}fro
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const Z=I("UserX",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]),F=Object.values(C).map(a=>({value:a,label:a}));function ee({isOpen:a,onClose:s,onCreated:n}){const{t:o}=D(),[r,i]=l.useState(""),[x,u]=l.useState(""),[m,b]=l.useState(""),[d,f]=l.useState(""),[h,y]=l.useState("developer"),[j,t]=l.useState(!1),[g,v]=l.useState("");function X(){i(""),u(""),b(""),f(""),y("developer"),v("")}function N(){X(),s()}async function U(){if(v(""),!r.trim()||!x.trim()||!m.trim()||!d.trim()){v(o("admin.all_fields_required"));return}const p=q(d);if(p){v(o(p));return}try{t(!0),await E.post("admin/developers",{json:{name:r.trim(),gitName:x.trim(),gitEmail:m.trim(),password:d,role:h}}).json(),N(),n()}catch(w){const c=w instanceof Error?w.message:o("admin.failed_to_create_developer");v(c)}finally{t(!1)}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:N}),e.jsxs("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// ",o("admin.create_developer_title")]}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:N,children:e.jsx(R,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[g&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:g}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("common.name")}),e.jsx("input",{type:"text",placeholder:"e.g. jdoe",value:r,onChange:p=>i(p.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("profile.git_name")}),e.jsx("input",{type:"text",placeholder:"e.g. John Doe",value:x,onChange:p=>u(p.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("profile.git_email")}),e.jsx("input",{type:"email",placeholder:"e.g. john@example.com",value:m,onChange:p=>b(p.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("auth.password")}),e.jsx("input",{type:"password",placeholder:"10-20 chars, letters + digits + special",value:d,onChange:p=>f(p.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:o("admin.password_hint")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("common.role")}),e.jsx(O,{value:h,onChange:y,options:F})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:N,children:o("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity disabled:opacity-50",disabled:j,onClick:U,children:o(j?"common.creating":"common.create")})]})]})]}):null}function te({isOpen:a,developer:s,onClose:n,onUpdated:o}){var p,w;const{t:r}=D(),i=z(c=>c.user),[x,u]=l.useState(s.name),[m,b]=l.useState(s.role),[d,f]=l.useState(((p=s.platformUids)==null?void 0:p.lark)??""),[h,y]=l.useState(((w=s.platformUids)==null?void 0:w.slack)??""),[j,t]=l.useState(!1),[g,v]=l.useState(""),N=s.id===(i==null?void 0:i.id)&&s.role===C.ADMIN&&m!==C.ADMIN;l.useEffect(()=>{var c,_;u(s.name),b(s.role),f(((c=s.platformUids)==null?void 0:c.lark)??""),y(((_=s.platformUids)==null?void 0:_.slack)??""),v("")},[s]);async function U(){var c,_;if(v(""),!x.trim()){v(r("admin.display_name_required"));return}N&&v(r("admin.demote_self_warning"));try{t(!0);const S={name:x.trim(),role:m},A=((c=s.platformUids)==null?void 0:c.lark)??"",P=((_=s.platformUids)==null?void 0:_.slack)??"";if(d.trim()!==A||h.trim()!==P){const T={};T.lark=d.trim(),T.slack=h.trim(),S.platformUids=T}await E.put(`admin/developers/${s.id}`,{json:S}).json(),n(),o()}catch(S){const A=S instanceof Error?S.message:r("admin.failed_to_update_developer");v(A)}finally{t(!1)}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:n}),e.jsxs("div",{className:"relative z-10 mx-2 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// ",r("admin.edit_developer_title")]}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:e.jsx(R,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[g&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:g}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("common.name")}),e.jsx("input",{type:"text",value:s.name,readOnly:!0,disabled:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-muted)] opacity-60"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("admin.display_name")}),e.jsx("input",{type:"text",value:x,onChange:c=>u(c.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("common.role")}),e.jsx(O,{value:m,onChange:b,options:F}),N&&e.jsx("div",{className:"mt-2 rounded-[4px] border border-[var(--warning)] bg-[var(--warning)]/10 px-3 py-2 text-xs text-[var(--warning)]",children:r("admin.demote_self_inline_warning")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("admin.platform_accounts")}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-muted)]",children:r("admin.lark_uid")}),e.jsx("input",{type:"text",value:d,onChange:c=>f(c.target.value),placeholder:"ou_xxxxxxxxxx",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-muted)]",children:r("admin.slack_uid")}),e.jsx("input",{type:"text",value:h,onChange:c=>y(c.target.value),placeholder:"U0XXXXXXXXX",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})]})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:r("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity disabled:opacity-50",disabled:j,onClick:U,children:r(j?"common.saving":"common.save_changes")})]})]})]}):null}function ae({isOpen:a,developer:s,onClose:n,onConfirmed:o}){const{t:r}=D(),[i,x]=l.useState(!1),[u,m]=l.useState("");async function b(){m("");try{x(!0),await E.put(`admin/developers/${s.id}/reset-totp`),n(),o()}catch(d){const f=d instanceof Error?d.message:r("admin.failed_to_reset_2fa");m(f)}finally{x(!1)}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:n}),e.jsxs("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{className:"h-4 w-4 text-yellow-400"}),e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// ",r("admin.reset_2fa")]})]}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:e.jsx(R,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-3 px-5 py-5",children:[u&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:u}),e.jsxs("p",{className:"text-xs text-[var(--text-primary)]",children:[r("admin.reset_2fa_confirm_message")," ",e.jsx("span",{className:"text-[var(--accent)]",children:s.name}),"?"]}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("admin.reset_2fa_audit_note")})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:r("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-yellow-600 px-3 py-1.5 text-xs text-white hover:opacity-90 transition-opacity disabled:opacity-50",disabled:i,onClick:b,children:r(i?"admin.resetting":"admin.reset_2fa")})]})]})]}):null}function M({dev:a,currentUserId:s,onEdit:n,onReset2fa:o,onToggleStatus:r}){const{t:i}=D();return e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-white/[0.05] transition-colors",title:i("common.edit"),onClick:()=>n(a),children:e.jsx(K,{className:"h-3.5 w-3.5"})}),a.id!==s&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-white/[0.05] transition-colors",title:i("admin.reset_2fa"),onClick:()=>o(a),children:e.jsx(Q,{className:"h-3.5 w-3.5"})}),e.jsx("button",{type:"button",className:`rounded-[4px] p-2.5 md:p-1.5 transition-colors hover:bg-white/[0.05] ${a.status===k.ACTIVE?"text-red-400 hover:text-red-300":"text-green-400 hover:text-green-300"}`,title:a.status===k.ACTIVE?i("admin.deactivate"):i("admin.activate"),onClick:()=>r(a),children:a.status===k.ACTIVE?e.jsx(Z,{className:"h-3.5 w-3.5"}):e.jsx(Y,{className:"h-3.5 w-3.5"})})]})]})}function ue(){const{t:a}=D(),s=z(t=>t.user),[n,o]=l.useState(""),[r,i]=l.useState(!1),[x,u]=l.useState(null),[m,b]=l.useState(null),{data:d,loading:f,refetch:h}=H(()=>{const t={};return n&&(t.q=n),E.get("admin/developers",{searchParams:t}).json()},[n]);async function y(t){const g=t.status===k.ACTIVE?k.DISABLED:k.ACTIVE;try{await E.put(`admin/developers/${t.id}`,{json:{status:g}}),h()}catch{}}function j(t){switch(t){case C.ADMIN:return"text-yellow-400";case C.DEVELOPER:return"text-blue-400";default:return"text-[var(--text-secondary)]"}}return e.jsxs("div",{className:"font-mono",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("admin.developers_title")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("admin.developers_subtitle")})]}),e.jsxs("button",{type:"button",className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity",onClick:()=>i(!0),children:[e.jsx(B,{className:"h-3.5 w-3.5"}),a("admin.create_developer")]})]}),e.jsx("div",{className:"mb-4",children:e.jsxs("div",{className:"relative w-full max-w-xs",children:[e.jsx(V,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[var(--text-muted)]"}),e.jsx("input",{type:"text",placeholder:a("admin.search_developers"),value:n,onChange:t=>o(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] py-1.5 pl-8 pr-3 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})}),f?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(G,{rows:4})}):!d||d.length===0?e.jsx($,{icon:J,title:a(n?"admin.no_matching_developers":"admin.no_developers_found"),description:a(n?"admin.try_adjusting_search":"admin.create_first_developer"),actionLabel:n?void 0:a("admin.create_developer"),onAction:n?void 0:()=>i(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-left text-[var(--text-muted)]",children:[e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.dev_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.display_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.role")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.status")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.totp")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("common.created_at")}),e.jsx("th",{className:"pb-2 font-normal",children:a("common.actions")})]})}),e.jsx("tbody",{children:d.map(t=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-primary)]",children:t.name}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:t.gitName}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:j(t.role),children:t.role})}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:L(t.status),children:t.status})}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:t.totpEnabled?"text-green-400":"text-[var(--text-muted)]",children:t.totpEnabled?a("common.enabled"):a("common.disabled")})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-muted)]",children:new Date(t.createdAt).toLocaleDateString()}),e.jsx("td",{className:"py-2.5",children:e.jsx(M,{dev:t,currentUserId:s==null?void 0:s.id,onEdit:u,onReset2fa:b,onToggleStatus:y})})]},t.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3",children:d.map(t=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)] font-medium",children:t.name}),e.jsx(M,{dev:t,currentUserId:s==null?void 0:s.id,onEdit:u,onReset2fa:b,onToggleStatus:y})]}),e.jsx("div",{className:"text-[11px] text-[var(--text-secondary)] mb-1",children:t.gitName}),e.jsxs("div",{className:"flex items-center gap-3 text-[11px]",children:[e.jsx("span",{className:j(t.role),children:t.role}),e.jsx("span",{className:L(t.status),children:t.status}),e.jsx("span",{className:t.totpEnabled?"text-green-400":"text-[var(--text-muted)]",children:t.totpEnabled?a("common.enabled"):a("common.disabled")})]})]},t.id))})]}),e.jsx(ee,{isOpen:r,onClose:()=>i(!1),onCreated:h}),x&&e.jsx(te,{isOpen:!!x,developer:x,onClose:()=>u(null),onUpdated:h}),m&&e.jsx(ae,{isOpen:!!m,developer:m,onClose:()=>b(null),onConfirmed:h})]})}export{ue as default};
16
+ */const Z=I("UserX",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]),P=Object.values(C).map(a=>({value:a,label:a}));function ee({isOpen:a,onClose:s,onCreated:n}){const{t:o}=D(),[r,i]=l.useState(""),[x,u]=l.useState(""),[m,b]=l.useState(""),[d,f]=l.useState(""),[h,y]=l.useState("developer"),[j,t]=l.useState(!1),[g,v]=l.useState("");function X(){i(""),u(""),b(""),f(""),y("developer"),v("")}function N(){X(),s()}async function U(){if(v(""),!r.trim()||!x.trim()||!m.trim()||!d.trim()){v(o("admin.all_fields_required"));return}const p=q(d);if(p){v(o(p));return}try{t(!0),await E.post("admin/developers",{json:{name:r.trim(),gitName:x.trim(),gitEmail:m.trim(),password:d,role:h}}).json(),N(),n()}catch(w){const c=w instanceof Error?w.message:o("admin.failed_to_create_developer");v(c)}finally{t(!1)}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:N}),e.jsxs("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// ",o("admin.create_developer_title")]}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:N,children:e.jsx(R,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[g&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:g}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("common.name")}),e.jsx("input",{type:"text",placeholder:"e.g. jdoe",value:r,onChange:p=>i(p.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("profile.git_name")}),e.jsx("input",{type:"text",placeholder:"e.g. John Doe",value:x,onChange:p=>u(p.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("profile.git_email")}),e.jsx("input",{type:"email",placeholder:"e.g. john@example.com",value:m,onChange:p=>b(p.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("auth.password")}),e.jsx("input",{type:"password",placeholder:"10-20 chars, letters + digits + special",value:d,onChange:p=>f(p.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:o("admin.password_hint")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:o("common.role")}),e.jsx(O,{value:h,onChange:y,options:P})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:N,children:o("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity disabled:opacity-50",disabled:j,onClick:U,children:o(j?"common.creating":"common.create")})]})]})]}):null}function te({isOpen:a,developer:s,onClose:n,onUpdated:o}){var p,w;const{t:r}=D(),i=z(c=>c.user),[x,u]=l.useState(s.name),[m,b]=l.useState(s.role),[d,f]=l.useState(((p=s.platformUids)==null?void 0:p.lark)??""),[h,y]=l.useState(((w=s.platformUids)==null?void 0:w.slack)??""),[j,t]=l.useState(!1),[g,v]=l.useState(""),N=s.id===(i==null?void 0:i.id)&&s.role===C.ADMIN&&m!==C.ADMIN;l.useEffect(()=>{var c,_;u(s.name),b(s.role),f(((c=s.platformUids)==null?void 0:c.lark)??""),y(((_=s.platformUids)==null?void 0:_.slack)??""),v("")},[s]);async function U(){var c,_;if(v(""),!x.trim()){v(r("admin.display_name_required"));return}N&&v(r("admin.demote_self_warning"));try{t(!0);const S={name:x.trim(),role:m},A=((c=s.platformUids)==null?void 0:c.lark)??"",F=((_=s.platformUids)==null?void 0:_.slack)??"";if(d.trim()!==A||h.trim()!==F){const T={};T.lark=d.trim(),T.slack=h.trim(),S.platformUids=T}await E.put(`admin/developers/${s.id}`,{json:S}).json(),n(),o()}catch(S){const A=S instanceof Error?S.message:r("admin.failed_to_update_developer");v(A)}finally{t(!1)}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:n}),e.jsxs("div",{className:"relative z-10 mx-2 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// ",r("admin.edit_developer_title")]}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:e.jsx(R,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[g&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:g}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("common.name")}),e.jsx("input",{type:"text",value:s.name,readOnly:!0,disabled:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-muted)] opacity-60"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("admin.display_name")}),e.jsx("input",{type:"text",value:x,onChange:c=>u(c.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("common.role")}),e.jsx(O,{value:m,onChange:b,options:P}),N&&e.jsx("div",{className:"mt-2 rounded-[4px] border border-[var(--warning)] bg-[var(--warning)]/10 px-3 py-2 text-xs text-[var(--warning)]",children:r("admin.demote_self_inline_warning")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("admin.platform_accounts")}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-muted)]",children:r("admin.lark_uid")}),e.jsx("input",{type:"text",value:d,onChange:c=>f(c.target.value),placeholder:"ou_xxxxxxxxxx",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-muted)]",children:r("admin.slack_uid")}),e.jsx("input",{type:"text",value:h,onChange:c=>y(c.target.value),placeholder:"U0XXXXXXXXX",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})]})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:r("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity disabled:opacity-50",disabled:j,onClick:U,children:r(j?"common.saving":"common.save_changes")})]})]})]}):null}function ae({isOpen:a,developer:s,onClose:n,onConfirmed:o}){const{t:r}=D(),[i,x]=l.useState(!1),[u,m]=l.useState("");async function b(){m("");try{x(!0),await E.put(`admin/developers/${s.id}/reset-totp`),n(),o()}catch(d){const f=d instanceof Error?d.message:r("admin.failed_to_reset_2fa");m(f)}finally{x(!1)}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:n}),e.jsxs("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{className:"h-4 w-4 text-yellow-400"}),e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// ",r("admin.reset_2fa")]})]}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:e.jsx(R,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-3 px-5 py-5",children:[u&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:u}),e.jsxs("p",{className:"text-xs text-[var(--text-primary)]",children:[r("admin.reset_2fa_confirm_message")," ",e.jsx("span",{className:"text-[var(--accent)]",children:s.name}),"?"]}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("admin.reset_2fa_audit_note")})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:r("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-yellow-600 px-3 py-1.5 text-xs text-white hover:opacity-90 transition-opacity disabled:opacity-50",disabled:i,onClick:b,children:r(i?"admin.resetting":"admin.reset_2fa")})]})]})]}):null}function M({dev:a,currentUserId:s,onEdit:n,onReset2fa:o,onToggleStatus:r}){const{t:i}=D();return e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-white/[0.05] transition-colors",title:i("common.edit"),onClick:()=>n(a),children:e.jsx(K,{className:"h-3.5 w-3.5"})}),a.id!==s&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-white/[0.05] transition-colors",title:i("admin.reset_2fa"),onClick:()=>o(a),children:e.jsx(Q,{className:"h-3.5 w-3.5"})}),e.jsx("button",{type:"button",className:`rounded-[4px] p-2.5 md:p-1.5 transition-colors hover:bg-white/[0.05] ${a.status===k.ACTIVE?"text-red-400 hover:text-red-300":"text-green-400 hover:text-green-300"}`,title:a.status===k.ACTIVE?i("admin.deactivate"):i("admin.activate"),onClick:()=>r(a),children:a.status===k.ACTIVE?e.jsx(Z,{className:"h-3.5 w-3.5"}):e.jsx(Y,{className:"h-3.5 w-3.5"})})]})]})}function ue(){const{t:a}=D(),s=z(t=>t.user),[n,o]=l.useState(""),[r,i]=l.useState(!1),[x,u]=l.useState(null),[m,b]=l.useState(null),{data:d,loading:f,refetch:h}=H(()=>{const t={};return n&&(t.q=n),E.get("admin/developers",{searchParams:t}).json()},[n]);async function y(t){const g=t.status===k.ACTIVE?k.DISABLED:k.ACTIVE;try{await E.put(`admin/developers/${t.id}`,{json:{status:g}}),h()}catch{}}function j(t){switch(t){case C.ADMIN:return"text-yellow-400";case C.DEVELOPER:return"text-blue-400";default:return"text-[var(--text-secondary)]"}}return e.jsxs("div",{className:"font-mono",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("admin.developers_title")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("admin.developers_subtitle")})]}),e.jsxs("button",{type:"button",className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity",onClick:()=>i(!0),children:[e.jsx(J,{className:"h-3.5 w-3.5"}),a("admin.create_developer")]})]}),e.jsx("div",{className:"mb-4",children:e.jsxs("div",{className:"relative w-full max-w-xs",children:[e.jsx(V,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[var(--text-muted)]"}),e.jsx("input",{type:"text",placeholder:a("admin.search_developers"),value:n,onChange:t=>o(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] py-1.5 pl-8 pr-3 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})}),f?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(G,{rows:4})}):!d||d.length===0?e.jsx($,{icon:B,title:a(n?"admin.no_matching_developers":"admin.no_developers_found"),description:a(n?"admin.try_adjusting_search":"admin.create_first_developer"),actionLabel:n?void 0:a("admin.create_developer"),onAction:n?void 0:()=>i(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-left text-[var(--text-muted)]",children:[e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.dev_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.display_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.role")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.status")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.totp")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("common.created_at")}),e.jsx("th",{className:"pb-2 font-normal",children:a("common.actions")})]})}),e.jsx("tbody",{children:d.map(t=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-primary)]",children:t.name}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:t.gitName}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:j(t.role),children:t.role})}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:L(t.status),children:t.status})}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:t.totpEnabled?"text-green-400":"text-[var(--text-muted)]",children:t.totpEnabled?a("common.enabled"):a("common.disabled")})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-muted)]",children:new Date(t.createdAt).toLocaleDateString()}),e.jsx("td",{className:"py-2.5",children:e.jsx(M,{dev:t,currentUserId:s==null?void 0:s.id,onEdit:u,onReset2fa:b,onToggleStatus:y})})]},t.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3",children:d.map(t=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)] font-medium",children:t.name}),e.jsx(M,{dev:t,currentUserId:s==null?void 0:s.id,onEdit:u,onReset2fa:b,onToggleStatus:y})]}),e.jsx("div",{className:"text-[11px] text-[var(--text-secondary)] mb-1",children:t.gitName}),e.jsxs("div",{className:"flex items-center gap-3 text-[11px]",children:[e.jsx("span",{className:j(t.role),children:t.role}),e.jsx("span",{className:L(t.status),children:t.status}),e.jsx("span",{className:t.totpEnabled?"text-green-400":"text-[var(--text-muted)]",children:t.totpEnabled?a("common.enabled"):a("common.disabled")})]})]},t.id))})]}),e.jsx(ee,{isOpen:r,onClose:()=>i(!1),onCreated:h}),x&&e.jsx(te,{isOpen:!!x,developer:x,onClose:()=>u(null),onUpdated:h}),m&&e.jsx(ae,{isOpen:!!m,developer:m,onClose:()=>b(null),onConfirmed:h})]})}export{ue as default};
@@ -0,0 +1,4 @@
1
+ import{j as e}from"./index-uDLAla67.js";import{I as s,a as t}from"./DocsPrimitives-DS0DquzY.js";import"./copy-CFKtBHG3.js";function l(){return e.jsx("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// overview"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["the ",e.jsx("code",{className:"text-[var(--accent)]",children:"ov"})," cli is the developer-facing command-line tool for interacting with overlord. install it on your laptop or workstation to create tasks, attach to running sessions, and monitor progress from your terminal."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// installation"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"install the developer cli globally:"}),e.jsx(s,{code:"npm install -g @overlordai/developer-cli"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// connect to your server"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"authenticate with your overlord server using a personal access token:"}),e.jsx(s,{code:"ov login https://overlord.yourdomain.com"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["you'll be prompted for a personal access token (pat). generate one in the web dashboard under ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"profile → access tokens"}),"."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"alternatively, use the one-step setup wizard:"}),e.jsx(s,{code:"ov setup"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"this prompts for both the server url and token interactively."})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// verify"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"confirm your connection is working:"}),e.jsx(s,{code:"ov whoami"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"should display your username and role."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// quick start"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> create a task"}),e.jsx(s,{code:'ov task create -d "fix the login bug" -p my-project'})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> watch a running task"}),e.jsx(t,{code:`ov attach <task_id>
2
+
3
+ # use --watch for read-only mode
4
+ # use --takeover to take control of the terminal`})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> list tasks"}),e.jsx(s,{code:"ov task list --status RUNNING"})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// next steps"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"developer cli reference"})," — full command reference for the ov cli"]}),e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"development workflow"})," — end-to-end guide for creating and managing tasks"]})]})]})]})})}export{l as default};
@@ -0,0 +1,41 @@
1
+ import{c as t,a as i,r as h,j as e,O as m,X as y,S as v,b,d as k,I as u}from"./index-uDLAla67.js";import{D as f}from"./download-CTnOMUpx.js";import{B as g}from"./bot-D9xi44vN.js";import{M as j}from"./message-square-CqYt8K2i.js";import{G as w,W as M}from"./workflow-DTNRYvFx.js";import{S as N}from"./settings-pymAAKeG.js";/**
2
+ * @license lucide-react v0.469.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const z=t("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
7
+ * @license lucide-react v0.469.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const l=t("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
12
+ * @license lucide-react v0.469.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const _=t("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
17
+ * @license lucide-react v0.469.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const S=t("Laptop",[["path",{d:"M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16",key:"tarvll"}]]);/**
22
+ * @license lucide-react v0.469.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const H=t("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
27
+ * @license lucide-react v0.469.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const L=t("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
32
+ * @license lucide-react v0.469.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const C=t("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
37
+ * @license lucide-react v0.469.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const q=t("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),A=[{category:"getting_started",items:[{to:"/docs/installation",label:"installation",icon:f},{to:"/docs/developer-setup",label:"developer_setup",icon:l},{to:"/docs/worker-setup",label:"worker_setup",icon:v},{to:"/docs/bot-setup",label:"bot_setup",icon:g}]},{category:"guides",items:[{to:"/docs/local-development",label:"local_dev",icon:S},{to:"/docs/worker-operations",label:"worker_ops",icon:z},{to:"/docs/deployment",label:"deployment",icon:C},{to:"/docs/bot-integration",label:"bot_integration",icon:j},{to:"/docs/pipeline-config",label:"pipeline",icon:w},{to:"/docs/dev-workflow",label:"dev_workflow",icon:M}]},{category:"reference",items:[{to:"/docs/cli",label:"cli",icon:b},{to:"/docs/api",label:"api",icon:l},{to:"/docs/skill",label:"skill",icon:q},{to:"/docs/permissions",label:"permissions",icon:k},{to:"/docs/env-variables",label:"env_vars",icon:N}]},{category:"other",items:[{to:"/docs/architecture",label:"architecture",icon:L},{to:"/docs/changelog",label:"changelog",icon:_}]}];function c({onNavClick:a}){const{t:s}=i();return e.jsx("nav",{className:"flex flex-col gap-4 py-4 px-3",children:A.map(({category:o,items:n})=>e.jsxs("div",{children:[e.jsx("div",{className:"mb-1.5 px-2 text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-muted)"},children:s(`docs.docs_nav_${o}`)}),e.jsx("div",{className:"flex flex-col gap-0.5",children:n.map(({to:r,label:d,icon:p})=>e.jsxs(u,{to:r,onClick:a,className:({isActive:x})=>`flex items-center gap-2 rounded-[4px] px-2 py-1.5 text-xs lowercase transition-colors ${x?"bg-[var(--accent)]/10 text-[var(--accent)]":"text-[var(--text-secondary)] hover:bg-[var(--accent)]/5 hover:text-[var(--text-primary)]"}`,children:[e.jsx(p,{size:14,style:{flexShrink:0}}),e.jsx("span",{children:s(`docs.docs_${d}`)})]},r))})]},o))})}function W(){const{t:a}=i(),[s,o]=h.useState(!1);return e.jsxs("div",{className:"flex h-full",children:[e.jsx("aside",{className:"hidden md:flex flex-col border-r border-[var(--border)] overflow-y-auto",style:{width:224,minWidth:224,backgroundColor:"var(--bg-card)"},children:e.jsx(c,{})}),e.jsxs("main",{className:"flex-1 overflow-auto p-6",children:[e.jsxs("button",{type:"button",onClick:()=>o(!0),className:"md:hidden mb-4 flex items-center gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2 text-xs lowercase text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)] sticky top-0 z-10",children:[e.jsx(H,{size:14}),a("docs.docs_menu")]}),e.jsx(m,{})]}),s&&e.jsxs("div",{className:"md:hidden fixed inset-0 z-50 flex",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:()=>o(!1)}),e.jsxs("div",{className:"relative flex flex-col overflow-y-auto",style:{width:260,backgroundColor:"var(--bg-card)"},children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[e.jsx("span",{className:"text-sm font-semibold lowercase text-[var(--text-primary)]",children:a("docs.docs_menu")}),e.jsx("button",{type:"button",onClick:()=>o(!1),className:"p-1 text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]",children:e.jsx(y,{size:16})})]}),e.jsx(c,{onNavClick:()=>o(!1)})]})]})]})}export{W as default};
@@ -0,0 +1 @@
1
+ import{j as e,a as i,r as s,C as x}from"./index-uDLAla67.js";import{C as p}from"./copy-CFKtBHG3.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{v as me,e as be,a as ve,r as s,G as j,A as p,g as i,j as e,L as je,P as ee,t as c}from"./index-C5ry7bCb.js";import{S as te}from"./Select-8MUED_Fj.js";import{U as ge,A as he,R as ye}from"./RemoveMemberConfirmDialog-Ctyx8n2a.js";import{P as fe}from"./plus-DETa4kg0.js";function we(){const{key:n}=me(),l=be(),{t:r}=ve(),[o,re]=s.useState(null),[g,se]=s.useState([]),[ae,oe]=s.useState(!0),[w,h]=s.useState(!1),[y,S]=s.useState(""),[f,T]=s.useState(""),[M,I]=s.useState(""),[A,P]=s.useState(j.GITHUB),[R,U]=s.useState(""),[O,G]=s.useState(p.CLAUDE),[E,$]=s.useState(""),[D,L]=s.useState("50"),[B,F]=s.useState(""),[J,q]=s.useState(""),[z,H]=s.useState(""),[K,W]=s.useState("0"),[x,N]=s.useState(""),[X,k]=s.useState(null),[u,_]=s.useState(""),[Q,m]=s.useState(!1),[ne,V]=s.useState(!1),[d,C]=s.useState(null),[le,Y]=s.useState(!1),b=s.useCallback(async()=>{if(n)try{const[t,v]=await Promise.all([i.get(`web/projects/${n}`).json(),i.get(`web/projects/${n}/members`).json().catch(()=>[])]);if(re(t),se(v),k(t.gitTokenMasked??null),S(t.name),T(t.repoUrl),I(t.sshUrl??""),P(t.gitPlatform),U(t.defaultBranch),G(t.agentType),$(t.agentCommand??""),L(String(t.maxTurns)),F(t.workspaceRoot??""),q(t.setupCommands??""),H(t.testCommand??""),W(String(t.ptyOutputFilter??0)),t.pipeline)try{N(JSON.stringify(JSON.parse(t.pipeline),null,2))}catch{N(t.pipeline)}}catch{}finally{oe(!1)}},[n]);s.useEffect(()=>{b()},[b]);async function ce(t){if(t.preventDefault(),!o)return;h(!0);let v=null;if(x.trim())try{JSON.parse(x),v=x.trim()}catch{c.error(r("projects.invalid_pipeline_json")),h(!1);return}try{await i.put(`web/projects/${o.key}`,{json:{name:y,repoUrl:f,sshUrl:M||null,defaultBranch:R,gitPlatform:A,agentType:O,agentCommand:E||null,maxTurns:parseInt(D,10)||50,workspaceRoot:B||null,setupCommands:J||null,testCommand:z||null,ptyOutputFilter:parseInt(K,10)||0,pipeline:v}}),c.success(r("projects.project_saved")),l(`/projects/${o.key}`)}catch(Z){const ue=Z instanceof Error?Z.message:r("projects.failed_to_save_project");c.error(ue)}finally{h(!1)}}function de(){l(`/projects/${n}`)}async function ie(){if(!(!o||!u.trim())){m(!0);try{const t=await i.put(`web/projects/${o.key}/git-token`,{json:{token:u.trim()}}).json();k(t.gitTokenMasked),_(""),c.success(r("projects.git_token_saved"))}catch{c.error(r("projects.git_token_failed"))}finally{m(!1)}}}async function pe(){if(o){m(!0);try{await i.delete(`web/projects/${o.key}/git-token`),k(null),_(""),c.success(r("projects.git_token_cleared"))}catch{c.error(r("projects.git_token_failed"))}finally{m(!1)}}}async function xe(){if(!(!o||!d)){Y(!0);try{await i.delete(`web/projects/${o.key}/members`,{searchParams:{developerId:String(d.developerId)}}),await b()}catch{}finally{Y(!1),C(null)}}}return ae?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})}):o?e.jsxs("form",{onSubmit:ce,className:"mx-auto max-w-6xl px-4 md:px-6 py-8",children:[e.jsxs("div",{className:"mb-2 text-xs text-[var(--text-muted)]",children:[e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l("/projects"),children:r("projects.title")})," / ",e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l(`/projects/${o.key}`),children:o.key})," / ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:r("common.edit")})]}),e.jsx("h1",{className:"text-lg font-bold text-[var(--text-primary)] mb-4",children:r("projects.edit_project_title")}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_400px]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.basic_info")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.key"),children:e.jsx("input",{type:"text",value:o.key,readOnly:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-muted)] outline-none opacity-60 cursor-not-allowed"})}),e.jsx(a,{label:r("projects.name"),children:e.jsx("input",{type:"text",value:y,onChange:t=>S(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.repo_url"),children:e.jsx("input",{type:"text",value:f,onChange:t=>T(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsxs(a,{label:r("projects.ssh_url"),children:[e.jsx("input",{type:"text",value:M,onChange:t=>I(t.target.value),placeholder:r("projects.ssh_url_placeholder"),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:r("projects.ssh_url_hint")})]}),e.jsx(a,{label:r("projects.git_platform"),children:e.jsx(te,{value:A,onChange:t=>P(t),options:[{value:j.GITHUB,label:r("projects.github")},{value:j.GITLAB,label:r("projects.gitlab")},{value:j.GITEA,label:r("projects.gitea")}]})}),e.jsx(a,{label:r("projects.default_branch"),children:e.jsx("input",{type:"text",value:R,onChange:t=>U(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.agent_config")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.agent_type"),children:e.jsx(te,{value:O,onChange:t=>G(t),options:[{value:p.CLAUDE,label:r("projects.claude")},{value:p.CURSOR,label:r("projects.cursor")},{value:p.CODEX,label:r("projects.codex")},{value:p.CUSTOM,label:r("projects.custom")}]})}),e.jsx(a,{label:r("projects.agent_command"),children:e.jsx("input",{type:"text",value:E,onChange:t=>$(t.target.value),placeholder:"custom agent command",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.max_turns"),children:e.jsx("input",{type:"number",value:D,onChange:t=>L(t.target.value),min:1,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.workspace_root"),children:e.jsx("input",{type:"text",value:B,onChange:t=>F(t.target.value),placeholder:"/path/to/workspace",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.environment")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.setup_commands"),children:e.jsx("textarea",{value:J,onChange:t=>q(t.target.value),rows:3,placeholder:`npm install
1
+ import{v as me,e as be,a as ve,r as s,G as j,A as p,g as i,j as e,L as je,y as ee,t as c}from"./index-uDLAla67.js";import{S as te}from"./Select-BaCTjbpe.js";import{U as ge,A as he,R as ye}from"./RemoveMemberConfirmDialog-BX3zkPVv.js";import{P as fe}from"./plus-DnDLd-iP.js";function we(){const{key:n}=me(),l=be(),{t:r}=ve(),[o,re]=s.useState(null),[g,se]=s.useState([]),[ae,oe]=s.useState(!0),[w,h]=s.useState(!1),[y,S]=s.useState(""),[f,T]=s.useState(""),[M,I]=s.useState(""),[A,R]=s.useState(j.GITHUB),[P,U]=s.useState(""),[O,G]=s.useState(p.CLAUDE),[E,$]=s.useState(""),[D,L]=s.useState("50"),[B,F]=s.useState(""),[J,q]=s.useState(""),[z,H]=s.useState(""),[K,W]=s.useState("0"),[x,N]=s.useState(""),[X,k]=s.useState(null),[u,_]=s.useState(""),[Q,m]=s.useState(!1),[ne,V]=s.useState(!1),[d,C]=s.useState(null),[le,Y]=s.useState(!1),b=s.useCallback(async()=>{if(n)try{const[t,v]=await Promise.all([i.get(`web/projects/${n}`).json(),i.get(`web/projects/${n}/members`).json().catch(()=>[])]);if(re(t),se(v),k(t.gitTokenMasked??null),S(t.name),T(t.repoUrl),I(t.sshUrl??""),R(t.gitPlatform),U(t.defaultBranch),G(t.agentType),$(t.agentCommand??""),L(String(t.maxTurns)),F(t.workspaceRoot??""),q(t.setupCommands??""),H(t.testCommand??""),W(String(t.ptyOutputFilter??0)),t.pipeline)try{N(JSON.stringify(JSON.parse(t.pipeline),null,2))}catch{N(t.pipeline)}}catch{}finally{oe(!1)}},[n]);s.useEffect(()=>{b()},[b]);async function ce(t){if(t.preventDefault(),!o)return;h(!0);let v=null;if(x.trim())try{JSON.parse(x),v=x.trim()}catch{c.error(r("projects.invalid_pipeline_json")),h(!1);return}try{await i.put(`web/projects/${o.key}`,{json:{name:y,repoUrl:f,sshUrl:M||null,defaultBranch:P,gitPlatform:A,agentType:O,agentCommand:E||null,maxTurns:parseInt(D,10)||50,workspaceRoot:B||null,setupCommands:J||null,testCommand:z||null,ptyOutputFilter:parseInt(K,10)||0,pipeline:v}}),c.success(r("projects.project_saved")),l(`/projects/${o.key}`)}catch(Z){const ue=Z instanceof Error?Z.message:r("projects.failed_to_save_project");c.error(ue)}finally{h(!1)}}function de(){l(`/projects/${n}`)}async function ie(){if(!(!o||!u.trim())){m(!0);try{const t=await i.put(`web/projects/${o.key}/git-token`,{json:{token:u.trim()}}).json();k(t.gitTokenMasked),_(""),c.success(r("projects.git_token_saved"))}catch{c.error(r("projects.git_token_failed"))}finally{m(!1)}}}async function pe(){if(o){m(!0);try{await i.delete(`web/projects/${o.key}/git-token`),k(null),_(""),c.success(r("projects.git_token_cleared"))}catch{c.error(r("projects.git_token_failed"))}finally{m(!1)}}}async function xe(){if(!(!o||!d)){Y(!0);try{await i.delete(`web/projects/${o.key}/members`,{searchParams:{developerId:String(d.developerId)}}),await b()}catch{}finally{Y(!1),C(null)}}}return ae?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})}):o?e.jsxs("form",{onSubmit:ce,className:"mx-auto max-w-6xl px-4 md:px-6 py-8",children:[e.jsxs("div",{className:"mb-2 text-xs text-[var(--text-muted)]",children:[e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l("/projects"),children:r("projects.title")})," / ",e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l(`/projects/${o.key}`),children:o.key})," / ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:r("common.edit")})]}),e.jsx("h1",{className:"text-lg font-bold text-[var(--text-primary)] mb-4",children:r("projects.edit_project_title")}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_400px]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.basic_info")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.key"),children:e.jsx("input",{type:"text",value:o.key,readOnly:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-muted)] outline-none opacity-60 cursor-not-allowed"})}),e.jsx(a,{label:r("projects.name"),children:e.jsx("input",{type:"text",value:y,onChange:t=>S(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.repo_url"),children:e.jsx("input",{type:"text",value:f,onChange:t=>T(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsxs(a,{label:r("projects.ssh_url"),children:[e.jsx("input",{type:"text",value:M,onChange:t=>I(t.target.value),placeholder:r("projects.ssh_url_placeholder"),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:r("projects.ssh_url_hint")})]}),e.jsx(a,{label:r("projects.git_platform"),children:e.jsx(te,{value:A,onChange:t=>R(t),options:[{value:j.GITHUB,label:r("projects.github")},{value:j.GITLAB,label:r("projects.gitlab")},{value:j.GITEA,label:r("projects.gitea")}]})}),e.jsx(a,{label:r("projects.default_branch"),children:e.jsx("input",{type:"text",value:P,onChange:t=>U(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.agent_config")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.agent_type"),children:e.jsx(te,{value:O,onChange:t=>G(t),options:[{value:p.CLAUDE,label:r("projects.claude")},{value:p.CURSOR,label:r("projects.cursor")},{value:p.CODEX,label:r("projects.codex")},{value:p.CUSTOM,label:r("projects.custom")}]})}),e.jsx(a,{label:r("projects.agent_command"),children:e.jsx("input",{type:"text",value:E,onChange:t=>$(t.target.value),placeholder:"custom agent command",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.max_turns"),children:e.jsx("input",{type:"number",value:D,onChange:t=>L(t.target.value),min:1,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.workspace_root"),children:e.jsx("input",{type:"text",value:B,onChange:t=>F(t.target.value),placeholder:"/path/to/workspace",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.environment")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.setup_commands"),children:e.jsx("textarea",{value:J,onChange:t=>q(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(a,{label:r("projects.post_command"),children:e.jsx("input",{type:"text",value:z,onChange:t=>H(t.target.value),placeholder:"npm test",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.security")}),e.jsx("div",{className:"space-y-3",children:e.jsx(a,{label:r("projects.pty_output_filter"),children:e.jsx("input",{type:"text",value:K,onChange:t=>W(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.git_token")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.git_token_label"),children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:X??r("common.not_set")})})}),e.jsxs(a,{label:r("projects.git_token_set"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"password",value:u,onChange:t=>_(t.target.value),placeholder:"ghp_xxxx...",className:"flex-1 rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("button",{type:"button",disabled:Q||!u.trim(),onClick:ie,className:"shrink-0 rounded-[4px] bg-[var(--accent)] px-3 py-2 text-xs font-medium text-black hover:opacity-90 transition-opacity disabled:opacity-50",children:r("common.save")})]}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:r("projects.git_token_hint")})]}),X&&e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{type:"button",disabled:Q,onClick:pe,className:"rounded-[4px] border border-[var(--destructive)] px-3 py-1.5 text-xs text-[var(--destructive)] hover:opacity-70 transition-opacity disabled:opacity-50",children:r("projects.git_token_clear")})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--accent)]",children:r("projects.pipeline_section")}),e.jsx(je,{to:"/projects/"+n+"/pipeline",className:"text-xs text-[var(--accent)] hover:underline",children:r("projects.edit_pipeline")})]}),e.jsx("textarea",{value:x,onChange:t=>N(t.target.value),rows:20,spellCheck:!1,placeholder:'{"stages": []}',className:"w-full resize-y rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]",style:{fontFamily:'"JetBrains Mono", monospace',textTransform:"none"}})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--accent)]",children:r("projects.members")}),e.jsxs("button",{type:"button",onClick:()=>V(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs font-medium text-black",children:[e.jsx(fe,{className:"h-3.5 w-3.5"}),r("projects.add_member")]})]}),g.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:g.map(t=>e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-[var(--accent)]/20 text-xs font-bold text-[var(--accent)]",children:(t.developerName??String(t.developerId)).charAt(0).toUpperCase()}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:t.developerName??`#${t.developerId}`}),e.jsx("span",{className:"ml-2 rounded-[4px] px-1.5 py-0.5 text-[11px] font-medium",style:{color:t.role===ee.MAINTAINER?"var(--warning)":"var(--text-secondary)",background:t.role===ee.MAINTAINER?"rgba(245,158,11,0.1)":"rgba(163,163,163,0.1)"},children:t.role})]})]}),e.jsx("button",{type:"button",onClick:()=>C(t),className:"text-[var(--destructive)] hover:opacity-70 transition-opacity","aria-label":r("projects.remove_member"),children:e.jsx(ge,{className:"h-3.5 w-3.5"})})]},t.developerId))})]})]})]}),e.jsxs("div",{className:"mt-8 flex items-center justify-end gap-3 border-t border-[var(--border)] pt-6",children:[e.jsx("button",{type:"button",onClick:de,className:"rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("common.discard")}),e.jsx("button",{type:"submit",disabled:w||!y||!f,className:"rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-medium text-black hover:opacity-90 transition-opacity disabled:opacity-50",children:r(w?"common.saving":"projects.save_changes")})]}),e.jsx(he,{isOpen:ne,onClose:()=>V(!1),projectKey:o.key,existingMemberIds:g.map(t=>t.developerId),onAdded:b}),e.jsx(ye,{isOpen:!!d,onClose:()=>C(null),onConfirm:xe,memberName:d?d.developerName??`#${d.developerId}`:"",loading:le})]}):e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 text-center",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:r("projects.project_not_found")}),e.jsx("button",{onClick:()=>l("/projects"),className:"mt-4 rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:r("projects.back_to_projects")})]})}function a({label:n,children:l}){return e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-1 sm:gap-3",children:[e.jsx("label",{className:"sm:w-36 shrink-0 sm:pt-2 text-xs text-[var(--text-muted)]",children:n}),e.jsx("div",{className:"flex-1",children:l})]})}export{we as default};
@@ -1,4 +1,4 @@
1
- import{c as o,j as e}from"./index-C5ry7bCb.js";/**
1
+ import{c as o,j as e}from"./index-uDLAla67.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -0,0 +1 @@
1
+ import{j as e}from"./index-uDLAla67.js";function s(){return e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// environment variables"}),e.jsx("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:"configuration reference for server and worker environment variables."})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> server variables"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"server configuration is stored in ~/.overlord/.env. these variables are set during overlord install and can be manually edited."}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"default"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"SERVER_PORT"})}),e.jsx("td",{className:"py-2 pr-4",children:"9000"}),e.jsx("td",{className:"py-2",children:"http/ws port"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"DB_PATH"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord/data/overlord.db"}),e.jsx("td",{className:"py-2",children:"sqlite database path"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"REDIS_URL"})}),e.jsx("td",{className:"py-2 pr-4",children:"redis://localhost:6379"}),e.jsx("td",{className:"py-2",children:"redis connection url"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"JWT_SECRET"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"jwt signing secret (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"WORKER_JWT_SECRET"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"worker jwt signing secret (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"ENCRYPTION_KEY"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"encryption key for sensitive data at rest (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"CORS_ORIGIN"})}),e.jsx("td",{className:"py-2 pr-4",children:"*"}),e.jsx("td",{className:"py-2",children:"allowed cors origins (comma-separated)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WEB_URL"})}),e.jsx("td",{className:"py-2 pr-4",children:"http://localhost:5173"}),e.jsx("td",{className:"py-2",children:"public url used in notification links and bot cards"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"GIT_TOKEN"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"git platform authentication token for mr/pr operations"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"TUNNEL_TTL_HOURS"})}),e.jsx("td",{className:"py-2 pr-4",children:"4"}),e.jsx("td",{className:"py-2",children:"cursor tunnel expiration in hours (max 24)"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LOG_LEVEL"})}),e.jsx("td",{className:"py-2 pr-4",children:"info"}),e.jsx("td",{className:"py-2",children:"log level: fatal, error, warn, info, debug, trace"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"never expose JWT_SECRET, WORKER_JWT_SECRET, or ENCRYPTION_KEY. these are generated automatically during installation and should not be shared or committed to version control."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> log levels"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"level"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"fatal"})}),e.jsx("td",{className:"py-2",children:"critical errors causing shutdown"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"error"})}),e.jsx("td",{className:"py-2",children:"runtime errors"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"warn"})}),e.jsx("td",{className:"py-2",children:"warnings"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"info"})}),e.jsx("td",{className:"py-2",children:"general operational info"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"debug"})}),e.jsx("td",{className:"py-2",children:"detailed debugging info"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"trace"})}),e.jsx("td",{className:"py-2",children:"very verbose tracing"})]})]})]})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> worker variables"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"worker configuration is stored in ~/.overlord-worker/.env. these are set during overlord setup worker."}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"default"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_HOST"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"server url (required)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKER_TOKEN"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"one-time registration token"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKER_NAME"})}),e.jsx("td",{className:"py-2 pr-4",children:"hostname"}),e.jsx("td",{className:"py-2",children:"display name for this worker"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKSPACE_ROOT"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord-worker/workspaces"}),e.jsx("td",{className:"py-2",children:"directory for task workspaces"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_MAX_SLOTS"})}),e.jsx("td",{className:"py-2 pr-4",children:"2"}),e.jsx("td",{className:"py-2",children:"maximum concurrent tasks"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_DATA_DIR"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord-worker"}),e.jsx("td",{className:"py-2",children:"config and jwt storage directory"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_SSH_KEY_PATH"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"ssh key for git clone/push operations"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"OVERLORD_WORKER_TOKEN is consumed on first registration. after that, the worker uses a jwt for authentication. the token field can remain in the .env file but will not be used again."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> redis configuration"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"redis is required for the server (used for bullmq task queue and pub/sub). recommended setting:"}),e.jsx("pre",{className:"rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 text-xs text-[var(--text-secondary)] overflow-x-auto",children:"appendonly yes"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"redis must have aof persistence enabled to minimize queue data loss on restart."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> file locations"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"path"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord/"})}),e.jsx("td",{className:"py-2",children:"server configuration directory"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord/.env"})}),e.jsx("td",{className:"py-2",children:"server environment variables"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord/data/overlord.db"})}),e.jsx("td",{className:"py-2",children:"sqlite database"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord/logs/"})}),e.jsx("td",{className:"py-2",children:"server log files"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord-worker/"})}),e.jsx("td",{className:"py-2",children:"worker configuration directory"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord-worker/.env"})}),e.jsx("td",{className:"py-2",children:"worker environment variables"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord-worker/workspaces/"})}),e.jsx("td",{className:"py-2",children:"task workspace directory"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord-worker/jwt.json"})}),e.jsx("td",{className:"py-2",children:"worker jwt credentials"})]})]})]})})]})]})]})}export{s as default};
@@ -1 +1 @@
1
- import{e as W,a as A,h as $,i as w,r as S,j as e,L as b,W as v,g as x}from"./index-C5ry7bCb.js";import{T as L}from"./TaskStatusBadge-yU5DIpkP.js";import{T as u}from"./Skeleton-B0x9oN6a.js";import{O as B}from"./OnboardingGuide-dk4OyOgV.js";import{f as j}from"./date-BdNtiQTP.js";import{t as D}from"./string-B39tzdVK.js";import{g as F}from"./status-colors-C_xltR1x.js";import{u as o}from"./useFetch-CKA2R0HW.js";import{A as g}from"./arrow-right-DbRiIkn5.js";import"./chevron-right-Cz1_0u26.js";const M=3e5,O=[{key:"active_tasks",labelKey:"dashboard.active_tasks"},{key:"queued_tasks",labelKey:"dashboard.queued_tasks"},{key:"online_workers",labelKey:"dashboard.online_workers"},{key:"completed_today",labelKey:"dashboard.completed_today"}],P=["mon","tue","wed","thu","fri","sat","sun"];function G({dailyRates:l,overallRate:t}){const{t:m}=A(),n=P.map((r,c)=>({label:r,value:l[c]??0})),i=Math.max(...n.map(r=>r.value),1);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 flex items-baseline gap-2",children:[e.jsxs("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:[t,"%"]}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:m("dashboard.last_7_days")})]}),e.jsx("div",{className:"flex gap-2",style:{height:80},children:n.map(r=>{const c=i>0?Math.max(r.value/i*100,4):4;return e.jsxs("div",{className:"flex flex-1 flex-col items-center gap-1",children:[e.jsx("div",{className:"relative w-full h-full rounded-[4px]",style:{backgroundColor:"rgba(34,197,94,0.1)"},children:e.jsx("div",{className:"absolute bottom-0 left-0 right-0 rounded-[4px]",style:{height:`${c}%`,backgroundColor:r.value>=80?"var(--accent)":r.value>=50?"var(--warning)":"var(--destructive)"}})}),e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:r.label})]},r.label)})})]})}function se(){const l=W(),{t}=A(),m=$(),n=w(s=>s.taskSeq),i=w(s=>s.workerSeq),[r,c]=S.useState(0),{data:a,loading:f}=o(()=>x.get("web/dashboard/stats").json(),[r,n,i]),{data:T,loading:R}=o(()=>x.get("web/dashboard/recent-tasks",{searchParams:{limit:"5"}}).json(),[r,n]),{data:C,loading:I}=o(()=>x.get("web/workers").json(),[r,i]),{data:E,loading:q}=o(()=>x.get("web/dashboard/recent-activity").json(),[]);S.useEffect(()=>{const s=setInterval(()=>{c(d=>d+1)},M);return()=>clearInterval(s)},[]);const N=(a==null?void 0:a.success_rate_daily)??null,y=(a==null?void 0:a.task_success_rate_7d)??0,k=T??[],h=C??[],_=E??[];function K(s){switch(s){case v.ONLINE:return t("dashboard.online");case v.DRAINING:return t("dashboard.idle");case v.OFFLINE:default:return t("dashboard.offline")}}return e.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-4 md:px-6 md:py-8 font-mono",children:[e.jsx("div",{className:"mb-4 md:hidden",children:e.jsxs("span",{className:"text-base font-bold text-[var(--accent)]",children:["// ",t("dashboard.title")]})}),e.jsx("div",{className:"mb-6 md:mb-8 grid grid-cols-2 gap-3 md:gap-4 lg:grid-cols-4",children:O.map(({key:s,labelKey:d})=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-4",children:[e.jsxs("span",{className:"text-[11px] md:text-xs text-[var(--text-muted)]",children:[t(d),":"]}),f?e.jsx("div",{className:"mt-1 h-6 md:h-8 w-12 md:w-16 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):e.jsx("div",{className:"mt-1 flex items-baseline gap-2",children:e.jsx("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:(a==null?void 0:a[s])??0})})]},s))}),e.jsx(B,{data:{activeTasks:((a==null?void 0:a.active_tasks)??0)+((a==null?void 0:a.queued_tasks)??0),totalWorkers:h.length,totalProjects:(a==null?void 0:a.project_count)??0,totalDevelopers:(a==null?void 0:a.developer_count)??0}}),e.jsxs("div",{className:"mb-6 grid gap-6 lg:grid-cols-3 items-stretch",children:[e.jsx("div",{className:"flex flex-col gap-6 lg:col-span-2",children:e.jsxs("div",{className:"flex flex-1 flex-col rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("div",{className:"border-b border-[var(--border)] px-5 py-3",children:e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.task_success_rate")})}),e.jsx("div",{className:"flex flex-1 flex-col justify-center p-5",children:f?e.jsx("div",{className:"h-24 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):N?e.jsx(G,{dailyRates:N,overallRate:y}):e.jsxs("div",{className:"flex flex-col items-center gap-2 py-6",children:[e.jsxs("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:[y,"%"]}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.daily_breakdown_not_available")})]})})]})}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:border",children:[e.jsxs("div",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.recent_tasks")}),e.jsxs(b,{to:"/tasks",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[t("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"flex md:hidden items-center justify-between px-3 py-3",children:e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:t("dashboard.recent_tasks")})}),e.jsx("div",{className:"px-3 pb-3 md:px-5 md:pb-4 md:pt-0",children:R?e.jsx(u,{rows:4}):k.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.no_tasks_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2 md:gap-0",children:k.map(s=>e.jsxs("div",{onClick:()=>l(`/tasks/${s.id}`),className:"flex cursor-pointer items-center gap-3 rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)] md:rounded-none md:border-0 md:border-b md:border-[var(--border-row)] md:p-0 md:py-2.5 last:md:border-b-0",children:[e.jsxs("div",{className:"flex-1 min-w-0 md:hidden",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("span",{className:"text-[11px] text-[var(--text-primary)] leading-tight",style:{wordBreak:"break-word"},children:["#",s.id," ",s.description]}),e.jsx("span",{className:"shrink-0",children:e.jsx(L,{status:s.status})})]}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)] mt-1 block",children:j(s.createdAt)})]}),e.jsxs("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:["#",s.id]}),e.jsx("span",{className:"hidden md:inline flex-1 text-xs text-[var(--text-primary)] truncate",children:D(s.description,40)}),e.jsx("span",{className:"hidden md:inline",children:e.jsx(L,{status:s.status})}),e.jsx("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:j(s.createdAt)})]},s.id))})})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.worker_status")}),e.jsxs(b,{to:"/workers",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[t("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:I?e.jsx(u,{rows:3}):h.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.no_workers_registered")})]}):e.jsx("div",{className:"flex flex-col",children:h.map(s=>e.jsxs("div",{onClick:()=>l(`/workers/${s.id}`),className:"flex cursor-pointer items-center justify-between border-b border-[var(--border-row)] py-2.5 transition-colors hover:bg-[var(--bg-input)] last:border-b-0",children:[e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:s.host??"--"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:[s.activeSlots,"/",s.maxSlots," ",t("dashboard.slots")]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs",style:{color:F(s.status)},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),K(s.status)]})]})]},s.id))})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.recent_activity")}),m&&e.jsxs(b,{to:"/admin/audit-logs",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[t("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:q?e.jsx(u,{rows:4}):_.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.no_recent_activity")})]}):e.jsx("div",{className:"flex flex-col",children:_.map(s=>{const d=s.message.match(/task\s*#?(\d+)/i),p=d?d[1]:null;return e.jsxs("div",{className:`flex items-start gap-3 border-b border-[var(--border-row)] py-2 last:border-b-0 ${p?"cursor-pointer hover:bg-[var(--bg-input)] transition-colors":""}`,onClick:()=>p&&l(`/tasks/${p}`),children:[e.jsx("span",{className:"shrink-0 text-xs text-[var(--text-muted)]",children:j(s.timestamp)}),e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:s.message})]},s.id)})})})]})]})]})}export{se as default};
1
+ import{e as W,a as A,h as $,i as w,r as S,j as e,L as b,W as v,g as x}from"./index-uDLAla67.js";import{T as L}from"./TaskStatusBadge-Cf0DzE71.js";import{T as u}from"./Skeleton-wnwOeI39.js";import{O as B}from"./OnboardingGuide-CsX3AAYe.js";import{f as j}from"./date-BdNtiQTP.js";import{t as D}from"./string-B39tzdVK.js";import{g as F}from"./status-colors-BcGt1oBU.js";import{u as o}from"./useFetch-DPbqlqsl.js";import{A as g}from"./arrow-right-BVGnZmSj.js";import"./chevron-right-BagQ0WTS.js";const M=3e5,O=[{key:"active_tasks",labelKey:"dashboard.active_tasks"},{key:"queued_tasks",labelKey:"dashboard.queued_tasks"},{key:"online_workers",labelKey:"dashboard.online_workers"},{key:"completed_today",labelKey:"dashboard.completed_today"}],P=["mon","tue","wed","thu","fri","sat","sun"];function G({dailyRates:l,overallRate:t}){const{t:m}=A(),n=P.map((r,c)=>({label:r,value:l[c]??0})),i=Math.max(...n.map(r=>r.value),1);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 flex items-baseline gap-2",children:[e.jsxs("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:[t,"%"]}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:m("dashboard.last_7_days")})]}),e.jsx("div",{className:"flex gap-2",style:{height:80},children:n.map(r=>{const c=i>0?Math.max(r.value/i*100,4):4;return e.jsxs("div",{className:"flex flex-1 flex-col items-center gap-1",children:[e.jsx("div",{className:"relative w-full h-full rounded-[4px]",style:{backgroundColor:"rgba(34,197,94,0.1)"},children:e.jsx("div",{className:"absolute bottom-0 left-0 right-0 rounded-[4px]",style:{height:`${c}%`,backgroundColor:r.value>=80?"var(--accent)":r.value>=50?"var(--warning)":"var(--destructive)"}})}),e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:r.label})]},r.label)})})]})}function se(){const l=W(),{t}=A(),m=$(),n=w(s=>s.taskSeq),i=w(s=>s.workerSeq),[r,c]=S.useState(0),{data:a,loading:f}=o(()=>x.get("web/dashboard/stats").json(),[r,n,i]),{data:T,loading:R}=o(()=>x.get("web/dashboard/recent-tasks",{searchParams:{limit:"5"}}).json(),[r,n]),{data:C,loading:I}=o(()=>x.get("web/workers").json(),[r,i]),{data:E,loading:q}=o(()=>x.get("web/dashboard/recent-activity").json(),[]);S.useEffect(()=>{const s=setInterval(()=>{c(d=>d+1)},M);return()=>clearInterval(s)},[]);const N=(a==null?void 0:a.success_rate_daily)??null,y=(a==null?void 0:a.task_success_rate_7d)??0,k=T??[],h=C??[],_=E??[];function K(s){switch(s){case v.ONLINE:return t("dashboard.online");case v.DRAINING:return t("dashboard.idle");case v.OFFLINE:default:return t("dashboard.offline")}}return e.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-4 md:px-6 md:py-8 font-mono",children:[e.jsx("div",{className:"mb-4 md:hidden",children:e.jsxs("span",{className:"text-base font-bold text-[var(--accent)]",children:["// ",t("dashboard.title")]})}),e.jsx("div",{className:"mb-6 md:mb-8 grid grid-cols-2 gap-3 md:gap-4 lg:grid-cols-4",children:O.map(({key:s,labelKey:d})=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-4",children:[e.jsxs("span",{className:"text-[11px] md:text-xs text-[var(--text-muted)]",children:[t(d),":"]}),f?e.jsx("div",{className:"mt-1 h-6 md:h-8 w-12 md:w-16 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):e.jsx("div",{className:"mt-1 flex items-baseline gap-2",children:e.jsx("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:(a==null?void 0:a[s])??0})})]},s))}),e.jsx(B,{data:{activeTasks:((a==null?void 0:a.active_tasks)??0)+((a==null?void 0:a.queued_tasks)??0),totalWorkers:h.length,totalProjects:(a==null?void 0:a.project_count)??0,totalDevelopers:(a==null?void 0:a.developer_count)??0}}),e.jsxs("div",{className:"mb-6 grid gap-6 lg:grid-cols-3 items-stretch",children:[e.jsx("div",{className:"flex flex-col gap-6 lg:col-span-2",children:e.jsxs("div",{className:"flex flex-1 flex-col rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("div",{className:"border-b border-[var(--border)] px-5 py-3",children:e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.task_success_rate")})}),e.jsx("div",{className:"flex flex-1 flex-col justify-center p-5",children:f?e.jsx("div",{className:"h-24 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):N?e.jsx(G,{dailyRates:N,overallRate:y}):e.jsxs("div",{className:"flex flex-col items-center gap-2 py-6",children:[e.jsxs("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:[y,"%"]}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.daily_breakdown_not_available")})]})})]})}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:border",children:[e.jsxs("div",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.recent_tasks")}),e.jsxs(b,{to:"/tasks",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[t("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"flex md:hidden items-center justify-between px-3 py-3",children:e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:t("dashboard.recent_tasks")})}),e.jsx("div",{className:"px-3 pb-3 md:px-5 md:pb-4 md:pt-0",children:R?e.jsx(u,{rows:4}):k.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.no_tasks_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2 md:gap-0",children:k.map(s=>e.jsxs("div",{onClick:()=>l(`/tasks/${s.id}`),className:"flex cursor-pointer items-center gap-3 rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)] md:rounded-none md:border-0 md:border-b md:border-[var(--border-row)] md:p-0 md:py-2.5 last:md:border-b-0",children:[e.jsxs("div",{className:"flex-1 min-w-0 md:hidden",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("span",{className:"text-[11px] text-[var(--text-primary)] leading-tight",style:{wordBreak:"break-word"},children:["#",s.id," ",s.description]}),e.jsx("span",{className:"shrink-0",children:e.jsx(L,{status:s.status})})]}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)] mt-1 block",children:j(s.createdAt)})]}),e.jsxs("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:["#",s.id]}),e.jsx("span",{className:"hidden md:inline flex-1 text-xs text-[var(--text-primary)] truncate",children:D(s.description,40)}),e.jsx("span",{className:"hidden md:inline",children:e.jsx(L,{status:s.status})}),e.jsx("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:j(s.createdAt)})]},s.id))})})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.worker_status")}),e.jsxs(b,{to:"/workers",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[t("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:I?e.jsx(u,{rows:3}):h.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.no_workers_registered")})]}):e.jsx("div",{className:"flex flex-col",children:h.map(s=>e.jsxs("div",{onClick:()=>l(`/workers/${s.id}`),className:"flex cursor-pointer items-center justify-between border-b border-[var(--border-row)] py-2.5 transition-colors hover:bg-[var(--bg-input)] last:border-b-0",children:[e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:s.host??"--"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:[s.activeSlots,"/",s.maxSlots," ",t("dashboard.slots")]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs",style:{color:F(s.status)},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),K(s.status)]})]})]},s.id))})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.recent_activity")}),m&&e.jsxs(b,{to:"/admin/audit-logs",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[t("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:q?e.jsx(u,{rows:4}):_.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.no_recent_activity")})]}):e.jsx("div",{className:"flex flex-col",children:_.map(s=>{const d=s.message.match(/task\s*#?(\d+)/i),p=d?d[1]:null;return e.jsxs("div",{className:`flex items-start gap-3 border-b border-[var(--border-row)] py-2 last:border-b-0 ${p?"cursor-pointer hover:bg-[var(--bg-input)] transition-colors":""}`,onClick:()=>p&&l(`/tasks/${p}`),children:[e.jsx("span",{className:"shrink-0 text-xs text-[var(--text-muted)]",children:j(s.timestamp)}),e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:s.message})]},s.id)})})})]})]})]})}export{se as default};
@@ -0,0 +1 @@
1
+ import{j as e}from"./index-uDLAla67.js";function m({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 items-center justify-between gap-4",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:s}),e.jsx("span",{className:"min-w-0 truncate text-[var(--text-primary)]",children:t})]})}export{m as I};
@@ -0,0 +1,7 @@
1
+ import{j as e}from"./index-uDLAla67.js";import{I as s,a as t}from"./DocsPrimitives-DS0DquzY.js";import"./copy-CFKtBHG3.js";function l(){return e.jsx("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// prerequisites"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"before installing overlord, make sure you have:"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"node.js"})," ",">="," 20"]}),e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"redis"})," (for the server — task queue and pub/sub)"]}),e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"git"})," ",">="," 2.20"]}),e.jsxs("li",{children:["— an ai agent cli installed on worker machines (one or more of: ",e.jsx("code",{className:"text-[var(--accent)]",children:"claude"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"cursor"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"codex"}),")"]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// server setup"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"install the overlord cli and server packages globally:"}),e.jsx(s,{code:"npm install -g @overlordai/cli @overlordai/server"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"run the interactive installation wizard:"}),e.jsx(s,{code:"overlord install"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"the wizard will:"}),e.jsxs("ol",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsx("li",{children:"1. check that all prerequisites are met (node, redis, git)"}),e.jsxs("li",{children:["2. generate secrets (",e.jsx("code",{className:"text-[var(--accent)]",children:"JWT_SECRET"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"WORKER_JWT_SECRET"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"ENCRYPTION_KEY"}),")"]}),e.jsxs("li",{children:["3. configure redis connection (default: ",e.jsx("code",{className:"text-[var(--text-muted)]",children:"redis://localhost:6379/0"}),")"]}),e.jsx("li",{children:"4. initialize the sqlite database and run migrations"}),e.jsx("li",{children:"5. create your admin account (username, password, git name, git email)"})]}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["all configuration is written to ",e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord/.env"}),"."]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// start the server"}),e.jsx(t,{code:`overlord start # start services (systemd / launchd)
2
+ overlord status # verify everything is running
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
+
5
+ ov setup # quick setup — configure server url + authenticate
6
+ ov task create -d "fix the login bug" -p PROJ
7
+ ov attach 42 # connect to a running task's terminal`}),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:"// the developer cli uses personal access tokens (pat) for authentication. generate one in the web dashboard under profile → access tokens."})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// verify installation"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["after starting the server, open ",e.jsx("code",{className:"text-[var(--accent)]",children:"http://localhost:9000"})," in your browser and log in with the admin credentials you created during installation. check the machines page to verify workers are connected."]})]})]})})}export{l as default};