@overlordai/server 1.0.67 → 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 (101) hide show
  1. package/dist/adapters/lark/lark.controller.d.ts.map +1 -1
  2. package/dist/adapters/lark/lark.controller.js +0 -3
  3. package/dist/adapters/lark/lark.controller.js.map +1 -1
  4. package/dist/database/repositories/bot.repository.d.ts +3 -2
  5. package/dist/database/repositories/bot.repository.d.ts.map +1 -1
  6. package/dist/database/repositories/bot.repository.js +2 -2
  7. package/dist/database/repositories/bot.repository.js.map +1 -1
  8. package/dist/dispatcher/pty-relay.service.d.ts.map +1 -1
  9. package/dist/dispatcher/pty-relay.service.js +19 -0
  10. package/dist/dispatcher/pty-relay.service.js.map +1 -1
  11. package/dist/web/admin/admin-bot.controller.d.ts +3 -3
  12. package/package.json +4 -4
  13. package/public/assets/{AccessTokensPage-DcOzH6vQ.js → AccessTokensPage-iDZ6rZhl.js} +1 -1
  14. package/public/assets/AdminPage-CIVF_6oN.js +1 -0
  15. package/public/assets/{ApiReferencePage-Cn1nZmYJ.js → ApiReferencePage-DdBJhmX5.js} +1 -1
  16. package/public/assets/ArchitecturePage-BWQACk_w.js +47 -0
  17. package/public/assets/{AuditLogPage-CkE1EJZh.js → AuditLogPage-DTZL5_x5.js} +2 -2
  18. package/public/assets/{BindPlatformPage-DYNztOnJ.js → BindPlatformPage-DR0wVGmo.js} +1 -1
  19. package/public/assets/BotIntegrationPage-BsClXkLN.js +1 -0
  20. package/public/assets/BotManage-CNZfkmIJ.js +6 -0
  21. package/public/assets/BotSetupPage-Bcfnysyl.js +33 -0
  22. package/public/assets/ChangelogPage-DpiKKuMW.js +1 -0
  23. package/public/assets/{CliReferencePage-DyfbBqGH.js → CliReferencePage-3PUTVc7V.js} +1 -1
  24. package/public/assets/DeploymentPage-CKZ4SJGu.js +34 -0
  25. package/public/assets/DevWorkflowPage-3C2oScnn.js +6 -0
  26. package/public/assets/{DeveloperManage-DgwZWjLh.js → DeveloperManage-wTnur24N.js} +2 -2
  27. package/public/assets/DeveloperSetupPage-BMm9F-Bb.js +4 -0
  28. package/public/assets/DocsLayout-Db02r7be.js +41 -0
  29. package/public/assets/DocsPrimitives-DS0DquzY.js +1 -0
  30. package/public/assets/{EditProjectPage-DjGCEool.js → EditProjectPage-f_umSRE8.js} +1 -1
  31. package/public/assets/{EmptyState-C7-kuf8X.js → EmptyState-CF1knXIb.js} +1 -1
  32. package/public/assets/EnvVariablesPage-BG-6sXnf.js +1 -0
  33. package/public/assets/{HomePage-CWYmPB1e.js → HomePage-Dx-CsXKm.js} +1 -1
  34. package/public/assets/InfoRow-DSmNnnLr.js +1 -0
  35. package/public/assets/InstallationPage-BNHwwjLf.js +7 -0
  36. package/public/assets/{LandingPage-ZuEWmIZL.js → LandingPage-D58CYxTa.js} +8 -18
  37. package/public/assets/LocalDevelopmentPage-CyUsNaWH.js +11 -0
  38. package/public/assets/{LoginPage-ZN3nJzEX.js → LoginPage-BkBq-gI2.js} +1 -1
  39. package/public/assets/{MetricBar-CH5ccxZr.js → MetricBar-CTJw2-TT.js} +1 -1
  40. package/public/assets/{NotFoundPage-DkoNgmQ4.js → NotFoundPage-DQOZcvon.js} +1 -1
  41. package/public/assets/{OnboardingGuide-dk4OyOgV.js → OnboardingGuide-CsX3AAYe.js} +1 -1
  42. package/public/assets/PermissionsPage-DV1jB5wk.js +1 -0
  43. package/public/assets/PipelineConfigPage-DWTyDQIr.js +28 -0
  44. package/public/assets/{PipelineEditorPage-CtUnQDef.js → PipelineEditorPage-D3LWtMr2.js} +1 -1
  45. package/public/assets/{ProfilePage-B0CWDm55.js → ProfilePage-BcJ4dzzZ.js} +1 -1
  46. package/public/assets/{ProjectDetailPage-BbOgUrnR.js → ProjectDetailPage-CfnwUUSo.js} +3 -3
  47. package/public/assets/{ProjectListPage-CtGknAYM.js → ProjectListPage-CNotLnBe.js} +1 -1
  48. package/public/assets/{PtyTerminal-C28RQ62I.js → PtyTerminal-BIf7o9cl.js} +12 -7
  49. package/public/assets/{QuickAuth-8eT76fKz.js → QuickAuth-C2UsxqX9.js} +1 -1
  50. package/public/assets/{RemoveMemberConfirmDialog-Ctyx8n2a.js → RemoveMemberConfirmDialog-BX3zkPVv.js} +1 -1
  51. package/public/assets/{Select-8MUED_Fj.js → Select-BaCTjbpe.js} +1 -1
  52. package/public/assets/{SettingsPage-CXDXq71S.js → SettingsPage-DwbzfiSN.js} +1 -1
  53. package/public/assets/{Skeleton-B0x9oN6a.js → Skeleton-wnwOeI39.js} +1 -1
  54. package/public/assets/SkillPage-BLEt2rMu.js +1 -0
  55. package/public/assets/TaskDetailPage-DtwpHF_O.js +21 -0
  56. package/public/assets/{TaskListPage-DMYTWhw_.js → TaskListPage-sy7iLza2.js} +1 -1
  57. package/public/assets/{TaskStatusBadge-yU5DIpkP.js → TaskStatusBadge-Cf0DzE71.js} +1 -1
  58. package/public/assets/TerminalHomePage-BTqi9Axa.js +11 -0
  59. package/public/assets/{TokenManage-NYgoI8yJ.js → TokenManage-DWMXnCDJ.js} +1 -1
  60. package/public/assets/{TotpSetupPage-lw418pBO.js → TotpSetupPage-DHdTMjpN.js} +1 -1
  61. package/public/assets/{WorkerDetailPage-CF7FWzQn.js → WorkerDetailPage-YJUVETFW.js} +1 -1
  62. package/public/assets/WorkerListPage-B-D7X_b1.js +1 -0
  63. package/public/assets/WorkerOperationsPage-BBxYUgIw.js +1 -0
  64. package/public/assets/{WorkerSetupGuidePage-dRLxcC1D.js → WorkerSetupGuidePage-ChzKuXQZ.js} +2 -7
  65. package/public/assets/WorkerSetupPage-B4jlXCjH.js +5 -0
  66. package/public/assets/{arrow-left-D3hlGpFa.js → arrow-left-CclYAeLg.js} +1 -1
  67. package/public/assets/{arrow-right-DbRiIkn5.js → arrow-right-BVGnZmSj.js} +1 -1
  68. package/public/assets/{bot-DJcm4TDu.js → bot-D9xi44vN.js} +1 -1
  69. package/public/assets/{chevron-right-Cz1_0u26.js → chevron-right-BagQ0WTS.js} +1 -1
  70. package/public/assets/{copy-BSpogfAn.js → copy-CFKtBHG3.js} +1 -1
  71. package/public/assets/download-CTnOMUpx.js +6 -0
  72. package/public/assets/{external-link-BYnHDfTq.js → external-link-Bdlp6eLv.js} +1 -1
  73. package/public/assets/index-CVFlBK8x.css +1 -0
  74. package/public/assets/index-uDLAla67.js +225 -0
  75. package/public/assets/{key-B7y18xnM.js → key-9SBu60Mo.js} +1 -1
  76. package/public/assets/{loader-circle-j2WCDelv.js → loader-circle-C3TDU6pb.js} +1 -1
  77. package/public/assets/message-square-CqYt8K2i.js +6 -0
  78. package/public/assets/{pencil-CkuHyqYU.js → pencil-CrcM0dgK.js} +1 -1
  79. package/public/assets/{plus-DETa4kg0.js → plus-DnDLd-iP.js} +1 -1
  80. package/public/assets/{rotate-ccw-oPqSTHU8.js → rotate-ccw-BS27hgv2.js} +1 -1
  81. package/public/assets/{scroll-text--ZQgIRbt.js → scroll-text-BLE2ARXF.js} +1 -1
  82. package/public/assets/{settings-COdENdI-.js → settings-pymAAKeG.js} +1 -1
  83. package/public/assets/{status-colors-C_xltR1x.js → status-colors-BcGt1oBU.js} +1 -1
  84. package/public/assets/{task-constants-BisV3uAk.js → task-constants-G2j8o2ma.js} +1 -1
  85. package/public/assets/{trash-2-BLxwKGg4.js → trash-2-BmckJ_Dj.js} +1 -1
  86. package/public/assets/{useFetch-CKA2R0HW.js → useFetch-DPbqlqsl.js} +1 -1
  87. package/public/assets/{users-Cm06VaAm.js → users-DFQbCvYm.js} +1 -1
  88. package/public/assets/{wifi-CoOrgHWP.js → wifi-DrZKx701.js} +1 -1
  89. package/public/assets/workflow-DTNRYvFx.js +11 -0
  90. package/public/assets/{zap-CZBm69SW.js → zap-D3sq7Jac.js} +1 -1
  91. package/public/index.html +2 -2
  92. package/public/sw.js +1 -1
  93. package/public/assets/AdminPage-DjzkTi-Z.js +0 -1
  94. package/public/assets/BotManage-B4YAKqEk.js +0 -6
  95. package/public/assets/InfoRow-DGZv5P3m.js +0 -1
  96. package/public/assets/SkillPage-CeTlmMdA.js +0 -1
  97. package/public/assets/TaskDetailPage-jyeOPtsb.js +0 -31
  98. package/public/assets/TerminalHomePage-D3Z-uJUx.js +0 -16
  99. package/public/assets/WorkerListPage-Dd6P84ye.js +0 -6
  100. package/public/assets/index-C5ry7bCb.js +0 -225
  101. package/public/assets/index-DBZN6iTO.css +0 -1
