@overlordai/server 1.0.140 → 1.0.142

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 (232) hide show
  1. package/database/migrations/010-plan-review-mode.sql +11 -0
  2. package/database/migrations/012-schema-index-fixes.sql +72 -0
  3. package/dist/adapters/adapter.module.d.ts.map +1 -1
  4. package/dist/adapters/adapter.module.js +3 -0
  5. package/dist/adapters/adapter.module.js.map +1 -1
  6. package/dist/adapters/command-parser.utils.d.ts +11 -0
  7. package/dist/adapters/command-parser.utils.d.ts.map +1 -1
  8. package/dist/adapters/command-parser.utils.js +57 -0
  9. package/dist/adapters/command-parser.utils.js.map +1 -1
  10. package/dist/adapters/help-text.d.ts.map +1 -1
  11. package/dist/adapters/help-text.js +8 -6
  12. package/dist/adapters/help-text.js.map +1 -1
  13. package/dist/adapters/lark/lark-message.parser.d.ts +7 -7
  14. package/dist/adapters/lark/lark-message.parser.d.ts.map +1 -1
  15. package/dist/adapters/lark/lark-message.parser.js +11 -7
  16. package/dist/adapters/lark/lark-message.parser.js.map +1 -1
  17. package/dist/adapters/lark/lark.adapter.d.ts +3 -1
  18. package/dist/adapters/lark/lark.adapter.d.ts.map +1 -1
  19. package/dist/adapters/lark/lark.adapter.js +28 -12
  20. package/dist/adapters/lark/lark.adapter.js.map +1 -1
  21. package/dist/adapters/nlu.service.d.ts +20 -0
  22. package/dist/adapters/nlu.service.d.ts.map +1 -0
  23. package/dist/adapters/nlu.service.js +231 -0
  24. package/dist/adapters/nlu.service.js.map +1 -0
  25. package/dist/adapters/slack/slack-message.parser.d.ts.map +1 -1
  26. package/dist/adapters/slack/slack-message.parser.js +4 -0
  27. package/dist/adapters/slack/slack-message.parser.js.map +1 -1
  28. package/dist/adapters/slack/slack.adapter.d.ts +3 -1
  29. package/dist/adapters/slack/slack.adapter.d.ts.map +1 -1
  30. package/dist/adapters/slack/slack.adapter.js +43 -14
  31. package/dist/adapters/slack/slack.adapter.js.map +1 -1
  32. package/dist/adapters/slack/slack.controller.js +8 -8
  33. package/dist/adapters/slack/slack.controller.js.map +1 -1
  34. package/dist/common/project-validation.d.ts +13 -3
  35. package/dist/common/project-validation.d.ts.map +1 -1
  36. package/dist/common/project-validation.js +21 -5
  37. package/dist/common/project-validation.js.map +1 -1
  38. package/dist/database/migration-runner.d.ts.map +1 -1
  39. package/dist/database/migration-runner.js +10 -1
  40. package/dist/database/migration-runner.js.map +1 -1
  41. package/dist/database/repositories/project.repository.d.ts +2 -0
  42. package/dist/database/repositories/project.repository.d.ts.map +1 -1
  43. package/dist/database/repositories/project.repository.js +13 -0
  44. package/dist/database/repositories/project.repository.js.map +1 -1
  45. package/dist/database/repositories/task.repository.d.ts +11 -2
  46. package/dist/database/repositories/task.repository.d.ts.map +1 -1
  47. package/dist/database/repositories/task.repository.js +64 -8
  48. package/dist/database/repositories/task.repository.js.map +1 -1
  49. package/dist/dispatcher/dispatcher.service.d.ts +2 -0
  50. package/dist/dispatcher/dispatcher.service.d.ts.map +1 -1
  51. package/dist/dispatcher/dispatcher.service.js +79 -0
  52. package/dist/dispatcher/dispatcher.service.js.map +1 -1
  53. package/dist/dispatcher/scheduler.service.d.ts.map +1 -1
  54. package/dist/dispatcher/scheduler.service.js +3 -0
  55. package/dist/dispatcher/scheduler.service.js.map +1 -1
  56. package/dist/dispatcher/task-creation.service.d.ts +13 -2
  57. package/dist/dispatcher/task-creation.service.d.ts.map +1 -1
  58. package/dist/dispatcher/task-creation.service.js +207 -21
  59. package/dist/dispatcher/task-creation.service.js.map +1 -1
  60. package/dist/dispatcher/task-lifecycle.service.d.ts +5 -1
  61. package/dist/dispatcher/task-lifecycle.service.d.ts.map +1 -1
  62. package/dist/dispatcher/task-lifecycle.service.js +231 -1
  63. package/dist/dispatcher/task-lifecycle.service.js.map +1 -1
  64. package/dist/events/event-types.d.ts +8 -0
  65. package/dist/events/event-types.d.ts.map +1 -1
  66. package/dist/events/event-types.js +1 -0
  67. package/dist/events/event-types.js.map +1 -1
  68. package/dist/notifier/notification-consumer.d.ts.map +1 -1
  69. package/dist/notifier/notification-consumer.js +5 -0
  70. package/dist/notifier/notification-consumer.js.map +1 -1
  71. package/dist/notifier/notification-event-listener.d.ts +2 -1
  72. package/dist/notifier/notification-event-listener.d.ts.map +1 -1
  73. package/dist/notifier/notification-event-listener.js +14 -0
  74. package/dist/notifier/notification-event-listener.js.map +1 -1
  75. package/dist/notifier/notifier.service.d.ts +1 -0
  76. package/dist/notifier/notifier.service.d.ts.map +1 -1
  77. package/dist/notifier/notifier.service.js +8 -0
  78. package/dist/notifier/notifier.service.js.map +1 -1
  79. package/dist/notifier/template.service.d.ts +4 -0
  80. package/dist/notifier/template.service.d.ts.map +1 -1
  81. package/dist/notifier/template.service.js +32 -0
  82. package/dist/notifier/template.service.js.map +1 -1
  83. package/dist/web/admin/admin-project.controller.d.ts.map +1 -1
  84. package/dist/web/admin/admin-project.controller.js +15 -0
  85. package/dist/web/admin/admin-project.controller.js.map +1 -1
  86. package/dist/web/dashboard.service.js +3 -3
  87. package/dist/web/frame-handlers/index.d.ts +1 -0
  88. package/dist/web/frame-handlers/index.d.ts.map +1 -1
  89. package/dist/web/frame-handlers/index.js +3 -1
  90. package/dist/web/frame-handlers/index.js.map +1 -1
  91. package/dist/web/frame-handlers/progress.handler.d.ts.map +1 -1
  92. package/dist/web/frame-handlers/progress.handler.js +18 -0
  93. package/dist/web/frame-handlers/progress.handler.js.map +1 -1
  94. package/dist/web/frame-handlers/review-report.handler.d.ts +15 -0
  95. package/dist/web/frame-handlers/review-report.handler.d.ts.map +1 -0
  96. package/dist/web/frame-handlers/review-report.handler.js +140 -0
  97. package/dist/web/frame-handlers/review-report.handler.js.map +1 -0
  98. package/dist/web/frame-handlers/stage-confirm.handler.d.ts +3 -1
  99. package/dist/web/frame-handlers/stage-confirm.handler.d.ts.map +1 -1
  100. package/dist/web/frame-handlers/stage-confirm.handler.js +18 -4
  101. package/dist/web/frame-handlers/stage-confirm.handler.js.map +1 -1
  102. package/dist/web/project.controller.js +1 -1
  103. package/dist/web/project.controller.js.map +1 -1
  104. package/dist/web/task.controller.d.ts +116 -2
  105. package/dist/web/task.controller.d.ts.map +1 -1
  106. package/dist/web/task.controller.js +172 -8
  107. package/dist/web/task.controller.js.map +1 -1
  108. package/dist/web/web-event.service.d.ts +2 -1
  109. package/dist/web/web-event.service.d.ts.map +1 -1
  110. package/dist/web/web-event.service.js +13 -0
  111. package/dist/web/web-event.service.js.map +1 -1
  112. package/dist/web/worker-channel.gateway.d.ts +2 -1
  113. package/dist/web/worker-channel.gateway.d.ts.map +1 -1
  114. package/dist/web/worker-channel.gateway.js +6 -3
  115. package/dist/web/worker-channel.gateway.js.map +1 -1
  116. package/package.json +4 -4
  117. package/public/assets/AccessTokensPage-DsNgVUdv.js +1 -0
  118. package/public/assets/AdminPage-NZC6yOHW.js +1 -0
  119. package/public/assets/{AgentCliPage-CyYjrwq2.js → AgentCliPage-Bp8tQiWl.js} +1 -1
  120. package/public/assets/{ApiReferencePage-Bclq5KsN.js → ApiReferencePage-DXNSPdww.js} +1 -1
  121. package/public/assets/{ArchitecturePage-BDytxAWu.js → ArchitecturePage-DFUNHKTN.js} +1 -1
  122. package/public/assets/AuditLogPage-Wtpr8CDi.js +1 -0
  123. package/public/assets/{BindPlatformPage-BWFCXp_B.js → BindPlatformPage-Bp_NG22g.js} +1 -1
  124. package/public/assets/{BotIntegrationPage-BE63GDU0.js → BotIntegrationPage-DuH_f_mp.js} +1 -1
  125. package/public/assets/{BotManage-B4jE07jf.js → BotManage-CJ5GZ0HR.js} +2 -2
  126. package/public/assets/{BotSetupPage-CFZ4rCsj.js → BotSetupPage-Ct_gjzJt.js} +1 -1
  127. package/public/assets/{ChangelogPage-Dq4Vbaek.js → ChangelogPage-DrpgpyjK.js} +1 -1
  128. package/public/assets/CliReferencePage-BiUl0LtI.js +17 -0
  129. package/public/assets/ConfirmStageDialog-BsoAtSes.js +12 -0
  130. package/public/assets/{DeploymentPage-Cl6zirj-.js → DeploymentPage-DtlH8d7p.js} +1 -1
  131. package/public/assets/{DevWorkflowPage-Le7igjcE.js → DevWorkflowPage-BoZm03L7.js} +1 -1
  132. package/public/assets/{DeveloperManage-CEia9VDa.js → DeveloperManage-hoNX7J5P.js} +2 -2
  133. package/public/assets/{DeveloperSetupPage-CYbrSjhy.js → DeveloperSetupPage-D3FDp-R7.js} +1 -1
  134. package/public/assets/{DocsIndexPage-Ds7FZGYL.js → DocsIndexPage-ZBDBTreg.js} +2 -2
  135. package/public/assets/DocsLayout-CX3AKUlL.js +1 -0
  136. package/public/assets/{DocsPrimitives-BeRfTNWi.js → DocsPrimitives-B3qhkVFu.js} +1 -1
  137. package/public/assets/EditProjectPage-DKaSpnod.js +2 -0
  138. package/public/assets/{EmptyState-BrTEmjub.js → EmptyState-BKUHLcAb.js} +1 -1
  139. package/public/assets/{EnvVariablesPage-Cco0LY2i.js → EnvVariablesPage-C2nu-wxe.js} +1 -1
  140. package/public/assets/{HomePage-DkFq_Niq.js → HomePage-CQ0Upd0D.js} +1 -1
  141. package/public/assets/{InfoRow-VesvmVYO.js → InfoRow-CBKDMEtd.js} +1 -1
  142. package/public/assets/{InstallationPage-Cd7Eh_1x.js → InstallationPage-0TO7IQzJ.js} +1 -1
  143. package/public/assets/{LandingPage-Cxp2IXav.js → LandingPage-YcgE-OTL.js} +7 -12
  144. package/public/assets/{LocalDevelopmentPage-BC2x9o_F.js → LocalDevelopmentPage-BDpTHWAo.js} +1 -1
  145. package/public/assets/{LoginPage-fgYsLW4-.js → LoginPage-F34Kt4ot.js} +1 -1
  146. package/public/assets/{MetricBar-CFHaSbdz.js → MetricBar-xV1juDz6.js} +1 -1
  147. package/public/assets/{NotFoundPage-BxtgZYrG.js → NotFoundPage-DPZDwk1M.js} +1 -1
  148. package/public/assets/{OnboardingGuide-BqdyHxJS.js → OnboardingGuide-C8QTC3cZ.js} +1 -1
  149. package/public/assets/{PermissionsPage-BP5SsoMl.js → PermissionsPage-DsNmsUoe.js} +1 -1
  150. package/public/assets/{PipelineConfigPage-B8NayzNO.js → PipelineConfigPage-D5gx3bIv.js} +2 -2
  151. package/public/assets/PipelineEditorPage-18u7wxjE.js +3 -0
  152. package/public/assets/PlanPage-Dds_7koM.js +1 -0
  153. package/public/assets/ProfilePage-D3YRdW9C.js +1 -0
  154. package/public/assets/{ProjectDetailPage-CGhCxrKQ.js → ProjectDetailPage-1mftEUqP.js} +3 -3
  155. package/public/assets/{ProjectListPage-2b4E2H36.js → ProjectListPage-D62NmkBp.js} +2 -2
  156. package/public/assets/PtyTerminal-B3lRN-u1.js +38 -0
  157. package/public/assets/QuickAuth-DzYrNwL-.js +1 -0
  158. package/public/assets/{RemoveMemberConfirmDialog-CblKQmK2.js → RemoveMemberConfirmDialog-svHE4uU4.js} +1 -1
  159. package/public/assets/ReviewAggregatePage-Dq3hl9db.js +11 -0
  160. package/public/assets/ReviewPage-CNeCz2eT.js +1 -0
  161. package/public/assets/Select-BMBYwPr-.js +1 -0
  162. package/public/assets/{SettingsPage-CcTEwK5L.js → SettingsPage-Ml3L-j5R.js} +1 -1
  163. package/public/assets/{Skeleton-CJVHi16l.js → Skeleton-9LGrFcdv.js} +1 -1
  164. package/public/assets/{SkillPage-Dl6hXkHy.js → SkillPage-BGYJMqPr.js} +1 -1
  165. package/public/assets/TaskDetailPage-Beto_Zqp.js +21 -0
  166. package/public/assets/TaskGuidePage-CKnugDRu.js +19 -0
  167. package/public/assets/TaskListPage-CFri9wCk.js +1 -0
  168. package/public/assets/{TaskStatusBadge-BdDVC3F4.js → TaskStatusBadge-B_S_xjEI.js} +1 -1
  169. package/public/assets/TerminalHomePage-CDr4Mq6o.js +6 -0
  170. package/public/assets/TokenManage-BqOEJDHV.js +1 -0
  171. package/public/assets/{Tooltip-BSeP698b.js → Tooltip-BFj-n88a.js} +1 -1
  172. package/public/assets/{TotpSetupPage-DkTKw-87.js → TotpSetupPage-CI411-Y7.js} +1 -1
  173. package/public/assets/{WorkerDetailPage-C3xgOzQ5.js → WorkerDetailPage-DcMycoTh.js} +1 -1
  174. package/public/assets/{WorkerListPage-SzomA2Jg.js → WorkerListPage-nPKvREXn.js} +2 -2
  175. package/public/assets/{WorkerOperationsPage-Dm1PdRDK.js → WorkerOperationsPage-qgdLSK1X.js} +1 -1
  176. package/public/assets/WorkerSetupGuidePage-DHbju_7j.js +1 -0
  177. package/public/assets/{WorkerSetupPage-DOjZMVtt.js → WorkerSetupPage-D0Cob5nl.js} +1 -1
  178. package/public/assets/{agent-type-options-SYUwiixD.js → agent-type-options-CdJpMswW.js} +1 -1
  179. package/public/assets/{arrow-left-B16h49gW.js → arrow-left-BOJ_pZwC.js} +1 -1
  180. package/public/assets/{arrow-right-DxSODyV0.js → arrow-right-GWPYDcKr.js} +1 -1
  181. package/public/assets/{bot-DvI1Z_Mw.js → bot-DZ_48uoa.js} +1 -1
  182. package/public/assets/chevron-down-DiFQzkq3.js +6 -0
  183. package/public/assets/{chevron-left-CH1J8GB-.js → chevron-left-PB0m_3-R.js} +1 -1
  184. package/public/assets/{chevron-right-CdPoqMfX.js → chevron-right-Bsbm1nYp.js} +1 -1
  185. package/public/assets/chevron-up-CvYNL872.js +6 -0
  186. package/public/assets/{copy-DNIFSymA.js → copy-DR5cQtVj.js} +1 -1
  187. package/public/assets/{download-DLYSP8rX.js → download-FpaVrNQK.js} +1 -1
  188. package/public/assets/{external-link-DrZcaziN.js → external-link-CiQhHCsl.js} +1 -1
  189. package/public/assets/{file-text-224YYyRN.js → file-text-Gk2VyRBd.js} +1 -1
  190. package/public/assets/{git-fork-CsNrC-5K.js → git-fork-CLaKXs0Y.js} +1 -1
  191. package/public/assets/index-CfvO5R0v.js +252 -0
  192. package/public/assets/index-kJfGgL_V.css +1 -0
  193. package/public/assets/{key-ChevPWu9.js → key-b2-JaSCL.js} +1 -1
  194. package/public/assets/{loader-circle-_p8GERRD.js → loader-circle-_Xw40aLD.js} +1 -1
  195. package/public/assets/{pencil-BjrOvZ4y.js → pencil-z5Zqj0qg.js} +1 -1
  196. package/public/assets/play-D2z1wzeo.js +6 -0
  197. package/public/assets/{plus-DtE-5ICU.js → plus-DDEIETPT.js} +1 -1
  198. package/public/assets/{rotate-ccw-DTMgDeUz.js → rotate-ccw-DryDtPrl.js} +1 -1
  199. package/public/assets/{scroll-text-DLDVcM9k.js → scroll-text-DdAPH940.js} +1 -1
  200. package/public/assets/{settings-BWLb7GMU.js → settings-DLSb7OkM.js} +1 -1
  201. package/public/assets/skip-forward-Dshgkb5J.js +6 -0
  202. package/public/assets/status-colors-w6Ie5LWO.js +1 -0
  203. package/public/assets/task-constants-DpDhF7YW.js +1 -0
  204. package/public/assets/task.store-QLdgw-z_.js +1 -0
  205. package/public/assets/{trash-2-DGYLJbuV.js → trash-2-DN1oshyp.js} +1 -1
  206. package/public/assets/{useFetch-BHc-EDVT.js → useFetch-DpOLDSFc.js} +1 -1
  207. package/public/assets/{users-CXqH9m6n.js → users-DrLwCx8Z.js} +1 -1
  208. package/public/assets/{wifi-CknEzeaW.js → wifi-B4XgJ6JW.js} +1 -1
  209. package/public/assets/{workflow-BHEQEN9B.js → workflow-Cd6zqDgi.js} +1 -1
  210. package/public/index.html +2 -2
  211. package/public/sw.js +1 -1
  212. package/public/assets/AccessTokensPage-D1CyjkMd.js +0 -1
  213. package/public/assets/AdminPage-BfGgzqGY.js +0 -1
  214. package/public/assets/AuditLogPage-BtlSABTt.js +0 -1
  215. package/public/assets/CliReferencePage-fyRcKPES.js +0 -16
  216. package/public/assets/DocsLayout-Bc08wdi2.js +0 -1
  217. package/public/assets/EditProjectPage-UQcHFFv0.js +0 -2
  218. package/public/assets/MobileTerminalShell-DvdSW-sx.js +0 -49
  219. package/public/assets/PipelineEditorPage-BLRXg7uE.js +0 -3
  220. package/public/assets/ProfilePage-BY4_Kq2m.js +0 -1
  221. package/public/assets/QuickAuth-DODaMzBE.js +0 -1
  222. package/public/assets/Select-CatoaxSD.js +0 -6
  223. package/public/assets/TaskDetailPage-BF-G4onm.js +0 -26
  224. package/public/assets/TaskListPage-DKtvYTqk.js +0 -1
  225. package/public/assets/TerminalHomePage-CR-OzAME.js +0 -11
  226. package/public/assets/TokenManage-DGWTDHT0.js +0 -1
  227. package/public/assets/WorkerSetupGuidePage-BDxh9qGL.js +0 -6
  228. package/public/assets/index-BUjb3VF-.css +0 -1
  229. package/public/assets/index-BnZa648g.js +0 -242
  230. package/public/assets/status-colors-CJELOkpG.js +0 -1
  231. package/public/assets/task-constants-DVi4wVyB.js +0 -1
  232. /package/public/assets/{MobileTerminalShell-6GBZ9nXN.css → PtyTerminal-6GBZ9nXN.css} +0 -0
