@overlordai/server 1.0.180 → 1.0.181

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 (148) hide show
  1. package/database/migrations/022-binding-multi-external-key.sql +31 -0
  2. package/dist/adapters/command-parser.utils.d.ts.map +1 -1
  3. package/dist/adapters/command-parser.utils.js +9 -0
  4. package/dist/adapters/command-parser.utils.js.map +1 -1
  5. package/dist/adapters/nlu.service.d.ts.map +1 -1
  6. package/dist/adapters/nlu.service.js +4 -2
  7. package/dist/adapters/nlu.service.js.map +1 -1
  8. package/dist/connectors/connector-closure.service.js +1 -1
  9. package/dist/connectors/connector-closure.service.js.map +1 -1
  10. package/dist/connectors/figma/figma.connector.js +1 -1
  11. package/dist/connectors/figma/figma.connector.js.map +1 -1
  12. package/dist/connectors/issue-ref-helpers.d.ts +13 -1
  13. package/dist/connectors/issue-ref-helpers.d.ts.map +1 -1
  14. package/dist/connectors/issue-ref-helpers.js +22 -1
  15. package/dist/connectors/issue-ref-helpers.js.map +1 -1
  16. package/dist/connectors/jira/jira.connector.js +1 -1
  17. package/dist/connectors/jira/jira.connector.js.map +1 -1
  18. package/dist/database/repositories/connector.repository.d.ts +1 -1
  19. package/dist/database/repositories/connector.repository.d.ts.map +1 -1
  20. package/dist/database/repositories/connector.repository.js +18 -3
  21. package/dist/database/repositories/connector.repository.js.map +1 -1
  22. package/dist/dispatcher/dispatcher.service.d.ts +3 -1
  23. package/dist/dispatcher/dispatcher.service.d.ts.map +1 -1
  24. package/dist/dispatcher/dispatcher.service.js +9 -3
  25. package/dist/dispatcher/dispatcher.service.js.map +1 -1
  26. package/dist/web/admin/admin-connector.controller.d.ts.map +1 -1
  27. package/dist/web/admin/admin-connector.controller.js +38 -7
  28. package/dist/web/admin/admin-connector.controller.js.map +1 -1
  29. package/dist/web/task.controller.d.ts +3 -1
  30. package/dist/web/task.controller.d.ts.map +1 -1
  31. package/dist/web/task.controller.js +9 -3
  32. package/dist/web/task.controller.js.map +1 -1
  33. package/package.json +4 -4
  34. package/public/assets/{AccessTokensPage-DSRaXrXC.js → AccessTokensPage-Bi3uxA3T.js} +1 -1
  35. package/public/assets/{AdminPage-quo_nZu0.js → AdminPage-Djnac3LM.js} +1 -1
  36. package/public/assets/{AgentCliPage-B_cQKyB7.js → AgentCliPage-C3yOGirY.js} +1 -1
  37. package/public/assets/{ApiReferencePage-CkzYCBis.js → ApiReferencePage-DjPPezM_.js} +1 -1
  38. package/public/assets/{ArchitecturePage-B0j0c21l.js → ArchitecturePage-BRnu7fs6.js} +1 -1
  39. package/public/assets/{AuditLogPage-DdW6Rjbw.js → AuditLogPage-CSU9Kq4E.js} +1 -1
  40. package/public/assets/{AutomationCreatePage-DglF_EDi.js → AutomationCreatePage-C5_skUAW.js} +1 -1
  41. package/public/assets/{AutomationDetailPage-C3aTSg-j.js → AutomationDetailPage-Dm7bglg6.js} +1 -1
  42. package/public/assets/{AutomationEditPage-CcC-aVlt.js → AutomationEditPage-DsXULmbq.js} +1 -1
  43. package/public/assets/{AutomationListPage-DR_CE70e.js → AutomationListPage-C5TyZJxq.js} +1 -1
  44. package/public/assets/{AutomationRunDetailPage-CZ4pxP1x.js → AutomationRunDetailPage-Dv8qazt9.js} +1 -1
  45. package/public/assets/{BindPlatformPage-Bn9R5es1.js → BindPlatformPage-DSZ8vxn8.js} +1 -1
  46. package/public/assets/{BotIntegrationPage-BF9ii7I9.js → BotIntegrationPage-Sq_s8bs2.js} +1 -1
  47. package/public/assets/{BotManage-CVBala6Z.js → BotManage-BI685RGY.js} +1 -1
  48. package/public/assets/{BotSetupPage-B2w5uyZ-.js → BotSetupPage-CFWirxCn.js} +1 -1
  49. package/public/assets/{ChangelogPage-CQ09e6Bp.js → ChangelogPage-Bt-JNRC1.js} +1 -1
  50. package/public/assets/{Checkbox-ksCSqTDb.js → Checkbox-CyCYOM9B.js} +1 -1
  51. package/public/assets/{CliReferencePage-CXSJI2NI.js → CliReferencePage-BF5nRFvL.js} +1 -1
  52. package/public/assets/{ConfirmStageDialog-pT-iA956.js → ConfirmStageDialog-Dz9ZiEHm.js} +1 -1
  53. package/public/assets/ConnectorsManage-CNxs8bY8.js +6 -0
  54. package/public/assets/ConnectorsPage-1JnDN5xq.js +48 -0
  55. package/public/assets/{DeploymentPage-CUZ5KK3d.js → DeploymentPage-CWvy64KR.js} +1 -1
  56. package/public/assets/{DevWorkflowPage-j3fyS7Y_.js → DevWorkflowPage-B97oJghl.js} +1 -1
  57. package/public/assets/{DeveloperManage-BKyKIipO.js → DeveloperManage-CnS99jVe.js} +1 -1
  58. package/public/assets/{DeveloperSetupPage-BZoCYXpK.js → DeveloperSetupPage-DdKufm_Z.js} +1 -1
  59. package/public/assets/{DocsIndexPage-BvqoOdfl.js → DocsIndexPage-DRuSeBRo.js} +1 -1
  60. package/public/assets/{DocsLayout-C59ONhjV.js → DocsLayout-pkd6OloA.js} +1 -1
  61. package/public/assets/{DocsPrimitives-CipzCTEu.js → DocsPrimitives-CdPzgbGD.js} +1 -1
  62. package/public/assets/{EditProjectPage-Bi5rAJ13.js → EditProjectPage-C4UC2YNY.js} +1 -1
  63. package/public/assets/{EmptyState-DV7LUJer.js → EmptyState-D1Mkvsbg.js} +1 -1
  64. package/public/assets/{EnvVariablesPage-jcd0s6Kk.js → EnvVariablesPage-BXuL-UHy.js} +1 -1
  65. package/public/assets/{HomePage-CG2VZtpZ.js → HomePage-WEsutho7.js} +1 -1
  66. package/public/assets/{InfoRow-DtLvNV_J.js → InfoRow-pIzmMwL4.js} +1 -1
  67. package/public/assets/{InstallationPage-BCxuKwTs.js → InstallationPage-DFDKDl6y.js} +1 -1
  68. package/public/assets/{LandingPage-CnUihNQl.js → LandingPage-DlVf5vQm.js} +1 -1
  69. package/public/assets/{LocalDevelopmentPage-BvDGaeS9.js → LocalDevelopmentPage-CqR4oA4I.js} +1 -1
  70. package/public/assets/{LoginPage-CnO_s0hQ.js → LoginPage-CJWqhYZ5.js} +1 -1
  71. package/public/assets/{MetricBar-DnOi5rBL.js → MetricBar-x_HuL3WY.js} +1 -1
  72. package/public/assets/{MultiSelect-B-bLdzr4.js → MultiSelect-BOCBr8zQ.js} +1 -1
  73. package/public/assets/{NotFoundPage-H5psGKE8.js → NotFoundPage-Oz_0wqgE.js} +1 -1
  74. package/public/assets/{OnboardingGuide-Cj05MAli.js → OnboardingGuide-D9Hixolx.js} +1 -1
  75. package/public/assets/{PermissionsPage-CDjMHQvq.js → PermissionsPage-CL-WIbc4.js} +1 -1
  76. package/public/assets/{PipelineConfigPage-D_TTvIoA.js → PipelineConfigPage-DVK8MXyL.js} +1 -1
  77. package/public/assets/{PipelineEditorPage-xKDOKA_r.js → PipelineEditorPage-BPejALml.js} +1 -1
  78. package/public/assets/{PlanPage-pjNFq5I8.js → PlanPage-CU10D21h.js} +1 -1
  79. package/public/assets/{ProfilePage-CS9IfoHU.js → ProfilePage-DjSSb9gE.js} +1 -1
  80. package/public/assets/{ProjectDetailPage-BFQsH4bl.js → ProjectDetailPage-bB4Js57i.js} +1 -1
  81. package/public/assets/{ProjectListPage-DzCFTq0z.js → ProjectListPage--I1w0_bI.js} +1 -1
  82. package/public/assets/{PtyTerminal-DWRVuu-D.js → PtyTerminal-CEEqo32e.js} +1 -1
  83. package/public/assets/{QuickAuth-DmFeLmAr.js → QuickAuth-DdX0tx6I.js} +1 -1
  84. package/public/assets/{RemoveMemberConfirmDialog-CHU9g7rJ.js → RemoveMemberConfirmDialog-rsA80nKv.js} +1 -1
  85. package/public/assets/{ReviewAggregatePage-Bf7aL-gD.js → ReviewAggregatePage-DVkt0S9v.js} +1 -1
  86. package/public/assets/{ReviewPage-DV9HrPzi.js → ReviewPage-BF2Uzaxt.js} +1 -1
  87. package/public/assets/{Select-xdty1j0i.js → Select-Z1Ruu5ET.js} +1 -1
  88. package/public/assets/{SettingsPage-DAIr4JkV.js → SettingsPage-Bo3wE5Mc.js} +1 -1
  89. package/public/assets/{Skeleton-CmBnyd29.js → Skeleton-CSQRa5CX.js} +1 -1
  90. package/public/assets/{SkillPage-Cj3pNfKV.js → SkillPage-Dh9e_Lfo.js} +1 -1
  91. package/public/assets/{TaskDetailPage-CLwDpv_i.js → TaskDetailPage-Cfl6T160.js} +1 -1
  92. package/public/assets/{TaskGuidePage-nIfi5sYx.js → TaskGuidePage-Cz5AstPW.js} +1 -1
  93. package/public/assets/{TaskListPage-BUcEF_A8.js → TaskListPage-Di0mIgQM.js} +1 -1
  94. package/public/assets/{TaskStatusBadge-4rifJwVC.js → TaskStatusBadge-BiKYxoLM.js} +1 -1
  95. package/public/assets/{TerminalHomePage-BfTnmFzn.js → TerminalHomePage-Df4V1BYP.js} +1 -1
  96. package/public/assets/{TokenManage-DUxh8mAN.js → TokenManage-CMxZrj7e.js} +1 -1
  97. package/public/assets/{Tooltip-CAj06OH3.js → Tooltip-DjmXgfn4.js} +1 -1
  98. package/public/assets/{TotpSetupPage-DGSu7E4H.js → TotpSetupPage-KLS9o2JZ.js} +1 -1
  99. package/public/assets/{WorkerDetailPage-BMQxaS56.js → WorkerDetailPage-B1JNZ4Lo.js} +1 -1
  100. package/public/assets/{WorkerListPage-Dblt6aZ1.js → WorkerListPage-Nb19zRX0.js} +1 -1
  101. package/public/assets/{WorkerOperationsPage-CzxRiINJ.js → WorkerOperationsPage-BrnEFrfl.js} +1 -1
  102. package/public/assets/{WorkerSetupGuidePage-WaRQgvcM.js → WorkerSetupGuidePage-D8UKL7Zt.js} +1 -1
  103. package/public/assets/{WorkerSetupPage-B5xXzfZ8.js → WorkerSetupPage-CWyDDmy-.js} +1 -1
  104. package/public/assets/{agent-type-options-BgAoGQFU.js → agent-type-options-CB0iYj4Z.js} +1 -1
  105. package/public/assets/{arrow-left-Dsd8akiF.js → arrow-left-C_vw-kEx.js} +1 -1
  106. package/public/assets/{arrow-right-BwFsEszb.js → arrow-right-Dd0H7A0R.js} +1 -1
  107. package/public/assets/{bot-C7wSfjw1.js → bot-DnUHQkGw.js} +1 -1
  108. package/public/assets/{chevron-down-SeRjAX4r.js → chevron-down-kiRdaTGv.js} +1 -1
  109. package/public/assets/{chevron-left-BvZWPLc1.js → chevron-left-BjQ_RWDi.js} +1 -1
  110. package/public/assets/{chevron-right-Dirw-Ueo.js → chevron-right-Cd7nI939.js} +1 -1
  111. package/public/assets/{chevron-up-D_UYsCj8.js → chevron-up-DH_W0A-K.js} +1 -1
  112. package/public/assets/{circle-alert-WAD2ix0l.js → circle-alert-DHi-ZC5Y.js} +1 -1
  113. package/public/assets/{clock-oJUEgAKB.js → clock-C0wYrh2Y.js} +1 -1
  114. package/public/assets/{copy-BWTAfZ7b.js → copy-x3TRsMrN.js} +1 -1
  115. package/public/assets/{developer-options-Czaxdx-w.js → developer-options-BuslJ1Mm.js} +1 -1
  116. package/public/assets/{download-l-ATQbZQ.js → download-Caxzdu6U.js} +1 -1
  117. package/public/assets/{external-link-BesNRyvW.js → external-link-Xpq_myyW.js} +1 -1
  118. package/public/assets/{git-fork-_pBPs-xc.js → git-fork-BPZdxvrF.js} +1 -1
  119. package/public/assets/{index-0QFy9ku9.js → index-Bq34NKPe.js} +3 -3
  120. package/public/assets/index-ILodqx8e.css +1 -0
  121. package/public/assets/{key-BilH6uAl.js → key-DSDcZD0n.js} +1 -1
  122. package/public/assets/{link-2-ELPNTQde.js → link-2-DlUa7W5s.js} +1 -1
  123. package/public/assets/{loader-circle-OCqj772N.js → loader-circle-Bbjs3UNM.js} +1 -1
  124. package/public/assets/{pencil-QmINK6St.js → pencil-mbtGj-qR.js} +1 -1
  125. package/public/assets/{play-CUByBpQ0.js → play-B6TrGDkx.js} +1 -1
  126. package/public/assets/{plug-CvdRvl-j.js → plug-CG6QKzKq.js} +1 -1
  127. package/public/assets/{plus-D38pnIMa.js → plus-BCUcEsOi.js} +1 -1
  128. package/public/assets/{power-CzLnYo_h.js → power-CyAjYDyH.js} +1 -1
  129. package/public/assets/{rotate-ccw-BsCb3qU2.js → rotate-ccw-DNMevmJD.js} +1 -1
  130. package/public/assets/{scroll-text-CF1Ze80E.js → scroll-text-DSkbgBii.js} +1 -1
  131. package/public/assets/{settings-CqcmKnX4.js → settings-CDRWAtMY.js} +1 -1
  132. package/public/assets/{skip-forward-DcSN0O55.js → skip-forward-BeUayP53.js} +1 -1
  133. package/public/assets/{status-colors-DlyerwQ7.js → status-colors-5_ZR5pcJ.js} +1 -1
  134. package/public/assets/{task-agent-Cgyq_UGX.js → task-agent-B-6g-uMU.js} +1 -1
  135. package/public/assets/{task-constants-D5ty4qUR.js → task-constants-B_4T9a02.js} +1 -1
  136. package/public/assets/{task.store-D_nwogGq.js → task.store-igwVC2gU.js} +1 -1
  137. package/public/assets/{timer-EysIetGz.js → timer-B8jrHGU0.js} +1 -1
  138. package/public/assets/{trash-2-CYdvAzYO.js → trash-2-BaFGTeyn.js} +1 -1
  139. package/public/assets/{useFetch-BqnEzaSJ.js → useFetch-C1wTw-Jt.js} +1 -1
  140. package/public/assets/{users-dmt7eU5B.js → users-BR3rVcV_.js} +1 -1
  141. package/public/assets/{wifi-Bore97VF.js → wifi-BbHJtTrb.js} +1 -1
  142. package/public/assets/{workflow-DLz7dyVN.js → workflow-CG74TuIT.js} +1 -1
  143. package/public/assets/{zap-DhNn8k7Z.js → zap-TfXpX22P.js} +1 -1
  144. package/public/index.html +2 -2
  145. package/public/sw.js +1 -1
  146. package/public/assets/ConnectorsManage-Dfl92aJZ.js +0 -6
  147. package/public/assets/ConnectorsPage-B65QSW6u.js +0 -48
  148. package/public/assets/index-CTXH5Ib6.css +0 -1