@@ -0,0 +1,6 @@
1
+ import{c as z,a as E,r as n,j as e,X as D,g as _,s as W,t as U}from"./index-uDLAla67.js";import{S as M}from"./Select-BaCTjbpe.js";import{C as O}from"./DocsPrimitives-DS0DquzY.js";import{T as F}from"./trash-2-BmckJ_Dj.js";import{P as q}from"./plus-DnDLd-iP.js";import{E as R}from"./EmptyState-CF1knXIb.js";import{T}from"./Skeleton-wnwOeI39.js";import{u as P}from"./useFetch-DPbqlqsl.js";import{d as A}from"./status-colors-BcGt1oBU.js";import{B as H}from"./bot-D9xi44vN.js";import{P as V}from"./pencil-CrcM0dgK.js";import"./copy-CFKtBHG3.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 X=z("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]),G=[{value:"lark",label:"lark_(feishu)"},{value:"slack",label:"slack"}];function J({isOpen:r,onClose:j,onCreated:f,editBot:m,onEditClose:s}){const{t}=E(),i=!!m,[C,y]=n.useState(""),[o,b]=n.useState("lark"),[g,u]=n.useState(""),[c,N]=n.useState(""),[p,h]=n.useState(""),[k,w]=n.useState(!1),[S,x]=n.useState("");n.useEffect(()=>{r&&(m?(y(m.name),b(m.platform),u(m.appId),N(""),h("")):(y(""),b("lark"),u(""),N(""),h("")),w(!1),x(""))},[m,r]);function v(){i&&s?s():j()}async function a(){if(x(""),!C.trim()||!g.trim()){x(t("admin.name_and_app_id_required"));return}if(i){if(o==="slack"&&c.trim()&&!c.trim().startsWith("xoxb-")){x(t("admin.invalid_bot_token"));return}}else{if(!c.trim()){x(t("admin.app_secret_required"));return}if(o==="slack"){if(!c.trim().startsWith("xoxb-")){x(t("admin.invalid_bot_token"));return}if(!p.trim()){x(t("admin.signing_secret_required"));return}}}const l={name:C.trim(),platform:o,appId:g.trim()};c.trim()&&(l.appSecret=c.trim()),p.trim()&&(l.webhookToken=p.trim());try{w(!0),i?await _.put(`admin/bots/${m.id}`,{json:l}).json():await _.post("admin/bots",{json:l}).json(),v(),f()}catch(B){const K=B instanceof Error?B.message:t(i?"admin.failed_to_update_bot":"admin.failed_to_create_bot");x(K)}finally{w(!1)}}if(!r)return null;const I=window.location.origin,$=[{label:t("admin.webhook_events_url"),url:`${I}/webhook/slack/events`,hint:t("admin.slack_events_hint")},{label:t("admin.webhook_interact_url"),url:`${I}/webhook/slack/interact`,hint:t("admin.slack_interact_hint")},{label:t("admin.webhook_commands_url"),url:`${I}/webhook/slack/commands`,hint:t("admin.slack_commands_hint")}],d=[{label:t("admin.webhook_request_url"),url:`${I}/webhook/lark`,hint:t("admin.webhook_config_hint_lark")}],L=o==="slack"?$:d;return 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:v}),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.jsx("h3",{className:"text-sm text-[var(--text-primary)]",children:i?`// ${t("admin.edit_bot")}`:`// ${t("admin.create_bot")}`}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:v,children:e.jsx(D,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[S&&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:S}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t("admin.bot_name")}),e.jsx("input",{type:"text",placeholder:"e.g. overlord lark bot",value:C,onChange:l=>y(l.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:t("admin.platform")}),e.jsx(M,{value:o,onChange:b,options:G,disabled:i})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-3",children:[e.jsx("div",{className:"mb-2 text-xs text-[var(--text-muted)]",children:t("admin.webhook_config")}),e.jsx("div",{className:"text-xs text-[var(--text-muted)] mb-3",children:t(o==="slack"?"admin.webhook_config_hint_slack":"admin.webhook_config_hint_lark")}),e.jsx("div",{className:"space-y-2",children:L.map(l=>e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-[var(--text-muted)] mb-1",children:l.label}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("code",{className:"flex-1 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-2 py-1 text-xs text-[var(--text-primary)] select-all overflow-x-auto",children:l.url}),e.jsx(O,{text:l.url})]}),e.jsx("div",{className:"mt-0.5 text-xs text-[var(--text-muted)]",children:l.hint})]},l.label))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t("admin.app_id")}),e.jsx("div",{className:"mb-1 text-xs text-[var(--text-muted)]",children:t(o==="slack"?"admin.app_id_hint_slack":"admin.app_id_hint_lark")}),e.jsx("input",{type:"text",placeholder:"platform application id",value:g,onChange:l=>u(l.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)]"})]}),o==="slack"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t(i?"admin.bot_token_keep_current":"admin.bot_token")}),e.jsx("div",{className:"mb-1 text-xs text-[var(--text-muted)]",children:t("admin.bot_token_hint")}),e.jsx("input",{type:"password",placeholder:t("admin.bot_token_placeholder"),value:c,onChange:l=>N(l.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:t(i?"admin.signing_secret_keep_current":"admin.signing_secret")}),e.jsx("div",{className:"mb-1 text-xs text-[var(--text-muted)]",children:t("admin.signing_secret_hint")}),e.jsx("input",{type:"password",placeholder:t("admin.signing_secret_placeholder"),value:p,onChange:l=>h(l.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:t(i?"admin.app_secret_keep_current":"admin.app_secret")}),e.jsx("div",{className:"mb-1 text-xs text-[var(--text-muted)]",children:t("admin.app_secret_hint_lark")}),e.jsx("input",{type:"password",placeholder:"platform application secret",value:c,onChange:l=>N(l.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",{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:v,children:t("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:k,onClick:a,children:t(k?i?"common.saving":"common.creating":i?"common.save_changes":"common.create")})]})]})]})}function Q({isOpen:r,bot:j,onClose:f,onUpdated:m}){const{t:s}=E(),[t,i]=n.useState([]),[C,y]=n.useState([]),[o,b]=n.useState(!1),[g,u]=n.useState(!1),[c,N]=n.useState(""),[p,h]=n.useState(""),[k,w]=n.useState(""),[S,x]=n.useState(""),v=n.useCallback(async()=>{try{const d=await _.get(`admin/bots/${j.id}/bindings`).json();i(d)}catch{}},[j.id]);n.useEffect(()=>{r&&v()},[r,v]);const a=n.useCallback(async()=>{try{const d=await _.get("web/projects").json();y(d)}catch{}},[]);n.useEffect(()=>{r&&a()},[r,a]);const I=async()=>{if(x(""),!c.trim()||!p.trim()||!k){x(s("admin.chat_binding_all_fields_required"));return}try{b(!0),await _.post(`admin/bots/${j.id}/bindings`,{json:{platformChatId:c.trim(),chatName:p.trim(),projectKey:k}}).json(),N(""),h(""),w(""),u(!1),m()}catch(d){const L=d instanceof Error?d.message:s("admin.failed_to_add_binding");x(L)}finally{b(!1)}},$=async d=>{try{await _.delete(`admin/bots/${j.id}/bindings`,{json:{platformChatId:d.platformChatId}}),i(L=>L.filter(l=>l.id!==d.id)),m()}catch{}};return r?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:f}),e.jsxs("div",{className:"relative z-10 w-full max-w-[600px] 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.jsx("h3",{className:"text-sm text-[var(--text-primary)]",children:s("admin.chat_binding_title",{name:j.name})}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:f,children:e.jsx(D,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"px-5 py-5",children:[S&&e.jsx("div",{className:"mb-4 rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:S}),t.length===0&&!g?e.jsx("p",{className:"py-4 text-center text-xs text-[var(--text-muted)]",children:s("admin.chat_binding_no_bindings")}):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)] text-left text-[var(--text-muted)]",children:[e.jsx("th",{className:"pb-2 pr-4 font-normal",children:s("admin.chat_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:s("admin.chat_id")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:s("admin.project")}),e.jsx("th",{className:"pb-2 font-normal",children:s("common.remove")})]})}),e.jsx("tbody",{children:t.map(d=>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:d.chatName}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:d.platformChatId}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:d.projectKey}),e.jsx("td",{className:"py-2.5",children:e.jsx("button",{type:"button",className:"rounded-[4px] p-1.5 text-red-400 hover:text-red-300 hover:bg-white/[0.05] transition-colors",onClick:()=>$(d),children:e.jsx(F,{className:"h-3.5 w-3.5"})})})]},d.id))})]})}),g&&e.jsxs("div",{className:"mt-4 space-y-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] p-4",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:s("admin.chat_binding_add")}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:s("admin.chat_id")}),e.jsx("input",{type:"text",placeholder:s("admin.chat_binding_id_placeholder"),value:c,onChange:d=>N(d.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:s("admin.chat_name")}),e.jsx("input",{type:"text",placeholder:s("admin.chat_binding_name_placeholder"),value:p,onChange:d=>h(d.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:s("admin.project")}),e.jsx(M,{value:k,onChange:w,options:C.map(d=>({value:d.key,label:`${d.name} (${d.key})`})),placeholder:s("admin.chat_binding_select_project")})]}),e.jsxs("div",{className:"flex justify-end gap-2",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:()=>u(!1),children:s("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:o,onClick:I,children:s(o?"admin.chat_binding_adding":"admin.add_binding")})]})]})]}),e.jsxs("div",{className:"flex items-center justify-between border-t border-[var(--border)] px-5 py-4",children:[e.jsx("div",{children:!g&&e.jsxs("button",{type:"button",className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] transition-colors",onClick:()=>u(!0),children:[e.jsx(q,{className:"h-3.5 w-3.5"}),s("admin.add_binding")]})}),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:f,children:s("common.close")})]})]})]}):null}function ce(){const{t:r}=E(),[j,f]=n.useState(!1),[m,s]=n.useState(null),[t,i]=n.useState(null),[C,y]=n.useState(!1),[o,b]=n.useState(null),[g,u]=n.useState(!1),{data:c,loading:N,refetch:p}=P(()=>_.get("admin/bots").json(),[]),{data:h,loading:k,refetch:w}=P(()=>_.get("admin/bots/all-bindings").json(),[]);async function S(){if(o){u(!0);try{await _.delete(`admin/bots/${o.id}`),y(!1),b(null),p()}catch{U.error(r("admin.failed_to_delete_bot"))}finally{u(!1)}}}function x(a){switch(a){case"lark":return"text-blue-400";case"slack":return"text-yellow-400";default:return"text-[var(--text-secondary)]"}}function v(a){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:r("common.edit"),onClick:()=>s(a),children:e.jsx(V,{className:"h-3.5 w-3.5"})}),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:r("admin.chat_bindings"),onClick:()=>i(a),children:e.jsx(X,{className:"h-3.5 w-3.5"})}),e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-red-400 hover:text-red-300 hover:bg-white/[0.05] transition-colors",title:r("common.delete"),onClick:()=>{b(a),y(!0)},children:e.jsx(F,{className:"h-3.5 w-3.5"})})]})}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:r("admin.bots_title")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("admin.bots_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:()=>{s(null),f(!0)},children:[e.jsx(q,{className:"h-3.5 w-3.5"}),r("admin.create_bot")]})]}),N?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(T,{rows:3})}):!c||c.length===0?e.jsx(R,{icon:H,title:r("admin.no_bots_configured"),description:r("admin.add_bot_desc"),actionLabel:r("admin.create_bot"),onAction:()=>{s(null),f(!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:r("admin.bot_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.platform")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.app_id")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.status")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("common.created_at")}),e.jsx("th",{className:"pb-2 font-normal",children:r("common.actions")})]})}),e.jsx("tbody",{children:c.map(a=>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:a.name}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:x(a.platform),children:a.platform})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:a.appId}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:A(a.status),children:a.status})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-muted)]",children:new Date(a.createdAt).toLocaleDateString()}),e.jsx("td",{className:"py-2.5",children:v(a)})]},a.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3",children:c.map(a=>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:a.name}),v(a)]}),e.jsxs("div",{className:"flex items-center gap-3 text-[11px]",children:[e.jsx("span",{className:x(a.platform),children:a.platform}),e.jsx("span",{className:A(a.status),children:a.status})]}),e.jsx("div",{className:"mt-1 text-[11px] text-[var(--text-secondary)] truncate",children:a.appId})]},a.id))})]}),e.jsx(J,{isOpen:j||!!m,onClose:()=>{f(!1),s(null)},onCreated:p,editBot:m,onEditClose:()=>s(null)}),t&&e.jsx(Q,{isOpen:!!t,bot:t,onClose:()=>i(null),onUpdated:()=>{p(),w()}}),e.jsx(W,{isOpen:C,onClose:()=>{y(!1),b(null)},onConfirm:S,title:r("admin.delete_bot"),message:r("admin.delete_bot_confirm",{name:(o==null?void 0:o.name)??""}),confirmLabel:r("common.delete"),confirmVariant:"danger",isLoading:g}),e.jsxs("div",{className:"mt-8",children:[e.jsxs("h2",{className:"mb-4 text-sm text-[var(--text-primary)]",children:[r("admin.chat_bindings"),e.jsx("span",{className:"ml-2 text-[var(--text-muted)]",children:r("admin.chat_bindings_subtitle")})]}),k?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(T,{rows:3})}):!h||h.length===0?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-8 text-center",children:e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("admin.no_chat_bindings")})}):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:r("admin.bot")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.platform")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.chat_id")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.chat_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.project")}),e.jsx("th",{className:"pb-2 font-normal",children:r("common.created_at")})]})}),e.jsx("tbody",{children:h.map(a=>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:a.botName}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:x(a.platform),children:a.platform})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:a.platformChatId}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:a.chatName??"-"}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:a.projectKey??"-"}),e.jsx("td",{className:"py-2.5 text-[var(--text-muted)]",children:new Date(a.createdAt).toLocaleDateString()})]},a.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3",children:h.map(a=>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-1",children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)] font-medium",children:a.botName}),e.jsx("span",{className:`text-[11px] ${x(a.platform)}`,children:a.platform})]}),e.jsx("div",{className:"text-[11px] text-[var(--text-secondary)] truncate",children:a.platformChatId}),e.jsxs("div",{className:"flex items-center gap-3 mt-1 text-[11px] text-[var(--text-muted)]",children:[e.jsx("span",{children:a.chatName??"-"}),e.jsx("span",{children:a.projectKey??"-"})]})]},a.id))})]})]})]})}export{ce as default};
@@ -0,0 +1,33 @@
1
+ import{j as e}from"./index-uDLAla67.js";import{a as s}from"./DocsPrimitives-DS0DquzY.js";import"./copy-CFKtBHG3.js";const r=[{command:"develop",alias:"dev",example:'@bot develop "fix login bug" --project WEB',description:"create a new task"},{command:"develop",alias:"dev",example:'@bot develop "deploy" --on worker-1',description:"create a task on a specific worker"},{command:"progress",alias:"",example:"@bot progress #42",description:"check task progress"},{command:"cancel",alias:"",example:"@bot cancel #42",description:"cancel a running task"},{command:"retry",alias:"",example:"@bot retry #42",description:"retry a failed task"},{command:"list",alias:"ls",example:"@bot list --project WEB",description:"list recent tasks"},{command:"confirm",alias:"",example:"@bot confirm #42",description:"confirm a pending stage"},{command:"workspace",alias:"ws",example:"@bot workspace #42",description:"show task workspace info"},{command:"logs",alias:"log",example:"@bot logs #42",description:"view task logs"},{command:"drain",alias:"",example:"@bot drain worker-1",description:"drain a worker (stop accepting new tasks)"},{command:"undrain",alias:"",example:"@bot undrain worker-1",description:"resume a drained worker"},{command:"bind",alias:"",example:"@bot bind",description:"link your chat account to your overlord account"},{command:"info",alias:"",example:"@bot info",description:"show chat id, user id, and link status"},{command:"help",alias:"",example:"@bot help",description:"show available commands"}];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",{children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// overview"}),e.jsxs("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:["overlord supports creating tasks via chat bots. users can ",e.jsx("code",{className:"text-[var(--accent)]",children:'@bot develop "fix the login bug"'})," in a group chat, and overlord dispatches the task automatically. notifications are sent back through the same channel."]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// lark setup"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 1. create a lark app"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["on ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"lark open platform"})," (open.larksuite.com) → custom app:"]}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsxs("li",{children:["— note the ",e.jsx("span",{className:"text-[var(--accent)]",children:"app id"})," and ",e.jsx("span",{className:"text-[var(--accent)]",children:"app secret"})]}),e.jsxs("li",{children:["— event subscriptions: ",e.jsx("code",{className:"text-[var(--accent)]",children:"im.message.receive_v1"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"card.action.trigger"})]}),e.jsxs("li",{children:["— request url: ",e.jsx("code",{className:"text-[var(--text-secondary)]",children:"https://your-overlord-server.com/webhook/lark"})]}),e.jsx("li",{children:"— enable bot capability"}),e.jsxs("li",{children:["— permissions: ",e.jsx("code",{className:"text-[var(--accent)]",children:"im:message"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"im:message:send_as_bot"})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 2. register in overlord"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"via admin → bot management → add bot, or via the api:"}),e.jsx(s,{code:`curl -X POST https://your-server:9000/api/admin/bots \\
2
+ -H "Authorization: Bearer $TOKEN" \\
3
+ -H "Content-Type: application/json" \\
4
+ -d '{
5
+ "platform": "lark",
6
+ "appId": "cli_xxx",
7
+ "appSecret": "your-app-secret",
8
+ "webhookToken": "your-verification-token",
9
+ "name": "Overlord Bot"
10
+ }'`})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 3. bind chat groups to projects"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"each chat group is bound to a default project so users don't need to specify --project every time:"}),e.jsx(s,{code:`curl -X POST https://your-server:9000/api/admin/bots/:botId/bindings \\
11
+ -H "Authorization: Bearer $TOKEN" \\
12
+ -H "Content-Type: application/json" \\
13
+ -d '{
14
+ "platformChatId": "oc_xxx",
15
+ "projectKey": "PROJ",
16
+ "chatName": "Project Dev Group"
17
+ }'`})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 4. link developer accounts"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["each developer's lark open id must be linked to their overlord account via the ",e.jsx("code",{className:"text-[var(--accent)]",children:"platform_uid"})," field. this mapping allows overlord to identify who is issuing bot commands."]}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"update via admin → developers → edit, setting the platform uid to their lark open id."})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// slack setup"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 1. create a slack app"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["go to ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"slack api"})," (api.slack.com/apps) → create new app → from scratch."]}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["note the ",e.jsx("span",{className:"text-[var(--accent)]",children:"app id"})," and ",e.jsx("span",{className:"text-[var(--accent)]",children:"signing secret"})," from basic information."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 2. configure bot token scopes"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"under oauth & permissions, add these bot token scopes:"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsxs("li",{children:["— ",e.jsx("code",{className:"text-[var(--accent)]",children:"chat:write"})," — send messages"]}),e.jsxs("li",{children:["— ",e.jsx("code",{className:"text-[var(--accent)]",children:"chat:write.public"})," — send messages to channels the bot isn't a member of"]}),e.jsxs("li",{children:["— ",e.jsx("code",{className:"text-[var(--accent)]",children:"app_mentions:read"})," — receive @bot mentions"]}),e.jsxs("li",{children:["— ",e.jsx("code",{className:"text-[var(--accent)]",children:"im:read"})," — read direct messages"]}),e.jsxs("li",{children:["— ",e.jsx("code",{className:"text-[var(--accent)]",children:"im:write"})," — send direct messages"]}),e.jsxs("li",{children:["— ",e.jsx("code",{className:"text-[var(--accent)]",children:"users:read"})," — look up user info"]})]}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["install the app to your workspace and copy the ",e.jsx("span",{className:"text-[var(--accent)]",children:"bot user oauth token"})," (xoxb-...)."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 3. configure event subscriptions"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"under event subscriptions:"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsx("li",{children:"— enable events"}),e.jsxs("li",{children:["— set request url: ",e.jsx("code",{className:"text-[var(--text-secondary)]",children:"https://your-overlord-server.com/webhook/slack/events"})]}),e.jsxs("li",{children:["— subscribe to bot events: ",e.jsx("code",{className:"text-[var(--accent)]",children:"app_mention"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"message.im"})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 4. enable interactivity"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"under interactivity & shortcuts:"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsx("li",{children:"— toggle on"}),e.jsxs("li",{children:["— set request url: ",e.jsx("code",{className:"text-[var(--text-secondary)]",children:"https://your-overlord-server.com/webhook/slack/interact"})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 5. add a slash command (optional)"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"under slash commands → create new command:"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsxs("li",{children:["— command: ",e.jsx("code",{className:"text-[var(--accent)]",children:"/overlord"})]}),e.jsxs("li",{children:["— request url: ",e.jsx("code",{className:"text-[var(--text-secondary)]",children:"https://your-overlord-server.com/webhook/slack/commands"})]}),e.jsx("li",{children:"— short description: run overlord bot commands"})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 6. register in overlord"}),e.jsx(s,{code:`curl -X POST https://your-server:9000/api/admin/bots \\
18
+ -H "Authorization: Bearer $TOKEN" \\
19
+ -H "Content-Type: application/json" \\
20
+ -d '{
21
+ "platform": "slack",
22
+ "appId": "A0XXXXXXX",
23
+ "appSecret": "xoxb-your-bot-token",
24
+ "webhookToken": "your-signing-secret",
25
+ "name": "Overlord Bot"
26
+ }'`}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["note: ",e.jsx("code",{className:"text-[var(--accent)]",children:"appSecret"})," = bot user oauth token, ",e.jsx("code",{className:"text-[var(--accent)]",children:"webhookToken"})," = signing secret."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 7. bind channels to projects"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["same as lark, but use the slack channel id (C0XXXXXXX) as ",e.jsx("code",{className:"text-[var(--accent)]",children:"platformChatId"}),":"]}),e.jsx(s,{code:`curl -X POST https://your-server:9000/api/admin/bots/:botId/bindings \\
27
+ -H "Authorization: Bearer $TOKEN" \\
28
+ -H "Content-Type: application/json" \\
29
+ -d '{
30
+ "platformChatId": "C0XXXXXXX",
31
+ "projectKey": "PROJ",
32
+ "chatName": "#project-dev"
33
+ }'`})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 8. link developer accounts"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["same as lark, but use the slack user id as ",e.jsx("code",{className:"text-[var(--accent)]",children:"platform_uid"}),". find it via the user's profile → more → copy member id."]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// bot commands"}),e.jsx("div",{className:"overflow-x-auto rounded-[4px] border border-[var(--border)]",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:"command"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"alias"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"example"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsx("tbody",{children:r.map((t,a)=>e.jsxs("tr",{className:"border-b border-[var(--border)] last:border-b-0",children:[e.jsx("td",{className:"px-3 py-2 text-[var(--accent)] whitespace-nowrap",children:t.command}),e.jsx("td",{className:"px-3 py-2 text-[var(--text-secondary)]",children:t.alias||"—"}),e.jsx("td",{className:"px-3 py-2 text-[var(--text-secondary)] whitespace-nowrap",children:e.jsx("code",{children:t.example})}),e.jsx("td",{className:"px-3 py-2 text-[var(--text-muted)]",children:t.description})]},a))})]})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// interactive cards"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"when a pipeline reaches a confirmation stage, the bot sends an interactive card with action buttons (confirm / cancel / choice). users can respond directly from the chat interface without opening the web dashboard."})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// multi-bot architecture"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"overlord supports multiple bot instances. each project or group can have its own bot on any supported platform. all bots share the same overlord backend. the server identifies which bot to use based on the app_id in the incoming request."}),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:"// a discord adapter is planned for a future release. the adapter interface is extensible — custom platform support can be added by implementing the adapter interface."})})]})]})})}export{l as default};
@@ -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};