@@ -0,0 +1,17 @@
1
+ import{f as d,a as i,w as l,r as p,j as e,L as m}from"./index-CfvO5R0v.js";import{C as a}from"./DocsPrimitives-B3qhkVFu.js";import{Q as x}from"./QuickAuth-DzYrNwL-.js";import{P as v}from"./plus-DDEIETPT.js";import"./copy-DR5cQtVj.js";const u=[{command:"ov setup",description:"quick setup — configure server connection and authenticate in one step",usage:"ov setup [--server <url>] [--token <token>]",flags:[{flag:"--server <url>",desc:"overlord server url"},{flag:"--token <token>",desc:"personal access token (skips prompt)"}],example:`ov setup
2
+ > Overlord server URL: http://localhost:9000
3
+ > Personal Access Token: ov_pat_xxxxx
4
+ ✓ Connected to http://localhost:9000
5
+ ✓ Authenticated as admin (admin)`},{command:"ov login",description:"authenticate with the overlord server using a personal access token",usage:"ov login",example:`ov login
6
+ > Enter server URL: http://localhost:9000
7
+ > Enter PAT: ov_pat_xxxxx
8
+ ✓ Logged in as admin`},{command:"ov logout",description:"clear stored credentials",usage:"ov logout"},{command:"ov whoami",description:"show current authenticated user and platform bind status",usage:"ov whoami [--json]",flags:[{flag:"--json",desc:"output as json"}],example:`ov whoami
9
+ Name: admin
10
+ Email: admin@overlord.dev
11
+ Role: admin
12
+ Status: active
13
+ Lark: linked
14
+ Slack: not linked`},{command:"ov task create",description:"create a new task",usage:"ov task create -d <description> [-p <project>] [--on <worker>] [--agent <type>] [--branch <slug>]",flags:[{flag:"-d, --description",desc:"task description (required unless -f)"},{flag:"-p, --project",desc:"project key to assign the task to"},{flag:"--on",desc:"target worker id (optional)"},{flag:"--agent",desc:"agent type: claude, cursor, codex (overrides project default)"},{flag:"--branch",desc:"custom branch slug for the task"},{flag:"-t, --type",desc:"task type: feat, fix, refactor, docs, chore"},{flag:"-f, --file",desc:"create task from yaml file"}],example:'ov task create -d "fix login bug" -p overlord --agent cursor --branch fix-login'},{command:"ov task list",description:"list all tasks with optional filters",usage:"ov task list [--status <status>] [-p <project>]",flags:[{flag:"--status",desc:"filter by status (RUNNING, QUEUED, COMPLETED, FAILED, CANCELLED)"},{flag:"-p, --project",desc:"filter by project key"}]},{command:"ov task show <id>",description:"show detailed information about a task",usage:"ov task show <task_id>"},{command:"ov task fork <id>",description:"fork a completed, failed, or cancelled task",usage:"ov task fork <task_id> [-d <description>] [--agent <type>] [--replace]",flags:[{flag:"-d, --description",desc:"extra detail to append to the original description"},{flag:"--agent",desc:"override the agent type for the forked task (claude, codex, cursor)"},{flag:"-r, --replace",desc:"replace the original description instead of appending"}],example:`ov task fork 42 -d "retry with different approach"
15
+ ov task fork 42 --agent codex
16
+ ov task fork 42 -d "rewrite the plan from scratch" --replace`},{command:"ov task plan",description:"start an interactive planning session to design a feature and produce a spec document",usage:"ov task plan -d <description> [-p <project>] [--on <worker>] [--agent <type>]",flags:[{flag:"-d, --description",desc:"feature description (required)"},{flag:"-p, --project",desc:"project key to plan against"},{flag:"--on",desc:"target worker id (optional)"},{flag:"--agent",desc:"agent type: claude, cursor, codex (overrides project default)"}],example:'ov task plan -d "implement user authentication system" -p WEB'},{command:"ov task review <id>",description:"trigger cross-model code review on a completed develop task",usage:"ov task review <task_id> --agent <types>",flags:[{flag:"--agent",desc:"comma-separated agent types to review with (e.g., codex,cursor,claude)"}],example:`ov task review 42 --agent codex,cursor
17
+ ov task review 42 --agent codex "focus on SQL injection risks in auth.ts"`},{command:"ov task cancel <id>",description:"cancel a running or queued task",usage:"ov task cancel <task_id>"},{command:"ov task retry <id>",description:"retry a failed or cancelled task",usage:"ov task retry <task_id>"},{command:"ov task logs <id>",description:"view task logs (streams via pty if active, fetches historical otherwise)",usage:"ov task logs <task_id> [--json]",flags:[{flag:"--json",desc:"output as json"}]},{command:"ov task confirm <id>",description:"confirm a suspended task stage",usage:"ov task confirm <task_id> --stage <index>",flags:[{flag:"--stage <index>",desc:"stage index to confirm (required)"}]},{command:"ov task choose <id> <option>",description:"submit a choice for a suspended task",usage:"ov task choose <task_id> <option> --stage <index>",flags:[{flag:"--stage <index>",desc:"stage index to respond to (required)"}]},{command:"ov task input <id> <text>",description:"submit text input for a suspended task",usage:"ov task input <task_id> <text> --stage <index>",flags:[{flag:"--stage <index>",desc:"stage index to respond to (required)"}]},{command:"ov attach <id>",description:"connect to a task pty terminal",usage:"ov attach <task_id> [--watch] [--takeover] [--session <id>]",flags:[{flag:"--watch",desc:"read-only observer mode"},{flag:"--takeover",desc:"take over pty control from current user"},{flag:"--session <id>",desc:"session id for takeover"}]},{command:"ov project list",description:"list all projects",usage:"ov project list"},{command:"ov project show <key>",description:"show project details",usage:"ov project show <project_key>"},{command:"ov worker list",description:"list all registered workers",usage:"ov worker list"},{command:"ov worker show <id>",description:"show worker details",usage:"ov worker show <worker_id>"},{command:"ov notifications",description:"view your notifications",usage:"ov notifications [--all] [--json]",flags:[{flag:"--all",desc:"show all notifications (including read)"},{flag:"--json",desc:"output as json"}]},{command:"ov notifications read <id>",description:"mark a notification as read",usage:"ov notifications read <notification_id>"},{command:"ov search <query>",description:"search across tasks, workers, and projects",usage:"ov search <query>"},{command:"ov config set <key> <value>",description:"set a configuration value",usage:"ov config set <key> <value>",flags:[{flag:"server",desc:"overlord server url"},{flag:"default-project",desc:"default project key"},{flag:"output-format",desc:"output format (table, json)"},{flag:"color",desc:"enable/disable color (true/false)"}]},{command:"ov config get <key>",description:"get a configuration value",usage:"ov config get <key>"},{command:"ov config list",description:"list all configuration values",usage:"ov config list [--json]"},{command:"ov status",description:"show server connectivity, current user, and cluster overview",usage:"ov status [--json]"},{command:"ov upgrade",description:"upgrade ov cli to the latest version",usage:"ov upgrade"}],g=[{command:"overlord install",description:"interactive server installation wizard — checks environment, configures database, creates admin account",usage:"overlord install"},{command:"overlord setup worker",description:"interactive worker setup wizard — configures connection, writes .env, registers service",usage:"overlord setup worker"},{command:"overlord start [component]",description:"start server or worker services (systemd / launchd)",usage:"overlord start [server|worker]"},{command:"overlord stop [component]",description:"stop running processes",usage:"overlord stop [server|worker]"},{command:"overlord status",description:"show process status table (pid, cpu, memory, uptime)",usage:"overlord status"},{command:"overlord logs [component]",description:"view server or worker logs",usage:"overlord logs [server|worker] [--lines <n>]"},{command:"overlord doctor",description:"run system diagnostics",usage:"overlord doctor"},{command:"overlord upgrade",description:"upgrade to the latest release",usage:"overlord upgrade"},{command:"overlord backup",description:"backup server configuration (.env) and database",usage:"overlord backup [/path/to/backup]"},{command:"overlord backup worker",description:"backup worker configuration (.env) and JWT token",usage:"overlord backup worker [/path/to/backup]"},{command:"overlord restart [component]",description:"restart server or worker services",usage:"overlord restart [server|worker]"},{command:"overlord uninstall",description:"remove all services and data for a clean reinstall",usage:"overlord uninstall"}];function n({title:r,commands:t}){const{t:o}=i();return e.jsxs("div",{children:[e.jsxs("h2",{className:"mb-4 text-sm text-[var(--accent)]",children:["> ",r]}),e.jsx("div",{className:"space-y-3",children:t.map(s=>e.jsxs("details",{className:"group rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("summary",{className:"flex cursor-pointer items-center justify-between px-3 md:px-4 py-3 hover:bg-[var(--bg-input)] transition-colors",children:e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("code",{className:"text-xs text-[var(--accent)] shrink-0",children:s.command}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)] hidden sm:inline truncate",children:["// ",s.description]})]})}),e.jsxs("div",{className:"border-t border-[var(--border)] px-3 md:px-4 py-3 space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-[11px] uppercase tracking-wider text-[var(--text-muted)]",children:o("docs.usage")}),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(--text-primary)] whitespace-nowrap",children:s.usage}),e.jsx(a,{text:s.usage})]})]}),s.flags&&s.flags.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-[11px] uppercase tracking-wider text-[var(--text-muted)]",children:o("docs.flags")}),e.jsx("div",{className:"space-y-1",children:s.flags.map(c=>e.jsxs("div",{className:"flex items-start gap-3 text-xs",children:[e.jsx("code",{className:"shrink-0 text-[var(--accent)]",children:c.flag}),e.jsx("span",{className:"text-[var(--text-secondary)]",children:c.desc})]},c.flag))})]}),s.example&&e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-[11px] uppercase tracking-wider text-[var(--text-muted)]",children:o("docs.example")}),e.jsx("pre",{className:"rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 text-xs text-[var(--text-secondary)] whitespace-pre-wrap overflow-x-auto",children:s.example})]})]})]},s.command))})]})}function y(){const r=d(),{t}=i();return l(p.useMemo(()=>e.jsxs("button",{onClick:()=>r("/access-tokens"),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs font-mono text-black transition-opacity hover:opacity-90",children:[e.jsx(v,{className:"h-3.5 w-3.5"}),t("access_tokens.create_token")]}),[r,t])),e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[e.jsx("div",{className:"mb-8",children:e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:t("docs.cli_tools_desc",{ov:"ov",overlord:"overlord"})})}),e.jsx(x,{mode:"cli"}),e.jsx("div",{className:"mb-8 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsxs("p",{className:"text-xs text-[var(--text-secondary)]",children:["task commands use two separate concepts: workflow mode and work intent. if you want the short version of"," ",e.jsx("code",{className:"text-[var(--accent)]",children:"develop"})," ","vs"," ",e.jsx("code",{className:"text-[var(--accent)]",children:"plan"})," ","vs"," ",e.jsx("code",{className:"text-[var(--accent)]",children:"review"}),", plus how"," ",e.jsx("code",{className:"text-[var(--accent)]",children:"task type"})," ","and"," ",e.jsx("code",{className:"text-[var(--accent)]",children:"fork"})," ","fit in, read the"," ",e.jsx(m,{to:"/docs/task-guide",className:"text-[var(--accent)] hover:underline",children:"task guide"}),"."]})}),e.jsxs("div",{className:"mb-8 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:t("docs.quick_start")}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-[11px] uppercase tracking-wider text-[var(--text-muted)]",children:"1. install"}),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:"npm install -g @overlordai/developer-cli"}),e.jsx(a,{text:"npm install -g @overlordai/developer-cli"})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-[11px] uppercase tracking-wider text-[var(--text-muted)]",children:"2. setup"}),e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-primary)] px-3 py-2",children:[e.jsx("code",{className:"text-xs text-[var(--accent)]",children:"ov setup"}),e.jsx(a,{text:"ov setup"})]})]})]}),e.jsxs("div",{className:"space-y-8",children:[e.jsx(n,{title:t("docs.developer_cli"),commands:u}),e.jsx(n,{title:t("docs.admin_cli"),commands:g})]}),e.jsxs("div",{className:"mt-8 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:"> ai agent skill"}),e.jsx("p",{className:"text-xs text-[var(--text-secondary)]",children:"// use overlord from your ai coding assistant — claude code, cursor, windsurf, codex, and more. install the skill and your assistant can create tasks, monitor execution, and manage your fleet."}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-[11px] uppercase tracking-wider text-[var(--text-muted)]",children:"install"}),e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-primary)] px-3 py-2",children:[e.jsx("code",{className:"text-xs text-[var(--accent)]",children:"npx skills add overlord-run/skill"}),e.jsx(a,{text:"npx skills add overlord-run/skill"})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-[11px] uppercase tracking-wider text-[var(--text-muted)]",children:"configure"}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-primary)] px-3 py-2",children:[e.jsxs("code",{className:"text-xs text-[var(--text-primary)]",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"export "}),"OVERLORD_SERVER=https://your-server.com"]}),e.jsx(a,{text:"export OVERLORD_SERVER=https://your-server.com"})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-primary)] px-3 py-2",children:[e.jsxs("code",{className:"text-xs text-[var(--text-primary)]",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"export "}),"OVERLORD_TOKEN=your-token"]}),e.jsx(a,{text:"export OVERLORD_TOKEN=your-token"})]})]})]}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"// once installed, your ai agent can create tasks, check status, read logs, and manage projects on your behalf."})]})]})}export{y as default};
@@ -0,0 +1,12 @@
1
+ import{c as K,r as c,a as P,j as s,I as Q,J as Z,o as I,u as $,h as B,K as ee,M as te}from"./index-CfvO5R0v.js";import{L as ne}from"./loader-circle-_Xw40aLD.js";import{R as re}from"./rotate-ccw-DryDtPrl.js";import{a as se,P as G}from"./PtyTerminal-B3lRN-u1.js";import{a as ae}from"./date-RFA7-ZGs.js";import{F as oe}from"./file-text-Gk2VyRBd.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 ce=K("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
7
+ * @license lucide-react v0.469.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const V=K("Hand",[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]]),H="claude";function Ne(t){if(t.agentType)return t.agentType;if(!t.configSnapshot)return H;try{const n=JSON.parse(t.configSnapshot);return typeof n.agentType=="string"&&n.agentType?n.agentType:H}catch{return H}}const ie=768,X=`(max-width: ${ie-1}px)`;function O(){const[t,n]=c.useState(()=>typeof window>"u"?!1:window.matchMedia(X).matches);return c.useEffect(()=>{const e=window.matchMedia(X);n(e.matches);const r=a=>n(a.matches);return e.addEventListener("change",r),()=>e.removeEventListener("change",r)},[]),t}function le({state:t,onRelease:n,onRequestTakeover:e,denialReason:r,retryAttempt:a=1,maxRetries:o=3}){const{t:l}=P(),[i,u]=c.useState(!0);return c.useEffect(()=>{u(!0)},[t]),i?s.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-3 py-2",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[t==="auto"&&s.jsxs(s.Fragment,{children:[s.jsx(Q,{className:"h-3 w-3 text-[var(--accent)]"}),s.jsx("span",{className:"text-[11px] font-medium text-[var(--accent)]",children:l("tasks.auto_pipeline")})]}),t==="requesting"&&s.jsxs(s.Fragment,{children:[s.jsx(ne,{className:"h-3 w-3 animate-spin text-amber-500"}),s.jsx("span",{className:"text-[11px] font-medium text-amber-500",children:l("tasks.requesting_takeover")})]}),t==="manual"&&s.jsxs(s.Fragment,{children:[s.jsx(V,{className:"h-3 w-3 text-amber-500"}),s.jsx("span",{className:"text-[11px] font-medium text-amber-500",children:l("tasks.manual_takeover")})]}),t==="denied"&&s.jsxs("div",{className:"flex items-center gap-1.5 rounded-[4px] border border-red-900 bg-red-950 px-2.5 py-1",children:[s.jsx(Z,{className:"h-3 w-3 text-red-500"}),s.jsxs("span",{className:"text-[11px] font-medium text-red-500",children:[l("tasks.takeover_denied"),r?`: ${r}`:""]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[(t==="auto"||t==="denied")&&e&&s.jsx("button",{type:"button",onClick:e,className:"inline-flex items-center rounded-[4px] border border-[var(--border)] p-1.5 text-amber-500 hover:bg-white/5","aria-label":l("tasks.take_over"),children:s.jsx(V,{className:"h-3.5 w-3.5"})}),t==="manual"&&n&&s.jsx("button",{type:"button",onClick:n,className:"inline-flex items-center rounded-[4px] bg-[var(--accent)] p-1.5","aria-label":l("tasks.restore_auto"),children:s.jsx(re,{className:"h-3.5 w-3.5 text-black"})})]})]}):null}function ue({value:t,onChange:n,onSubmit:e,isMobile:r=!1,inputDisabled:a=!1,sendDisabled:o=!1}){function l(i){i.preventDefault(),!o&&e()}return s.jsxs("form",{onSubmit:l,className:"flex flex-col gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] p-2",children:[s.jsx("textarea",{value:t,onChange:i=>n(i.target.value),rows:r?3:4,spellCheck:!1,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",placeholder:"type a command...",disabled:a,className:"min-h-20 resize-none rounded-[4px] border border-[var(--border)] bg-transparent px-3 py-2 font-mono text-xs text-[var(--text-primary)] outline-none placeholder:text-[var(--text-muted)] disabled:cursor-not-allowed disabled:opacity-60"}),s.jsx("div",{className:"flex items-center justify-end",children:s.jsx("button",{type:"submit",disabled:o,className:"rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs font-medium text-black disabled:cursor-not-allowed disabled:opacity-60",children:"send"})})]})}const z=new Map;function W(t){const n=(z.get(t)??0)+1;return z.set(t,n),n}function de(){for(const[t,n]of z.entries())z.set(t,n+1)}function Y(t,n){return z.get(t)===n}const A=I((t,n)=>({connections:new Map,statuses:new Map,connect:async(e,r,a)=>{const o=W(e),l=n().connections.get(e);l&&(l.dispose(),t(v=>{const d=new Map(v.connections);d.delete(e);const h=new Map(v.statuses);return h.delete(e),{connections:d,statuses:h}}));const i=$.getState().accessToken;if(!i)throw new Error("Not authenticated");const{channelToken:u}=await B.post(`web/tasks/${e}/pty-token`).json(),x=async()=>(await B.post(`web/tasks/${e}/pty-token`).json()).channelToken,b=new se({taskId:e,accessToken:i,channelToken:u,getChannelToken:x,getAccessToken:()=>$.getState().accessToken,onData:r,onMessage:a,onStatus:v=>{Y(e,o)&&t(d=>{if(d.statuses.get(e)===v)return d;const h=new Map(d.statuses);return h.set(e,v),{statuses:h}})}});if(!Y(e,o)){b.dispose();return}t(v=>{const d=new Map(v.connections);return d.set(e,b),{connections:d}}),b.connect()},disconnect:e=>{W(e);const r=n().connections.get(e);r&&(r.dispose(),t(a=>{const o=new Map(a.connections);o.delete(e);const l=new Map(a.statuses);return l.delete(e),{connections:o,statuses:l}}))},write:(e,r)=>{var a;(a=n().connections.get(e))==null||a.sendData(r)},resize:(e,r,a)=>{var o;(o=n().connections.get(e))==null||o.sendResize(r,a)},requestTakeover:(e,r)=>{var a;(a=n().connections.get(e))==null||a.requestTakeover(r)},releaseTakeover:e=>{var r;(r=n().connections.get(e))==null||r.releaseTakeover()},forceTakeover:e=>{var r;(r=n().connections.get(e))==null||r.send({type:"force_takeover"})},disconnectAll:()=>{de();for(const e of n().connections.values())e.dispose();t({connections:new Map,statuses:new Map})}})),U="\x1B",fe=new Set(["h","l"]),xe=new Set(["1049","1047","47"]);function J(){return{visibleText:"",inAlternateScreen:!1,fullscreenTuiDetected:!1,pendingControlSequence:""}}function pe(t,n){const e=me(t.pendingControlSequence+n),r=(t.visibleText+e.visibleText).slice(-12e4);let a=t.inAlternateScreen,o=t.fullscreenTuiDetected;for(const l of e.alternateScreenTransitions)a=l==="enter",l==="enter"&&(o=!0);return{visibleText:r,inAlternateScreen:a,fullscreenTuiDetected:o,pendingControlSequence:e.pendingControlSequence}}function me(t){let n="";const e=[];let r="";for(let a=0;a<t.length;){const o=t[a];if(o!==U){o!=="\r"&&o!=="\x07"&&(n+=o),a+=1;continue}if(a===t.length-1){r=t.slice(a);break}const l=t[a+1];if(l==="["){const u=be(t,a+2);if(u===-1){r=t.slice(a);break}const x=t.slice(a,u+1),b=we(x);b&&e.push(b),a=u+1;continue}if(l==="]"){const u=ve(t,a+2);if(u===-1){r=t.slice(a);break}a=u+1;continue}const i=he(t,a+1);if(i===-1){r=t.slice(a);break}a=i+1}return{visibleText:n,alternateScreenTransitions:e,pendingControlSequence:r}}function be(t,n){let e=n;for(;e<t.length;){const r=t.charCodeAt(e);if(r>=64&&r<=126)return e;if(r>=48&&r<=63||r>=32&&r<=47){e+=1;continue}return-1}return-1}function ve(t,n){for(let e=n;e<t.length;e+=1){if(t[e]==="\x07")return e;if(t[e]===U&&t[e+1]==="\\")return e+1}return-1}function he(t,n){let e=n;for(;e<t.length;){const r=t.charCodeAt(e);if(r>=48&&r<=126)return e;if(r>=32&&r<=47){e+=1;continue}return-1}return-1}function we(t){if(!t.startsWith("\x1B[?"))return null;const n=t.at(-1);if(!n||!fe.has(n))return null;const e=t.slice(3,-1);return xe.has(e)?n==="h"?"enter":"exit":null}const ge=c.forwardRef(function({taskId:n,taskFinished:e=!1,onOpenFullTerminal:r,onStatusChange:a,onTakeoverChange:o},l){const i=O(),{t:u}=P(),x=A(p=>p.connect),b=A(p=>p.disconnect),v=A(p=>p.write),d=A(p=>p.forceTakeover),h=A(p=>p.releaseTakeover),y=A(p=>p.statuses.get(n)),[k,S]=c.useState(""),[N,C]=c.useState(J()),[j,w]=c.useState("auto"),[g,f]=c.useState();c.useEffect(()=>{S(""),C(J()),w("auto"),f(void 0)},[n]),c.useEffect(()=>{e&&(w("auto"),f(void 0))},[e]),c.useEffect(()=>{a==null||a(y??"disconnected")},[a,y]),c.useEffect(()=>{o==null||o(j)},[o,j]),c.useEffect(()=>{if(e)return;let p=!0,q,m=0;const T=5,F=()=>{x(n,D=>{p&&C(L=>pe(L,D))},D=>{if(!p)return;const L=D;switch(L.type){case"takeover_granted":w("manual"),f(void 0);break;case"takeover_denied":w("denied"),f(L.reason??L.message);break;case"writer_revoked":w("auto"),f(void 0);break}}).catch(()=>{if(p&&m<T){const D=Math.min(3e3*2**m,3e4);m++,q=setTimeout(F,D)}})};return F(),()=>{p=!1,q&&clearTimeout(q),b(n)}},[x,b,e,n]);const _=y==="connected"&&j==="manual",E=c.useCallback(()=>{_&&(v(n,`${k}
12
+ `),S(""))},[k,_,n,v]),M=c.useCallback(()=>{w("requesting"),f(void 0),d(n)},[d,n]),R=c.useCallback(()=>{h(n),w("auto"),f(void 0)},[h,n]);return c.useImperativeHandle(l,()=>({requestTakeover:M,releaseTakeover:R}),[R,M]),s.jsxs("div",{"data-testid":"companion-terminal",className:"flex h-full min-h-0 flex-col rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono text-xs text-[var(--text-primary)]",children:[s.jsx(le,{state:j,onRequestTakeover:e?void 0:M,onRelease:e?void 0:R,denialReason:g}),s.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto p-3",children:[r&&s.jsx("div",{className:"mb-3 flex justify-end",children:s.jsx("button",{type:"button",onClick:r,className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[11px] text-[var(--text-primary)] hover:bg-white/5",children:u("tasks.full_terminal")})}),N.fullscreenTuiDetected&&s.jsx("div",{className:"mb-3 rounded-[4px] border border-amber-900 bg-amber-950/40 px-3 py-2 text-[11px] text-amber-300",children:u("tasks.complex_terminal_hint")}),s.jsx("pre",{"data-testid":"companion-terminal-output","aria-label":"terminal output",className:"min-h-[120px] overflow-auto whitespace-pre-wrap break-words rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] p-3 text-[12px] leading-5 text-[var(--text-primary)]",children:N.visibleText||u("tasks.no_output")})]}),s.jsx("div",{className:"shrink-0 border-t border-[var(--border)] p-3",children:s.jsx(ue,{value:k,onChange:S,onSubmit:E,isMobile:i,inputDisabled:e,sendDisabled:e||!_})})]})}),Ee=c.forwardRef(function({taskId:n,sessionId:e,taskFinished:r,onStatusChange:a,onTakeoverChange:o},l){const i=O(),{t:u}=P(),[x,b]=c.useState("companion"),[v,d]=c.useState(!1),[h,y]=c.useState("disconnected"),[k,S]=c.useState("auto"),[N,C]=c.useState("disconnected"),[j,w]=c.useState("auto"),[g,f]=c.useState(null),_=c.useRef(null),E=c.useRef(null);c.useEffect(()=>{b("companion"),d(!1),y("disconnected"),S("auto"),C("disconnected"),w("auto"),f(null)},[n]);const M=x==="full"?N:h,R=x==="full"?j:k;c.useEffect(()=>{i&&(a==null||a(M))},[M,i,a]),c.useEffect(()=>{i&&(o==null||o(R))},[R,i,o]),c.useEffect(()=>{var m,T;if(!(!i||!g)){if(g==="full"){if(N!=="connected")return;(m=E.current)==null||m.requestTakeover(),f(null);return}h==="connected"&&((T=_.current)==null||T.requestTakeover(),f(null))}},[h,N,i,g]);const p=c.useCallback(()=>{var m;k==="manual"&&((m=_.current)==null||m.releaseTakeover(),f("full")),d(!0),b("full")},[k]),q=c.useCallback(()=>{var m;j==="manual"&&((m=E.current)==null||m.releaseTakeover(),f("companion")),b("companion")},[j]);return c.useImperativeHandle(l,()=>({requestTakeover(){var m,T;if(!i||x==="full"){(m=E.current)==null||m.requestTakeover();return}(T=_.current)==null||T.requestTakeover()},releaseTakeover(){var m,T;if(!i||x==="full"){(m=E.current)==null||m.releaseTakeover();return}(T=_.current)==null||T.releaseTakeover()}}),[i,x]),i?s.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-2 overflow-hidden",children:[x==="full"&&s.jsx("button",{type:"button",onClick:q,className:"self-start rounded-[4px] border border-[var(--border)] px-3 py-2 text-[11px] text-[var(--text-primary)]",children:u("tasks.return_to_companion")}),s.jsx("div",{className:x==="companion"?"min-h-0 flex-1 overflow-hidden":"hidden",children:s.jsx(ge,{ref:_,taskId:n,taskFinished:r,onOpenFullTerminal:p,onStatusChange:y,onTakeoverChange:S})}),v&&s.jsx("div",{className:x==="full"?"min-h-0 flex-1 overflow-hidden":"hidden",children:s.jsx(G,{ref:E,taskId:n,sessionId:e,taskFinished:r,onStatusChange:C,onTakeoverChange:w})})]}):s.jsx(G,{ref:E,taskId:n,sessionId:e,taskFinished:r,onStatusChange:a,onTakeoverChange:o})});function Ce({isOpen:t,onClose:n,taskId:e,stageName:r,timeoutSeconds:a,confirmType:o="confirm",onSubmitted:l}){const{t:i}=P(),[u,x]=c.useState(a),[b,v]=c.useState(!1),[d,h]=c.useState(""),y=o==="plan_review"||o==="code_review",k=o==="plan_decompose";c.useEffect(()=>{if(!t)return;x(a),h("");const g=setInterval(()=>{x(f=>f<=1?(clearInterval(g),0):f-1)},1e3);return()=>clearInterval(g)},[t,a]),c.useEffect(()=>{u===0&&t&&n()},[u,t,n]);const S=c.useCallback(async g=>{v(!0);try{const f={stageName:r,approved:g};y&&!k&&d.trim()&&(f.feedback=d.trim()),await B.post(`web/tasks/${e}/confirm-stage`,{json:f}),l==null||l(),n()}catch{}finally{v(!1)}},[e,r,d,y,k,n,l]);if(!t)return null;const N=o==="plan_review"||o==="plan_decompose"?oe:o==="code_review"?ee:te,C=o==="plan_review"?i("tasks.plan_review_message",{name:r}):o==="plan_decompose"?i("tasks.plan_decompose_message"):o==="code_review"?i("tasks.code_review_message",{name:r}):i("tasks.confirm_stage_message",{name:r}),j=i(o==="plan_review"?"tasks.approve_plan":o==="plan_decompose"?"tasks.approve_plan_decompose":o==="code_review"?"tasks.approve_review":"tasks.confirm_and_proceed"),w=i(o==="plan_decompose"?"tasks.reject_plan_decompose":y?"tasks.request_changes":"tasks.reject");return s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[s.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]"}),s.jsxs("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(N,{className:"h-4 w-4 text-[var(--accent)]"}),s.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// stage: ",r]})]}),a>0&&s.jsxs("span",{className:"flex items-center gap-1 text-xs text-[var(--text-muted)]",children:[s.jsx(ce,{className:"h-3.5 w-3.5"}),ae(u)]})]}),s.jsxs("div",{className:"space-y-4 px-5 py-5",children:[s.jsx("p",{className:"whitespace-pre-wrap text-xs text-[var(--text-primary)]",children:C}),y&&!k&&s.jsx("textarea",{className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:border-[var(--accent)] focus:outline-none resize-y",rows:4,placeholder:i("tasks.feedback_placeholder"),value:d,onChange:g=>h(g.target.value)})]}),s.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[s.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 disabled:opacity-50",disabled:b,onClick:()=>S(!1),children:w}),s.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:b,onClick:()=>S(!0),children:b?i("tasks.stage_submitting"):j})]})]})]})}export{ce as C,V as H,Ee as M,Ce as a,Ne as g,O as u};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./index-BnZa648g.js";import{a as s}from"./DocsPrimitives-BeRfTNWi.js";import"./copy-DNIFSymA.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-CfvO5R0v.js";import{a as s}from"./DocsPrimitives-B3qhkVFu.js";import"./copy-DR5cQtVj.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-BnZa648g.js";import{a as s}from"./DocsPrimitives-BeRfTNWi.js";import"./copy-DNIFSymA.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-CfvO5R0v.js";import{a as s}from"./DocsPrimitives-B3qhkVFu.js";import"./copy-DR5cQtVj.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 X,D as S,a as E,r as o,j as e,X as L,h as C,u as F,x as H,a4 as k}from"./index-BnZa648g.js";import{S as V}from"./Select-CatoaxSD.js";import{v as B}from"./password-CHk45-jw.js";import{E as J}from"./EmptyState-BrTEmjub.js";import{T as K}from"./Skeleton-CJVHi16l.js";import{u as Q}from"./useFetch-BHc-EDVT.js";import{c as O}from"./status-colors-CJELOkpG.js";import{P as W}from"./plus-DtE-5ICU.js";import{U as Y}from"./users-CXqH9m6n.js";import{P as Z}from"./pencil-BjrOvZ4y.js";import{R as ee}from"./rotate-ccw-DTMgDeUz.js";/**
1
+ import{c as X,D as S,a as E,r as o,j as e,X as L,h as C,u as F,x as H,a7 as k}from"./index-CfvO5R0v.js";import{S as V}from"./Select-BMBYwPr-.js";import{v as B}from"./password-CHk45-jw.js";import{E as J}from"./EmptyState-BKUHLcAb.js";import{T as K}from"./Skeleton-9LGrFcdv.js";import{u as Q}from"./useFetch-DpOLDSFc.js";import{c as O}from"./status-colors-w6Ie5LWO.js";import{P as W}from"./plus-DDEIETPT.js";import{U as Y}from"./users-DrLwCx8Z.js";import{P as Z}from"./pencil-z5Zqj0qg.js";import{R as ee}from"./rotate-ccw-DryDtPrl.js";import"./chevron-down-DiFQzkq3.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -13,4 +13,4 @@ import{c as X,D as S,a as E,r as o,j as e,X as L,h as C,u as F,x as H,a4 as k}fr
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const re=X("UserX",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]),q=Object.values(S).map(a=>({value:a,label:a}));function se({isOpen:a,onClose:r,onCreated:n}){const{t:l}=E(),[s,i]=o.useState(""),[m,u]=o.useState(""),[p,b]=o.useState(""),[c,v]=o.useState(""),[h,y]=o.useState("developer"),[f,t]=o.useState(!1),[j,g]=o.useState("");function D(){i(""),u(""),b(""),v(""),y("developer"),g("")}function N(){D(),r()}async function U(){if(g(""),!s.trim()||!m.trim()||!p.trim()||!c.trim()){g(l("admin.all_fields_required"));return}const x=B(c);if(x){g(l(x));return}try{t(!0),await C.post("admin/developers",{json:{name:s.trim(),gitName:m.trim(),gitEmail:p.trim(),password:c,role:h}}).json(),N(),n()}catch(T){const A=T instanceof Error?T.message:l("admin.failed_to_create_developer");g(A)}finally{t(!1)}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:N}),e.jsxs("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// ",l("admin.create_developer_title")]}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:N,children:e.jsx(L,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[j&&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:j}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:l("admin.username")}),e.jsx("input",{type:"text",placeholder:"e.g. jdoe",value:s,onChange:x=>i(x.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:l("profile.git_name")}),e.jsx("input",{type:"text",placeholder:"e.g. John Doe",value:m,onChange:x=>u(x.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:l("profile.git_email")}),e.jsx("input",{type:"email",placeholder:"e.g. john@example.com",value:p,onChange:x=>b(x.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:l("auth.password")}),e.jsx("input",{type:"password",placeholder:"10-20 chars, letters + digits + special",value:c,onChange:x=>v(x.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:l("admin.password_hint")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:l("common.role")}),e.jsx(V,{value:h,onChange:y,options:q})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:N,children:l("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:f,onClick:U,children:l(f?"common.creating":"common.create")})]})]})]}):null}function ne({isOpen:a,developer:r,onClose:n,onUpdated:l}){var M,z;const{t:s}=E(),i=F(d=>d.user),[m,u]=o.useState(r.name),[p,b]=o.useState(r.gitName),[c,v]=o.useState(r.gitEmail),[h,y]=o.useState(r.role),[f,t]=o.useState(((M=r.platformUids)==null?void 0:M.lark)??""),[j,g]=o.useState(((z=r.platformUids)==null?void 0:z.slack)??""),[D,N]=o.useState(!1),[U,x]=o.useState(""),A=r.id===(i==null?void 0:i.id)&&r.role===S.ADMIN&&h!==S.ADMIN;o.useEffect(()=>{var d,w;u(r.name),b(r.gitName),v(r.gitEmail),y(r.role),t(((d=r.platformUids)==null?void 0:d.lark)??""),g(((w=r.platformUids)==null?void 0:w.slack)??""),x("")},[r]);async function G(){var d,w;if(x(""),!m.trim()||!p.trim()||!c.trim()){x(s("admin.all_fields_required"));return}A&&x(s("admin.demote_self_warning"));try{N(!0);const _={name:m.trim(),gitName:p.trim(),gitEmail:c.trim(),role:h},I=((d=r.platformUids)==null?void 0:d.lark)??"",$=((w=r.platformUids)==null?void 0:w.slack)??"";if(f.trim()!==I||j.trim()!==$){const R={};R.lark=f.trim(),R.slack=j.trim(),_.platformUids=R}await C.put(`admin/developers/${r.id}`,{json:_}).json(),n(),l()}catch(_){const I=_ instanceof Error?_.message:s("admin.failed_to_update_developer");x(I)}finally{N(!1)}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:n}),e.jsxs("div",{className:"relative z-10 mx-2 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// ",s("admin.edit_developer_title")]}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:e.jsx(L,{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:s("admin.username")}),e.jsx("input",{type:"text",value:m,onChange:d=>u(d.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:s("profile.git_name")}),e.jsx("input",{type:"text",value:p,onChange:d=>b(d.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:s("profile.git_email")}),e.jsx("input",{type:"email",value:c,onChange:d=>v(d.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:s("common.role")}),e.jsx(V,{value:h,onChange:y,options:q}),A&&e.jsx("div",{className:"mt-2 rounded-[4px] border border-[var(--warning)] bg-[var(--warning)]/10 px-3 py-2 text-xs text-[var(--warning)]",children:s("admin.demote_self_inline_warning")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:s("admin.platform_accounts")}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-muted)]",children:s("admin.lark_uid")}),e.jsx("input",{type:"text",value:f,onChange:d=>t(d.target.value),placeholder:"ou_xxxxxxxxxx",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-muted)]",children:s("admin.slack_uid")}),e.jsx("input",{type:"text",value:j,onChange:d=>g(d.target.value),placeholder:"U0XXXXXXXXX",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})]})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:s("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity disabled:opacity-50",disabled:D,onClick:G,children:s(D?"common.saving":"common.save_changes")})]})]})]}):null}function oe({isOpen:a,developer:r,onClose:n,onConfirmed:l}){const{t:s}=E(),[i,m]=o.useState(!1),[u,p]=o.useState("");async function b(){p("");try{m(!0),await C.put(`admin/developers/${r.id}/reset-totp`),n(),l()}catch(c){const v=c instanceof Error?c.message:s("admin.failed_to_reset_2fa");p(v)}finally{m(!1)}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:n}),e.jsxs("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(te,{className:"h-4 w-4 text-yellow-400"}),e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// ",s("admin.reset_2fa")]})]}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:e.jsx(L,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-3 px-5 py-5",children:[u&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:u}),e.jsxs("p",{className:"text-xs text-[var(--text-primary)]",children:[s("admin.reset_2fa_confirm_message")," ",e.jsx("span",{className:"text-[var(--accent)]",children:r.name}),"?"]}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:s("admin.reset_2fa_audit_note")})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:s("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-yellow-600 px-3 py-1.5 text-xs text-white hover:opacity-90 transition-opacity disabled:opacity-50",disabled:i,onClick:b,children:s(i?"admin.resetting":"admin.reset_2fa")})]})]})]}):null}function P({dev:a,currentUserId:r,onEdit:n,onReset2fa:l,onToggleStatus:s}){const{t:i}=E();return e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-white/[0.05] transition-colors",title:i("common.edit"),onClick:()=>n(a),children:e.jsx(Z,{className:"h-3.5 w-3.5"})}),a.id!==r&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-white/[0.05] transition-colors",title:i("admin.reset_2fa"),onClick:()=>l(a),children:e.jsx(ee,{className:"h-3.5 w-3.5"})}),e.jsx("button",{type:"button",className:`rounded-[4px] p-2.5 md:p-1.5 transition-colors hover:bg-white/[0.05] ${a.status===k.ACTIVE?"text-red-400 hover:text-red-300":"text-green-400 hover:text-green-300"}`,title:a.status===k.ACTIVE?i("admin.deactivate"):i("admin.activate"),onClick:()=>s(a),children:a.status===k.ACTIVE?e.jsx(re,{className:"h-3.5 w-3.5"}):e.jsx(ae,{className:"h-3.5 w-3.5"})})]})]})}function fe(){const{t:a}=E(),r=F(t=>t.user),[n,l]=o.useState(""),[s,i]=o.useState(!1),[m,u]=o.useState(null),[p,b]=o.useState(null),{data:c,loading:v,refetch:h}=Q(()=>{const t={};return n&&(t.q=n),C.get("admin/developers",{searchParams:t}).json()},[n]);async function y(t){const j=t.status===k.ACTIVE?k.DISABLED:k.ACTIVE;try{await C.put(`admin/developers/${t.id}`,{json:{status:j}}),h()}catch{}}function f(t){switch(t){case S.ADMIN:return"text-yellow-400";case S.DEVELOPER:return"text-blue-400";default:return"text-[var(--text-secondary)]"}}return e.jsxs("div",{className:"font-mono",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("admin.developers_title")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("admin.developers_subtitle")})]}),e.jsxs("button",{type:"button",className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity",onClick:()=>i(!0),children:[e.jsx(W,{className:"h-3.5 w-3.5"}),a("admin.create_developer")]})]}),e.jsx("div",{className:"mb-4",children:e.jsxs("div",{className:"relative w-full max-w-xs",children:[e.jsx(H,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[var(--text-muted)]"}),e.jsx("input",{type:"text",placeholder:a("admin.search_developers"),value:n,onChange:t=>l(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] py-1.5 pl-8 pr-3 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})}),v?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(K,{rows:4})}):!c||c.length===0?e.jsx(J,{icon:Y,title:a(n?"admin.no_matching_developers":"admin.no_developers_found"),description:a(n?"admin.try_adjusting_search":"admin.create_first_developer"),actionLabel:n?void 0:a("admin.create_developer"),onAction:n?void 0:()=>i(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-left text-[var(--text-muted)]",children:[e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.username")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("profile.git_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.role")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.status")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.totp")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("common.created_at")}),e.jsx("th",{className:"pb-2 font-normal",children:a("common.actions")})]})}),e.jsx("tbody",{children:c.map(t=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-primary)]",children:t.name}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:t.gitName}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:f(t.role),children:t.role})}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:O(t.status),children:t.status})}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:t.totpEnabled?"text-green-400":"text-[var(--text-muted)]",children:t.totpEnabled?a("common.enabled"):a("common.disabled")})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-muted)]",children:new Date(t.createdAt).toLocaleDateString()}),e.jsx("td",{className:"py-2.5",children:e.jsx(P,{dev:t,currentUserId:r==null?void 0:r.id,onEdit:u,onReset2fa:b,onToggleStatus:y})})]},t.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3",children:c.map(t=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)] font-medium",children:t.name}),e.jsx(P,{dev:t,currentUserId:r==null?void 0:r.id,onEdit:u,onReset2fa:b,onToggleStatus:y})]}),e.jsx("div",{className:"text-[11px] text-[var(--text-secondary)] mb-1",children:t.gitName}),e.jsxs("div",{className:"flex items-center gap-3 text-[11px]",children:[e.jsx("span",{className:f(t.role),children:t.role}),e.jsx("span",{className:O(t.status),children:t.status}),e.jsx("span",{className:t.totpEnabled?"text-green-400":"text-[var(--text-muted)]",children:t.totpEnabled?a("common.enabled"):a("common.disabled")})]})]},t.id))})]}),e.jsx(se,{isOpen:s,onClose:()=>i(!1),onCreated:h}),m&&e.jsx(ne,{isOpen:!!m,developer:m,onClose:()=>u(null),onUpdated:h}),p&&e.jsx(oe,{isOpen:!!p,developer:p,onClose:()=>b(null),onConfirmed:h})]})}export{fe as default};
16
+ */const re=X("UserX",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]),q=Object.values(S).map(a=>({value:a,label:a}));function se({isOpen:a,onClose:r,onCreated:n}){const{t:l}=E(),[s,i]=o.useState(""),[m,u]=o.useState(""),[p,b]=o.useState(""),[c,v]=o.useState(""),[h,y]=o.useState("developer"),[f,t]=o.useState(!1),[j,g]=o.useState("");function D(){i(""),u(""),b(""),v(""),y("developer"),g("")}function N(){D(),r()}async function U(){if(g(""),!s.trim()||!m.trim()||!p.trim()||!c.trim()){g(l("admin.all_fields_required"));return}const x=B(c);if(x){g(l(x));return}try{t(!0),await C.post("admin/developers",{json:{name:s.trim(),gitName:m.trim(),gitEmail:p.trim(),password:c,role:h}}).json(),N(),n()}catch(T){const A=T instanceof Error?T.message:l("admin.failed_to_create_developer");g(A)}finally{t(!1)}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:N}),e.jsxs("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// ",l("admin.create_developer_title")]}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:N,children:e.jsx(L,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[j&&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:j}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:l("admin.username")}),e.jsx("input",{type:"text",placeholder:"e.g. jdoe",value:s,onChange:x=>i(x.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:l("profile.git_name")}),e.jsx("input",{type:"text",placeholder:"e.g. John Doe",value:m,onChange:x=>u(x.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:l("profile.git_email")}),e.jsx("input",{type:"email",placeholder:"e.g. john@example.com",value:p,onChange:x=>b(x.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:l("auth.password")}),e.jsx("input",{type:"password",placeholder:"10-20 chars, letters + digits + special",value:c,onChange:x=>v(x.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:l("admin.password_hint")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:l("common.role")}),e.jsx(V,{value:h,onChange:y,options:q})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:N,children:l("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:f,onClick:U,children:l(f?"common.creating":"common.create")})]})]})]}):null}function ne({isOpen:a,developer:r,onClose:n,onUpdated:l}){var M,z;const{t:s}=E(),i=F(d=>d.user),[m,u]=o.useState(r.name),[p,b]=o.useState(r.gitName),[c,v]=o.useState(r.gitEmail),[h,y]=o.useState(r.role),[f,t]=o.useState(((M=r.platformUids)==null?void 0:M.lark)??""),[j,g]=o.useState(((z=r.platformUids)==null?void 0:z.slack)??""),[D,N]=o.useState(!1),[U,x]=o.useState(""),A=r.id===(i==null?void 0:i.id)&&r.role===S.ADMIN&&h!==S.ADMIN;o.useEffect(()=>{var d,w;u(r.name),b(r.gitName),v(r.gitEmail),y(r.role),t(((d=r.platformUids)==null?void 0:d.lark)??""),g(((w=r.platformUids)==null?void 0:w.slack)??""),x("")},[r]);async function G(){var d,w;if(x(""),!m.trim()||!p.trim()||!c.trim()){x(s("admin.all_fields_required"));return}A&&x(s("admin.demote_self_warning"));try{N(!0);const _={name:m.trim(),gitName:p.trim(),gitEmail:c.trim(),role:h},I=((d=r.platformUids)==null?void 0:d.lark)??"",$=((w=r.platformUids)==null?void 0:w.slack)??"";if(f.trim()!==I||j.trim()!==$){const R={};R.lark=f.trim(),R.slack=j.trim(),_.platformUids=R}await C.put(`admin/developers/${r.id}`,{json:_}).json(),n(),l()}catch(_){const I=_ instanceof Error?_.message:s("admin.failed_to_update_developer");x(I)}finally{N(!1)}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:n}),e.jsxs("div",{className:"relative z-10 mx-2 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// ",s("admin.edit_developer_title")]}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:e.jsx(L,{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:s("admin.username")}),e.jsx("input",{type:"text",value:m,onChange:d=>u(d.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:s("profile.git_name")}),e.jsx("input",{type:"text",value:p,onChange:d=>b(d.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:s("profile.git_email")}),e.jsx("input",{type:"email",value:c,onChange:d=>v(d.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:s("common.role")}),e.jsx(V,{value:h,onChange:y,options:q}),A&&e.jsx("div",{className:"mt-2 rounded-[4px] border border-[var(--warning)] bg-[var(--warning)]/10 px-3 py-2 text-xs text-[var(--warning)]",children:s("admin.demote_self_inline_warning")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:s("admin.platform_accounts")}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-muted)]",children:s("admin.lark_uid")}),e.jsx("input",{type:"text",value:f,onChange:d=>t(d.target.value),placeholder:"ou_xxxxxxxxxx",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-muted)]",children:s("admin.slack_uid")}),e.jsx("input",{type:"text",value:j,onChange:d=>g(d.target.value),placeholder:"U0XXXXXXXXX",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})]})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:s("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity disabled:opacity-50",disabled:D,onClick:G,children:s(D?"common.saving":"common.save_changes")})]})]})]}):null}function oe({isOpen:a,developer:r,onClose:n,onConfirmed:l}){const{t:s}=E(),[i,m]=o.useState(!1),[u,p]=o.useState("");async function b(){p("");try{m(!0),await C.put(`admin/developers/${r.id}/reset-totp`),n(),l()}catch(c){const v=c instanceof Error?c.message:s("admin.failed_to_reset_2fa");p(v)}finally{m(!1)}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:n}),e.jsxs("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(te,{className:"h-4 w-4 text-yellow-400"}),e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// ",s("admin.reset_2fa")]})]}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:e.jsx(L,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-3 px-5 py-5",children:[u&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:u}),e.jsxs("p",{className:"text-xs text-[var(--text-primary)]",children:[s("admin.reset_2fa_confirm_message")," ",e.jsx("span",{className:"text-[var(--accent)]",children:r.name}),"?"]}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:s("admin.reset_2fa_audit_note")})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:s("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-yellow-600 px-3 py-1.5 text-xs text-white hover:opacity-90 transition-opacity disabled:opacity-50",disabled:i,onClick:b,children:s(i?"admin.resetting":"admin.reset_2fa")})]})]})]}):null}function P({dev:a,currentUserId:r,onEdit:n,onReset2fa:l,onToggleStatus:s}){const{t:i}=E();return e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-white/[0.05] transition-colors",title:i("common.edit"),onClick:()=>n(a),children:e.jsx(Z,{className:"h-3.5 w-3.5"})}),a.id!==r&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-white/[0.05] transition-colors",title:i("admin.reset_2fa"),onClick:()=>l(a),children:e.jsx(ee,{className:"h-3.5 w-3.5"})}),e.jsx("button",{type:"button",className:`rounded-[4px] p-2.5 md:p-1.5 transition-colors hover:bg-white/[0.05] ${a.status===k.ACTIVE?"text-red-400 hover:text-red-300":"text-green-400 hover:text-green-300"}`,title:a.status===k.ACTIVE?i("admin.deactivate"):i("admin.activate"),onClick:()=>s(a),children:a.status===k.ACTIVE?e.jsx(re,{className:"h-3.5 w-3.5"}):e.jsx(ae,{className:"h-3.5 w-3.5"})})]})]})}function ye(){const{t:a}=E(),r=F(t=>t.user),[n,l]=o.useState(""),[s,i]=o.useState(!1),[m,u]=o.useState(null),[p,b]=o.useState(null),{data:c,loading:v,refetch:h}=Q(()=>{const t={};return n&&(t.q=n),C.get("admin/developers",{searchParams:t}).json()},[n]);async function y(t){const j=t.status===k.ACTIVE?k.DISABLED:k.ACTIVE;try{await C.put(`admin/developers/${t.id}`,{json:{status:j}}),h()}catch{}}function f(t){switch(t){case S.ADMIN:return"text-yellow-400";case S.DEVELOPER:return"text-blue-400";default:return"text-[var(--text-secondary)]"}}return e.jsxs("div",{className:"font-mono",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("admin.developers_title")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("admin.developers_subtitle")})]}),e.jsxs("button",{type:"button",className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity",onClick:()=>i(!0),children:[e.jsx(W,{className:"h-3.5 w-3.5"}),a("admin.create_developer")]})]}),e.jsx("div",{className:"mb-4",children:e.jsxs("div",{className:"relative w-full max-w-xs",children:[e.jsx(H,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[var(--text-muted)]"}),e.jsx("input",{type:"text",placeholder:a("admin.search_developers"),value:n,onChange:t=>l(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] py-1.5 pl-8 pr-3 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})}),v?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(K,{rows:4})}):!c||c.length===0?e.jsx(J,{icon:Y,title:a(n?"admin.no_matching_developers":"admin.no_developers_found"),description:a(n?"admin.try_adjusting_search":"admin.create_first_developer"),actionLabel:n?void 0:a("admin.create_developer"),onAction:n?void 0:()=>i(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-left text-[var(--text-muted)]",children:[e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.username")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("profile.git_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.role")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.status")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.totp")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("common.created_at")}),e.jsx("th",{className:"pb-2 font-normal",children:a("common.actions")})]})}),e.jsx("tbody",{children:c.map(t=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-primary)]",children:t.name}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:t.gitName}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:f(t.role),children:t.role})}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:O(t.status),children:t.status})}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:t.totpEnabled?"text-green-400":"text-[var(--text-muted)]",children:t.totpEnabled?a("common.enabled"):a("common.disabled")})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-muted)]",children:new Date(t.createdAt).toLocaleDateString()}),e.jsx("td",{className:"py-2.5",children:e.jsx(P,{dev:t,currentUserId:r==null?void 0:r.id,onEdit:u,onReset2fa:b,onToggleStatus:y})})]},t.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3",children:c.map(t=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)] font-medium",children:t.name}),e.jsx(P,{dev:t,currentUserId:r==null?void 0:r.id,onEdit:u,onReset2fa:b,onToggleStatus:y})]}),e.jsx("div",{className:"text-[11px] text-[var(--text-secondary)] mb-1",children:t.gitName}),e.jsxs("div",{className:"flex items-center gap-3 text-[11px]",children:[e.jsx("span",{className:f(t.role),children:t.role}),e.jsx("span",{className:O(t.status),children:t.status}),e.jsx("span",{className:t.totpEnabled?"text-green-400":"text-[var(--text-muted)]",children:t.totpEnabled?a("common.enabled"):a("common.disabled")})]})]},t.id))})]}),e.jsx(se,{isOpen:s,onClose:()=>i(!1),onCreated:h}),m&&e.jsx(ne,{isOpen:!!m,developer:m,onClose:()=>u(null),onUpdated:h}),p&&e.jsx(oe,{isOpen:!!p,developer:p,onClose:()=>b(null),onConfirmed:h})]})}export{ye as default};
@@ -1,4 +1,4 @@
1
- import{j as e,L as t}from"./index-BnZa648g.js";import{I as s,a}from"./DocsPrimitives-BeRfTNWi.js";import"./copy-DNIFSymA.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-CfvO5R0v.js";import{I as s,a}from"./DocsPrimitives-B3qhkVFu.js";import"./copy-DR5cQtVj.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 n,j as s,a0 as t,S as _,b as p,M as h,a1 as m,d as y,L as x}from"./index-BnZa648g.js";import{D as v}from"./download-DLYSP8rX.js";import{B as k}from"./bot-DvI1Z_Mw.js";import{G as b,W as g}from"./workflow-BHEQEN9B.js";import{S as u}from"./settings-BWLb7GMU.js";import{F as w}from"./file-text-224YYyRN.js";/**
1
+ import{c,a as _,j as s,K as t,S as p,b as h,M as m,a4 as y,d as x,L as v}from"./index-CfvO5R0v.js";import{D as k}from"./download-FpaVrNQK.js";import{B as b}from"./bot-DZ_48uoa.js";import{G as a,W as g}from"./workflow-Cd6zqDgi.js";import{S as u}from"./settings-DLSb7OkM.js";import{F as w}from"./file-text-Gk2VyRBd.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -23,4 +23,4 @@ import{c,a as n,j as s,a0 as t,S as _,b as p,M as h,a1 as m,d as y,L as x}from".
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
- */const N=c("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]),z=[{titleKey:"docs.docs_nav_getting_started",cards:[{to:"/docs/installation",label:"docs.docs_installation",descKey:"docs.docs_desc_installation",icon:v},{to:"/docs/developer-setup",label:"docs.docs_developer_setup",descKey:"docs.docs_desc_developer_setup",icon:t},{to:"/docs/worker-setup",label:"docs.docs_worker_setup",descKey:"docs.docs_desc_worker_setup",icon:_},{to:"/docs/bot-setup",label:"docs.docs_bot_setup",descKey:"docs.docs_desc_bot_setup",icon:k}]},{titleKey:"docs.docs_nav_guides",cards:[{to:"/docs/local-development",label:"docs.docs_local_dev",descKey:"docs.docs_desc_local_dev",icon:j},{to:"/docs/worker-operations",label:"docs.docs_worker_ops",descKey:"docs.docs_desc_worker_ops",icon:K},{to:"/docs/deployment",label:"docs.docs_deployment",descKey:"docs.docs_desc_deployment",icon:N},{to:"/docs/pipeline-config",label:"docs.docs_pipeline",descKey:"docs.docs_desc_pipeline",icon:b},{to:"/docs/dev-workflow",label:"docs.docs_dev_workflow",descKey:"docs.docs_desc_dev_workflow",icon:g}]},{titleKey:"docs.docs_nav_reference",cards:[{to:"/docs/cli",label:"docs.docs_cli",descKey:"docs.docs_desc_cli",icon:p},{to:"/docs/api",label:"docs.docs_api",descKey:"docs.docs_desc_api",icon:t},{to:"/docs/bot",label:"docs.docs_bot_integration",descKey:"docs.docs_desc_bot_integration",icon:h},{to:"/docs/skill",label:"docs.docs_skill",descKey:"docs.docs_desc_skill",icon:m},{to:"/docs/permissions",label:"docs.docs_permissions",descKey:"docs.docs_desc_permissions",icon:y},{to:"/docs/env-variables",label:"docs.docs_env_vars",descKey:"docs.docs_desc_env_vars",icon:u},{to:"/docs/agent-cli",label:"docs.docs_agent_cli",descKey:"docs.docs_desc_agent_cli",icon:f}]},{titleKey:"docs.docs_nav_other",cards:[{to:"/docs/architecture",label:"docs.docs_architecture",descKey:"docs.docs_desc_architecture",icon:M},{to:"/docs/changelog",label:"docs.docs_changelog",descKey:"docs.docs_desc_changelog",icon:w}]}];function C(){const{t:e}=n();return s.jsxs("div",{className:"mx-auto max-w-4xl font-mono lowercase",children:[s.jsxs("div",{className:"mb-8",children:[s.jsx("h1",{className:"text-sm text-[var(--text-primary)]",children:e("docs.docs_all_title")}),s.jsx("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:e("docs.docs_all_subtitle")})]}),s.jsx("div",{className:"space-y-8",children:z.map(({titleKey:o,cards:a})=>s.jsxs("section",{children:[s.jsx("h2",{className:"mb-3 text-xs font-semibold text-[var(--accent)]",children:e(o)}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:a.map(({to:d,label:l,descKey:i,icon:r})=>s.jsxs(x,{to:d,className:"flex items-start gap-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 transition-colors hover:border-[var(--accent)]",children:[s.jsx(r,{size:16,className:"mt-0.5 shrink-0 text-[var(--accent)]"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm text-[var(--text-primary)]",children:e(l)}),s.jsx("p",{className:"mt-0.5 text-xs text-[var(--text-muted)]",children:e(i)})]})]},d))})]},o))})]})}export{C as default};
26
+ */const N=c("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]),z=[{titleKey:"docs.docs_nav_getting_started",cards:[{to:"/docs/installation",label:"docs.docs_installation",descKey:"docs.docs_desc_installation",icon:k},{to:"/docs/developer-setup",label:"docs.docs_developer_setup",descKey:"docs.docs_desc_developer_setup",icon:t},{to:"/docs/worker-setup",label:"docs.docs_worker_setup",descKey:"docs.docs_desc_worker_setup",icon:p},{to:"/docs/bot-setup",label:"docs.docs_bot_setup",descKey:"docs.docs_desc_bot_setup",icon:b}]},{titleKey:"docs.docs_nav_guides",cards:[{to:"/docs/local-development",label:"docs.docs_local_dev",descKey:"docs.docs_desc_local_dev",icon:j},{to:"/docs/worker-operations",label:"docs.docs_worker_ops",descKey:"docs.docs_desc_worker_ops",icon:K},{to:"/docs/deployment",label:"docs.docs_deployment",descKey:"docs.docs_desc_deployment",icon:N},{to:"/docs/pipeline-config",label:"docs.docs_pipeline",descKey:"docs.docs_desc_pipeline",icon:a},{to:"/docs/dev-workflow",label:"docs.docs_dev_workflow",descKey:"docs.docs_desc_dev_workflow",icon:g}]},{titleKey:"docs.docs_nav_reference",cards:[{to:"/docs/cli",label:"docs.docs_cli",descKey:"docs.docs_desc_cli",icon:h},{to:"/docs/api",label:"docs.docs_api",descKey:"docs.docs_desc_api",icon:t},{to:"/docs/task-guide",label:"docs.docs_task_guide",descKey:"docs.docs_desc_task_guide",icon:a},{to:"/docs/bot",label:"docs.docs_bot_integration",descKey:"docs.docs_desc_bot_integration",icon:m},{to:"/docs/skill",label:"docs.docs_skill",descKey:"docs.docs_desc_skill",icon:y},{to:"/docs/permissions",label:"docs.docs_permissions",descKey:"docs.docs_desc_permissions",icon:x},{to:"/docs/env-variables",label:"docs.docs_env_vars",descKey:"docs.docs_desc_env_vars",icon:u},{to:"/docs/agent-cli",label:"docs.docs_agent_cli",descKey:"docs.docs_desc_agent_cli",icon:f}]},{titleKey:"docs.docs_nav_other",cards:[{to:"/docs/architecture",label:"docs.docs_architecture",descKey:"docs.docs_desc_architecture",icon:M},{to:"/docs/changelog",label:"docs.docs_changelog",descKey:"docs.docs_desc_changelog",icon:w}]}];function C(){const{t:e}=_();return s.jsxs("div",{className:"mx-auto max-w-4xl font-mono lowercase",children:[s.jsxs("div",{className:"mb-8",children:[s.jsx("h1",{className:"text-sm text-[var(--text-primary)]",children:e("docs.docs_all_title")}),s.jsx("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:e("docs.docs_all_subtitle")})]}),s.jsx("div",{className:"space-y-8",children:z.map(({titleKey:o,cards:l})=>s.jsxs("section",{children:[s.jsx("h2",{className:"mb-3 text-xs font-semibold text-[var(--accent)]",children:e(o)}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:l.map(({to:d,label:i,descKey:r,icon:n})=>s.jsxs(v,{to:d,className:"flex items-start gap-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 transition-colors hover:border-[var(--accent)]",children:[s.jsx(n,{size:16,className:"mt-0.5 shrink-0 text-[var(--accent)]"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm text-[var(--text-primary)]",children:e(i)}),s.jsx("p",{className:"mt-0.5 text-xs text-[var(--text-muted)]",children:e(r)})]})]},d))})]},o))})]})}export{C as default};
@@ -0,0 +1 @@
1
+ import{a as i,g as x,j as a,L as d,b as m,K as b,M as p,a4 as u,e as v,a5 as f,a6 as h}from"./index-CfvO5R0v.js";import{A as j}from"./arrow-left-BOJ_pZwC.js";const o=[{to:"/docs/cli",label:"cli",icon:m},{to:"/docs/api",label:"api",icon:b},{to:"/docs/bot",label:"bot",icon:p},{to:"/docs/skill",label:"skill",icon:u},{to:"/docs/all",label:"all",icon:v}],k=new Set(o.map(s=>s.to));function y(){const{t:s}=i(),r=x(),t=!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:[t&&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}),s("docs.docs_back")]}),o.map(({to:e,label:l,icon:c})=>a.jsxs(f,{to:e,className:({isActive:n})=>`flex items-center gap-1.5 px-3 py-3 text-xs lowercase border-b-2 transition-colors shrink-0 ${n||t&&e==="/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})]},e))]}),a.jsx("main",{className:"flex-1 overflow-auto p-4 md:p-6",children:a.jsx(h,{})})]})}export{y as default};
@@ -1 +1 @@
1
- import{a as i,r as s,j as e,C as x}from"./index-BnZa648g.js";import{C as p}from"./copy-DNIFSymA.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-CfvO5R0v.js";import{C as p}from"./copy-DR5cQtVj.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};
@@ -0,0 +1,2 @@
1
+ import{A as xe,f as ue,a as me,r as s,G as v,Q as be,h as d,j as e,L as ve,Z as V,t as c}from"./index-CfvO5R0v.js";import{S as X}from"./Select-BMBYwPr-.js";import{U as je,A as he,R as ge}from"./RemoveMemberConfirmDialog-svHE4uU4.js";import{a as ye}from"./agent-type-options-CdJpMswW.js";import{P as fe}from"./plus-DDEIETPT.js";import"./chevron-down-DiFQzkq3.js";function Te(){const{key:o}=xe(),l=ue(),{t:r}=me(),Y=ye(t=>t),[a,ee]=s.useState(null),[j,te]=s.useState([]),[re,se]=s.useState(!0),[w,h]=s.useState(!1),[g,C]=s.useState(""),[y,S]=s.useState(""),[T,M]=s.useState(""),[I,A]=s.useState(v.GITHUB),[P,R]=s.useState(""),[O,U]=s.useState(be.CLAUDE),[G,$]=s.useState("50"),[E,D]=s.useState(""),[B,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),M(t.sshUrl??""),A(t.gitPlatform),R(t.defaultBranch),U(t.agentType),$(String(t.maxTurns)),D(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:P,gitPlatform:I,agentType:O,maxTurns:parseInt(G,10)||50,workspaceRoot:E||null,setupCommands:B||null,testCommand:F||null,ptyOutputFilter:parseInt(q,10)||0,pipeline:b}}),c.success(r("projects.project_saved")),l(`/projects/${a.key}`)}catch(Z){const pe=Z instanceof Error?Z.message:r("projects.failed_to_save_project");c.error(pe)}finally{h(!1)}}function le(){l(`/projects/${o}`)}async function ce(){if(!(!a||!x.trim())){u(!0);try{const t=await d.put(`web/projects/${a.key}/git-token`,{json:{token:x.trim()}}).json();N(t.gitTokenMasked),k(""),c.success(r("projects.git_token_saved"))}catch{c.error(r("projects.git_token_failed"))}finally{u(!1)}}}async function ie(){if(a){u(!0);try{await d.delete(`web/projects/${a.key}/git-token`),N(null),k(""),c.success(r("projects.git_token_cleared"))}catch{c.error(r("projects.git_token_failed"))}finally{u(!1)}}}async function de(){if(!(!a||!i)){W(!0);try{await d.delete(`web/projects/${a.key}/members`,{searchParams:{developerId:String(i.developerId)}}),await m()}catch{}finally{W(!1),_(null)}}}return re?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})}):a?e.jsxs("form",{onSubmit:oe,className:"mx-auto max-w-6xl px-4 md:px-6 py-8",children:[e.jsxs("div",{className:"mb-2 text-xs text-[var(--text-muted)]",children:[e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l("/projects"),children:r("projects.title")})," / ",e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l(`/projects/${a.key}`),children:a.key})," / ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:r("common.edit")})]}),e.jsx("h1",{className:"text-lg font-bold text-[var(--text-primary)] mb-4",children:r("projects.edit_project_title")}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_400px]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.basic_info")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{label:r("projects.key"),children:e.jsx("input",{type:"text",value:a.key,readOnly:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-muted)] outline-none opacity-60 cursor-not-allowed"})}),e.jsx(n,{label:r("projects.name"),children:e.jsx("input",{type:"text",value:g,onChange:t=>C(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(n,{label:r("projects.repo_url"),children:e.jsx("input",{type:"text",value:y,onChange:t=>S(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsxs(n,{label:r("projects.ssh_url"),children:[e.jsx("input",{type:"text",value:T,onChange:t=>M(t.target.value),placeholder:r("projects.ssh_url_placeholder"),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:r("projects.ssh_url_hint")})]}),e.jsx(n,{label:r("projects.git_platform"),children:e.jsx(X,{value:I,onChange:t=>A(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:P,onChange:t=>R(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.agent_config")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{label:r("projects.agent_type"),children:e.jsx(X,{value:O,onChange:t=>U(t),options:Y})}),e.jsx(n,{label:r("projects.max_turns"),children:e.jsx("input",{type:"number",value:G,onChange:t=>$(t.target.value),min:1,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(n,{label:r("projects.workspace_root"),children:e.jsx("input",{type:"text",value:E,onChange:t=>D(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:B,onChange:t=>L(t.target.value),rows:3,placeholder:`npm install
2
+ npm run build`,className:"w-full resize-y rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(n,{label:r("projects.post_command"),children:e.jsx("input",{type:"text",value:F,onChange:t=>J(t.target.value),placeholder:"npm test",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.security")}),e.jsx("div",{className:"space-y-3",children:e.jsx(n,{label:r("projects.pty_output_filter"),children:e.jsx("input",{type:"text",value:q,onChange:t=>z(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.git_token")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{label:r("projects.git_token_label"),children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:H??r("common.not_set")})})}),e.jsxs(n,{label:r("projects.git_token_set"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"password",value:x,onChange:t=>k(t.target.value),placeholder:"ghp_xxxx...",className:"min-w-0 flex-1 rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("button",{type:"button",disabled:K||!x.trim(),onClick:ce,className:"shrink-0 rounded-[4px] bg-[var(--accent)] px-3 py-2 text-xs font-medium text-black hover:opacity-90 transition-opacity disabled:opacity-50",children:r("common.save")})]}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:r("projects.git_token_hint")})]}),H&&e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{type:"button",disabled:K,onClick:ie,className:"rounded-[4px] border border-[var(--destructive)] px-3 py-1.5 text-xs text-[var(--destructive)] hover:opacity-70 transition-opacity disabled:opacity-50",children:r("projects.git_token_clear")})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--accent)]",children:r("projects.pipeline_section")}),e.jsx(ve,{to:"/projects/"+o+"/pipeline",className:"text-xs text-[var(--accent)] hover:underline",children:r("projects.edit_pipeline")})]}),e.jsx("textarea",{value:p,onChange:t=>f(t.target.value),rows:20,spellCheck:!1,placeholder:'{"stages": []}',className:"w-full resize-y rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]",style:{fontFamily:'"JetBrains Mono", monospace',textTransform:"none"}})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--accent)]",children:r("projects.members")}),e.jsxs("button",{type:"button",onClick:()=>Q(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs font-medium text-black",children:[e.jsx(fe,{className:"h-3.5 w-3.5"}),r("projects.add_member")]})]}),j.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("projects.no_members_yet")})]}):e.jsx("div",{className:"space-y-2",children:j.map(t=>e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-[var(--accent)]/20 text-xs font-bold text-[var(--accent)]",children:(t.developerName??String(t.developerId)).charAt(0).toUpperCase()}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:t.developerName??`#${t.developerId}`}),e.jsx("span",{className:"ml-2 rounded-[4px] px-1.5 py-0.5 text-[11px] font-medium",style:{color:t.role===V.MAINTAINER?"var(--warning)":"var(--text-secondary)",background:t.role===V.MAINTAINER?"rgba(245,158,11,0.1)":"rgba(163,163,163,0.1)"},children:t.role})]})]}),e.jsx("button",{type:"button",onClick:()=>_(t),className:"text-[var(--destructive)] hover:opacity-70 transition-opacity","aria-label":r("projects.remove_member"),children:e.jsx(je,{className:"h-3.5 w-3.5"})})]},t.developerId))})]})]})]}),e.jsxs("div",{className:"mt-8 flex items-center justify-end gap-3 border-t border-[var(--border)] pt-6",children:[e.jsx("button",{type:"button",onClick:le,className:"rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("common.discard")}),e.jsx("button",{type:"submit",disabled:w||!g||!y,className:"rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-medium text-black hover:opacity-90 transition-opacity disabled:opacity-50",children:r(w?"common.saving":"projects.save_changes")})]}),e.jsx(he,{isOpen:ae,onClose:()=>Q(!1),projectKey:a.key,existingMemberIds:j.map(t=>t.developerId),onAdded:m}),e.jsx(ge,{isOpen:!!i,onClose:()=>_(null),onConfirm:de,memberName:i?i.developerName??`#${i.developerId}`:"",loading:ne})]}):e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 text-center",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:r("projects.project_not_found")}),e.jsx("button",{onClick:()=>l("/projects"),className:"mt-4 rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:r("projects.back_to_projects")})]})}function n({label:o,children:l}){return e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-1 sm:gap-3",children:[e.jsx("label",{className:"sm:w-36 shrink-0 sm:pt-2 text-xs text-[var(--text-muted)]",children:o}),e.jsx("div",{className:"min-w-0 flex-1",children:l})]})}export{Te as default};
@@ -1,4 +1,4 @@
1
- import{c as o,j as e}from"./index-BnZa648g.js";/**
1
+ import{c as o,j as e}from"./index-CfvO5R0v.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-BnZa648g.js";import{a as r}from"./DocsPrimitives-BeRfTNWi.js";import"./copy-DNIFSymA.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:"// 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 ai-powered task naming. when configured, overlord uses any openai-compatible api to auto-generate concise task names and branch slugs from the task description. without these variables, tasks fall back to showing the full description."}),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 ai task naming.'})]}),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 for task name generation."})]}),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."})]})]})]})}),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-CfvO5R0v.js";import{a as r}from"./DocsPrimitives-B3qhkVFu.js";import"./copy-DR5cQtVj.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:"// 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 ai-powered task naming. when configured, overlord uses any openai-compatible api to auto-generate concise task names and branch slugs from the task description. without these variables, tasks fall back to showing the full description."}),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 ai task naming.'})]}),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 for task name generation."})]}),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."})]})]})]})}),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,n as G,W as w,h}from"./index-BnZa648g.js";import{T as R}from"./TaskStatusBadge-BdDVC3F4.js";import{T as g}from"./Skeleton-CJVHi16l.js";import{O as V}from"./OnboardingGuide-BqdyHxJS.js";import{f as _}from"./date-RFA7-ZGs.js";import{g as Y}from"./status-colors-CJELOkpG.js";import{u as b}from"./useFetch-BHc-EDVT.js";import{T as q}from"./Tooltip-BSeP698b.js";import{A as v}from"./arrow-right-DxSODyV0.js";import"./chevron-right-CdPoqMfX.js";const J=3e5,Q=[{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"}],U=["sun","mon","tue","wed","thu","fri","sat"];function X(){const n=new Date;return Array.from({length:7},(a,i)=>{const r=new Date(n);r.setDate(r.getDate()-(6-i));const o=String(r.getMonth()+1).padStart(2,"0"),l=String(r.getDate()).padStart(2,"0");return{label:U[r.getDay()],date:`${o}/${l}`}})}function Z({dailyRates:n,dailyCounts:a,overallRate:i}){const{t:r}=K(),o=X(),l=a.reduce((t,c)=>t+c,0),u=Math.max(...a,1);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 flex items-baseline gap-2",children:[e.jsx("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:l}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("dashboard.last_7_days")}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"·"}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:[r("dashboard.success_rate"),": ",i,"%"]})]}),e.jsx("div",{className:"flex gap-2",style:{height:80},children:o.map(({label:t,date:c},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} ${c} — ${x} ${f} (${m}%)`,className:"flex flex-1 flex-col items-center gap-1",children:[e.jsx("div",{className:"relative w-full h-full rounded-[4px] cursor-default",style:{backgroundColor:"rgba(34,197,94,0.1)"},children:e.jsx("div",{className:"absolute bottom-0 left-0 right-0 rounded-[4px]",style:{height:`${N}%`,backgroundColor:m>=80?"var(--accent)":m>=50?"var(--warning)":"var(--destructive)"}})}),e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:t})]},t)})})]})}function ie(){const n=z(),{t:a}=K(),i=H(),r=D(s=>s.taskSeq),o=D(s=>s.workerSeq),[l,u]=$.useState(0),{data:t,loading:c}=b(()=>h.get("web/dashboard/stats",{searchParams:{tz:String(new Date().getTimezoneOffset())}}).json(),[l,r,o]),{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,o]),{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)},J);return()=>clearInterval(s)},[]);const S=(t==null?void 0:t.success_rate_daily)??null,T=(t==null?void 0:t.task_count_daily)??[],W=(t==null?void 0:t.task_success_rate_7d)??0,L=j??[],y=m??[],C=N??[],A=O??[];function F(s){switch(s){case w.ONLINE:return a("dashboard.online");case w.DRAINING:return a("dashboard.idle");case w.OFFLINE:default:return a("dashboard.offline")}}function P(s){return a(s===1?"dashboard.task_total":"dashboard.tasks_total")}return e.jsxs("div",{className:"mx-auto max-w-6xl overflow-hidden px-2 py-4 md:px-4 md:py-6 font-mono",children:[e.jsx("div",{className:"mb-6 md:mb-8 grid grid-cols-2 gap-3 md:gap-4 lg:grid-cols-4",children:Q.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),":"]}),c?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(V,{data:{activeTasks:((t==null?void 0:t.active_tasks)??0)+((t==null?void 0:t.queued_tasks)??0),totalWorkers:y.length,totalProjects:(t==null?void 0:t.project_count)??0,totalDevelopers:(t==null?void 0:t.developer_count)??0}}),e.jsxs("div",{className:"mb-6 grid gap-6 lg:grid-cols-3 items-stretch",children:[e.jsx("div",{className:"flex flex-col gap-6 lg:col-span-2",children:e.jsxs("div",{className:"flex flex-1 flex-col rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("div",{className:"border-b border-[var(--border)] px-5 py-3",children:e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.task_count")})}),e.jsx("div",{className:"flex flex-1 flex-col justify-center p-5",children:c?e.jsx("div",{className:"h-24 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):S?e.jsx(Z,{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",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",children:e.jsx(q,{content:G(s),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:Y(s.status)},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),F(s.status)]})]})]},s.id))})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:hidden",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-3 py-3",children:[e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.projects")}),e.jsxs(p,{to:"/projects",className:"flex items-center gap-1 text-[11px] text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-3",children:E?e.jsx(g,{rows:3}):C.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("projects.no_projects_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2",children:C.map(s=>{const d=s.taskCount??0;return e.jsxs("div",{onClick:()=>n(`/projects/${s.key}`),className:"cursor-pointer rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)]",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-[var(--accent)]",children:s.key}),e.jsxs("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:[d," ",P(d)]})]}),e.jsx("span",{className:"mt-1 block text-[11px] text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"mt-0.5 block text-[11px] text-[var(--text-muted)]",children:s.agentType})]},s.key)})})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.recent_activity")}),i&&e.jsxs(p,{to:"/admin/audit-logs",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-3 md:p-4",children:M?e.jsx(g,{rows:4}):A.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.no_recent_activity")})]}):e.jsx("div",{className:"flex flex-col",children:A.map(s=>{const d=s.message.match(/task\s*#?(\d+)/i),k=d?d[1]:null;return e.jsxs("div",{className:`flex min-w-0 flex-col gap-1 rounded-[4px] border-b border-[var(--border-row)] px-2 py-2 transition-colors last:border-b-0 md:flex-row md:items-start md:gap-3 md:rounded-none md:px-0 ${k?"cursor-pointer hover:bg-[var(--bg-input)]":""}`,onClick:()=>k&&n(`/tasks/${k}`),children:[e.jsx("span",{className:"shrink-0 whitespace-nowrap text-[11px] text-[var(--text-muted)] md:text-xs",children:_(s.timestamp)}),e.jsx("span",{className:"min-w-0 break-words text-[11px] leading-relaxed text-[var(--text-secondary)] md:truncate md:text-xs md:leading-normal",children:s.message})]},s.id)})})})]})]})]})}export{ie 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,n as G,W as w,h}from"./index-CfvO5R0v.js";import{T as R}from"./TaskStatusBadge-B_S_xjEI.js";import{T as g}from"./Skeleton-9LGrFcdv.js";import{O as V}from"./OnboardingGuide-C8QTC3cZ.js";import{f as _}from"./date-RFA7-ZGs.js";import{g as Y}from"./status-colors-w6Ie5LWO.js";import{u as b}from"./useFetch-DpOLDSFc.js";import{T as q}from"./Tooltip-BFj-n88a.js";import{A as v}from"./arrow-right-GWPYDcKr.js";import"./chevron-right-Bsbm1nYp.js";const J=3e5,Q=[{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"}],U=["sun","mon","tue","wed","thu","fri","sat"];function X(){const n=new Date;return Array.from({length:7},(a,i)=>{const r=new Date(n);r.setDate(r.getDate()-(6-i));const o=String(r.getMonth()+1).padStart(2,"0"),l=String(r.getDate()).padStart(2,"0");return{label:U[r.getDay()],date:`${o}/${l}`}})}function Z({dailyRates:n,dailyCounts:a,overallRate:i}){const{t:r}=K(),o=X(),l=a.reduce((t,c)=>t+c,0),u=Math.max(...a,1);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 flex items-baseline gap-2",children:[e.jsx("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:l}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("dashboard.last_7_days")}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"·"}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:[r("dashboard.success_rate"),": ",i,"%"]})]}),e.jsx("div",{className:"flex gap-2",style:{height:80},children:o.map(({label:t,date:c},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} ${c} — ${x} ${f} (${m}%)`,className:"flex flex-1 flex-col items-center gap-1",children:[e.jsx("div",{className:"relative w-full h-full rounded-[4px] cursor-default",style:{backgroundColor:"rgba(34,197,94,0.1)"},children:e.jsx("div",{className:"absolute bottom-0 left-0 right-0 rounded-[4px]",style:{height:`${N}%`,backgroundColor:m>=80?"var(--accent)":m>=50?"var(--warning)":"var(--destructive)"}})}),e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:t})]},t)})})]})}function ie(){const n=z(),{t:a}=K(),i=H(),r=D(s=>s.taskSeq),o=D(s=>s.workerSeq),[l,u]=$.useState(0),{data:t,loading:c}=b(()=>h.get("web/dashboard/stats",{searchParams:{tz:String(new Date().getTimezoneOffset())}}).json(),[l,r,o]),{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,o]),{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)},J);return()=>clearInterval(s)},[]);const S=(t==null?void 0:t.success_rate_daily)??null,T=(t==null?void 0:t.task_count_daily)??[],W=(t==null?void 0:t.task_success_rate_7d)??0,L=j??[],y=m??[],C=N??[],A=O??[];function F(s){switch(s){case w.ONLINE:return a("dashboard.online");case w.DRAINING:return a("dashboard.idle");case w.OFFLINE:default:return a("dashboard.offline")}}function P(s){return a(s===1?"dashboard.task_total":"dashboard.tasks_total")}return e.jsxs("div",{className:"mx-auto max-w-6xl overflow-hidden px-2 py-4 md:px-4 md:py-6 font-mono",children:[e.jsx("div",{className:"mb-6 md:mb-8 grid grid-cols-2 gap-3 md:gap-4 lg:grid-cols-4",children:Q.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),":"]}),c?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(V,{data:{activeTasks:((t==null?void 0:t.active_tasks)??0)+((t==null?void 0:t.queued_tasks)??0),totalWorkers:y.length,totalProjects:(t==null?void 0:t.project_count)??0,totalDevelopers:(t==null?void 0:t.developer_count)??0}}),e.jsxs("div",{className:"mb-6 grid gap-6 lg:grid-cols-3 items-stretch",children:[e.jsx("div",{className:"flex flex-col gap-6 lg:col-span-2",children:e.jsxs("div",{className:"flex flex-1 flex-col rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("div",{className:"border-b border-[var(--border)] px-5 py-3",children:e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.task_count")})}),e.jsx("div",{className:"flex flex-1 flex-col justify-center p-5",children:c?e.jsx("div",{className:"h-24 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):S?e.jsx(Z,{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",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",children:e.jsx(q,{content:G(s),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:Y(s.status)},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),F(s.status)]})]})]},s.id))})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:hidden",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-3 py-3",children:[e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.projects")}),e.jsxs(p,{to:"/projects",className:"flex items-center gap-1 text-[11px] text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-3",children:E?e.jsx(g,{rows:3}):C.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("projects.no_projects_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2",children:C.map(s=>{const d=s.taskCount??0;return e.jsxs("div",{onClick:()=>n(`/projects/${s.key}`),className:"cursor-pointer rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)]",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-[var(--accent)]",children:s.key}),e.jsxs("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:[d," ",P(d)]})]}),e.jsx("span",{className:"mt-1 block text-[11px] text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"mt-0.5 block text-[11px] text-[var(--text-muted)]",children:s.agentType})]},s.key)})})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.recent_activity")}),i&&e.jsxs(p,{to:"/admin/audit-logs",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-3 md:p-4",children:M?e.jsx(g,{rows:4}):A.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.no_recent_activity")})]}):e.jsx("div",{className:"flex flex-col",children:A.map(s=>{const d=s.message.match(/task\s*#?(\d+)/i),k=d?d[1]:null;return e.jsxs("div",{className:`flex min-w-0 flex-col gap-1 rounded-[4px] border-b border-[var(--border-row)] px-2 py-2 transition-colors last:border-b-0 md:flex-row md:items-start md:gap-3 md:rounded-none md:px-0 ${k?"cursor-pointer hover:bg-[var(--bg-input)]":""}`,onClick:()=>k&&n(`/tasks/${k}`),children:[e.jsx("span",{className:"shrink-0 whitespace-nowrap text-[11px] text-[var(--text-muted)] md:text-xs",children:_(s.timestamp)}),e.jsx("span",{className:"min-w-0 break-words text-[11px] leading-relaxed text-[var(--text-secondary)] md:truncate md:text-xs md:leading-normal",children:s.message})]},s.id)})})})]})]})]})}export{ie as default};
@@ -1 +1 @@
1
- import{j as e}from"./index-BnZa648g.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-CfvO5R0v.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};