@@ -0,0 +1,6 @@
1
+ import{c as Y,a as q,v as I,r as o,j as e,X,h as b,t as P,s as Z}from"./index-Bq34NKPe.js";import{S as ee}from"./Select-Z1Ruu5ET.js";import{u as U}from"./useFetch-C1wTw-Jt.js";import{C as O}from"./Checkbox-CyCYOM9B.js";import{T as G}from"./trash-2-BaFGTeyn.js";import{P as H}from"./plus-BCUcEsOi.js";import{E as te}from"./EmptyState-D1Mkvsbg.js";import{T as re}from"./Skeleton-CSQRa5CX.js";import{P as ae}from"./plug-CG6QKzKq.js";import{C as J}from"./copy-x3TRsMrN.js";import{L as W}from"./loader-circle-Bbjs3UNM.js";import{P as se}from"./power-CyAjYDyH.js";import{P as ne}from"./pencil-mbtGj-qR.js";import{L as oe}from"./link-2-DlUa7W5s.js";import"./chevron-down-kiRdaTGv.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 ie=Y("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),le=[{value:"jira",label:"jira"},{value:"sentry",label:"sentry"},{value:"figma",label:"figma"}];function ce({isOpen:a,onClose:l,onCreated:T,editConnector:d}){const{t:r}=q(),i=!!d;I(a);const[y,K]=o.useState(""),[c,p]=o.useState("jira"),[h,$]=o.useState(""),[_,C]=o.useState(""),[A,E]=o.useState(!1),[N,v]=o.useState(""),[S,f]=o.useState(!1),[u,x]=o.useState(""),[w,D]=o.useState(""),[L,B]=o.useState(""),[j,s]=o.useState(""),[t,m]=o.useState(""),[g,F]=o.useState(""),[M,z]=o.useState("");o.useEffect(()=>{a&&(d?(K(d.name),p(d.platform),$(d.baseUrl??""),v(d.mentionKeyword??"")):(K(""),p("jira"),$(""),v("")),C(""),E(!1),D(""),B(""),s(""),m(""),F(""),z(""),f(!1),x(""))},[d,a]);async function Q(){if(x(""),!y.trim()){x(r("admin.connector_name_required"));return}const n={};if(c==="jira"){const R=j.trim(),V=w.trim()&&L.trim();if(!i&&!R&&!V){x(r("admin.connector_jira_creds_required"));return}R?n.personalAccessToken=j.trim():(w.trim()&&(n.email=w.trim()),L.trim()&&(n.apiToken=L.trim()))}else if(c==="sentry"){if(!i&&(!t.trim()||!g.trim())){x(r("admin.connector_sentry_creds_required"));return}t.trim()&&(n.authToken=t.trim()),g.trim()&&(n.org=g.trim())}else if(c==="figma"){if(!i&&!M.trim()){x(r("admin.connector_figma_creds_required"));return}if(!i&&!_.trim()){x(r("admin.connector_figma_webhook_required"));return}M.trim()&&(n.personalAccessToken=M.trim())}const k={name:y.trim()};i||(k.platform=c),i?(k.baseUrl=h.trim()||null,k.mentionKeyword=N.trim()):(h.trim()&&(k.baseUrl=h.trim()),N.trim()&&(k.mentionKeyword=N.trim())),Object.keys(n).length>0&&(k.credentials=n),_.trim()?k.webhookSecret=_.trim():i&&A&&(k.webhookSecret="");try{f(!0),i?await b.put(`admin/connectors/${d.id}`,{json:k}).json():await b.post("admin/connectors",{json:k}).json(),l(),T()}catch(R){const V=R instanceof Error?R.message:r(i?"admin.connector_failed_to_update":"admin.connector_failed_to_create");x(V)}finally{f(!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)]"}),e.jsxs("div",{className:"relative z-10 w-full max-w-[480px] max-h-[90vh] overflow-y-auto 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?`// ${r("admin.connector_edit")}`:`// ${r("admin.connector_create")}`}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:l,children:e.jsx(X,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-4 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("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("admin.connector_name")}),e.jsx("input",{type:"text",placeholder:"e.g. jira production",value:y,onChange:n=>K(n.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("admin.platform")}),e.jsx(ee,{value:c,onChange:p,options:le,disabled:i})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("admin.connector_base_url")}),e.jsx("input",{type:"text",placeholder:c==="jira"?"https://your-domain.atlassian.net":c==="sentry"?"https://sentry.io":"",value:h,onChange:n=>$(n.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)]"})]}),c==="jira"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-[11px] text-[var(--text-muted)]",children:r("admin.connector_jira_cloud_label")}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r(i?"admin.connector_jira_email_keep":"admin.connector_jira_email")}),e.jsx("input",{type:"text",placeholder:"user@example.com",value:w,onChange:n=>{D(n.target.value),n.target.value&&s("")},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(i?"admin.connector_jira_token_keep":"admin.connector_jira_token")}),e.jsx("input",{type:"password",placeholder:"api token",value:L,onChange:n=>{B(n.target.value),n.target.value&&s("")},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("div",{className:"text-[11px] text-[var(--text-muted)]",children:r("admin.connector_jira_pat_label")}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r(i?"admin.connector_jira_pat_keep":"admin.connector_jira_pat")}),e.jsx("input",{type:"password",placeholder:"personal access token",value:j,onChange:n=>{s(n.target.value),n.target.value&&(D(""),B(""))},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)]"})]})]}),c==="sentry"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r(i?"admin.connector_sentry_token_keep":"admin.connector_sentry_token")}),e.jsx("input",{type:"password",placeholder:"auth token",value:t,onChange:n=>m(n.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(i?"admin.connector_sentry_org_keep":"admin.connector_sentry_org")}),e.jsx("input",{type:"text",placeholder:"organization slug",value:g,onChange:n=>F(n.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)]"})]})]}),c==="figma"&&e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r(i?"admin.connector_figma_token_keep":"admin.connector_figma_token")}),e.jsx("input",{type:"password",placeholder:"personal access token",value:M,onChange:n=>z(n.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(i?"admin.connector_webhook_secret_keep":"admin.connector_webhook_secret")}),e.jsx("input",{type:"password",placeholder:"webhook secret",value:_,onChange:n=>C(n.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)]"}),i&&c!=="figma"&&e.jsxs("label",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-[var(--text-muted)] cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:A,onChange:n=>E(n.target.checked),className:"rounded-[4px]"}),r("admin.connector_webhook_secret_clear")]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("admin.connector_mention_keyword")}),e.jsx("div",{className:"mb-1 text-xs text-[var(--text-muted)]",children:r("admin.connector_mention_keyword_hint")}),e.jsx("input",{type:"text",placeholder:"e.g. @overlord",value:N,onChange:n=>v(n.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:l,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:S,onClick:Q,children:r(S?i?"common.saving":"common.creating":i?"common.save_changes":"common.create")})]})]})]}):null}function de({isOpen:a,connector:l,onClose:T,onUpdated:d}){const{t:r}=q();I(a);const[i,y]=o.useState(""),[K,c]=o.useState(""),[p,h]=o.useState(!1),[$,_]=o.useState(!1),[C,A]=o.useState(""),[E,N]=o.useState(!1),[v,S]=o.useState(!1),[f,u]=o.useState("");o.useEffect(()=>{a&&u("")},[a]);const{data:x,refetch:w}=U(()=>b.get(`admin/connectors/${l.id}/bindings`).json(),[l.id]),{data:D}=U(()=>b.get("admin/projects").json(),[]);async function L(){if(u(""),!i.trim()){u(r("admin.connector_binding_project_required"));return}try{N(!0),await b.post(`admin/connectors/${l.id}/bindings`,{json:{projectKey:i.trim(),externalProjectKey:K.trim()||void 0,isDefault:p,autoDesignReview:l.platform==="figma"?$:void 0,statusMapping:C.trim()?{done:C.trim()}:void 0}}).json(),y(""),c(""),h(!1),_(!1),A(""),w(),d()}catch(s){const t=s instanceof Error?s.message:r("admin.connector_binding_failed_to_add");u(t)}finally{N(!1)}}async function B(s){if(!v){S(!0);try{await b.delete(`admin/connectors/bindings/${s}`),w(),d()}catch{P.error(r("admin.connector_binding_failed_to_delete"))}finally{S(!1)}}}async function j(s,t){if(!v){S(!0);try{await b.put(`admin/connectors/bindings/${s}`,{json:t}),w(),d()}catch{P.error(r("admin.connector_binding_failed_to_update"))}finally{S(!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)]"}),e.jsxs("div",{className:"relative z-10 w-full max-w-[540px] max-h-[90vh] overflow-y-auto 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:r("admin.connector_bindings_title",{name:l.name})}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:T,children:e.jsx(X,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"px-5 py-5 space-y-4",children:[x&&x.length>0?e.jsx("div",{className:"space-y-2",children:x.map(s=>{var t;return e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] px-3 py-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-[var(--text-primary)]",children:s.projectKey}),e.jsx("input",{type:"text",defaultValue:s.externalProjectKey??"",placeholder:r("admin.connector_binding_external_key"),onBlur:m=>{const g=m.target.value.trim()||null;g!==(s.externalProjectKey??null)&&j(s.id,{externalProjectKey:g})},className:"w-20 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-1.5 py-0.5 text-[11px] text-[var(--text-secondary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"}),e.jsxs("label",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)] cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:s.isDefault,onChange:()=>j(s.id,{isDefault:!s.isDefault}),className:"rounded-[4px]"}),r("admin.connector_binding_default")]})]}),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",title:r("common.delete"),onClick:()=>B(s.id),children:e.jsx(G,{className:"h-3.5 w-3.5"})})]}),e.jsxs("div",{className:"mt-1.5 flex items-center gap-3 text-[11px] text-[var(--text-muted)]",children:[(l.platform==="jira"||l.platform==="sentry")&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs("span",{children:[r("admin.connector_binding_status_done"),":"]}),e.jsx("input",{type:"text",defaultValue:((t=s.statusMapping)==null?void 0:t.done)??"",placeholder:l.platform==="jira"?"Done":"resolved",onBlur:m=>{var M;const g=m.target.value.trim(),F=((M=s.statusMapping)==null?void 0:M.done)??"";g!==F&&j(s.id,{statusMapping:g?{done:g}:null})},className:"w-24 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-1.5 py-0.5 text-[11px] text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),l.platform==="figma"&&e.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:s.autoDesignReview,onChange:()=>j(s.id,{autoDesignReview:!s.autoDesignReview}),className:"rounded-[4px]"}),r("admin.connector_binding_auto_review")]})]})]},s.id)})}):e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("admin.connector_no_bindings")}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-3 space-y-3",children:[e.jsx("div",{className:"text-xs text-[var(--text-muted)]",children:r("admin.connector_add_binding")}),f&&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:f}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("admin.connector_binding_project")}),D&&D.length>0?e.jsxs("select",{value:i,onChange:s=>y(s.target.value),className:"w-full appearance-none rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] focus:outline-none focus:border-[var(--accent)]",children:[e.jsx("option",{value:"",children:r("admin.connector_binding_select_project")}),D.map(s=>e.jsxs("option",{value:s.key,children:[s.key," — ",s.name]},s.key))]}):e.jsx("input",{type:"text",placeholder:"project key",value:i,onChange:s=>y(s.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] 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("admin.connector_binding_external_key")}),e.jsx("input",{type:"text",placeholder:l.platform==="jira"?"PROJ":l.platform==="sentry"?"my-project":"",value:K,onChange:s=>c(s.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),(l.platform==="jira"||l.platform==="sentry")&&e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:r("admin.connector_binding_status_done")}),e.jsx("input",{type:"text",placeholder:l.platform==="jira"?"e.g. Done":"e.g. resolved",value:C,onChange:s=>A(s.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsx(O,{checked:p,onCheckedChange:h,label:r("admin.connector_binding_is_default"),containerClassName:"gap-2"}),l.platform==="figma"&&e.jsx(O,{checked:$,onCheckedChange:_,label:r("admin.connector_binding_auto_review"),containerClassName:"gap-2"}),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 disabled:opacity-50",disabled:E,onClick:L,children:[e.jsx(H,{className:"h-3.5 w-3.5"}),r(E?"admin.connector_binding_adding":"admin.connector_add_binding")]})]})]}),e.jsx("div",{className:"flex items-center justify-end 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:T,children:r("common.close")})})]})]}):null}function Ce(){const{t:a}=q(),[l,T]=o.useState(!1),[d,r]=o.useState(null),[i,y]=o.useState(null),[K,c]=o.useState(!1),[p,h]=o.useState(null),[$,_]=o.useState(!1),[C,A]=o.useState(null),[E,N]=o.useState(null),{data:v,loading:S,refetch:f}=U(()=>b.get("admin/connectors").json(),[]),{data:u,refetch:x}=U(()=>b.get("admin/connectors/bindings").json(),[]);async function w(){if(p){_(!0);try{await b.delete(`admin/connectors/${p.id}`),c(!1),h(null),f(),x()}catch{P.error(a("admin.connector_failed_to_delete"))}finally{_(!1)}}}async function D(t){A(t.id);try{(await b.post(`admin/connectors/${t.id}/validate`).json()).valid?P.success(a("admin.connector_valid")):P.error(a("admin.connector_invalid"))}catch{P.error(a("admin.connector_validate_failed"))}finally{A(null)}}async function L(t){const m=t.status==="active"?"disabled":"active";N(t.id);try{await b.put(`admin/connectors/${t.id}`,{json:{status:m}}),f()}catch{P.error(a("admin.connector_failed_to_update"))}finally{N(null)}}function B(t){switch(t){case"jira":return"text-blue-400";case"sentry":return"text-purple-400";case"figma":return"text-pink-400";default:return"text-[var(--text-secondary)]"}}function j(t){switch(t){case"active":return"text-green-400";case"disabled":return"text-red-400";default:return"text-[var(--text-muted)]"}}function s(t){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:a("admin.connector_validate"),onClick:()=>D(t),disabled:C===t.id,children:C===t.id?e.jsx(W,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(ie,{className:"h-3.5 w-3.5"})}),e.jsx("button",{type:"button",className:`rounded-[4px] p-2.5 md:p-1.5 hover:bg-white/[0.05] transition-colors ${t.status==="active"?"text-green-400 hover:text-green-300":"text-red-400 hover:text-red-300"}`,title:t.status==="active"?a("admin.connector_disable"):a("admin.connector_enable"),onClick:()=>L(t),disabled:E===t.id,children:E===t.id?e.jsx(W,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(se,{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:a("common.edit"),onClick:()=>r(t),children:e.jsx(ne,{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:a("admin.connector_bindings"),onClick:()=>y(t),children:e.jsx(oe,{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:a("common.delete"),onClick:()=>{h(t),c(!0)},children:e.jsx(G,{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:a("admin.connectors_title")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("admin.connectors_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:()=>{r(null),T(!0)},children:[e.jsx(H,{className:"h-3.5 w-3.5"}),a("admin.connector_create")]})]}),S?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(re,{rows:3})}):!v||v.length===0?e.jsx(te,{icon:ae,title:a("admin.connectors_empty"),description:a("admin.connectors_empty_desc"),actionLabel:a("admin.connector_create"),onAction:()=>{r(null),T(!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.connector_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.platform")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.connector_base_url")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.connector_webhook_url")}),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("common.created_at")}),e.jsx("th",{className:"pb-2 font-normal",children:a("common.actions")})]})}),e.jsx("tbody",{children:v.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",children:e.jsx("span",{className:B(t.platform),children:t.platform})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:t.baseUrl??"-"}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsxs("button",{type:"button",className:"flex items-center gap-1 text-[10px] text-[var(--text-muted)] hover:text-[var(--accent)] transition-colors",title:a("common.copy"),onClick:()=>{const m=window.location.port==="5173"?window.location.origin.replace(":5173",":9000"):window.location.origin;navigator.clipboard.writeText(`${m}/webhook/connector/${t.platform}/${t.id}`),P.success(a("admin.connector_webhook_copied"))},children:[e.jsxs("code",{className:"select-all",children:[window.location.origin,"/webhook/connector/",t.platform,"/",t.id]}),e.jsx(J,{className:"h-3 w-3 shrink-0"})]})}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:j(t.status),children:t.status})}),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:s(t)})]},t.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3",children:v.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}),s(t)]}),e.jsxs("div",{className:"flex items-center gap-3 text-[11px]",children:[e.jsx("span",{className:B(t.platform),children:t.platform}),e.jsx("span",{className:j(t.status),children:t.status})]}),t.baseUrl&&e.jsx("div",{className:"mt-1 text-[11px] text-[var(--text-secondary)] truncate",children:t.baseUrl}),e.jsxs("button",{type:"button",className:"mt-1 flex items-center gap-1 text-[10px] text-[var(--text-muted)] hover:text-[var(--accent)] transition-colors",onClick:()=>{const m=window.location.port==="5173"?window.location.origin.replace(":5173",":9000"):window.location.origin;navigator.clipboard.writeText(`${m}/webhook/connector/${t.platform}/${t.id}`),P.success(a("admin.connector_webhook_copied"))},children:[e.jsxs("span",{className:"truncate",children:[window.location.origin,"/webhook/connector/",t.platform,"/",t.id]}),e.jsx(J,{className:"h-3 w-3 shrink-0"})]})]},t.id))})]}),e.jsx(ce,{isOpen:l||!!d,onClose:()=>{T(!1),r(null)},onCreated:f,editConnector:d}),i&&e.jsx(de,{isOpen:!!i,connector:i,onClose:()=>y(null),onUpdated:()=>{f(),x()}}),e.jsx(Z,{isOpen:K,onClose:()=>{c(!1),h(null)},onConfirm:w,title:a("admin.connector_delete"),message:a("admin.connector_delete_confirm",{name:(p==null?void 0:p.name)??""}),confirmLabel:a("common.delete"),confirmVariant:"danger",isLoading:$}),e.jsxs("div",{className:"mt-8",children:[e.jsxs("h2",{className:"mb-4 text-sm text-[var(--text-primary)]",children:[a("admin.connector_bindings"),e.jsx("span",{className:"ml-2 text-[var(--text-muted)]",children:a("admin.connector_bindings_subtitle")})]}),!u||u.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:a("admin.connector_no_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:a("admin.connector_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.connector_binding_project")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.connector_binding_external_key")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.connector_binding_default")}),e.jsx("th",{className:"pb-2 font-normal",children:a("common.created_at")})]})}),e.jsx("tbody",{children:u.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-secondary)]",children:t.connectorName??"-"}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-primary)]",children:t.projectKey}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:t.externalProjectKey??"-"}),e.jsx("td",{className:"py-2.5 pr-4",children:t.isDefault&&e.jsx("span",{className:"rounded-[4px] border border-[var(--accent)] px-1.5 py-0.5 text-[10px] text-[var(--accent)]",children:a("admin.connector_binding_default")})}),e.jsx("td",{className:"py-2.5 text-[var(--text-muted)]",children:new Date(t.createdAt).toLocaleDateString()})]},t.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3",children:u.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-1",children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)] font-medium",children:t.projectKey}),t.isDefault&&e.jsx("span",{className:"rounded-[4px] border border-[var(--accent)] px-1.5 py-0.5 text-[10px] text-[var(--accent)]",children:a("admin.connector_binding_default")})]}),e.jsx("div",{className:"text-[11px] text-[var(--text-muted)]",children:t.connectorName}),e.jsx("div",{className:"text-[11px] text-[var(--text-secondary)]",children:t.externalProjectKey??"-"})]},t.id))})]})]})]})}export{Ce as default};
@@ -0,0 +1,48 @@
1
+ import{j as e}from"./index-Bq34NKPe.js";import{a as s}from"./DocsPrimitives-CdPzgbGD.js";import"./copy-x3TRsMrN.js";function c(){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:"// external connectors"}),e.jsx("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:"connect overlord to jira, sentry, and figma. when a jira comment mentions the trigger keyword, a sentry alert fires, or a figma comment tags overlord, a coding task is automatically created."})]}),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:"> supported platforms"}),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:"text-left py-2 pr-4 text-[var(--text-secondary)]",children:"platform"}),e.jsx("th",{className:"text-left py-2 pr-4 text-[var(--text-secondary)]",children:"trigger"}),e.jsx("th",{className:"text-left py-2 text-[var(--text-secondary)]",children:"closure actions"})]})}),e.jsxs("tbody",{className:"text-[var(--text-muted)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4 text-[var(--text-primary)]",children:"jira"}),e.jsxs("td",{className:"py-2 pr-4",children:["comment with ",e.jsx("code",{className:"text-[var(--accent)]",children:"@Overlord"})," mention"]}),e.jsx("td",{className:"py-2",children:"comment, link mr, transition status"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4 text-[var(--text-primary)]",children:"sentry"}),e.jsx("td",{className:"py-2 pr-4",children:"alert rule triggered"}),e.jsx("td",{className:"py-2",children:"comment, resolve/unresolve"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4 text-[var(--text-primary)]",children:"figma"}),e.jsxs("td",{className:"py-2 pr-4",children:["comment with ",e.jsx("code",{className:"text-[var(--accent)]",children:"@Overlord"})," mention"]}),e.jsx("td",{className:"py-2",children:"comment"})]})]})]})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> setup"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xs text-[var(--text-primary)]",children:"1. create a connector instance"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["go to ",e.jsx("span",{className:"text-[var(--accent)]",children:"admin → connectors → add connector"}),", or use the api:"]}),e.jsx(s,{code:`# jira
2
+ curl -X POST https://overlord.example.com/api/admin/connectors \\
3
+ -H "Authorization: Bearer $TOKEN" \\
4
+ -H "Content-Type: application/json" \\
5
+ -d '{
6
+ "platform": "jira",
7
+ "name": "Company Jira",
8
+ "baseUrl": "https://company.atlassian.net",
9
+ "credentials": {
10
+ "email": "bot@company.com",
11
+ "apiToken": "your-jira-api-token"
12
+ },
13
+ "webhookSecret": "your-webhook-secret",
14
+ "mentionKeyword": "@Overlord"
15
+ }'`}),e.jsx(s,{code:`# sentry
16
+ curl -X POST https://overlord.example.com/api/admin/connectors \\
17
+ -H "Authorization: Bearer $TOKEN" \\
18
+ -H "Content-Type: application/json" \\
19
+ -d '{
20
+ "platform": "sentry",
21
+ "name": "Company Sentry",
22
+ "baseUrl": "https://sentry.io",
23
+ "credentials": {
24
+ "authToken": "your-sentry-auth-token",
25
+ "org": "your-org-slug"
26
+ },
27
+ "webhookSecret": "your-sentry-webhook-secret"
28
+ }'`}),e.jsx(s,{code:`# figma
29
+ curl -X POST https://overlord.example.com/api/admin/connectors \\
30
+ -H "Authorization: Bearer $TOKEN" \\
31
+ -H "Content-Type: application/json" \\
32
+ -d '{
33
+ "platform": "figma",
34
+ "name": "Company Figma",
35
+ "credentials": {
36
+ "personalAccessToken": "your-figma-pat"
37
+ },
38
+ "webhookSecret": "your-figma-passcode",
39
+ "mentionKeyword": "@Overlord"
40
+ }'`}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:[e.jsx("span",{className:"text-[var(--warning)]",children:"note:"})," figma requires ",e.jsx("code",{className:"text-[var(--accent)]",children:"webhookSecret"})," (used as passcode for webhook verification)"]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xs text-[var(--text-primary)]",children:"2. create a binding"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"link the connector to an overlord project:"}),e.jsx(s,{code:`curl -X POST https://overlord.example.com/api/admin/connectors/1/bindings \\
41
+ -H "Authorization: Bearer $TOKEN" \\
42
+ -H "Content-Type: application/json" \\
43
+ -d '{
44
+ "projectKey": "my-project",
45
+ "externalProjectKey": "PROJ",
46
+ "isDefault": true,
47
+ "statusMapping": { "done": "Done" }
48
+ }'`}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-muted)] pl-4",children:[e.jsxs("li",{children:["- ",e.jsx("code",{className:"text-[var(--accent)]",children:"externalProjectKey"})," — jira project key or sentry project slug"]}),e.jsxs("li",{children:["- ",e.jsx("code",{className:"text-[var(--accent)]",children:"isDefault"})," — fallback binding when no exact external key match"]}),e.jsxs("li",{children:["- ",e.jsx("code",{className:"text-[var(--accent)]",children:"statusMapping.done"})," — jira status to transition to on task completion"]}),e.jsxs("li",{children:["- ",e.jsx("code",{className:"text-[var(--accent)]",children:"autoDesignReview"})," — figma only: auto-trigger design review when task completes"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xs text-[var(--text-primary)]",children:"3. configure webhook in external system"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["create the connector in overlord ",e.jsx("span",{className:"text-[var(--accent)]",children:"first"})," to get the instance id, then configure the webhook in the external system. the webhook url is shown in the admin connectors page."]}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:[e.jsx("span",{className:"text-[var(--text-secondary)]",children:"about webhook secret:"})," generate a random secret (e.g. ",e.jsx("code",{className:"text-[var(--accent)]",children:"openssl rand -hex 32"}),") and use the same value in both overlord and the external system. for jira and sentry this is optional — if omitted, signature verification is skipped. for figma it is required."]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs text-[var(--text-secondary)]",children:"jira:"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-muted)] pl-4",children:[e.jsx("li",{children:"- jira settings → system → webhooks"}),e.jsxs("li",{children:["- url: ",e.jsx("code",{className:"text-[var(--accent)]",children:"https://overlord.example.com/webhook/connector/jira/{instanceId}"})]}),e.jsx("li",{children:"- events: issue → comment created"}),e.jsx("li",{children:"- if you set a webhookSecret in overlord, enter the same value as the secret in jira"})]}),e.jsx("p",{className:"text-xs text-[var(--text-secondary)]",children:"sentry:"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-muted)] pl-4",children:[e.jsx("li",{children:"- sentry settings → integrations → webhooks"}),e.jsxs("li",{children:["- url: ",e.jsx("code",{className:"text-[var(--accent)]",children:"https://overlord.example.com/webhook/connector/sentry/{instanceId}"})]}),e.jsx("li",{children:"- events: issue alerts"}),e.jsx("li",{children:"- if you set a webhookSecret in overlord, enter the same value as the signing secret in sentry"})]}),e.jsx("p",{className:"text-xs text-[var(--text-secondary)]",children:"figma:"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-muted)] pl-4",children:[e.jsx("li",{children:"- figma → team settings → webhooks"}),e.jsxs("li",{children:["- url: ",e.jsx("code",{className:"text-[var(--accent)]",children:"https://overlord.example.com/webhook/connector/figma/{instanceId}"})]}),e.jsx("li",{children:"- events: FILE_COMMENT"}),e.jsxs("li",{children:["- passcode: must match ",e.jsx("code",{className:"text-[var(--accent)]",children:"webhookSecret"})," (required for figma)"]})]})]})]})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> usage flows"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xs text-[var(--text-primary)]",children:"jira: comment-triggered task"}),e.jsxs("ol",{className:"space-y-1 text-xs text-[var(--text-muted)] pl-4",children:[e.jsxs("li",{children:["1. developer comments on PROJ-123: ",e.jsx("code",{className:"text-[var(--accent)]",children:"@Overlord fix the login timeout bug"})]}),e.jsx("li",{children:"2. overlord receives webhook → creates task with description from comment"}),e.jsx("li",{children:'3. overlord replies on PROJ-123: "task #456 has been created"'}),e.jsx("li",{children:"4. agent executes task → creates mr"}),e.jsx("li",{children:"5. task completes → overlord comments with results + mr link"}),e.jsx("li",{children:'6. if statusMapping.done is set → jira issue transitions (e.g. "done")'})]}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["specify target project: ",e.jsx("code",{className:"text-[var(--accent)]",children:"@Overlord --project frontend fix the bug"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xs text-[var(--text-primary)]",children:"sentry: alert-triggered task"}),e.jsxs("ol",{className:"space-y-1 text-xs text-[var(--text-muted)] pl-4",children:[e.jsx("li",{children:"1. sentry alert fires (error rate spike, new issue, etc.)"}),e.jsx("li",{children:"2. overlord receives webhook → creates task with error details"}),e.jsx("li",{children:"3. agent investigates and fixes → creates mr"}),e.jsx("li",{children:"4. task completes → overlord comments on sentry issue"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xs text-[var(--text-primary)]",children:"figma: design-to-code task"}),e.jsxs("ol",{className:"space-y-1 text-xs text-[var(--text-muted)] pl-4",children:[e.jsxs("li",{children:["1. designer comments on figma file: ",e.jsx("code",{className:"text-[var(--accent)]",children:"@Overlord implement this login page"})]}),e.jsx("li",{children:"2. overlord fetches frame screenshots + node anchoring as design context"}),e.jsx("li",{children:"3. task created with design reference → agent implements the design"}),e.jsx("li",{children:"4. task completes → overlord comments on figma file"}),e.jsxs("li",{children:["5. if ",e.jsx("code",{className:"text-[var(--accent)]",children:"autoDesignReview"})," is enabled → review task auto-created"]})]}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["specify target project: ",e.jsx("code",{className:"text-[var(--accent)]",children:"@Overlord --project frontend implement this page"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xs text-[var(--text-primary)]",children:"manual issue linking (bot / cli / web)"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"link any task to a jira, sentry, or figma issue at creation time. on task completion, closure actions run automatically."}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-muted)] pl-4",children:[e.jsxs("li",{children:["- bot: ",e.jsx("code",{className:"text-[var(--accent)]",children:'@bot develop "fix bug" --ref PROJ-123'})]}),e.jsxs("li",{children:["- bot: ",e.jsx("code",{className:"text-[var(--accent)]",children:'@bot develop "implement design" --ref https://www.figma.com/design/abc123/Page'})]}),e.jsxs("li",{children:["- cli: ",e.jsx("code",{className:"text-[var(--accent)]",children:'ov task create -d "fix bug" --ref PROJ-123'})]}),e.jsx("li",{children:'- web: task creation form → "external issue" field'}),e.jsxs("li",{children:["- accepts jira keys (",e.jsx("code",{className:"text-[var(--accent)]",children:"PROJ-123"}),") or full urls (jira, sentry, figma)"]})]}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["figma refs require ",e.jsx("code",{className:"text-[var(--accent)]",children:"--project"})," and automatically attach design screenshots as context."]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xs text-[var(--text-primary)]",children:"manual design review"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"trigger a design review for an existing task:"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-muted)] pl-4",children:[e.jsxs("li",{children:["- bot: ",e.jsx("code",{className:"text-[var(--accent)]",children:"@bot review #123 --ref https://www.figma.com/design/abc123/Page"})]}),e.jsxs("li",{children:["- cli: ",e.jsx("code",{className:"text-[var(--accent)]",children:"ov task review 123 --ref https://www.figma.com/design/abc123/Page"})]}),e.jsx("li",{children:"- web: task detail → launch review → paste figma url in ref field"})]}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"the review agent receives figma screenshots and compares the implementation against the design."})]})]}),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:"> deduplication"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-muted)] pl-4",children:[e.jsxs("li",{children:["- ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"event-level"})," — same jira comment, sentry alert, or figma comment is never processed twice (24h redis ttl)"]}),e.jsxs("li",{children:["- ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"issue-level"})," — if an active task exists for the same issue on the same connector, new webhooks are skipped"]}),e.jsxs("li",{children:["- ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"in-process"})," — concurrent requests for the same event within the same tick are deduplicated"]}),e.jsxs("li",{children:["- ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"fingerprint"})," — same issue as key or url produces identical dedup fingerprint"]})]})]}),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:"> platform capabilities"}),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:"text-left py-2 pr-4 text-[var(--text-secondary)]",children:"capability"}),e.jsx("th",{className:"text-left py-2 pr-4 text-[var(--text-secondary)]",children:"jira"}),e.jsx("th",{className:"text-left py-2 pr-4 text-[var(--text-secondary)]",children:"sentry"}),e.jsx("th",{className:"text-left py-2 text-[var(--text-secondary)]",children:"figma"})]})}),e.jsxs("tbody",{className:"text-[var(--text-muted)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"closure comment"}),e.jsx("td",{className:"py-2 pr-4 text-green-400",children:"yes"}),e.jsx("td",{className:"py-2 pr-4 text-green-400",children:"yes"}),e.jsx("td",{className:"py-2 text-green-400",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"mr link"}),e.jsx("td",{className:"py-2 pr-4 text-green-400",children:"yes"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-[var(--text-muted)]",children:"—"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"status transition"}),e.jsx("td",{className:"py-2 pr-4 text-green-400",children:"yes"}),e.jsx("td",{className:"py-2 pr-4 text-yellow-400",children:"resolve only"}),e.jsx("td",{className:"py-2 text-[var(--text-muted)]",children:"—"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"design context"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-green-400",children:"yes"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"auto design review"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 pr-4 text-[var(--text-muted)]",children:"—"}),e.jsx("td",{className:"py-2 text-green-400",children:"yes"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:"--ref format"}),e.jsx("td",{className:"py-2 pr-4",children:"key or url"}),e.jsx("td",{className:"py-2 pr-4",children:"url only"}),e.jsx("td",{className:"py-2",children:"url only"})]})]})]})})]}),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:"> troubleshooting"}),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:"text-left py-2 pr-4 text-[var(--text-secondary)]",children:"symptom"}),e.jsx("th",{className:"text-left py-2 pr-4 text-[var(--text-secondary)]",children:"cause"}),e.jsx("th",{className:"text-left py-2 text-[var(--text-secondary)]",children:"fix"})]})}),e.jsxs("tbody",{className:"text-[var(--text-muted)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"webhook returns 401"}),e.jsx("td",{className:"py-2 pr-4",children:"signature/passcode mismatch"}),e.jsx("td",{className:"py-2",children:"verify webhookSecret matches external system"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"task not created"}),e.jsx("td",{className:"py-2 pr-4",children:"missing keyword / no binding"}),e.jsx("td",{className:"py-2",children:"check comment contains @Overlord; create a binding"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"figma ref fails"}),e.jsx("td",{className:"py-2 pr-4",children:"no --project specified"}),e.jsx("td",{className:"py-2",children:"figma design refs require explicit --project flag"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"no design screenshots"}),e.jsx("td",{className:"py-2 pr-4",children:"figma api error or invalid nodes"}),e.jsx("td",{className:"py-2",children:"task is created without context; check figma token permissions"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"closure not working"}),e.jsx("td",{className:"py-2 pr-4",children:"connector disabled"}),e.jsx("td",{className:"py-2",children:"re-enable the connector instance"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:"status not transitioning"}),e.jsx("td",{className:"py-2 pr-4",children:"missing statusMapping"}),e.jsx("td",{className:"py-2",children:"add statusMapping.done to the binding"})]})]})]})})]})]})]})}export{c as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./index-0QFy9ku9.js";import{a as s}from"./DocsPrimitives-CipzCTEu.js";import"./copy-BWTAfZ7b.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
1
+ import{j as e}from"./index-Bq34NKPe.js";import{a as s}from"./DocsPrimitives-CdPzgbGD.js";import"./copy-x3TRsMrN.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
2
  |
3
3
  v
4
4
  cloudflare zero trust (access + tunnel)
@@ -1,4 +1,4 @@
1
- import{j as e}from"./index-0QFy9ku9.js";import{a as s}from"./DocsPrimitives-CipzCTEu.js";import"./copy-BWTAfZ7b.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
1
+ import{j as e}from"./index-Bq34NKPe.js";import{a as s}from"./DocsPrimitives-CdPzgbGD.js";import"./copy-x3TRsMrN.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
2
  cd overlord
3
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
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
@@ -1,4 +1,4 @@
1
- import{c as L,D as C,a as D,v as X,r as n,j as e,X as M,h as E,u as G,V as g,y as H}from"./index-0QFy9ku9.js";import{S as V}from"./Select-xdty1j0i.js";import{v as K}from"./password-CHk45-jw.js";import{E as J}from"./EmptyState-DV7LUJer.js";import{T as Q}from"./Skeleton-CmBnyd29.js";import{u as W}from"./useFetch-BqnEzaSJ.js";import{c as P}from"./status-colors-DlyerwQ7.js";import{P as Y}from"./plus-D38pnIMa.js";import{U as Z}from"./users-dmt7eU5B.js";import{P as ee}from"./pencil-QmINK6St.js";import{R as te}from"./rotate-ccw-BsCb3qU2.js";import"./chevron-down-SeRjAX4r.js";/**
1
+ import{c as L,D as C,a as D,v as X,r as n,j as e,X as M,h as E,u as G,V as g,y as H}from"./index-Bq34NKPe.js";import{S as V}from"./Select-Z1Ruu5ET.js";import{v as K}from"./password-CHk45-jw.js";import{E as J}from"./EmptyState-D1Mkvsbg.js";import{T as Q}from"./Skeleton-CSQRa5CX.js";import{u as W}from"./useFetch-C1wTw-Jt.js";import{c as P}from"./status-colors-5_ZR5pcJ.js";import{P as Y}from"./plus-BCUcEsOi.js";import{U as Z}from"./users-BR3rVcV_.js";import{P as ee}from"./pencil-mbtGj-qR.js";import{R as te}from"./rotate-ccw-DNMevmJD.js";import"./chevron-down-kiRdaTGv.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{j as e,L as t}from"./index-0QFy9ku9.js";import{I as s,a}from"./DocsPrimitives-CipzCTEu.js";import"./copy-BWTAfZ7b.js";function o(){return e.jsx("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// overview"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["the ",e.jsx("code",{className:"text-[var(--accent)]",children:"ov"})," cli is the developer-facing command-line tool for interacting with overlord. install it on your laptop or workstation to create tasks, attach to running sessions, and monitor progress from your terminal."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// installation"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"install the developer cli globally:"}),e.jsx(s,{code:"npm install -g @overlordai/developer-cli"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// connect to your server"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"authenticate with your overlord server using a personal access token:"}),e.jsx(s,{code:"ov login https://overlord.yourdomain.com"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["you'll be prompted for a personal access token (pat). generate one in the web dashboard under ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"profile → access tokens"}),"."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"alternatively, use the one-step setup wizard:"}),e.jsx(s,{code:"ov setup"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"this prompts for both the server url and token interactively."})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// verify"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"confirm your connection is working:"}),e.jsx(s,{code:"ov whoami"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"should display your username and role."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// quick start"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> create a task"}),e.jsx(s,{code:'ov task create -d "fix the login bug" -p my-project'})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> watch a running task"}),e.jsx(a,{code:`ov attach <task_id>
1
+ import{j as e,L as t}from"./index-Bq34NKPe.js";import{I as s,a}from"./DocsPrimitives-CdPzgbGD.js";import"./copy-x3TRsMrN.js";function o(){return e.jsx("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// overview"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["the ",e.jsx("code",{className:"text-[var(--accent)]",children:"ov"})," cli is the developer-facing command-line tool for interacting with overlord. install it on your laptop or workstation to create tasks, attach to running sessions, and monitor progress from your terminal."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// installation"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"install the developer cli globally:"}),e.jsx(s,{code:"npm install -g @overlordai/developer-cli"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// connect to your server"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"authenticate with your overlord server using a personal access token:"}),e.jsx(s,{code:"ov login https://overlord.yourdomain.com"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["you'll be prompted for a personal access token (pat). generate one in the web dashboard under ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"profile → access tokens"}),"."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"alternatively, use the one-step setup wizard:"}),e.jsx(s,{code:"ov setup"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"this prompts for both the server url and token interactively."})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// verify"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"confirm your connection is working:"}),e.jsx(s,{code:"ov whoami"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"should display your username and role."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// quick start"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> create a task"}),e.jsx(s,{code:'ov task create -d "fix the login bug" -p my-project'})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> watch a running task"}),e.jsx(a,{code:`ov attach <task_id>
2
2
 
3
3
  # use --watch for read-only mode
4
4
  # use --takeover to take control of the terminal`})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> list tasks"}),e.jsx(s,{code:"ov task list --status RUNNING"})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// next steps"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsxs("li",{children:["— ",e.jsx(t,{to:"/docs/cli",className:"text-[var(--accent)] hover:underline",children:"developer cli reference"})," — full command reference for the ov cli"]}),e.jsxs("li",{children:["— ",e.jsx(t,{to:"/docs/dev-workflow",className:"text-[var(--accent)] hover:underline",children:"development workflow"})," — end-to-end guide for creating and managing tasks"]})]})]})]})})}export{o as default};
@@ -1,4 +1,4 @@
1
- import{c,a as _,j as s,G as p,M as t,S as h,b as m,O as y,a6 as x,d as v,L as k}from"./index-0QFy9ku9.js";import{D as b}from"./download-l-ATQbZQ.js";import{B as g}from"./bot-C7wSfjw1.js";import{G as a,W as u}from"./workflow-DLz7dyVN.js";import{S as w}from"./settings-CqcmKnX4.js";import{P as K}from"./plug-CvdRvl-j.js";/**
1
+ import{c,a as _,j as s,G as p,M as t,S as h,b as m,O as y,a6 as x,d as v,L as k}from"./index-Bq34NKPe.js";import{D as b}from"./download-Caxzdu6U.js";import{B as g}from"./bot-DnUHQkGw.js";import{G as a,W as u}from"./workflow-CG74TuIT.js";import{S as w}from"./settings-CDRWAtMY.js";import{P as K}from"./plug-CG6QKzKq.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{a as i,g as x,j as a,L as d,G as m,b,M as p,O as h,a6 as u,e as v,aa as f,ab as g}from"./index-0QFy9ku9.js";import{A as j}from"./arrow-left-Dsd8akiF.js";const t=[{to:"/docs/changelog",label:"changelog",icon:m},{to:"/docs/cli",label:"cli",icon:b},{to:"/docs/api",label:"api",icon:p},{to:"/docs/bot",label:"bot",icon:h},{to:"/docs/skill",label:"skill",icon:u},{to:"/docs/all",label:"all",icon:v}],k=new Set(t.map(e=>e.to));function N(){const{t:e}=i(),r=x(),o=!k.has(r.pathname);return a.jsxs("div",{className:"flex h-full flex-col",children:[a.jsxs("nav",{className:"flex items-center border-b border-[var(--border)] bg-[var(--bg-card)] px-4 md:px-6 overflow-x-auto no-scrollbar",children:[o&&a.jsxs(d,{to:"/docs/all",className:"mr-3 shrink-0 flex items-center gap-1 text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:[a.jsx(j,{size:12}),e("docs.docs_back")]}),t.map(({to:s,label:l,icon:c})=>a.jsxs(f,{to:s,className:({isActive:n})=>`flex items-center gap-1.5 px-3 py-3 text-xs lowercase border-b-2 transition-colors shrink-0 ${n||o&&s==="/docs/all"?"border-[var(--accent)] text-[var(--accent)]":"border-transparent text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:[a.jsx(c,{size:14}),a.jsx("span",{children:l})]},s))]}),a.jsx("main",{className:"flex-1 overflow-auto p-4 md:p-6",children:a.jsx(g,{})})]})}export{N as default};
1
+ import{a as i,g as x,j as a,L as d,G as m,b,M as p,O as h,a6 as u,e as v,aa as f,ab as g}from"./index-Bq34NKPe.js";import{A as j}from"./arrow-left-C_vw-kEx.js";const t=[{to:"/docs/changelog",label:"changelog",icon:m},{to:"/docs/cli",label:"cli",icon:b},{to:"/docs/api",label:"api",icon:p},{to:"/docs/bot",label:"bot",icon:h},{to:"/docs/skill",label:"skill",icon:u},{to:"/docs/all",label:"all",icon:v}],k=new Set(t.map(e=>e.to));function N(){const{t:e}=i(),r=x(),o=!k.has(r.pathname);return a.jsxs("div",{className:"flex h-full flex-col",children:[a.jsxs("nav",{className:"flex items-center border-b border-[var(--border)] bg-[var(--bg-card)] px-4 md:px-6 overflow-x-auto no-scrollbar",children:[o&&a.jsxs(d,{to:"/docs/all",className:"mr-3 shrink-0 flex items-center gap-1 text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:[a.jsx(j,{size:12}),e("docs.docs_back")]}),t.map(({to:s,label:l,icon:c})=>a.jsxs(f,{to:s,className:({isActive:n})=>`flex items-center gap-1.5 px-3 py-3 text-xs lowercase border-b-2 transition-colors shrink-0 ${n||o&&s==="/docs/all"?"border-[var(--accent)] text-[var(--accent)]":"border-transparent text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:[a.jsx(c,{size:14}),a.jsx("span",{children:l})]},s))]}),a.jsx("main",{className:"flex-1 overflow-auto p-4 md:p-6",children:a.jsx(g,{})})]})}export{N as default};
@@ -1 +1 @@
1
- import{a as i,r as s,j as e,C as x}from"./index-0QFy9ku9.js";import{C as p}from"./copy-BWTAfZ7b.js";function o({text:t}){const{t:c}=i(),[n,a]=s.useState(!1),r=s.useRef(void 0);return s.useEffect(()=>()=>clearTimeout(r.current),[]),e.jsx("button",{onClick:async()=>{await navigator.clipboard.writeText(t),a(!0),clearTimeout(r.current),r.current=setTimeout(()=>a(!1),2e3)},className:"rounded-[4px] p-1 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",title:c("common.copy"),children:n?e.jsx(x,{className:"h-3 w-3 text-[var(--accent)]"}):e.jsx(p,{className:"h-3 w-3"})})}function m({code:t}){return e.jsxs("div",{className:"relative rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 overflow-x-auto",children:[e.jsx("div",{className:"absolute right-2 top-2",children:e.jsx(o,{text:t})}),e.jsx("pre",{className:"text-xs text-[var(--text-secondary)] whitespace-pre-wrap pr-8",children:t})]})}function d({code:t}){return e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 overflow-x-auto",children:[e.jsx("code",{className:"text-xs text-[var(--accent)] whitespace-nowrap",children:t}),e.jsx(o,{text:t})]})}export{o as C,d as I,m as a};
1
+ import{a as i,r as s,j as e,C as x}from"./index-Bq34NKPe.js";import{C as p}from"./copy-x3TRsMrN.js";function o({text:t}){const{t:c}=i(),[n,a]=s.useState(!1),r=s.useRef(void 0);return s.useEffect(()=>()=>clearTimeout(r.current),[]),e.jsx("button",{onClick:async()=>{await navigator.clipboard.writeText(t),a(!0),clearTimeout(r.current),r.current=setTimeout(()=>a(!1),2e3)},className:"rounded-[4px] p-1 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",title:c("common.copy"),children:n?e.jsx(x,{className:"h-3 w-3 text-[var(--accent)]"}):e.jsx(p,{className:"h-3 w-3"})})}function m({code:t}){return e.jsxs("div",{className:"relative rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 overflow-x-auto",children:[e.jsx("div",{className:"absolute right-2 top-2",children:e.jsx(o,{text:t})}),e.jsx("pre",{className:"text-xs text-[var(--text-secondary)] whitespace-pre-wrap pr-8",children:t})]})}function d({code:t}){return e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 overflow-x-auto",children:[e.jsx("code",{className:"text-xs text-[var(--accent)] whitespace-nowrap",children:t}),e.jsx(o,{text:t})]})}export{o as C,d as I,m as a};
@@ -1,2 +1,2 @@
1
- import{B as xe,f as ue,a as me,r as s,I as v,Q as be,h as d,j as e,L as ve,_ as X,t as c}from"./index-0QFy9ku9.js";import{S as Y}from"./Select-xdty1j0i.js";import{U as je,A as he,R as ge}from"./RemoveMemberConfirmDialog-CHU9g7rJ.js";import{b as ye}from"./agent-type-options-BgAoGQFU.js";import{P as fe}from"./plus-D38pnIMa.js";import"./chevron-down-SeRjAX4r.js";function Te(){const{key:o}=xe(),l=ue(),{t:r}=me(),Z=ye(t=>t),[a,ee]=s.useState(null),[j,te]=s.useState([]),[re,se]=s.useState(!0),[w,h]=s.useState(!1),[g,C]=s.useState(""),[y,S]=s.useState(""),[T,I]=s.useState(""),[M,P]=s.useState(v.GITHUB),[A,R]=s.useState(""),[O,U]=s.useState(be.CLAUDE),[G,$]=s.useState("50"),[E,B]=s.useState(""),[D,L]=s.useState(""),[F,J]=s.useState(""),[q,z]=s.useState("0"),[p,f]=s.useState(""),[H,N]=s.useState(null),[x,k]=s.useState(""),[K,u]=s.useState(!1),[ae,Q]=s.useState(!1),[i,_]=s.useState(null),[ne,W]=s.useState(!1),m=s.useCallback(async()=>{if(o)try{const[t,b]=await Promise.all([d.get(`web/projects/${o}`).json(),d.get(`web/projects/${o}/members`).json().catch(()=>[])]);if(ee(t),te(b),N(t.gitTokenMasked??null),C(t.name),S(t.repoUrl),I(t.sshUrl??""),P(t.gitPlatform),R(t.defaultBranch),U(t.agentType),$(String(t.maxTurns)),B(t.workspaceRoot??""),L(t.setupCommands??""),J(t.testCommand??""),z(String(t.ptyOutputFilter??0)),t.pipeline)try{f(JSON.stringify(JSON.parse(t.pipeline),null,2))}catch{f(t.pipeline)}}catch{}finally{se(!1)}},[o]);s.useEffect(()=>{m()},[m]);async function oe(t){if(t.preventDefault(),!a)return;h(!0);let b=null;if(p.trim())try{JSON.parse(p),b=p.trim()}catch{c.error(r("projects.invalid_pipeline_json")),h(!1);return}try{await d.put(`web/projects/${a.key}`,{json:{name:g,repoUrl:y,sshUrl:T||null,defaultBranch:A,gitPlatform:M,agentType:O,maxTurns:parseInt(G,10)||50,workspaceRoot:E||null,setupCommands:D||null,testCommand:F||null,ptyOutputFilter:parseInt(q,10)||0,pipeline:b}}),c.success(r("projects.project_saved")),l(`/projects/${a.key}`)}catch(V){const pe=V instanceof Error?V.message:r("projects.failed_to_save_project");c.error(pe)}finally{h(!1)}}function le(){l(`/projects/${o}`)}async function ce(){if(!(!a||!x.trim())){u(!0);try{const t=await d.put(`web/projects/${a.key}/git-token`,{json:{token:x.trim()}}).json();N(t.gitTokenMasked),k(""),c.success(r("projects.git_token_saved"))}catch{c.error(r("projects.git_token_failed"))}finally{u(!1)}}}async function ie(){if(a){u(!0);try{await d.delete(`web/projects/${a.key}/git-token`),N(null),k(""),c.success(r("projects.git_token_cleared"))}catch{c.error(r("projects.git_token_failed"))}finally{u(!1)}}}async function de(){if(!(!a||!i)){W(!0);try{await d.delete(`web/projects/${a.key}/members`,{searchParams:{developerId:String(i.developerId)}}),await m()}catch{}finally{W(!1),_(null)}}}return re?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})}):a?e.jsxs("form",{onSubmit:oe,className:"mx-auto max-w-6xl px-4 md:px-6 py-8",children:[e.jsxs("div",{className:"mb-2 text-xs text-[var(--text-muted)]",children:[e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l("/projects"),children:r("projects.title")})," / ",e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l(`/projects/${a.key}`),children:a.key})," / ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:r("common.edit")})]}),e.jsx("h1",{className:"text-lg font-bold text-[var(--text-primary)] mb-4",children:r("projects.edit_project_title")}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_400px]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.basic_info")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{label:r("projects.key"),children:e.jsx("input",{type:"text",value:a.key,readOnly:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-muted)] outline-none opacity-60 cursor-not-allowed"})}),e.jsx(n,{label:r("projects.name"),children:e.jsx("input",{type:"text",value:g,onChange:t=>C(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(n,{label:r("projects.repo_url"),children:e.jsx("input",{type:"text",value:y,onChange:t=>S(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsxs(n,{label:r("projects.ssh_url"),children:[e.jsx("input",{type:"text",value:T,onChange:t=>I(t.target.value),placeholder:r("projects.ssh_url_placeholder"),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:r("projects.ssh_url_hint")})]}),e.jsx(n,{label:r("projects.git_platform"),children:e.jsx(Y,{value:M,onChange:t=>P(t),options:[{value:v.GITHUB,label:r("projects.github")},{value:v.GITLAB,label:r("projects.gitlab")},{value:v.GITEA,label:r("projects.gitea")}]})}),e.jsx(n,{label:r("projects.default_branch"),children:e.jsx("input",{type:"text",value:A,onChange:t=>R(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.agent_config")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{label:r("projects.agent_type"),children:e.jsx(Y,{value:O,onChange:t=>U(t),options:Z})}),e.jsx(n,{label:r("projects.max_turns"),children:e.jsx("input",{type:"number",value:G,onChange:t=>$(t.target.value),min:1,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(n,{label:r("projects.workspace_root"),children:e.jsx("input",{type:"text",value:E,onChange:t=>B(t.target.value),placeholder:"/path/to/workspace",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.environment")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{label:r("projects.setup_commands"),children:e.jsx("textarea",{value:D,onChange:t=>L(t.target.value),rows:3,placeholder:`npm install
1
+ import{B as xe,f as ue,a as me,r as s,I as v,Q as be,h as d,j as e,L as ve,_ as X,t as c}from"./index-Bq34NKPe.js";import{S as Y}from"./Select-Z1Ruu5ET.js";import{U as je,A as he,R as ge}from"./RemoveMemberConfirmDialog-rsA80nKv.js";import{b as ye}from"./agent-type-options-CB0iYj4Z.js";import{P as fe}from"./plus-BCUcEsOi.js";import"./chevron-down-kiRdaTGv.js";function Te(){const{key:o}=xe(),l=ue(),{t:r}=me(),Z=ye(t=>t),[a,ee]=s.useState(null),[j,te]=s.useState([]),[re,se]=s.useState(!0),[w,h]=s.useState(!1),[g,C]=s.useState(""),[y,S]=s.useState(""),[T,I]=s.useState(""),[M,P]=s.useState(v.GITHUB),[A,R]=s.useState(""),[O,U]=s.useState(be.CLAUDE),[G,$]=s.useState("50"),[E,B]=s.useState(""),[D,L]=s.useState(""),[F,J]=s.useState(""),[q,z]=s.useState("0"),[p,f]=s.useState(""),[H,N]=s.useState(null),[x,k]=s.useState(""),[K,u]=s.useState(!1),[ae,Q]=s.useState(!1),[i,_]=s.useState(null),[ne,W]=s.useState(!1),m=s.useCallback(async()=>{if(o)try{const[t,b]=await Promise.all([d.get(`web/projects/${o}`).json(),d.get(`web/projects/${o}/members`).json().catch(()=>[])]);if(ee(t),te(b),N(t.gitTokenMasked??null),C(t.name),S(t.repoUrl),I(t.sshUrl??""),P(t.gitPlatform),R(t.defaultBranch),U(t.agentType),$(String(t.maxTurns)),B(t.workspaceRoot??""),L(t.setupCommands??""),J(t.testCommand??""),z(String(t.ptyOutputFilter??0)),t.pipeline)try{f(JSON.stringify(JSON.parse(t.pipeline),null,2))}catch{f(t.pipeline)}}catch{}finally{se(!1)}},[o]);s.useEffect(()=>{m()},[m]);async function oe(t){if(t.preventDefault(),!a)return;h(!0);let b=null;if(p.trim())try{JSON.parse(p),b=p.trim()}catch{c.error(r("projects.invalid_pipeline_json")),h(!1);return}try{await d.put(`web/projects/${a.key}`,{json:{name:g,repoUrl:y,sshUrl:T||null,defaultBranch:A,gitPlatform:M,agentType:O,maxTurns:parseInt(G,10)||50,workspaceRoot:E||null,setupCommands:D||null,testCommand:F||null,ptyOutputFilter:parseInt(q,10)||0,pipeline:b}}),c.success(r("projects.project_saved")),l(`/projects/${a.key}`)}catch(V){const pe=V instanceof Error?V.message:r("projects.failed_to_save_project");c.error(pe)}finally{h(!1)}}function le(){l(`/projects/${o}`)}async function ce(){if(!(!a||!x.trim())){u(!0);try{const t=await d.put(`web/projects/${a.key}/git-token`,{json:{token:x.trim()}}).json();N(t.gitTokenMasked),k(""),c.success(r("projects.git_token_saved"))}catch{c.error(r("projects.git_token_failed"))}finally{u(!1)}}}async function ie(){if(a){u(!0);try{await d.delete(`web/projects/${a.key}/git-token`),N(null),k(""),c.success(r("projects.git_token_cleared"))}catch{c.error(r("projects.git_token_failed"))}finally{u(!1)}}}async function de(){if(!(!a||!i)){W(!0);try{await d.delete(`web/projects/${a.key}/members`,{searchParams:{developerId:String(i.developerId)}}),await m()}catch{}finally{W(!1),_(null)}}}return re?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})}):a?e.jsxs("form",{onSubmit:oe,className:"mx-auto max-w-6xl px-4 md:px-6 py-8",children:[e.jsxs("div",{className:"mb-2 text-xs text-[var(--text-muted)]",children:[e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l("/projects"),children:r("projects.title")})," / ",e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l(`/projects/${a.key}`),children:a.key})," / ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:r("common.edit")})]}),e.jsx("h1",{className:"text-lg font-bold text-[var(--text-primary)] mb-4",children:r("projects.edit_project_title")}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_400px]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.basic_info")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{label:r("projects.key"),children:e.jsx("input",{type:"text",value:a.key,readOnly:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-muted)] outline-none opacity-60 cursor-not-allowed"})}),e.jsx(n,{label:r("projects.name"),children:e.jsx("input",{type:"text",value:g,onChange:t=>C(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(n,{label:r("projects.repo_url"),children:e.jsx("input",{type:"text",value:y,onChange:t=>S(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsxs(n,{label:r("projects.ssh_url"),children:[e.jsx("input",{type:"text",value:T,onChange:t=>I(t.target.value),placeholder:r("projects.ssh_url_placeholder"),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:r("projects.ssh_url_hint")})]}),e.jsx(n,{label:r("projects.git_platform"),children:e.jsx(Y,{value:M,onChange:t=>P(t),options:[{value:v.GITHUB,label:r("projects.github")},{value:v.GITLAB,label:r("projects.gitlab")},{value:v.GITEA,label:r("projects.gitea")}]})}),e.jsx(n,{label:r("projects.default_branch"),children:e.jsx("input",{type:"text",value:A,onChange:t=>R(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.agent_config")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{label:r("projects.agent_type"),children:e.jsx(Y,{value:O,onChange:t=>U(t),options:Z})}),e.jsx(n,{label:r("projects.max_turns"),children:e.jsx("input",{type:"number",value:G,onChange:t=>$(t.target.value),min:1,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(n,{label:r("projects.workspace_root"),children:e.jsx("input",{type:"text",value:E,onChange:t=>B(t.target.value),placeholder:"/path/to/workspace",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.environment")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{label:r("projects.setup_commands"),children:e.jsx("textarea",{value:D,onChange:t=>L(t.target.value),rows:3,placeholder:`npm install
2
2
  npm run build`,className:"w-full resize-y rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(n,{label:r("projects.post_command"),children:e.jsx("input",{type:"text",value:F,onChange:t=>J(t.target.value),placeholder:"npm test",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.security")}),e.jsx("div",{className:"space-y-3",children:e.jsx(n,{label:r("projects.pty_output_filter"),children:e.jsx("input",{type:"text",value:q,onChange:t=>z(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.git_token")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{label:r("projects.git_token_label"),children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:H??r("common.not_set")})})}),e.jsxs(n,{label:r("projects.git_token_set"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"password",value:x,onChange:t=>k(t.target.value),placeholder:"ghp_xxxx...",className:"min-w-0 flex-1 rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("button",{type:"button",disabled:K||!x.trim(),onClick:ce,className:"shrink-0 rounded-[4px] bg-[var(--accent)] px-3 py-2 text-xs font-medium text-black hover:opacity-90 transition-opacity disabled:opacity-50",children:r("common.save")})]}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:r("projects.git_token_hint")})]}),H&&e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{type:"button",disabled:K,onClick:ie,className:"rounded-[4px] border border-[var(--destructive)] px-3 py-1.5 text-xs text-[var(--destructive)] hover:opacity-70 transition-opacity disabled:opacity-50",children:r("projects.git_token_clear")})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--accent)]",children:r("projects.pipeline_section")}),e.jsx(ve,{to:"/projects/"+o+"/pipeline",className:"text-xs text-[var(--accent)] hover:underline",children:r("projects.edit_pipeline")})]}),e.jsx("textarea",{value:p,onChange:t=>f(t.target.value),rows:20,spellCheck:!1,placeholder:'{"stages": []}',className:"w-full resize-y rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]",style:{fontFamily:'"JetBrains Mono", monospace',textTransform:"none"}})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--accent)]",children:r("projects.members")}),e.jsxs("button",{type:"button",onClick:()=>Q(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs font-medium text-black",children:[e.jsx(fe,{className:"h-3.5 w-3.5"}),r("projects.add_member")]})]}),j.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("projects.no_members_yet")})]}):e.jsx("div",{className:"space-y-2",children:j.map(t=>e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-[var(--accent)]/20 text-xs font-bold text-[var(--accent)]",children:(t.developerName??String(t.developerId)).charAt(0).toUpperCase()}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:t.developerName??`#${t.developerId}`}),e.jsx("span",{className:"ml-2 rounded-[4px] px-1.5 py-0.5 text-[11px] font-medium",style:{color:t.role===X.MAINTAINER?"var(--warning)":"var(--text-secondary)",background:t.role===X.MAINTAINER?"rgba(245,158,11,0.1)":"rgba(163,163,163,0.1)"},children:t.role})]})]}),e.jsx("button",{type:"button",onClick:()=>_(t),className:"text-[var(--destructive)] hover:opacity-70 transition-opacity","aria-label":r("projects.remove_member"),children:e.jsx(je,{className:"h-3.5 w-3.5"})})]},t.developerId))})]})]})]}),e.jsxs("div",{className:"mt-8 flex items-center justify-end gap-3 border-t border-[var(--border)] pt-6",children:[e.jsx("button",{type:"button",onClick:le,className:"rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("common.discard")}),e.jsx("button",{type:"submit",disabled:w||!g||!y,className:"rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-medium text-black hover:opacity-90 transition-opacity disabled:opacity-50",children:r(w?"common.saving":"projects.save_changes")})]}),e.jsx(he,{isOpen:ae,onClose:()=>Q(!1),projectKey:a.key,existingMemberIds:j.map(t=>t.developerId),onAdded:m}),e.jsx(ge,{isOpen:!!i,onClose:()=>_(null),onConfirm:de,memberName:i?i.developerName??`#${i.developerId}`:"",loading:ne})]}):e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 text-center",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:r("projects.project_not_found")}),e.jsx("button",{onClick:()=>l("/projects"),className:"mt-4 rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:r("projects.back_to_projects")})]})}function n({label:o,children:l}){return e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-1 sm:gap-3",children:[e.jsx("label",{className:"sm:w-36 shrink-0 sm:pt-2 text-xs text-[var(--text-muted)]",children:o}),e.jsx("div",{className:"min-w-0 flex-1",children:l})]})}export{Te as default};
@@ -1,4 +1,4 @@
1
- import{c as o,j as e}from"./index-0QFy9ku9.js";/**
1
+ import{c as o,j as e}from"./index-Bq34NKPe.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{j as e}from"./index-0QFy9ku9.js";import{a as r}from"./DocsPrimitives-CipzCTEu.js";import"./copy-BWTAfZ7b.js";function d(){return e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// environment variables"}),e.jsx("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:"configuration reference for server and worker environment variables."})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> server variables"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"server configuration is stored in ~/.overlord/.env. these variables are set during overlord install and can be manually edited."}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"default"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"SERVER_PORT"})}),e.jsx("td",{className:"py-2 pr-4",children:"9000"}),e.jsx("td",{className:"py-2",children:"http/ws port"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"DB_PATH"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord/data/overlord.db"}),e.jsx("td",{className:"py-2",children:"sqlite database path"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"REDIS_URL"})}),e.jsx("td",{className:"py-2 pr-4",children:"redis://localhost:6379"}),e.jsx("td",{className:"py-2",children:"redis connection url"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"JWT_SECRET"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"jwt signing secret (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"WORKER_JWT_SECRET"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"worker jwt signing secret (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"ENCRYPTION_KEY"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"encryption key for sensitive data at rest (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"CORS_ORIGIN"})}),e.jsx("td",{className:"py-2 pr-4",children:"*"}),e.jsx("td",{className:"py-2",children:"allowed cors origins (comma-separated)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WEB_URL"})}),e.jsx("td",{className:"py-2 pr-4",children:"http://localhost:9000"}),e.jsx("td",{className:"py-2",children:"public url for notification links and bot cards (configured during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"GIT_TOKEN"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"git platform authentication token for mr/pr operations"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"TUNNEL_TTL_HOURS"})}),e.jsx("td",{className:"py-2 pr-4",children:"4"}),e.jsx("td",{className:"py-2",children:"cursor tunnel expiration in hours (max 24)"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LOG_LEVEL"})}),e.jsx("td",{className:"py-2 pr-4",children:"info"}),e.jsx("td",{className:"py-2",children:"log level: fatal, error, warn, info, debug, trace"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"never expose JWT_SECRET, WORKER_JWT_SECRET, or ENCRYPTION_KEY. these are generated automatically during installation and should not be shared or committed to version control."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> log levels"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"level"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"fatal"})}),e.jsx("td",{className:"py-2",children:"critical errors causing shutdown"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"error"})}),e.jsx("td",{className:"py-2",children:"runtime errors"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"warn"})}),e.jsx("td",{className:"py-2",children:"warnings"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"info"})}),e.jsx("td",{className:"py-2",children:"general operational info"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"debug"})}),e.jsx("td",{className:"py-2",children:"detailed debugging info"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"trace"})}),e.jsx("td",{className:"py-2",children:"very verbose tracing"})]})]})]})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> worker variables"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"worker configuration is stored in ~/.overlord-worker/.env. these are set during overlord setup worker."}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"default"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_HOST"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"server url (required)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKER_TOKEN"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"one-time registration token"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKER_NAME"})}),e.jsx("td",{className:"py-2 pr-4",children:"hostname"}),e.jsx("td",{className:"py-2",children:"display name for this worker"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKSPACE_ROOT"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord-worker/workspaces"}),e.jsx("td",{className:"py-2",children:"directory for task workspaces"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_MAX_SLOTS"})}),e.jsx("td",{className:"py-2 pr-4",children:"2"}),e.jsx("td",{className:"py-2",children:"maximum concurrent tasks"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_DATA_DIR"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord-worker"}),e.jsx("td",{className:"py-2",children:"config and jwt storage directory"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_SSH_KEY_PATH"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"ssh key for git clone/push operations"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"OVERLORD_WORKER_TOKEN is consumed on first registration. after that, the worker uses a jwt for authentication. the token field can remain in the .env file but will not be used again."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> redis configuration"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"redis is required for the server (used for bullmq task queue and pub/sub). recommended setting:"}),e.jsx("pre",{className:"rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 text-xs text-[var(--text-secondary)] overflow-x-auto",children:"appendonly yes"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"redis must have aof persistence enabled to minimize queue data loss on restart."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> llm configuration"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"optional llm integration that powers two features: (1) auto-generating concise task names and branch slugs from descriptions, and (2) natural language command parsing (nlu) — when a bot message doesn't match any structured command, the llm classifies the intent and extracts parameters. supports anthropic native api and any openai-compatible provider. without these variables, both features are disabled."}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"required"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"default"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LLM_BASE_URL"})}),e.jsx("td",{className:"py-2 pr-4",children:"optional"}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:'llm api base url. supports anthropic native api (url contains "anthropic") and openai-compatible format. leave empty to disable both task naming and nlu.'})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LLM_API_KEY"})}),e.jsx("td",{className:"py-2 pr-4",children:"optional"}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"api key for the llm service. required when LLM_BASE_URL is set."})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LLM_MODEL"})}),e.jsx("td",{className:"py-2 pr-4",children:"optional"}),e.jsx("td",{className:"py-2 pr-4",children:"claude-haiku-4-5-20251001"}),e.jsx("td",{className:"py-2",children:"model identifier used for both task naming and nlu."})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LLM_MAX_DESCRIPTION_LENGTH"})}),e.jsx("td",{className:"py-2 pr-4",children:"optional"}),e.jsx("td",{className:"py-2 pr-4",children:"4000"}),e.jsx("td",{className:"py-2",children:"max description chars sent to llm for task naming; nlu uses a separate internal cap."})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)] mt-2",children:"provider examples:"}),e.jsx(r,{code:`# anthropic (claude) — native messages api, auto-detected
1
+ import{j as e}from"./index-Bq34NKPe.js";import{a as r}from"./DocsPrimitives-CdPzgbGD.js";import"./copy-x3TRsMrN.js";function d(){return e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// environment variables"}),e.jsx("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:"configuration reference for server and worker environment variables."})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> server variables"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"server configuration is stored in ~/.overlord/.env. these variables are set during overlord install and can be manually edited."}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"default"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"SERVER_PORT"})}),e.jsx("td",{className:"py-2 pr-4",children:"9000"}),e.jsx("td",{className:"py-2",children:"http/ws port"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"DB_PATH"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord/data/overlord.db"}),e.jsx("td",{className:"py-2",children:"sqlite database path"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"REDIS_URL"})}),e.jsx("td",{className:"py-2 pr-4",children:"redis://localhost:6379"}),e.jsx("td",{className:"py-2",children:"redis connection url"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"JWT_SECRET"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"jwt signing secret (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"WORKER_JWT_SECRET"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"worker jwt signing secret (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"ENCRYPTION_KEY"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"encryption key for sensitive data at rest (auto-generated during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"CORS_ORIGIN"})}),e.jsx("td",{className:"py-2 pr-4",children:"*"}),e.jsx("td",{className:"py-2",children:"allowed cors origins (comma-separated)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WEB_URL"})}),e.jsx("td",{className:"py-2 pr-4",children:"http://localhost:9000"}),e.jsx("td",{className:"py-2",children:"public url for notification links and bot cards (configured during install)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"GIT_TOKEN"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"git platform authentication token for mr/pr operations"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"TUNNEL_TTL_HOURS"})}),e.jsx("td",{className:"py-2 pr-4",children:"4"}),e.jsx("td",{className:"py-2",children:"cursor tunnel expiration in hours (max 24)"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LOG_LEVEL"})}),e.jsx("td",{className:"py-2 pr-4",children:"info"}),e.jsx("td",{className:"py-2",children:"log level: fatal, error, warn, info, debug, trace"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"never expose JWT_SECRET, WORKER_JWT_SECRET, or ENCRYPTION_KEY. these are generated automatically during installation and should not be shared or committed to version control."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> log levels"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"level"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"fatal"})}),e.jsx("td",{className:"py-2",children:"critical errors causing shutdown"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"error"})}),e.jsx("td",{className:"py-2",children:"runtime errors"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"warn"})}),e.jsx("td",{className:"py-2",children:"warnings"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"info"})}),e.jsx("td",{className:"py-2",children:"general operational info"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"debug"})}),e.jsx("td",{className:"py-2",children:"detailed debugging info"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"trace"})}),e.jsx("td",{className:"py-2",children:"very verbose tracing"})]})]})]})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> worker variables"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"worker configuration is stored in ~/.overlord-worker/.env. these are set during overlord setup worker."}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"default"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_HOST"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"server url (required)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKER_TOKEN"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"one-time registration token"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKER_NAME"})}),e.jsx("td",{className:"py-2 pr-4",children:"hostname"}),e.jsx("td",{className:"py-2",children:"display name for this worker"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_WORKSPACE_ROOT"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord-worker/workspaces"}),e.jsx("td",{className:"py-2",children:"directory for task workspaces"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_MAX_SLOTS"})}),e.jsx("td",{className:"py-2 pr-4",children:"2"}),e.jsx("td",{className:"py-2",children:"maximum concurrent tasks"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_DATA_DIR"})}),e.jsx("td",{className:"py-2 pr-4",children:"~/.overlord-worker"}),e.jsx("td",{className:"py-2",children:"config and jwt storage directory"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"OVERLORD_SSH_KEY_PATH"})}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"ssh key for git clone/push operations"})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"OVERLORD_WORKER_TOKEN is consumed on first registration. after that, the worker uses a jwt for authentication. the token field can remain in the .env file but will not be used again."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> redis configuration"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"redis is required for the server (used for bullmq task queue and pub/sub). recommended setting:"}),e.jsx("pre",{className:"rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 text-xs text-[var(--text-secondary)] overflow-x-auto",children:"appendonly yes"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"redis must have aof persistence enabled to minimize queue data loss on restart."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> llm configuration"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"optional llm integration that powers two features: (1) auto-generating concise task names and branch slugs from descriptions, and (2) natural language command parsing (nlu) — when a bot message doesn't match any structured command, the llm classifies the intent and extracts parameters. supports anthropic native api and any openai-compatible provider. without these variables, both features are disabled."}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"required"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"default"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LLM_BASE_URL"})}),e.jsx("td",{className:"py-2 pr-4",children:"optional"}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:'llm api base url. supports anthropic native api (url contains "anthropic") and openai-compatible format. leave empty to disable both task naming and nlu.'})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LLM_API_KEY"})}),e.jsx("td",{className:"py-2 pr-4",children:"optional"}),e.jsx("td",{className:"py-2 pr-4",children:"—"}),e.jsx("td",{className:"py-2",children:"api key for the llm service. required when LLM_BASE_URL is set."})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LLM_MODEL"})}),e.jsx("td",{className:"py-2 pr-4",children:"optional"}),e.jsx("td",{className:"py-2 pr-4",children:"claude-haiku-4-5-20251001"}),e.jsx("td",{className:"py-2",children:"model identifier used for both task naming and nlu."})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"LLM_MAX_DESCRIPTION_LENGTH"})}),e.jsx("td",{className:"py-2 pr-4",children:"optional"}),e.jsx("td",{className:"py-2 pr-4",children:"4000"}),e.jsx("td",{className:"py-2",children:"max description chars sent to llm for task naming; nlu uses a separate internal cap."})]})]})]})}),e.jsx("p",{className:"text-xs text-[var(--text-muted)] mt-2",children:"provider examples:"}),e.jsx(r,{code:`# anthropic (claude) — native messages api, auto-detected
2
2
  LLM_BASE_URL=https://api.anthropic.com
3
3
  LLM_API_KEY=sk-ant-api03-...
4
4
  LLM_MODEL=claude-haiku-4-5-20251001
@@ -1 +1 @@
1
- import{f as z,a as K,i as H,k as D,r as $,j as e,L as p,l as I,m as B,W as k,h}from"./index-0QFy9ku9.js";import{T as R}from"./TaskStatusBadge-4rifJwVC.js";import{T as g}from"./Skeleton-CmBnyd29.js";import{O as G}from"./OnboardingGuide-Cj05MAli.js";import{f as _}from"./date-CmcdoD87.js";import{g as V}from"./status-colors-DlyerwQ7.js";import{u as b}from"./useFetch-BqnEzaSJ.js";import{T as q}from"./Tooltip-CAj06OH3.js";import{A as v}from"./arrow-right-BwFsEszb.js";import"./chevron-right-Dirw-Ueo.js";const Y=3e5,J=[{type:"fraction",numerator:"active_tasks",denominator:"queued_tasks",labelKey:"dashboard.tasks_active_queued"},{type:"simple",key:"online_workers",labelKey:"dashboard.online_workers"},{type:"simple",key:"completed_today",labelKey:"dashboard.completed_all_today"},{type:"simple",key:"completed_by_user_today",labelKey:"dashboard.completed_by_you_today"}],Q=["sun","mon","tue","wed","thu","fri","sat"];function U(){const n=new Date;return Array.from({length:14},(a,i)=>{const r=new Date(n);r.setDate(r.getDate()-(13-i));const c=String(r.getMonth()+1).padStart(2,"0"),l=String(r.getDate()).padStart(2,"0");return{label:Q[r.getDay()],date:`${c}/${l}`}})}function X({dailyRates:n,dailyCounts:a,overallRate:i}){const{t:r}=K(),c=U(),l=a.reduce((t,o)=>t+o,0),u=Math.max(...a,1);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 flex items-baseline gap-2",children:[e.jsx("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:l}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("dashboard.last_7_days")}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"·"}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:[r("dashboard.success_rate"),": ",i,"%"]})]}),e.jsx("div",{className:"flex gap-1 md:gap-2",style:{height:80},children:c.map(({label:t,date:o},j)=>{const x=a[j]??0,m=n[j]??0,f=r(x===1?"dashboard.task_total":"dashboard.tasks_total"),N=u>0?Math.max(x/u*100,4):4;return e.jsxs(q,{content:`${t} ${o} — ${x} ${f} (${m}%)`,className:"flex flex-1 flex-col items-center gap-1 min-w-0",children:[e.jsx("div",{className:"relative w-full h-full rounded-[4px] cursor-default",style:{backgroundColor:"rgba(34,197,94,0.1)"},children:e.jsx("div",{className:"absolute bottom-0 left-0 right-0 rounded-[4px]",style:{height:`${N}%`,backgroundColor:m>=80?"var(--accent)":m>=50?"var(--warning)":"var(--destructive)"}})}),e.jsx("span",{className:"text-[10px] md:text-[11px] text-[var(--text-muted)] truncate w-full text-center",children:t})]},t)})})]})}function oe(){const n=z(),{t:a}=K(),i=H(),r=D(s=>s.taskSeq),c=D(s=>s.workerSeq),[l,u]=$.useState(0),{data:t,loading:o}=b(()=>h.get("web/dashboard/stats",{searchParams:{tz:String(new Date().getTimezoneOffset())}}).json(),[l,r,c]),{data:j,loading:x}=b(()=>h.get("web/dashboard/recent-tasks",{searchParams:{limit:"5"}}).json(),[l,r]),{data:m,loading:f}=b(()=>h.get("web/workers").json(),[l,c]),{data:N,loading:E}=b(()=>h.get("web/projects").json(),[l]),{data:O,loading:M}=b(()=>h.get("web/dashboard/recent-activity").json(),[]);$.useEffect(()=>{const s=setInterval(()=>{u(d=>d+1)},Y);return()=>clearInterval(s)},[]);const S=(t==null?void 0:t.success_rate_daily)??null,T=(t==null?void 0:t.task_count_daily)??[],W=(t==null?void 0:t.task_success_rate_14d)??0,L=j??[],y=m??[],C=N??[],A=O??[];function F(s){switch(s){case k.ONLINE:return a("dashboard.online");case k.DRAINING:return a("dashboard.idle");case k.OFFLINE:default:return a("dashboard.offline")}}function P(s){return a(s===1?"dashboard.task_total":"dashboard.tasks_total")}return e.jsxs("div",{className:"mx-auto max-w-6xl overflow-hidden px-2 py-4 md:px-4 md:py-6 font-mono",children:[e.jsx("div",{className:"mb-6 md:mb-8 grid grid-cols-2 gap-3 md:gap-4 lg:grid-cols-4",children:J.map(s=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-4",children:[e.jsxs("span",{className:"text-[11px] md:text-xs text-[var(--text-muted)]",children:[a(s.labelKey),":"]}),o?e.jsx("div",{className:"mt-1 h-6 md:h-8 w-12 md:w-16 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):e.jsx("div",{className:"mt-1 flex items-baseline gap-2",children:s.type==="fraction"?e.jsxs("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:[(t==null?void 0:t[s.numerator])??0,e.jsx("span",{className:"text-base md:text-lg font-normal text-[var(--text-muted)]",children:"/"}),(t==null?void 0:t[s.denominator])??0]}):e.jsx("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:(t==null?void 0:t[s.key])??0})})]},s.labelKey))}),e.jsx(G,{data:{activeTasks:((t==null?void 0:t.active_tasks)??0)+((t==null?void 0:t.queued_tasks)??0),totalWorkers:y.length,totalProjects:(t==null?void 0:t.project_count)??0,totalDevelopers:(t==null?void 0:t.developer_count)??0}}),e.jsxs("div",{className:"mb-6 grid gap-6 lg:grid-cols-3 items-stretch",children:[e.jsx("div",{className:"flex flex-col gap-6 lg:col-span-2",children:e.jsxs("div",{className:"flex flex-1 flex-col rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("div",{className:"border-b border-[var(--border)] px-5 py-3",children:e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.task_count")})}),e.jsx("div",{className:"flex flex-1 flex-col justify-center p-3 md:p-5",children:o?e.jsx("div",{className:"h-24 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):S?e.jsx(X,{dailyRates:S,dailyCounts:T,overallRate:W}):e.jsxs("div",{className:"flex flex-col items-center gap-2 py-6",children:[e.jsx("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:T.reduce((s,d)=>s+d,0)}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.daily_breakdown_not_available")})]})})]})}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:border",children:[e.jsxs("div",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.recent_tasks")}),e.jsxs(p,{to:"/tasks",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"flex md:hidden items-center justify-between px-3 py-3",children:e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.recent_tasks")})}),e.jsx("div",{className:"px-3 pb-3 md:px-5 md:pb-4 md:pt-0",children:x?e.jsx(g,{rows:4}):L.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.no_tasks_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2 md:gap-0",children:L.map(s=>e.jsxs("div",{onClick:()=>n(`/tasks/${s.id}`),className:"flex cursor-pointer items-center gap-3 rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)] md:rounded-none md:border-0 md:border-b md:border-[var(--border-row)] md:p-0 md:py-2.5 last:md:border-b-0",children:[e.jsxs("div",{className:"flex-1 min-w-0 md:hidden",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("span",{className:"text-[11px] text-[var(--text-primary)] leading-tight line-clamp-2 preserve-case",title:B(s),children:["#",s.id," ",I(s)]}),e.jsx("span",{className:"shrink-0",children:e.jsx(R,{status:s.status})})]}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)] mt-1 block",children:_(s.createdAt)})]}),e.jsxs("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:["#",s.id]}),e.jsx("span",{className:"hidden md:inline flex-1 text-xs text-[var(--text-primary)] truncate preserve-case",children:e.jsx(q,{content:s.description,children:I(s,40)})}),e.jsx("span",{className:"hidden md:inline",children:e.jsx(R,{status:s.status})}),e.jsx("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:_(s.createdAt)})]},s.id))})})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.workers")}),e.jsxs(p,{to:"/workers",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsxs("div",{className:"flex md:hidden items-center justify-between border-b border-[var(--border)] px-3 py-3",children:[e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.workers")}),e.jsxs(p,{to:"/workers",className:"flex items-center gap-1 text-[11px] text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:f?e.jsx(g,{rows:3}):y.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.no_workers_registered")})]}):e.jsx("div",{className:"flex flex-col",children:y.map(s=>e.jsxs("div",{onClick:()=>n(`/workers/${s.id}`),className:"flex cursor-pointer items-center justify-between border-b border-[var(--border-row)] py-2.5 transition-colors hover:bg-[var(--bg-input)] last:border-b-0",children:[e.jsxs("div",{className:"min-w-0 flex-1 flex flex-col gap-0.5",children:[e.jsx("span",{className:"truncate text-xs text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"truncate text-xs text-[var(--text-muted)]",children:s.host??"--"})]}),e.jsxs("div",{className:"shrink-0 flex items-center gap-3",children:[e.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:[s.activeSlots,"/",s.maxSlots," ",a("dashboard.slots")]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs",style:{color:V(s.status)},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),F(s.status)]})]})]},s.id))})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:hidden",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-3 py-3",children:[e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.projects")}),e.jsxs(p,{to:"/projects",className:"flex items-center gap-1 text-[11px] text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-3",children:E?e.jsx(g,{rows:3}):C.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("projects.no_projects_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2",children:C.map(s=>{const d=s.taskCount??0;return e.jsxs("div",{onClick:()=>n(`/projects/${s.key}`),className:"cursor-pointer rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)]",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-[var(--accent)]",children:s.key}),e.jsxs("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:[d," ",P(d)]})]}),e.jsx("span",{className:"mt-1 block text-[11px] text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"mt-0.5 block text-[11px] text-[var(--text-muted)]",children:s.agentType})]},s.key)})})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.recent_activity")}),i&&e.jsxs(p,{to:"/admin/audit-logs",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-3 md:p-4",children:M?e.jsx(g,{rows:4}):A.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.no_recent_activity")})]}):e.jsx("div",{className:"flex flex-col",children:A.map(s=>{const d=s.message.match(/task\s*#?(\d+)/i),w=d?d[1]:null;return e.jsxs("div",{className:`flex min-w-0 flex-col gap-1 rounded-[4px] border-b border-[var(--border-row)] px-2 py-2 transition-colors last:border-b-0 md:flex-row md:items-start md:gap-3 md:rounded-none md:px-0 ${w?"cursor-pointer hover:bg-[var(--bg-input)]":""}`,onClick:()=>w&&n(`/tasks/${w}`),children:[e.jsx("span",{className:"shrink-0 whitespace-nowrap text-[11px] text-[var(--text-muted)] md:text-xs",children:_(s.timestamp)}),e.jsx("span",{className:"min-w-0 break-words text-[11px] leading-relaxed text-[var(--text-secondary)] md:truncate md:text-xs md:leading-normal",children:s.message})]},s.id)})})})]})]})]})}export{oe as default};
1
+ import{f as z,a as K,i as H,k as D,r as $,j as e,L as p,l as I,m as B,W as k,h}from"./index-Bq34NKPe.js";import{T as R}from"./TaskStatusBadge-BiKYxoLM.js";import{T as g}from"./Skeleton-CSQRa5CX.js";import{O as G}from"./OnboardingGuide-D9Hixolx.js";import{f as _}from"./date-CmcdoD87.js";import{g as V}from"./status-colors-5_ZR5pcJ.js";import{u as b}from"./useFetch-C1wTw-Jt.js";import{T as q}from"./Tooltip-DjmXgfn4.js";import{A as v}from"./arrow-right-Dd0H7A0R.js";import"./chevron-right-Cd7nI939.js";const Y=3e5,J=[{type:"fraction",numerator:"active_tasks",denominator:"queued_tasks",labelKey:"dashboard.tasks_active_queued"},{type:"simple",key:"online_workers",labelKey:"dashboard.online_workers"},{type:"simple",key:"completed_today",labelKey:"dashboard.completed_all_today"},{type:"simple",key:"completed_by_user_today",labelKey:"dashboard.completed_by_you_today"}],Q=["sun","mon","tue","wed","thu","fri","sat"];function U(){const n=new Date;return Array.from({length:14},(a,i)=>{const r=new Date(n);r.setDate(r.getDate()-(13-i));const c=String(r.getMonth()+1).padStart(2,"0"),l=String(r.getDate()).padStart(2,"0");return{label:Q[r.getDay()],date:`${c}/${l}`}})}function X({dailyRates:n,dailyCounts:a,overallRate:i}){const{t:r}=K(),c=U(),l=a.reduce((t,o)=>t+o,0),u=Math.max(...a,1);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 flex items-baseline gap-2",children:[e.jsx("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:l}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("dashboard.last_7_days")}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"·"}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:[r("dashboard.success_rate"),": ",i,"%"]})]}),e.jsx("div",{className:"flex gap-1 md:gap-2",style:{height:80},children:c.map(({label:t,date:o},j)=>{const x=a[j]??0,m=n[j]??0,f=r(x===1?"dashboard.task_total":"dashboard.tasks_total"),N=u>0?Math.max(x/u*100,4):4;return e.jsxs(q,{content:`${t} ${o} — ${x} ${f} (${m}%)`,className:"flex flex-1 flex-col items-center gap-1 min-w-0",children:[e.jsx("div",{className:"relative w-full h-full rounded-[4px] cursor-default",style:{backgroundColor:"rgba(34,197,94,0.1)"},children:e.jsx("div",{className:"absolute bottom-0 left-0 right-0 rounded-[4px]",style:{height:`${N}%`,backgroundColor:m>=80?"var(--accent)":m>=50?"var(--warning)":"var(--destructive)"}})}),e.jsx("span",{className:"text-[10px] md:text-[11px] text-[var(--text-muted)] truncate w-full text-center",children:t})]},t)})})]})}function oe(){const n=z(),{t:a}=K(),i=H(),r=D(s=>s.taskSeq),c=D(s=>s.workerSeq),[l,u]=$.useState(0),{data:t,loading:o}=b(()=>h.get("web/dashboard/stats",{searchParams:{tz:String(new Date().getTimezoneOffset())}}).json(),[l,r,c]),{data:j,loading:x}=b(()=>h.get("web/dashboard/recent-tasks",{searchParams:{limit:"5"}}).json(),[l,r]),{data:m,loading:f}=b(()=>h.get("web/workers").json(),[l,c]),{data:N,loading:E}=b(()=>h.get("web/projects").json(),[l]),{data:O,loading:M}=b(()=>h.get("web/dashboard/recent-activity").json(),[]);$.useEffect(()=>{const s=setInterval(()=>{u(d=>d+1)},Y);return()=>clearInterval(s)},[]);const S=(t==null?void 0:t.success_rate_daily)??null,T=(t==null?void 0:t.task_count_daily)??[],W=(t==null?void 0:t.task_success_rate_14d)??0,L=j??[],y=m??[],C=N??[],A=O??[];function F(s){switch(s){case k.ONLINE:return a("dashboard.online");case k.DRAINING:return a("dashboard.idle");case k.OFFLINE:default:return a("dashboard.offline")}}function P(s){return a(s===1?"dashboard.task_total":"dashboard.tasks_total")}return e.jsxs("div",{className:"mx-auto max-w-6xl overflow-hidden px-2 py-4 md:px-4 md:py-6 font-mono",children:[e.jsx("div",{className:"mb-6 md:mb-8 grid grid-cols-2 gap-3 md:gap-4 lg:grid-cols-4",children:J.map(s=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-4",children:[e.jsxs("span",{className:"text-[11px] md:text-xs text-[var(--text-muted)]",children:[a(s.labelKey),":"]}),o?e.jsx("div",{className:"mt-1 h-6 md:h-8 w-12 md:w-16 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):e.jsx("div",{className:"mt-1 flex items-baseline gap-2",children:s.type==="fraction"?e.jsxs("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:[(t==null?void 0:t[s.numerator])??0,e.jsx("span",{className:"text-base md:text-lg font-normal text-[var(--text-muted)]",children:"/"}),(t==null?void 0:t[s.denominator])??0]}):e.jsx("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:(t==null?void 0:t[s.key])??0})})]},s.labelKey))}),e.jsx(G,{data:{activeTasks:((t==null?void 0:t.active_tasks)??0)+((t==null?void 0:t.queued_tasks)??0),totalWorkers:y.length,totalProjects:(t==null?void 0:t.project_count)??0,totalDevelopers:(t==null?void 0:t.developer_count)??0}}),e.jsxs("div",{className:"mb-6 grid gap-6 lg:grid-cols-3 items-stretch",children:[e.jsx("div",{className:"flex flex-col gap-6 lg:col-span-2",children:e.jsxs("div",{className:"flex flex-1 flex-col rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("div",{className:"border-b border-[var(--border)] px-5 py-3",children:e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.task_count")})}),e.jsx("div",{className:"flex flex-1 flex-col justify-center p-3 md:p-5",children:o?e.jsx("div",{className:"h-24 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):S?e.jsx(X,{dailyRates:S,dailyCounts:T,overallRate:W}):e.jsxs("div",{className:"flex flex-col items-center gap-2 py-6",children:[e.jsx("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:T.reduce((s,d)=>s+d,0)}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.daily_breakdown_not_available")})]})})]})}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:border",children:[e.jsxs("div",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.recent_tasks")}),e.jsxs(p,{to:"/tasks",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"flex md:hidden items-center justify-between px-3 py-3",children:e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.recent_tasks")})}),e.jsx("div",{className:"px-3 pb-3 md:px-5 md:pb-4 md:pt-0",children:x?e.jsx(g,{rows:4}):L.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.no_tasks_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2 md:gap-0",children:L.map(s=>e.jsxs("div",{onClick:()=>n(`/tasks/${s.id}`),className:"flex cursor-pointer items-center gap-3 rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)] md:rounded-none md:border-0 md:border-b md:border-[var(--border-row)] md:p-0 md:py-2.5 last:md:border-b-0",children:[e.jsxs("div",{className:"flex-1 min-w-0 md:hidden",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("span",{className:"text-[11px] text-[var(--text-primary)] leading-tight line-clamp-2 preserve-case",title:B(s),children:["#",s.id," ",I(s)]}),e.jsx("span",{className:"shrink-0",children:e.jsx(R,{status:s.status})})]}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)] mt-1 block",children:_(s.createdAt)})]}),e.jsxs("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:["#",s.id]}),e.jsx("span",{className:"hidden md:inline flex-1 text-xs text-[var(--text-primary)] truncate preserve-case",children:e.jsx(q,{content:s.description,children:I(s,40)})}),e.jsx("span",{className:"hidden md:inline",children:e.jsx(R,{status:s.status})}),e.jsx("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:_(s.createdAt)})]},s.id))})})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.workers")}),e.jsxs(p,{to:"/workers",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsxs("div",{className:"flex md:hidden items-center justify-between border-b border-[var(--border)] px-3 py-3",children:[e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.workers")}),e.jsxs(p,{to:"/workers",className:"flex items-center gap-1 text-[11px] text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:f?e.jsx(g,{rows:3}):y.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.no_workers_registered")})]}):e.jsx("div",{className:"flex flex-col",children:y.map(s=>e.jsxs("div",{onClick:()=>n(`/workers/${s.id}`),className:"flex cursor-pointer items-center justify-between border-b border-[var(--border-row)] py-2.5 transition-colors hover:bg-[var(--bg-input)] last:border-b-0",children:[e.jsxs("div",{className:"min-w-0 flex-1 flex flex-col gap-0.5",children:[e.jsx("span",{className:"truncate text-xs text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"truncate text-xs text-[var(--text-muted)]",children:s.host??"--"})]}),e.jsxs("div",{className:"shrink-0 flex items-center gap-3",children:[e.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:[s.activeSlots,"/",s.maxSlots," ",a("dashboard.slots")]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs",style:{color:V(s.status)},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),F(s.status)]})]})]},s.id))})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:hidden",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-3 py-3",children:[e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.projects")}),e.jsxs(p,{to:"/projects",className:"flex items-center gap-1 text-[11px] text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-3",children:E?e.jsx(g,{rows:3}):C.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("projects.no_projects_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2",children:C.map(s=>{const d=s.taskCount??0;return e.jsxs("div",{onClick:()=>n(`/projects/${s.key}`),className:"cursor-pointer rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)]",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-[var(--accent)]",children:s.key}),e.jsxs("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:[d," ",P(d)]})]}),e.jsx("span",{className:"mt-1 block text-[11px] text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"mt-0.5 block text-[11px] text-[var(--text-muted)]",children:s.agentType})]},s.key)})})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.recent_activity")}),i&&e.jsxs(p,{to:"/admin/audit-logs",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-3 md:p-4",children:M?e.jsx(g,{rows:4}):A.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.no_recent_activity")})]}):e.jsx("div",{className:"flex flex-col",children:A.map(s=>{const d=s.message.match(/task\s*#?(\d+)/i),w=d?d[1]:null;return e.jsxs("div",{className:`flex min-w-0 flex-col gap-1 rounded-[4px] border-b border-[var(--border-row)] px-2 py-2 transition-colors last:border-b-0 md:flex-row md:items-start md:gap-3 md:rounded-none md:px-0 ${w?"cursor-pointer hover:bg-[var(--bg-input)]":""}`,onClick:()=>w&&n(`/tasks/${w}`),children:[e.jsx("span",{className:"shrink-0 whitespace-nowrap text-[11px] text-[var(--text-muted)] md:text-xs",children:_(s.timestamp)}),e.jsx("span",{className:"min-w-0 break-words text-[11px] leading-relaxed text-[var(--text-secondary)] md:truncate md:text-xs md:leading-normal",children:s.message})]},s.id)})})})]})]})]})}export{oe as default};
@@ -1 +1 @@
1
- import{j as e}from"./index-0QFy9ku9.js";function i({label:s,value:t,href:r,variant:n="between",labelWidth:a="w-20 md:w-28"}){return n==="fixed-label"?e.jsxs("div",{className:"flex min-w-0 flex-col sm:flex-row sm:items-center gap-0.5 sm:gap-3 py-1",children:[e.jsx("span",{className:`${a} shrink-0 text-xs text-[var(--text-muted)]`,children:s}),r?e.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"min-w-0 truncate text-sm text-[var(--accent)] hover:underline",children:t}):e.jsx("span",{className:"min-w-0 truncate text-sm text-[var(--text-primary)]",children:t})]}):e.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-4",children:[e.jsx("span",{className:"shrink-0 text-[var(--text-muted)]",children:s}),e.jsx("span",{className:"min-w-0 truncate text-[var(--text-primary)]",children:t})]})}export{i as I};
1
+ import{j as e}from"./index-Bq34NKPe.js";function i({label:s,value:t,href:r,variant:n="between",labelWidth:a="w-20 md:w-28"}){return n==="fixed-label"?e.jsxs("div",{className:"flex min-w-0 flex-col sm:flex-row sm:items-center gap-0.5 sm:gap-3 py-1",children:[e.jsx("span",{className:`${a} shrink-0 text-xs text-[var(--text-muted)]`,children:s}),r?e.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"min-w-0 truncate text-sm text-[var(--accent)] hover:underline",children:t}):e.jsx("span",{className:"min-w-0 truncate text-sm text-[var(--text-primary)]",children:t})]}):e.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-4",children:[e.jsx("span",{className:"shrink-0 text-[var(--text-muted)]",children:s}),e.jsx("span",{className:"min-w-0 truncate text-[var(--text-primary)]",children:t})]})}export{i as I};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./index-0QFy9ku9.js";import{I as s,a as t}from"./DocsPrimitives-CipzCTEu.js";import"./copy-BWTAfZ7b.js";function n(){return e.jsx("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// prerequisites"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"before installing overlord, make sure you have:"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"node.js"})," ",">="," 20"]}),e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"redis"})," (for the server — task queue and pub/sub)"]}),e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"git"})," ",">="," 2.20"]}),e.jsxs("li",{children:["— an ai agent cli installed on worker machines (one or more of: ",e.jsx("code",{className:"text-[var(--accent)]",children:"claude"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"cursor"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"codex"}),")"]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// server setup"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"install the overlord cli and server packages globally:"}),e.jsx(s,{code:"npm install -g @overlordai/cli @overlordai/server"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"run the interactive installation wizard:"}),e.jsx(s,{code:"overlord install"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"the wizard will:"}),e.jsxs("ol",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsx("li",{children:"1. check that all prerequisites are met (node, redis, git)"}),e.jsxs("li",{children:["2. generate secrets (",e.jsx("code",{className:"text-[var(--accent)]",children:"JWT_SECRET"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"WORKER_JWT_SECRET"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"ENCRYPTION_KEY"}),")"]}),e.jsxs("li",{children:["3. configure redis connection (default: ",e.jsx("code",{className:"text-[var(--text-muted)]",children:"redis://localhost:6379/0"}),")"]}),e.jsx("li",{children:"4. configure public url for notification links (optional — used in bot cards and email links)"}),e.jsx("li",{children:"5. initialize the sqlite database and run migrations"}),e.jsx("li",{children:"6. create your admin account (username, password, git name, git email)"}),e.jsx("li",{children:"7. configure ai task naming (optional — uses any openai-compatible llm api)"})]}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["all configuration is written to ",e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord/.env"}),"."]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// start the server"}),e.jsx(t,{code:`overlord start # start services (systemd / launchd)
1
+ import{j as e}from"./index-Bq34NKPe.js";import{I as s,a as t}from"./DocsPrimitives-CdPzgbGD.js";import"./copy-x3TRsMrN.js";function n(){return e.jsx("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// prerequisites"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"before installing overlord, make sure you have:"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"node.js"})," ",">="," 20"]}),e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"redis"})," (for the server — task queue and pub/sub)"]}),e.jsxs("li",{children:["— ",e.jsx("span",{className:"text-[var(--accent)]",children:"git"})," ",">="," 2.20"]}),e.jsxs("li",{children:["— an ai agent cli installed on worker machines (one or more of: ",e.jsx("code",{className:"text-[var(--accent)]",children:"claude"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"cursor"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"codex"}),")"]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// server setup"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"install the overlord cli and server packages globally:"}),e.jsx(s,{code:"npm install -g @overlordai/cli @overlordai/server"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"run the interactive installation wizard:"}),e.jsx(s,{code:"overlord install"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"the wizard will:"}),e.jsxs("ol",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsx("li",{children:"1. check that all prerequisites are met (node, redis, git)"}),e.jsxs("li",{children:["2. generate secrets (",e.jsx("code",{className:"text-[var(--accent)]",children:"JWT_SECRET"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"WORKER_JWT_SECRET"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"ENCRYPTION_KEY"}),")"]}),e.jsxs("li",{children:["3. configure redis connection (default: ",e.jsx("code",{className:"text-[var(--text-muted)]",children:"redis://localhost:6379/0"}),")"]}),e.jsx("li",{children:"4. configure public url for notification links (optional — used in bot cards and email links)"}),e.jsx("li",{children:"5. initialize the sqlite database and run migrations"}),e.jsx("li",{children:"6. create your admin account (username, password, git name, git email)"}),e.jsx("li",{children:"7. configure ai task naming (optional — uses any openai-compatible llm api)"})]}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["all configuration is written to ",e.jsx("code",{className:"text-[var(--accent)]",children:"~/.overlord/.env"}),"."]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// start the server"}),e.jsx(t,{code:`overlord start # start services (systemd / launchd)
2
2
  overlord status # verify everything is running
3
3
  overlord doctor # run health check`}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["the ",e.jsx("code",{className:"text-[var(--accent)]",children:"overlord start"})," command automatically generates and registers system services (systemd on linux, launchd on macos)."]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// add worker machines"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"workers are the machines that actually run tasks. you need at least one worker to start using overlord."}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 1. generate a registration token"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["in the web dashboard, go to ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"admin → worker tokens → generate token"}),". each token registers exactly one worker."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 2. install worker on the target machine"}),e.jsx(s,{code:"npm install -g @overlordai/cli @overlordai/worker"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 3. run the setup wizard"}),e.jsx(s,{code:"overlord setup worker"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"the wizard will ask for your server url, the registration token, a machine name, and the number of concurrent task slots."}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2",children:e.jsx("p",{className:"text-xs text-[var(--text-secondary)]",children:"// for detailed worker configuration, ssh keys, non-interactive mode, and troubleshooting, see the full worker setup guide."})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 4. verify connection"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["once the worker starts, it will appear on the ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"machines"}),' page in the web dashboard with status "online".']})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// developer cli"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["developers interact with overlord through the ",e.jsx("code",{className:"text-[var(--accent)]",children:"ov"})," cli:"]}),e.jsx(t,{code:`npm install -g @overlordai/developer-cli
4
4
 
@@ -1,4 +1,4 @@
1
- import{c as m,u,a as b,r as o,j as e,N as _,T as f,L as i,S as j,E as N,b as v,d as w,e as K,P as k,C as S}from"./index-0QFy9ku9.js";import{A as x}from"./arrow-right-BwFsEszb.js";import{Z as z}from"./zap-DhNn8k7Z.js";import{B as T}from"./bot-C7wSfjw1.js";import{W as L,G as C}from"./workflow-DLz7dyVN.js";import{U as M}from"./users-dmt7eU5B.js";import{C as I}from"./copy-BWTAfZ7b.js";/**
1
+ import{c as m,u,a as b,r as o,j as e,N as _,T as f,L as i,S as j,E as N,b as v,d as w,e as K,P as k,C as S}from"./index-Bq34NKPe.js";import{A as x}from"./arrow-right-Dd0H7A0R.js";import{Z as z}from"./zap-TfXpX22P.js";import{B as T}from"./bot-DnUHQkGw.js";import{W as L,G as C}from"./workflow-CG74TuIT.js";import{U as M}from"./users-BR3rVcV_.js";import{C as I}from"./copy-x3TRsMrN.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.