@overlordai/server 1.0.68 → 1.0.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/dispatcher/pty-relay.service.d.ts.map +1 -1
  2. package/dist/dispatcher/pty-relay.service.js +19 -0
  3. package/dist/dispatcher/pty-relay.service.js.map +1 -1
  4. package/package.json +4 -4
  5. package/public/assets/{AccessTokensPage-DcOzH6vQ.js → AccessTokensPage-C1KxsuHq.js} +1 -1
  6. package/public/assets/AdminPage-DbFm0hOL.js +1 -0
  7. package/public/assets/{ApiReferencePage-Cn1nZmYJ.js → ApiReferencePage-C2sQuzcP.js} +1 -1
  8. package/public/assets/ArchitecturePage-C7el9GsX.js +47 -0
  9. package/public/assets/{AuditLogPage-CkE1EJZh.js → AuditLogPage-CX9OBQtG.js} +2 -2
  10. package/public/assets/{BindPlatformPage-DYNztOnJ.js → BindPlatformPage-BW2M2vKF.js} +1 -1
  11. package/public/assets/BotIntegrationPage-Bsj1xlUm.js +1 -0
  12. package/public/assets/BotManage-CfH6RaDx.js +6 -0
  13. package/public/assets/BotSetupPage-B9qbCa_P.js +33 -0
  14. package/public/assets/ChangelogPage-CaIv9C_t.js +1 -0
  15. package/public/assets/{CliReferencePage-DyfbBqGH.js → CliReferencePage-FGtSB-WE.js} +1 -1
  16. package/public/assets/DeploymentPage-BAudG2Tr.js +34 -0
  17. package/public/assets/DevWorkflowPage-Cg3pznxy.js +6 -0
  18. package/public/assets/{DeveloperManage-DgwZWjLh.js → DeveloperManage-7_kw4pfm.js} +2 -2
  19. package/public/assets/DeveloperSetupPage-23Davo01.js +4 -0
  20. package/public/assets/DocsLayout-D3VKB5zJ.js +41 -0
  21. package/public/assets/DocsPrimitives-BiDMVOFl.js +1 -0
  22. package/public/assets/{EditProjectPage-DjGCEool.js → EditProjectPage-C6YcYdiz.js} +1 -1
  23. package/public/assets/{EmptyState-C7-kuf8X.js → EmptyState-C3yiKdL6.js} +1 -1
  24. package/public/assets/EnvVariablesPage-lxLwDyYf.js +1 -0
  25. package/public/assets/{HomePage-CWYmPB1e.js → HomePage-CMqtLPFH.js} +1 -1
  26. package/public/assets/InfoRow-BzF-Ghcu.js +1 -0
  27. package/public/assets/InstallationPage-CelO432V.js +7 -0
  28. package/public/assets/{LandingPage-ZuEWmIZL.js → LandingPage-W9ko7DVU.js} +8 -13
  29. package/public/assets/LocalDevelopmentPage-Rs-RJn5-.js +11 -0
  30. package/public/assets/{LoginPage-ZN3nJzEX.js → LoginPage-Bp96JFVD.js} +1 -1
  31. package/public/assets/{MetricBar-CH5ccxZr.js → MetricBar-BQkmuXAL.js} +1 -1
  32. package/public/assets/{NotFoundPage-DkoNgmQ4.js → NotFoundPage-ZvsZseSi.js} +1 -1
  33. package/public/assets/{OnboardingGuide-dk4OyOgV.js → OnboardingGuide-CDNvxE9_.js} +1 -1
  34. package/public/assets/PermissionsPage-CawIrPGc.js +1 -0
  35. package/public/assets/PipelineConfigPage-B_wutEEq.js +28 -0
  36. package/public/assets/{PipelineEditorPage-CtUnQDef.js → PipelineEditorPage-BSxxF72g.js} +1 -1
  37. package/public/assets/{ProfilePage-B0CWDm55.js → ProfilePage-C-nmN-By.js} +1 -1
  38. package/public/assets/{ProjectDetailPage-BbOgUrnR.js → ProjectDetailPage-LPHSSu7P.js} +3 -3
  39. package/public/assets/{ProjectListPage-CtGknAYM.js → ProjectListPage-C31_Ay4t.js} +1 -1
  40. package/public/assets/{PtyTerminal-C28RQ62I.js → PtyTerminal-CTqEV7Nd.js} +12 -7
  41. package/public/assets/{QuickAuth-8eT76fKz.js → QuickAuth-CFK1UL14.js} +1 -1
  42. package/public/assets/{RemoveMemberConfirmDialog-Ctyx8n2a.js → RemoveMemberConfirmDialog-C1y2iS_9.js} +1 -1
  43. package/public/assets/{Select-8MUED_Fj.js → Select-BmSEj4-2.js} +1 -1
  44. package/public/assets/{SettingsPage-CXDXq71S.js → SettingsPage-DggZSPQB.js} +1 -1
  45. package/public/assets/{Skeleton-B0x9oN6a.js → Skeleton-B2I8dIUF.js} +1 -1
  46. package/public/assets/SkillPage-CBTxscku.js +1 -0
  47. package/public/assets/TaskDetailPage-B9zrQxVz.js +21 -0
  48. package/public/assets/{TaskListPage-DMYTWhw_.js → TaskListPage-CLMgzykc.js} +1 -1
  49. package/public/assets/{TaskStatusBadge-yU5DIpkP.js → TaskStatusBadge-D7YtciSI.js} +1 -1
  50. package/public/assets/TerminalHomePage-DS9egsne.js +11 -0
  51. package/public/assets/{TokenManage-NYgoI8yJ.js → TokenManage-XhEZLm3U.js} +1 -1
  52. package/public/assets/{TotpSetupPage-lw418pBO.js → TotpSetupPage-BwXOuC8h.js} +1 -1
  53. package/public/assets/{WorkerDetailPage-CF7FWzQn.js → WorkerDetailPage-BidnHWSI.js} +1 -1
  54. package/public/assets/WorkerListPage-D9Sx2Qj1.js +1 -0
  55. package/public/assets/WorkerOperationsPage-BVqOPKPL.js +1 -0
  56. package/public/assets/{WorkerSetupGuidePage-dRLxcC1D.js → WorkerSetupGuidePage-CisdSN3i.js} +2 -7
  57. package/public/assets/WorkerSetupPage-D1EfdiQR.js +5 -0
  58. package/public/assets/{arrow-left-D3hlGpFa.js → arrow-left-BhUPkdy5.js} +1 -1
  59. package/public/assets/{arrow-right-DbRiIkn5.js → arrow-right-b1VhePsW.js} +1 -1
  60. package/public/assets/{bot-DJcm4TDu.js → bot-3wzbq300.js} +1 -1
  61. package/public/assets/{chevron-right-Cz1_0u26.js → chevron-right-u3Q_FU8D.js} +1 -1
  62. package/public/assets/{copy-BSpogfAn.js → copy-B1jQ4pbs.js} +1 -1
  63. package/public/assets/download-DJCYeset.js +6 -0
  64. package/public/assets/{external-link-BYnHDfTq.js → external-link-BlAvfzj2.js} +1 -1
  65. package/public/assets/index-BLXQrTv9.js +225 -0
  66. package/public/assets/index-CVFlBK8x.css +1 -0
  67. package/public/assets/{key-B7y18xnM.js → key-elqvuBzT.js} +1 -1
  68. package/public/assets/{loader-circle-j2WCDelv.js → loader-circle-BRMYxZfv.js} +1 -1
  69. package/public/assets/message-square-CZau8J5h.js +6 -0
  70. package/public/assets/{pencil-CkuHyqYU.js → pencil-BzyGpI8s.js} +1 -1
  71. package/public/assets/{plus-DETa4kg0.js → plus-NWcYLEIq.js} +1 -1
  72. package/public/assets/{rotate-ccw-oPqSTHU8.js → rotate-ccw-CPStvDV2.js} +1 -1
  73. package/public/assets/{scroll-text--ZQgIRbt.js → scroll-text-FNU4RbjS.js} +1 -1
  74. package/public/assets/{settings-COdENdI-.js → settings-Vg0cVhzJ.js} +1 -1
  75. package/public/assets/{status-colors-C_xltR1x.js → status-colors-CNClmRSt.js} +1 -1
  76. package/public/assets/{task-constants-BisV3uAk.js → task-constants-OK8-vXXs.js} +1 -1
  77. package/public/assets/{trash-2-BLxwKGg4.js → trash-2-YP06bYAN.js} +1 -1
  78. package/public/assets/{useFetch-CKA2R0HW.js → useFetch-WwlQwbqf.js} +1 -1
  79. package/public/assets/{users-Cm06VaAm.js → users-CFJarfcd.js} +1 -1
  80. package/public/assets/{wifi-CoOrgHWP.js → wifi-D7sIQnh6.js} +1 -1
  81. package/public/assets/workflow-Bz54V-O_.js +11 -0
  82. package/public/index.html +2 -2
  83. package/public/sw.js +1 -1
  84. package/public/assets/AdminPage-DjzkTi-Z.js +0 -1
  85. package/public/assets/BotManage-B4YAKqEk.js +0 -6
  86. package/public/assets/InfoRow-DGZv5P3m.js +0 -1
  87. package/public/assets/SkillPage-CeTlmMdA.js +0 -1
  88. package/public/assets/TaskDetailPage-jyeOPtsb.js +0 -31
  89. package/public/assets/TerminalHomePage-D3Z-uJUx.js +0 -16
  90. package/public/assets/WorkerListPage-Dd6P84ye.js +0 -6
  91. package/public/assets/index-C5ry7bCb.js +0 -225
  92. package/public/assets/index-DBZN6iTO.css +0 -1
  93. package/public/assets/zap-CZBm69SW.js +0 -6
@@ -1 +1 @@
1
- {"version":3,"file":"pty-relay.service.d.ts","sourceRoot":"","sources":["../../src/dispatcher/pty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B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,OAAO;IAgCV;;;OAGG;IACH,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI;IA6BhE;;;OAGG;IACH,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAsB9C"}
@@ -97,6 +97,8 @@ let PtyRelayService = PtyRelayService_1 = class PtyRelayService {
97
97
  outputFilter: null,
98
98
  taskOwnerId,
99
99
  projectFilterEnabled,
100
+ replayBuffer: [],
101
+ replayBufferSize: 0,
100
102
  });
101
103
  this.logger.log(`Registered worker PTY channel for task ${taskId}`);
102
104
  }
@@ -134,6 +136,15 @@ let PtyRelayService = PtyRelayService_1 = class PtyRelayService {
134
136
  channel.writerConnectionId = connectionId;
135
137
  this.logger.log(`Web client ${connectionId} is writer for task ${taskId}`);
136
138
  }
139
+ // Replay buffered output to new web client
140
+ if (channel.replayBuffer.length > 0) {
141
+ for (const data of channel.replayBuffer) {
142
+ const replayFrame = { type: 'data', data };
143
+ if (ws.readyState === ws_1.WebSocket.OPEN) {
144
+ ws.send(JSON.stringify(replayFrame));
145
+ }
146
+ }
147
+ }
137
148
  this.logger.log(`Web client ${connectionId} registered for PTY task ${taskId} (${channel.webWsSet.size} clients)`);
138
149
  }
139
150
  /**
@@ -156,6 +167,14 @@ let PtyRelayService = PtyRelayService_1 = class PtyRelayService {
156
167
  this.logger.error(`PtyOutputFilter.filter() threw for task ${taskId}; falling back to unfiltered data`, err instanceof Error ? err.stack : String(err));
157
168
  }
158
169
  }
170
+ // Store in replay buffer (keep last ~64KB of raw output)
171
+ const MAX_REPLAY_BYTES = 65536;
172
+ channel.replayBuffer.push(filteredData);
173
+ channel.replayBufferSize += filteredData.length;
174
+ while (channel.replayBufferSize > MAX_REPLAY_BYTES && channel.replayBuffer.length > 1) {
175
+ const removed = channel.replayBuffer.shift();
176
+ channel.replayBufferSize -= removed.length;
177
+ }
159
178
  const frame = { type: 'data', data: filteredData };
160
179
  const serialized = JSON.stringify(frame);
161
180
  // Backpressure: buffer management
@@ -1 +1 @@
1
- {"version":3,"file":"pty-relay.service.js","sourceRoot":"","sources":["../../src/dispatcher/pty-relay.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAoD;AACpD,2BAA+B;AAC/B,mDAI8B;AAC9B,iEAAsD;AAUtD,kFAAkF;AAClF,MAAM,eAAe,GAAG,IAAI,CAAC;AAE7B,gFAAgF;AAChF,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAIjC;;;;GAIG;AACH,MAAM,eAAe;IAKA;IACA;IACA;IACA;IAPX,YAAY,GAAG,EAAE,CAAC;IACT,OAAO,CAAU;IAElC,YACmB,oBAA6B,EAC7B,WAAmB,EACnB,IAAY,EACZ,WAAmB;QAHnB,yBAAoB,GAApB,oBAAoB,CAAS;QAC7B,gBAAW,GAAX,WAAW,CAAQ;QACnB,SAAI,GAAJ,IAAI,CAAQ;QACZ,gBAAW,GAAX,WAAW,CAAQ;QAEpC,wBAAwB;QACxB,4CAA4C;QAC5C,gEAAgE;QAChE,IAAI,CAAC,OAAO;YACV,oBAAoB;gBACpB,CAAC,IAAI,KAAK,wBAAa,CAAC,KAAK,IAAI,WAAW,KAAK,WAAW,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,IAAY;QACjB,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAE/B,iEAAiE;QACjE,wDAAwD;QACxD,MAAM,MAAM,GAAG,eAAe,CAAC;QAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,GAAG,MAAM,GAAG,IAAI,CAAC;QAEnD,sDAAsD;QACtD,MAAM,QAAQ,GAAG,IAAA,2BAAQ,EAAC,QAAQ,CAAC,CAAC;QAEpC,4DAA4D;QAC5D,IAAI,IAAI,CAAC,MAAM,GAAG,oBAAoB,EAAE,CAAC;YACvC,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AC,OAAO,EAAE,CAAC;YACb,OAAO;QACT,CAAC;QAED,mCAAmC;QACnC,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;YAChD,IAAI,MAAM,CAAC,EAAE,CAAC,UAAU,KAAK,cAAS,CAAC,IAAI,EAAE,CAAC;gBAC5C,IAAI,CAAC;oBACH,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,2BAA2B,CAAC,CAAC;gBACrD,CAAC;gBAAC,MAAM,CAAC;oBACP,cAAc;gBAChB,CAAC;YACH,CAAC;QACH,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7B,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,+BAA+B,MAAM,6CAA6C,CACnF,CAAC;IACJ,CAAC;CACF,CAAA;AArcY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;GACA,eAAe,CAqc3B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@overlordai/server",
3
- "version": "1.0.68",
3
+ "version": "1.0.70",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "dist",
@@ -28,9 +28,9 @@
28
28
  "@nestjs/platform-express": "^10.4.0",
29
29
  "@nestjs/platform-ws": "^10.4.0",
30
30
  "@nestjs/websockets": "^10.4.0",
31
- "@overlordai/command-parser": "1.0.68",
32
- "@overlordai/protocol": "1.0.68",
33
- "@overlordai/validation": "1.0.68",
31
+ "@overlordai/command-parser": "1.0.70",
32
+ "@overlordai/protocol": "1.0.70",
33
+ "@overlordai/validation": "1.0.70",
34
34
  "@slack/web-api": "^7.15.0",
35
35
  "bcrypt": "^6.0.0",
36
36
  "better-sqlite3": "^11.0.0",
@@ -1 +1 @@
1
- import{a as _,r as c,j as e,g as k,s as C,n as T,w as S,K as A,B as f,t as g}from"./index-C5ry7bCb.js";import{S as D}from"./Select-8MUED_Fj.js";import{E}from"./EmptyState-C7-kuf8X.js";import{T as L}from"./Skeleton-B0x9oN6a.js";import{t as N}from"./date-BdNtiQTP.js";import{u as I}from"./useFetch-CKA2R0HW.js";import{P as R}from"./plus-DETa4kg0.js";import{C as O}from"./copy-BSpogfAn.js";import{T as w}from"./trash-2-BLxwKGg4.js";function P({isOpen:s,onClose:u,onCreated:i}){const{t:a}=_(),[d,o]=c.useState(""),[x,n]=c.useState("never"),[m,p]=c.useState(!1),[v,l]=c.useState(""),j=[{value:"never",label:a("access_tokens.no_expiry")},{value:"30",label:a("access_tokens.days_30")},{value:"90",label:a("access_tokens.days_90")},{value:"365",label:a("access_tokens.days_365")}];function b(){o(""),n("never"),l(""),u()}async function h(){if(l(""),!d.trim()){l(a("access_tokens.token_label_required"));return}try{p(!0);const r=await k.post("web/profile/tokens",{json:{label:d.trim(),...x!=="never"&&{expiresAt:new Date(Date.now()+parseInt(x,10)*864e5).toISOString()}}}).json();o(""),n("never"),i({token:r.token,name:r.name})}catch(r){const y=r instanceof Error?r.message:a("access_tokens.failed_to_create_token");l(y)}finally{p(!1)}}return s?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-40 bg-[var(--modal-backdrop)]",onClick:b}),e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-lg",onClick:r=>r.stopPropagation(),children:[e.jsxs("div",{className:"border-b border-[var(--border)] px-5 py-4",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text-primary)]",children:a("access_tokens.create_personal_access_token")}),e.jsx("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:a("access_tokens.tokens_authenticate_desc")})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[v&&e.jsx("div",{className:"rounded-[4px] border border-[var(--destructive)]/30 bg-[var(--destructive)]/5 px-3 py-2 text-xs text-[var(--destructive)]",children:v}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:a("access_tokens.token_name")}),e.jsx("input",{type:"text",placeholder:a("access_tokens.token_name_placeholder"),value:d,onChange:r=>o(r.target.value),onKeyDown:r=>{r.key==="Enter"&&h()},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",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:a("access_tokens.expires")}),e.jsx(D,{value:x,onChange:n,options:j})]})]}),e.jsxs("div",{className:"flex justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{onClick:b,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:a("common.cancel")}),e.jsx("button",{onClick:h,disabled:m,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:a(m?"common.creating":"access_tokens.create_token")})]})]})})]}):null}function V({isOpen:s,onClose:u,onConfirm:i,tokenLabel:a,isLoading:d}){const{t:o}=_();return e.jsx(C,{isOpen:s,onClose:u,onConfirm:i,title:o("access_tokens.revoke_token_title"),message:o("access_tokens.revoke_confirm",{name:a}),confirmLabel:o("access_tokens.revoke"),confirmVariant:"danger",isLoading:d})}function G(){const{t:s}=_(),[u,i]=c.useState(!1),[a,d]=c.useState(null),[o,x]=c.useState(!1),[n,m]=c.useState(null),[p,v]=c.useState(null),{data:l,loading:j,refetch:b}=I(()=>k.get("web/profile/tokens").json(),[]);T(c.useMemo(()=>e.jsxs("button",{onClick:()=>i(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black transition-opacity hover:opacity-90",children:[e.jsx(R,{className:"h-3.5 w-3.5"}),s("access_tokens.create_token")]}),[s]));function h(t){i(!1),d(t.token),x(!1),b()}async function r(){if(a)try{await navigator.clipboard.writeText(a),x(!0),setTimeout(()=>x(!1),2e3)}catch{}}async function y(){if(n)try{v(n.id),await k.post(`web/profile/tokens/${n.id}/revoke`),g.success(s("access_tokens.token_revoked")),m(null),b()}catch{g.error(s("access_tokens.failed_to_revoke_token"))}finally{v(null)}}return e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[a&&e.jsxs("div",{className:"mb-6 rounded-[4px] border border-[var(--warning)] bg-[var(--bg-card)] px-4 py-3",children:[e.jsx("p",{className:"mb-2 text-xs font-medium text-[var(--warning)]",children:s("access_tokens.copy_token_warning")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"flex-1 break-all rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 text-xs text-[var(--text-primary)]",children:a}),e.jsxs("button",{onClick:r,className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:[o?e.jsx(S,{className:"h-3.5 w-3.5 text-[var(--accent)]"}):e.jsx(O,{className:"h-3.5 w-3.5"}),s(o?"common.copied":"common.copy")]})]}),e.jsx("div",{className:"mt-2 flex justify-end",children:e.jsx("button",{onClick:()=>d(null),className:"text-xs text-[var(--text-muted)] hover:text-[var(--text-secondary)]",children:s("common.dismiss")})})]}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:j?e.jsx("div",{className:"p-4",children:e.jsx(L,{rows:3})}):!l||l.length===0?e.jsx(E,{icon:A,title:s("access_tokens.no_tokens"),description:s("access_tokens.create_token_desc"),actionLabel:s("access_tokens.create_token"),onAction:()=>i(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"md:hidden divide-y divide-[var(--border)]",children:l.map(t=>e.jsxs("div",{className:"px-4 py-3 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-xs text-[var(--text-primary)] font-medium",children:t.label}),e.jsx("span",{className:`text-xs shrink-0 ml-2 ${t.status===f.ACTIVE?"text-green-400":"text-[var(--text-muted)]"}`,children:t.status})]}),e.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-[var(--text-secondary)]",children:[e.jsxs("span",{children:[s("access_tokens.created"),": ",new Date(t.createdAt).toLocaleDateString()]}),e.jsxs("span",{children:[s("access_tokens.expires"),": ",t.expiresAt?new Date(t.expiresAt).toLocaleDateString():s("common.never")]}),e.jsxs("span",{children:[s("access_tokens.last_used"),": ",t.lastUsedAt?N(t.lastUsedAt):s("common.never")]})]}),t.status===f.ACTIVE&&e.jsx("div",{className:"flex justify-end",children:e.jsxs("button",{onClick:()=>m(t),disabled:p===t.id,className:"inline-flex items-center gap-1 text-xs text-[var(--destructive)] hover:underline disabled:opacity-50",children:[e.jsx(w,{className:"h-3 w-3"}),s("access_tokens.revoke")]})})]},t.id))}),e.jsxs("table",{className:"hidden md:table 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:"px-4 py-2.5 font-normal",children:s("common.name")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:s("common.status")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:s("access_tokens.created")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:s("access_tokens.last_used")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:s("access_tokens.expires")}),e.jsx("th",{className:"px-4 py-2.5 font-normal text-right",children:s("common.actions")})]})}),e.jsx("tbody",{children:l.map(t=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] last:border-b-0 hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"px-4 py-3 text-[var(--text-primary)]",children:e.jsx("span",{className:"truncate block max-w-[200px]",children:t.label})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:t.status===f.ACTIVE?"text-green-400":"text-[var(--text-muted)]",children:t.status})}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-secondary)]",children:new Date(t.createdAt).toLocaleDateString()}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-secondary)]",children:t.lastUsedAt?N(t.lastUsedAt):s("common.never")}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-secondary)]",children:t.expiresAt?new Date(t.expiresAt).toLocaleDateString():s("common.never")}),e.jsx("td",{className:"px-4 py-3 text-right",children:t.status===f.ACTIVE&&e.jsxs("button",{onClick:()=>m(t),disabled:p===t.id,className:"inline-flex items-center gap-1 text-xs text-[var(--destructive)] hover:underline disabled:opacity-50",children:[e.jsx(w,{className:"h-3 w-3"}),s("access_tokens.revoke")]})})]},t.id))})]})]})}),e.jsx(P,{isOpen:u,onClose:()=>i(!1),onCreated:h}),e.jsx(V,{isOpen:!!n,onClose:()=>m(null),onConfirm:y,tokenLabel:(n==null?void 0:n.label)??"",isLoading:p!==null})]})}export{G as default};
1
+ import{a as _,r as c,j as e,g as k,s as C,n as T,w as S,K as A,F as f,t as g}from"./index-BLXQrTv9.js";import{S as D}from"./Select-BmSEj4-2.js";import{E}from"./EmptyState-C3yiKdL6.js";import{T as L}from"./Skeleton-B2I8dIUF.js";import{t as N}from"./date-BdNtiQTP.js";import{u as I}from"./useFetch-WwlQwbqf.js";import{P as R}from"./plus-NWcYLEIq.js";import{C as O}from"./copy-B1jQ4pbs.js";import{T as w}from"./trash-2-YP06bYAN.js";function P({isOpen:s,onClose:u,onCreated:i}){const{t:a}=_(),[d,o]=c.useState(""),[x,n]=c.useState("never"),[m,p]=c.useState(!1),[v,l]=c.useState(""),j=[{value:"never",label:a("access_tokens.no_expiry")},{value:"30",label:a("access_tokens.days_30")},{value:"90",label:a("access_tokens.days_90")},{value:"365",label:a("access_tokens.days_365")}];function b(){o(""),n("never"),l(""),u()}async function h(){if(l(""),!d.trim()){l(a("access_tokens.token_label_required"));return}try{p(!0);const r=await k.post("web/profile/tokens",{json:{label:d.trim(),...x!=="never"&&{expiresAt:new Date(Date.now()+parseInt(x,10)*864e5).toISOString()}}}).json();o(""),n("never"),i({token:r.token,name:r.name})}catch(r){const y=r instanceof Error?r.message:a("access_tokens.failed_to_create_token");l(y)}finally{p(!1)}}return s?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-40 bg-[var(--modal-backdrop)]",onClick:b}),e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-lg",onClick:r=>r.stopPropagation(),children:[e.jsxs("div",{className:"border-b border-[var(--border)] px-5 py-4",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text-primary)]",children:a("access_tokens.create_personal_access_token")}),e.jsx("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:a("access_tokens.tokens_authenticate_desc")})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[v&&e.jsx("div",{className:"rounded-[4px] border border-[var(--destructive)]/30 bg-[var(--destructive)]/5 px-3 py-2 text-xs text-[var(--destructive)]",children:v}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:a("access_tokens.token_name")}),e.jsx("input",{type:"text",placeholder:a("access_tokens.token_name_placeholder"),value:d,onChange:r=>o(r.target.value),onKeyDown:r=>{r.key==="Enter"&&h()},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",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:a("access_tokens.expires")}),e.jsx(D,{value:x,onChange:n,options:j})]})]}),e.jsxs("div",{className:"flex justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{onClick:b,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:a("common.cancel")}),e.jsx("button",{onClick:h,disabled:m,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:a(m?"common.creating":"access_tokens.create_token")})]})]})})]}):null}function V({isOpen:s,onClose:u,onConfirm:i,tokenLabel:a,isLoading:d}){const{t:o}=_();return e.jsx(C,{isOpen:s,onClose:u,onConfirm:i,title:o("access_tokens.revoke_token_title"),message:o("access_tokens.revoke_confirm",{name:a}),confirmLabel:o("access_tokens.revoke"),confirmVariant:"danger",isLoading:d})}function G(){const{t:s}=_(),[u,i]=c.useState(!1),[a,d]=c.useState(null),[o,x]=c.useState(!1),[n,m]=c.useState(null),[p,v]=c.useState(null),{data:l,loading:j,refetch:b}=I(()=>k.get("web/profile/tokens").json(),[]);T(c.useMemo(()=>e.jsxs("button",{onClick:()=>i(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black transition-opacity hover:opacity-90",children:[e.jsx(R,{className:"h-3.5 w-3.5"}),s("access_tokens.create_token")]}),[s]));function h(t){i(!1),d(t.token),x(!1),b()}async function r(){if(a)try{await navigator.clipboard.writeText(a),x(!0),setTimeout(()=>x(!1),2e3)}catch{}}async function y(){if(n)try{v(n.id),await k.post(`web/profile/tokens/${n.id}/revoke`),g.success(s("access_tokens.token_revoked")),m(null),b()}catch{g.error(s("access_tokens.failed_to_revoke_token"))}finally{v(null)}}return e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[a&&e.jsxs("div",{className:"mb-6 rounded-[4px] border border-[var(--warning)] bg-[var(--bg-card)] px-4 py-3",children:[e.jsx("p",{className:"mb-2 text-xs font-medium text-[var(--warning)]",children:s("access_tokens.copy_token_warning")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"flex-1 break-all rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 text-xs text-[var(--text-primary)]",children:a}),e.jsxs("button",{onClick:r,className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:[o?e.jsx(S,{className:"h-3.5 w-3.5 text-[var(--accent)]"}):e.jsx(O,{className:"h-3.5 w-3.5"}),s(o?"common.copied":"common.copy")]})]}),e.jsx("div",{className:"mt-2 flex justify-end",children:e.jsx("button",{onClick:()=>d(null),className:"text-xs text-[var(--text-muted)] hover:text-[var(--text-secondary)]",children:s("common.dismiss")})})]}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:j?e.jsx("div",{className:"p-4",children:e.jsx(L,{rows:3})}):!l||l.length===0?e.jsx(E,{icon:A,title:s("access_tokens.no_tokens"),description:s("access_tokens.create_token_desc"),actionLabel:s("access_tokens.create_token"),onAction:()=>i(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"md:hidden divide-y divide-[var(--border)]",children:l.map(t=>e.jsxs("div",{className:"px-4 py-3 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-xs text-[var(--text-primary)] font-medium",children:t.label}),e.jsx("span",{className:`text-xs shrink-0 ml-2 ${t.status===f.ACTIVE?"text-green-400":"text-[var(--text-muted)]"}`,children:t.status})]}),e.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-[var(--text-secondary)]",children:[e.jsxs("span",{children:[s("access_tokens.created"),": ",new Date(t.createdAt).toLocaleDateString()]}),e.jsxs("span",{children:[s("access_tokens.expires"),": ",t.expiresAt?new Date(t.expiresAt).toLocaleDateString():s("common.never")]}),e.jsxs("span",{children:[s("access_tokens.last_used"),": ",t.lastUsedAt?N(t.lastUsedAt):s("common.never")]})]}),t.status===f.ACTIVE&&e.jsx("div",{className:"flex justify-end",children:e.jsxs("button",{onClick:()=>m(t),disabled:p===t.id,className:"inline-flex items-center gap-1 text-xs text-[var(--destructive)] hover:underline disabled:opacity-50",children:[e.jsx(w,{className:"h-3 w-3"}),s("access_tokens.revoke")]})})]},t.id))}),e.jsxs("table",{className:"hidden md:table 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:"px-4 py-2.5 font-normal",children:s("common.name")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:s("common.status")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:s("access_tokens.created")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:s("access_tokens.last_used")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:s("access_tokens.expires")}),e.jsx("th",{className:"px-4 py-2.5 font-normal text-right",children:s("common.actions")})]})}),e.jsx("tbody",{children:l.map(t=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] last:border-b-0 hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"px-4 py-3 text-[var(--text-primary)]",children:e.jsx("span",{className:"truncate block max-w-[200px]",children:t.label})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:t.status===f.ACTIVE?"text-green-400":"text-[var(--text-muted)]",children:t.status})}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-secondary)]",children:new Date(t.createdAt).toLocaleDateString()}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-secondary)]",children:t.lastUsedAt?N(t.lastUsedAt):s("common.never")}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-secondary)]",children:t.expiresAt?new Date(t.expiresAt).toLocaleDateString():s("common.never")}),e.jsx("td",{className:"px-4 py-3 text-right",children:t.status===f.ACTIVE&&e.jsxs("button",{onClick:()=>m(t),disabled:p===t.id,className:"inline-flex items-center gap-1 text-xs text-[var(--destructive)] hover:underline disabled:opacity-50",children:[e.jsx(w,{className:"h-3 w-3"}),s("access_tokens.revoke")]})})]},t.id))})]})]})}),e.jsx(P,{isOpen:u,onClose:()=>i(!1),onCreated:h}),e.jsx(V,{isOpen:!!n,onClose:()=>m(null),onConfirm:y,tokenLabel:(n==null?void 0:n.label)??"",isLoading:p!==null})]})}export{G as default};
@@ -0,0 +1 @@
1
+ import{a as i,K as d,j as t,I as m,O as l}from"./index-BLXQrTv9.js";import{U as c}from"./users-CFJarfcd.js";import{B as b}from"./bot-3wzbq300.js";import{S as p}from"./scroll-text-FNU4RbjS.js";import{S as x}from"./settings-Vg0cVhzJ.js";function h(){const{t:a}=i(),r=[{to:"/admin/developers",label:a("admin.tab_developers"),icon:c},{to:"/admin/bots",label:a("admin.tab_bots"),icon:b},{to:"/admin/tokens",label:a("admin.tab_tokens"),icon:d},{to:"/admin/audit-logs",label:a("admin.tab_audit_logs"),icon:p},{to:"/admin/settings",label:a("admin.tab_settings"),icon:x}];return t.jsxs("div",{children:[t.jsx("div",{className:"mb-6 flex flex-nowrap gap-2 overflow-x-auto border-b border-[var(--border)] no-scrollbar pr-4 md:pr-0",children:r.map(({to:e,label:o,icon:s})=>t.jsxs(m,{to:e,className:({isActive:n})=>`flex shrink-0 whitespace-nowrap items-center gap-2 border-b-2 px-4 py-3 md:py-2 text-sm transition-colors ${n?"border-[var(--accent)] text-[var(--accent)]":"border-transparent text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:[t.jsx(s,{size:16}),o]},e))}),t.jsx(l,{})]})}export{h as default};
@@ -1 +1 @@
1
- import{e as d,a as o,n as p,r as n,j as t}from"./index-C5ry7bCb.js";import{Q as c}from"./QuickAuth-8eT76fKz.js";import{P as h}from"./plus-DETa4kg0.js";import"./copy-BSpogfAn.js";const l={GET:"text-green-400",POST:"text-blue-400",PUT:"text-yellow-400",DELETE:"text-red-400"},m=[{title:"authentication",prefix:"/api/auth",endpoints:[{method:"POST",path:"/login",description:"authenticate with username + password (optional totpCode)",auth:"none",body:'{ "username": "string", "password": "string", "totpCode?": "string" }',response:'{ "accessToken": "string", "refreshToken": "string" }'},{method:"POST",path:"/refresh",description:"refresh access token (rotates refresh token)",auth:"none",body:'{ "refreshToken": "string" }',response:'{ "accessToken": "string", "refreshToken": "string" }'},{method:"POST",path:"/logout",description:"invalidate refresh token",auth:"jwt",body:'{ "refreshToken": "string" }'}]},{title:"tasks",prefix:"/api/web/tasks",endpoints:[{method:"GET",path:"",description:"list tasks with optional filters",auth:"jwt",response:'[ { "id": 1, "description": "...", "status": "RUNNING", ... } ]'},{method:"POST",path:"",description:"create a new task",auth:"jwt",body:'{ "projectKey": "string", "description": "string", "workerId?": "string" }'},{method:"GET",path:"/:id",description:"get task details",auth:"jwt"},{method:"POST",path:"/:id/cancel",description:"cancel a running task",auth:"jwt"},{method:"POST",path:"/:id/retry",description:"retry a failed task",auth:"jwt"},{method:"POST",path:"/:id/confirm-stage",description:"confirm/choose/input for suspended stage",auth:"jwt",body:'{ "stageIndex": "number", "result": "string" }'},{method:"POST",path:"/:id/pty-token",description:"get pty websocket token",auth:"jwt"}]},{title:"workers",prefix:"/api/web/workers",endpoints:[{method:"GET",path:"",description:"list all workers",auth:"jwt"},{method:"GET",path:"/:id",description:"get worker details",auth:"jwt"},{method:"GET",path:"/:id/tasks",description:"list tasks assigned to a worker",auth:"jwt"},{method:"POST",path:"/:id/drain",description:"start draining a worker",auth:"jwt"},{method:"POST",path:"/:id/undrain",description:"cancel worker drain",auth:"jwt"}]},{title:"projects",prefix:"/api/web/projects",endpoints:[{method:"GET",path:"",description:"list all projects",auth:"jwt"},{method:"GET",path:"/:key",description:"get project details",auth:"jwt"}]},{title:"profile",prefix:"/api/web/profile",endpoints:[{method:"GET",path:"",description:"get current user profile",auth:"jwt"},{method:"PUT",path:"",description:"update profile (gitName, gitEmail)",auth:"jwt",body:'{ "gitName?": "string", "gitEmail?": "string" }'},{method:"PUT",path:"/password",description:"change password",auth:"jwt",body:'{ "currentPassword": "string", "newPassword": "string" }'},{method:"POST",path:"/totp/setup",description:"initialize totp setup",auth:"jwt"},{method:"POST",path:"/totp/verify",description:"verify totp setup code",auth:"jwt",body:'{ "code": "string" }'},{method:"GET",path:"/tokens",description:"list personal access tokens",auth:"jwt"},{method:"POST",path:"/tokens",description:"create a personal access token",auth:"jwt",body:'{ "label": "string", "expiresAt?": "string" }'},{method:"POST",path:"/tokens/:id/revoke",description:"revoke a token",auth:"jwt"},{method:"POST",path:"/bind-platform",description:"link a chat platform account using a one-time bind token",auth:"jwt",body:'{ "token": "string" }',response:'{ "success": true, "platform": "lark" }'}]},{title:"workspaces & tunnels",prefix:"/api/web",endpoints:[{method:"GET",path:"/workspaces/:taskId",description:"get workspace for a task",auth:"jwt"},{method:"POST",path:"/workspace-tunnel/:taskId/start",description:"start a cursor remote tunnel",auth:"jwt"},{method:"POST",path:"/workspace-tunnel/:taskId/stop",description:"stop a running tunnel",auth:"jwt"},{method:"GET",path:"/workspace-tunnel/:taskId/status",description:"get tunnel status",auth:"jwt"}]},{title:"dashboard",prefix:"/api/web/dashboard",endpoints:[{method:"GET",path:"/stats",description:"get dashboard statistics",auth:"jwt"},{method:"GET",path:"/recent-tasks",description:"get recent tasks for dashboard",auth:"jwt"},{method:"GET",path:"/recent-activity",description:"get recent activity feed",auth:"jwt"}]},{title:"notifications",prefix:"/api/web/notifications",endpoints:[{method:"GET",path:"",description:"list notifications with cursor pagination",auth:"jwt"},{method:"POST",path:"/:id/read",description:"mark a notification as read",auth:"jwt"},{method:"POST",path:"/read-all",description:"mark all notifications as read",auth:"jwt"}]},{title:"search",prefix:"/api/web",endpoints:[{method:"GET",path:"/search?q=query",description:"global search across tasks, workers, projects",auth:"jwt"}]},{title:"admin — developers",prefix:"/api/admin/developers",endpoints:[{method:"GET",path:"",description:"list all developers",auth:"jwt"},{method:"POST",path:"",description:"create a developer",auth:"jwt",body:'{ "name": "string", "password": "string", "role": "string", "gitName": "string", "gitEmail": "string" }'},{method:"PUT",path:"/:id",description:"update developer",auth:"jwt"},{method:"PUT",path:"/:id/reset-totp",description:"reset developer totp",auth:"jwt"}]},{title:"admin — projects",prefix:"/api/admin/projects",endpoints:[{method:"GET",path:"",description:"list all projects",auth:"jwt"},{method:"POST",path:"",description:"create a project",auth:"jwt"},{method:"PUT",path:"/:key",description:"update project (including pipeline)",auth:"jwt"},{method:"DELETE",path:"/:key",description:"delete a project",auth:"jwt"},{method:"GET",path:"/:key/members",description:"get project members",auth:"jwt"},{method:"POST",path:"/:key/members",description:"add project member",auth:"jwt"},{method:"DELETE",path:"/:key/members?developerId=N",description:"remove project member",auth:"jwt"}]},{title:"admin — worker tokens",prefix:"/api/admin/worker-tokens",endpoints:[{method:"GET",path:"",description:"list all worker enrollment tokens",auth:"jwt"},{method:"POST",path:"",description:"generate a new worker token",auth:"jwt"},{method:"POST",path:"/:id/revoke",description:"revoke a worker token",auth:"jwt"},{method:"GET",path:"/:id/status",description:"get token status and linked worker",auth:"jwt"}]},{title:"admin — workers",prefix:"/api/admin/workers",endpoints:[{method:"GET",path:"",description:"list all workers (admin)",auth:"jwt"},{method:"PUT",path:"/:id",description:"update worker status",auth:"jwt",body:'{ "status?": "string" }'}]},{title:"admin — bots",prefix:"/api/admin/bots",endpoints:[{method:"GET",path:"",description:"list bot instances",auth:"jwt"},{method:"POST",path:"",description:"create a bot instance",auth:"jwt"},{method:"GET",path:"/:id/bindings",description:"get chat bindings for a bot",auth:"jwt"},{method:"POST",path:"/:id/bindings",description:"create a chat binding",auth:"jwt"},{method:"DELETE",path:"/:id/bindings",description:"delete a chat binding",auth:"jwt"}]},{title:"admin — audit & settings",prefix:"/api/admin",endpoints:[{method:"GET",path:"/audit-logs",description:"query audit log with filters",auth:"jwt"},{method:"GET",path:"/settings",description:"get all system settings",auth:"jwt"},{method:"PUT",path:"/settings",description:"update system settings",auth:"jwt"}]},{title:"websocket",prefix:"",endpoints:[{method:"GET",path:"WS /ws/pty/:taskId",description:'pty terminal websocket — first obtain a channel token via POST /api/web/tasks/:taskId/pty-token, then send an auth frame after connection: { type: "auth", token: "<jwt>", channelToken: "<channel-token>" }',auth:"jwt"},{method:"GET",path:"WS /api/workers/pty/:taskId",description:'worker pty websocket — auth via frame: { type: "auth", workerJwt: "<worker-jwt>", channelToken: "<channel-token>" }',auth:"worker-token"}]}];function x({ep:e,prefix:a}){const[s,i]=n.useState(!1),{t:r}=o();return t.jsxs("div",{className:"border-b border-[var(--border-row)] last:border-b-0",children:[t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 sm:gap-3 px-3 md:px-4 py-2.5 text-left transition-colors hover:bg-[var(--bg-input)] min-w-0",onClick:()=>i(!s),children:[t.jsx("span",{className:`w-12 shrink-0 text-xs font-bold ${l[e.method]}`,children:e.method}),t.jsxs("code",{className:"flex-1 text-xs text-[var(--text-primary)] truncate min-w-0",children:[a,e.path]}),t.jsxs("span",{className:"text-xs text-[var(--text-muted)] hidden sm:inline truncate max-w-[200px]",children:["// ",e.description]})]}),s&&t.jsxs("div",{className:"border-t border-[var(--border-row)] bg-[var(--bg-primary)] px-3 md:px-4 py-3 space-y-2",children:[t.jsxs("p",{className:"text-xs text-[var(--text-secondary)]",children:["// ",e.description]}),t.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[t.jsx("span",{className:"text-[var(--text-muted)]",children:"auth:"}),t.jsx("span",{className:e.auth==="none"?"text-[var(--text-muted)]":"text-[var(--accent)]",children:e.auth})]}),e.body&&t.jsxs("div",{children:[t.jsx("p",{className:"text-[11px] uppercase tracking-wider text-[var(--text-muted)] mb-1",children:r("docs.request_body")}),t.jsx("pre",{className:"rounded-[4px] bg-[var(--bg-card)] px-3 py-2 text-xs text-[var(--text-secondary)] overflow-x-auto",children:e.body})]}),e.response&&t.jsxs("div",{children:[t.jsx("p",{className:"text-[11px] uppercase tracking-wider text-[var(--text-muted)] mb-1",children:r("docs.response")}),t.jsx("pre",{className:"rounded-[4px] bg-[var(--bg-card)] px-3 py-2 text-xs text-[var(--text-secondary)] overflow-x-auto",children:e.response})]})]})]})}function g(){const e=d(),{t:a}=o();return p(n.useMemo(()=>t.jsxs("button",{onClick:()=>e("/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:[t.jsx(h,{className:"h-3.5 w-3.5"}),a("access_tokens.create_token")]}),[e,a])),t.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[t.jsx("div",{className:"mb-8",children:t.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("docs.api_base_url_desc",{url:"http://localhost:9000"})})}),t.jsx(c,{mode:"api"}),t.jsxs("div",{className:"mb-8 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-2",children:[t.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("docs.authentication")}),t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("code",{className:"shrink-0 text-xs text-[var(--accent)]",children:"jwt"}),t.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:["obtained via /api/auth/login — pass as ",t.jsx("code",{children:"authorization: bearer <token>"})]})]}),t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("code",{className:"shrink-0 text-xs text-[var(--accent)]",children:"pat"}),t.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:"personal access token — same header format, for cli/api usage"})]}),t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("code",{className:"shrink-0 text-xs text-yellow-400",children:"worker-token"}),t.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:"enrollment token for worker registration — used during initial handshake"})]})]}),t.jsx("div",{className:"space-y-6",children:m.map(s=>t.jsxs("div",{children:[t.jsxs("h2",{className:"mb-2 text-sm text-[var(--accent)]",children:["> ",s.title]}),t.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:s.endpoints.map((i,r)=>t.jsx(x,{ep:i,prefix:s.prefix},`${i.method}-${i.path}-${r}`))})]},s.title))})]})}export{g as default};
1
+ import{e as d,a as o,n as p,r as n,j as t}from"./index-BLXQrTv9.js";import{Q as c}from"./QuickAuth-CFK1UL14.js";import{P as h}from"./plus-NWcYLEIq.js";import"./copy-B1jQ4pbs.js";const l={GET:"text-green-400",POST:"text-blue-400",PUT:"text-yellow-400",DELETE:"text-red-400"},m=[{title:"authentication",prefix:"/api/auth",endpoints:[{method:"POST",path:"/login",description:"authenticate with username + password (optional totpCode)",auth:"none",body:'{ "username": "string", "password": "string", "totpCode?": "string" }',response:'{ "accessToken": "string", "refreshToken": "string" }'},{method:"POST",path:"/refresh",description:"refresh access token (rotates refresh token)",auth:"none",body:'{ "refreshToken": "string" }',response:'{ "accessToken": "string", "refreshToken": "string" }'},{method:"POST",path:"/logout",description:"invalidate refresh token",auth:"jwt",body:'{ "refreshToken": "string" }'}]},{title:"tasks",prefix:"/api/web/tasks",endpoints:[{method:"GET",path:"",description:"list tasks with optional filters",auth:"jwt",response:'[ { "id": 1, "description": "...", "status": "RUNNING", ... } ]'},{method:"POST",path:"",description:"create a new task",auth:"jwt",body:'{ "projectKey": "string", "description": "string", "workerId?": "string" }'},{method:"GET",path:"/:id",description:"get task details",auth:"jwt"},{method:"POST",path:"/:id/cancel",description:"cancel a running task",auth:"jwt"},{method:"POST",path:"/:id/retry",description:"retry a failed task",auth:"jwt"},{method:"POST",path:"/:id/confirm-stage",description:"confirm/choose/input for suspended stage",auth:"jwt",body:'{ "stageIndex": "number", "result": "string" }'},{method:"POST",path:"/:id/pty-token",description:"get pty websocket token",auth:"jwt"}]},{title:"workers",prefix:"/api/web/workers",endpoints:[{method:"GET",path:"",description:"list all workers",auth:"jwt"},{method:"GET",path:"/:id",description:"get worker details",auth:"jwt"},{method:"GET",path:"/:id/tasks",description:"list tasks assigned to a worker",auth:"jwt"},{method:"POST",path:"/:id/drain",description:"start draining a worker",auth:"jwt"},{method:"POST",path:"/:id/undrain",description:"cancel worker drain",auth:"jwt"}]},{title:"projects",prefix:"/api/web/projects",endpoints:[{method:"GET",path:"",description:"list all projects",auth:"jwt"},{method:"GET",path:"/:key",description:"get project details",auth:"jwt"}]},{title:"profile",prefix:"/api/web/profile",endpoints:[{method:"GET",path:"",description:"get current user profile",auth:"jwt"},{method:"PUT",path:"",description:"update profile (gitName, gitEmail)",auth:"jwt",body:'{ "gitName?": "string", "gitEmail?": "string" }'},{method:"PUT",path:"/password",description:"change password",auth:"jwt",body:'{ "currentPassword": "string", "newPassword": "string" }'},{method:"POST",path:"/totp/setup",description:"initialize totp setup",auth:"jwt"},{method:"POST",path:"/totp/verify",description:"verify totp setup code",auth:"jwt",body:'{ "code": "string" }'},{method:"GET",path:"/tokens",description:"list personal access tokens",auth:"jwt"},{method:"POST",path:"/tokens",description:"create a personal access token",auth:"jwt",body:'{ "label": "string", "expiresAt?": "string" }'},{method:"POST",path:"/tokens/:id/revoke",description:"revoke a token",auth:"jwt"},{method:"POST",path:"/bind-platform",description:"link a chat platform account using a one-time bind token",auth:"jwt",body:'{ "token": "string" }',response:'{ "success": true, "platform": "lark" }'}]},{title:"workspaces & tunnels",prefix:"/api/web",endpoints:[{method:"GET",path:"/workspaces/:taskId",description:"get workspace for a task",auth:"jwt"},{method:"POST",path:"/workspace-tunnel/:taskId/start",description:"start a cursor remote tunnel",auth:"jwt"},{method:"POST",path:"/workspace-tunnel/:taskId/stop",description:"stop a running tunnel",auth:"jwt"},{method:"GET",path:"/workspace-tunnel/:taskId/status",description:"get tunnel status",auth:"jwt"}]},{title:"dashboard",prefix:"/api/web/dashboard",endpoints:[{method:"GET",path:"/stats",description:"get dashboard statistics",auth:"jwt"},{method:"GET",path:"/recent-tasks",description:"get recent tasks for dashboard",auth:"jwt"},{method:"GET",path:"/recent-activity",description:"get recent activity feed",auth:"jwt"}]},{title:"notifications",prefix:"/api/web/notifications",endpoints:[{method:"GET",path:"",description:"list notifications with cursor pagination",auth:"jwt"},{method:"POST",path:"/:id/read",description:"mark a notification as read",auth:"jwt"},{method:"POST",path:"/read-all",description:"mark all notifications as read",auth:"jwt"}]},{title:"search",prefix:"/api/web",endpoints:[{method:"GET",path:"/search?q=query",description:"global search across tasks, workers, projects",auth:"jwt"}]},{title:"admin — developers",prefix:"/api/admin/developers",endpoints:[{method:"GET",path:"",description:"list all developers",auth:"jwt"},{method:"POST",path:"",description:"create a developer",auth:"jwt",body:'{ "name": "string", "password": "string", "role": "string", "gitName": "string", "gitEmail": "string" }'},{method:"PUT",path:"/:id",description:"update developer",auth:"jwt"},{method:"PUT",path:"/:id/reset-totp",description:"reset developer totp",auth:"jwt"}]},{title:"admin — projects",prefix:"/api/admin/projects",endpoints:[{method:"GET",path:"",description:"list all projects",auth:"jwt"},{method:"POST",path:"",description:"create a project",auth:"jwt"},{method:"PUT",path:"/:key",description:"update project (including pipeline)",auth:"jwt"},{method:"DELETE",path:"/:key",description:"delete a project",auth:"jwt"},{method:"GET",path:"/:key/members",description:"get project members",auth:"jwt"},{method:"POST",path:"/:key/members",description:"add project member",auth:"jwt"},{method:"DELETE",path:"/:key/members?developerId=N",description:"remove project member",auth:"jwt"}]},{title:"admin — worker tokens",prefix:"/api/admin/worker-tokens",endpoints:[{method:"GET",path:"",description:"list all worker enrollment tokens",auth:"jwt"},{method:"POST",path:"",description:"generate a new worker token",auth:"jwt"},{method:"POST",path:"/:id/revoke",description:"revoke a worker token",auth:"jwt"},{method:"GET",path:"/:id/status",description:"get token status and linked worker",auth:"jwt"}]},{title:"admin — workers",prefix:"/api/admin/workers",endpoints:[{method:"GET",path:"",description:"list all workers (admin)",auth:"jwt"},{method:"PUT",path:"/:id",description:"update worker status",auth:"jwt",body:'{ "status?": "string" }'}]},{title:"admin — bots",prefix:"/api/admin/bots",endpoints:[{method:"GET",path:"",description:"list bot instances",auth:"jwt"},{method:"POST",path:"",description:"create a bot instance",auth:"jwt"},{method:"GET",path:"/:id/bindings",description:"get chat bindings for a bot",auth:"jwt"},{method:"POST",path:"/:id/bindings",description:"create a chat binding",auth:"jwt"},{method:"DELETE",path:"/:id/bindings",description:"delete a chat binding",auth:"jwt"}]},{title:"admin — audit & settings",prefix:"/api/admin",endpoints:[{method:"GET",path:"/audit-logs",description:"query audit log with filters",auth:"jwt"},{method:"GET",path:"/settings",description:"get all system settings",auth:"jwt"},{method:"PUT",path:"/settings",description:"update system settings",auth:"jwt"}]},{title:"websocket",prefix:"",endpoints:[{method:"GET",path:"WS /ws/pty/:taskId",description:'pty terminal websocket — first obtain a channel token via POST /api/web/tasks/:taskId/pty-token, then send an auth frame after connection: { type: "auth", token: "<jwt>", channelToken: "<channel-token>" }',auth:"jwt"},{method:"GET",path:"WS /api/workers/pty/:taskId",description:'worker pty websocket — auth via frame: { type: "auth", workerJwt: "<worker-jwt>", channelToken: "<channel-token>" }',auth:"worker-token"}]}];function x({ep:e,prefix:a}){const[s,i]=n.useState(!1),{t:r}=o();return t.jsxs("div",{className:"border-b border-[var(--border-row)] last:border-b-0",children:[t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 sm:gap-3 px-3 md:px-4 py-2.5 text-left transition-colors hover:bg-[var(--bg-input)] min-w-0",onClick:()=>i(!s),children:[t.jsx("span",{className:`w-12 shrink-0 text-xs font-bold ${l[e.method]}`,children:e.method}),t.jsxs("code",{className:"flex-1 text-xs text-[var(--text-primary)] truncate min-w-0",children:[a,e.path]}),t.jsxs("span",{className:"text-xs text-[var(--text-muted)] hidden sm:inline truncate max-w-[200px]",children:["// ",e.description]})]}),s&&t.jsxs("div",{className:"border-t border-[var(--border-row)] bg-[var(--bg-primary)] px-3 md:px-4 py-3 space-y-2",children:[t.jsxs("p",{className:"text-xs text-[var(--text-secondary)]",children:["// ",e.description]}),t.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[t.jsx("span",{className:"text-[var(--text-muted)]",children:"auth:"}),t.jsx("span",{className:e.auth==="none"?"text-[var(--text-muted)]":"text-[var(--accent)]",children:e.auth})]}),e.body&&t.jsxs("div",{children:[t.jsx("p",{className:"text-[11px] uppercase tracking-wider text-[var(--text-muted)] mb-1",children:r("docs.request_body")}),t.jsx("pre",{className:"rounded-[4px] bg-[var(--bg-card)] px-3 py-2 text-xs text-[var(--text-secondary)] overflow-x-auto",children:e.body})]}),e.response&&t.jsxs("div",{children:[t.jsx("p",{className:"text-[11px] uppercase tracking-wider text-[var(--text-muted)] mb-1",children:r("docs.response")}),t.jsx("pre",{className:"rounded-[4px] bg-[var(--bg-card)] px-3 py-2 text-xs text-[var(--text-secondary)] overflow-x-auto",children:e.response})]})]})]})}function g(){const e=d(),{t:a}=o();return p(n.useMemo(()=>t.jsxs("button",{onClick:()=>e("/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:[t.jsx(h,{className:"h-3.5 w-3.5"}),a("access_tokens.create_token")]}),[e,a])),t.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[t.jsx("div",{className:"mb-8",children:t.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("docs.api_base_url_desc",{url:"http://localhost:9000"})})}),t.jsx(c,{mode:"api"}),t.jsxs("div",{className:"mb-8 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-2",children:[t.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("docs.authentication")}),t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("code",{className:"shrink-0 text-xs text-[var(--accent)]",children:"jwt"}),t.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:["obtained via /api/auth/login — pass as ",t.jsx("code",{children:"authorization: bearer <token>"})]})]}),t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("code",{className:"shrink-0 text-xs text-[var(--accent)]",children:"pat"}),t.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:"personal access token — same header format, for cli/api usage"})]}),t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("code",{className:"shrink-0 text-xs text-yellow-400",children:"worker-token"}),t.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:"enrollment token for worker registration — used during initial handshake"})]})]}),t.jsx("div",{className:"space-y-6",children:m.map(s=>t.jsxs("div",{children:[t.jsxs("h2",{className:"mb-2 text-sm text-[var(--accent)]",children:["> ",s.title]}),t.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:s.endpoints.map((i,r)=>t.jsx(x,{ep:i,prefix:s.prefix},`${i.method}-${i.path}-${r}`))})]},s.title))})]})}export{g as default};
@@ -0,0 +1,47 @@
1
+ import{j as e}from"./index-BLXQrTv9.js";import{C as s}from"./DocsPrimitives-BiDMVOFl.js";import"./copy-B1jQ4pbs.js";const r=` ┌──────────────────┐
2
+ │ Developer │
3
+ │ (create / attach) │
4
+ └──┬─────┬──────┬──┘
5
+ │ │ │
6
+ ┌─────────────────┘ │ └─────────────────┐
7
+ ▼ ▼ ▼
8
+ ┌────────────────────┐ ┌───────────────────────┐ ┌───────────────────────┐
9
+ │ Lark / Slack Bot │ │ Web App (Browser) │ │ Developer CLI (ov) │
10
+ │ @bot develop "xxx" │ │ live terminal xterm.js │ │ ov task / ov attach │
11
+ └────────┬───────────┘ └───────────┬───────────┘ └───────────┬───────────┘
12
+ │ │ │
13
+ ▼ ▼ ▼
14
+ ┌─────────────────┐ ┌──────────────────────────────────┐ ┌──────────────┐
15
+ │ Message Adapter │─▶│ Overlord Server (:9000) │◀─│ REST + WS │
16
+ │ webhook → Command│ │ NestJS + SQLite + Redis │ └──────────────┘
17
+ └─────────────────┘ │ JWT auth + RBAC + BullMQ │
18
+ │ │
19
+ │ ┌──────────────────────────────┐ │
20
+ │ │ Task Dispatcher + Notifier │ │
21
+ │ └──────────────┬───────────────┘ │
22
+ └────────────────┼───────────────────┘
23
+ │ WebSocket control channel
24
+ ┌──────────────────┼──────────────────┐
25
+ ┌─────┴─────┐ ┌─────┴─────┐ ┌─────┴─────┐
26
+ │ Worker 1 │ │ Worker 2 │ │ Worker N │
27
+ │ PTY+Agent │ │ PTY+Agent │ │ PTY+Agent │
28
+ │ (Claude / │ │ (Cursor / │ │ (Custom) │
29
+ │ Codex) │ │ Claude) │ │ │
30
+ └─────┬─────┘ └───────────┘ └───────────┘
31
+ │ ▲
32
+ │ │ Bidirectional PTY
33
+
34
+ ┌──────────────┐ ┌─────────────────────────────┐
35
+ │ Git Push MR │────▶│ Notifier → Bot / Web notify │
36
+ └──────────────┘ └─────────────────────────────┘`,a=`QUEUED → ASSIGNED → RUNNING ──→ COMPLETED
37
+ │ ↘
38
+ │ CANCELLED
39
+ ↓ ↑
40
+ SUSPENDED ──┤
41
+ │ ──→ RUNNING (reconnect)
42
+ │ ──→ COMPLETED
43
+ │ ──→ FAILED (timeout)
44
+
45
+ FAILED ←─┘
46
+
47
+ QUEUED (retry)`;function l(){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:"// architecture"}),e.jsx("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:"system overview — core components, data flow, task states, and security model."})]}),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:"> architecture diagram"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute right-2 top-2",children:e.jsx(s,{text:r})}),e.jsx("pre",{className:"rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 text-xs text-[var(--text-secondary)] overflow-x-auto whitespace-pre",children:r})]})]}),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:"> core components"}),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:"component"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"description"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"runs on"})]})}),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:"message adapter"})}),e.jsx("td",{className:"py-2 pr-4",children:"receives lark / slack webhook events, parses user commands, outputs unified command objects"}),e.jsx("td",{className:"py-2",children:"server"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"overlord web"})}),e.jsx("td",{className:"py-2 pr-4",children:"browser-based dashboard — task management, live pty terminal, machine monitoring, admin panel"}),e.jsx("td",{className:"py-2",children:"server"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"task dispatcher"})}),e.jsx("td",{className:"py-2 pr-4",children:"scheduling engine — manages task queue (bullmq), selects workers, tracks task lifecycle, persists to sqlite"}),e.jsx("td",{className:"py-2",children:"server"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"worker agent"})}),e.jsx("td",{className:"py-2 pr-4",children:"execution engine — manages git worktrees, spawns pty terminals, runs ai agents, manages cursor tunnels"}),e.jsx("td",{className:"py-2",children:"each 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:"pty manager"})}),e.jsx("td",{className:"py-2 pr-4",children:"worker sub-component — creates pseudo-terminals via node-pty, streams i/o bidirectionally"}),e.jsx("td",{className:"py-2",children:"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:"pipeline runner"})}),e.jsx("td",{className:"py-2 pr-4",children:"worker sub-component — monitors pty output, detects stage completion, injects next skill command"}),e.jsx("td",{className:"py-2",children:"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:"notifier"})}),e.jsx("td",{className:"py-2 pr-4",children:"sends notifications via the source platform (lark cards, slack blocks) and in-app notifications"}),e.jsx("td",{className:"py-2",children:"server"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"developer cli (ov)"})}),e.jsx("td",{className:"py-2 pr-4",children:"command-line tool — task creation, pty attach, project/machine queries, notifications"}),e.jsx("td",{className:"py-2",children:"developer machine"})]})]})]})})]}),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:"> monorepo packages"}),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:"package"}),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:"packages/protocol"})}),e.jsx("td",{className:"py-2",children:"shared types, enums, websocket frames, constants"})]}),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:"apps/server"})}),e.jsx("td",{className:"py-2",children:"nestjs backend — auth, dispatcher, scheduler, websocket gateway"})]}),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:"apps/web"})}),e.jsx("td",{className:"py-2",children:"react frontend — dashboard, task management, live terminal"})]}),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:"apps/worker"})}),e.jsx("td",{className:"py-2",children:"worker process — agent execution, pty management, git 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:"apps/cli"})}),e.jsx("td",{className:"py-2",children:"operations cli (overlord install/start/stop/doctor/upgrade)"})]}),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:"apps/developer-cli"})}),e.jsx("td",{className:"py-2",children:"developer cli (ov setup/task/attach/status/upgrade)"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"apps/e2e"})}),e.jsx("td",{className:"py-2",children:"end-to-end integration tests"})]})]})]})})]}),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:"> data flow"}),e.jsxs("div",{className:"space-y-1 text-xs text-[var(--text-secondary)]",children:[e.jsxs("p",{children:["1. ",e.jsx("span",{className:"text-[var(--accent)]",children:"task creation"})," — developer creates a task via web, cli, or bot"]}),e.jsxs("p",{children:["2. ",e.jsx("span",{className:"text-[var(--accent)]",children:"dispatching"})," — dispatcher selects the best available worker based on capacity, capabilities, and load"]}),e.jsxs("p",{children:["3. ",e.jsx("span",{className:"text-[var(--accent)]",children:"workspace setup"})," — worker creates an isolated git worktree for the task"]}),e.jsxs("p",{children:["4. ",e.jsx("span",{className:"text-[var(--accent)]",children:"execution"})," — pipeline runner drives the ai agent through configured stages"]}),e.jsxs("p",{children:["5. ",e.jsx("span",{className:"text-[var(--accent)]",children:"monitoring"})," — pty output streams in real time to web dashboard and cli"]}),e.jsxs("p",{children:["6. ",e.jsx("span",{className:"text-[var(--accent)]",children:"completion"})," — agent commits code, pushes branch, creates mr/pr"]}),e.jsxs("p",{children:["7. ",e.jsx("span",{className:"text-[var(--accent)]",children:"notification"})," — notifier informs the developer through their original channel"]})]})]}),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:"> task state machine"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute right-2 top-2",children:e.jsx(s,{text:a})}),e.jsx("pre",{className:"rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 text-xs text-[var(--text-secondary)] overflow-x-auto whitespace-pre",children:a})]}),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:"status"}),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:"QUEUED"})}),e.jsx("td",{className:"py-2",children:"task created, waiting for available 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:"ASSIGNED"})}),e.jsx("td",{className:"py-2",children:"worker selected, preparing workspace"})]}),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:"RUNNING"})}),e.jsx("td",{className:"py-2",children:"pipeline executing (current stage tracked)"})]}),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:"SUSPENDED"})}),e.jsx("td",{className:"py-2",children:"pipeline awaiting human confirmation for a stage gate, or worker disconnected — awaiting reconnection"})]}),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:"COMPLETED"})}),e.jsx("td",{className:"py-2",children:"all stages finished, code committed"})]}),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:"FAILED"})}),e.jsx("td",{className:"py-2",children:"execution error — can be retried"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"CANCELLED"})}),e.jsx("td",{className:"py-2",children:"manually cancelled by user"})]})]})]})})]}),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:"> machine selection"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"the dispatcher selects target machines using these criteria (in priority order):"}),e.jsxs("div",{className:"space-y-1 text-xs text-[var(--text-secondary)]",children:[e.jsx("p",{children:"1. user-specified machine via --on parameter"}),e.jsx("p",{children:"2. exclude offline and draining machines"}),e.jsx("p",{children:"3. filter by required capabilities (e.g., claude, cursor)"}),e.jsx("p",{children:"4. exclude machines above load threshold (default 85% cpu/memory)"}),e.jsx("p",{children:"5. exclude machines with all slots full"}),e.jsx("p",{children:"6. prefer machines that already have the project's base repository"}),e.jsx("p",{children:"7. select by lowest composite load score"}),e.jsx("p",{children:"8. tie-break by raw hardware capacity"})]})]}),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:"> security model"}),e.jsxs("div",{className:"space-y-1 text-xs text-[var(--text-secondary)]",children:[e.jsxs("p",{children:["- ",e.jsx("span",{className:"text-[var(--accent)]",children:"authentication"}),": jwt tokens (access + refresh) with totp 2fa"]}),e.jsxs("p",{children:["- ",e.jsx("span",{className:"text-[var(--accent)]",children:"authorization"}),": role-based access control (developer, lead, admin)"]}),e.jsxs("p",{children:["- ",e.jsx("span",{className:"text-[var(--accent)]",children:"api tokens"}),": scoped personal access tokens for cli and api usage"]}),e.jsxs("p",{children:["- ",e.jsx("span",{className:"text-[var(--accent)]",children:"worker auth"}),": one-time enrollment tokens + jwt for ongoing communication"]}),e.jsxs("p",{children:["- ",e.jsx("span",{className:"text-[var(--accent)]",children:"audit trail"}),": all administrative actions logged to audit_logs table"]})]})]})]})]})}export{l as default};
@@ -1,6 +1,6 @@
1
- import{c as C,a as S,r,g as k,j as e,o as L}from"./index-C5ry7bCb.js";import{S as E}from"./Select-8MUED_Fj.js";import{E as T}from"./EmptyState-C7-kuf8X.js";import{T as A}from"./Skeleton-B0x9oN6a.js";import{S as F}from"./scroll-text--ZQgIRbt.js";import{C as I}from"./chevron-right-Cz1_0u26.js";/**
1
+ import{c as C,a as S,r,g as k,j as e,o as L}from"./index-BLXQrTv9.js";import{S as E}from"./Select-BmSEj4-2.js";import{E as T}from"./EmptyState-C3yiKdL6.js";import{T as A}from"./Skeleton-B2I8dIUF.js";import{S as F}from"./scroll-text-FNU4RbjS.js";import{C as I}from"./chevron-right-u3Q_FU8D.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const P=C("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);function $(){const{t:a}=S(),h=[{value:"",label:a("admin.all_actions")},{value:"login",label:a("admin.action_login")},{value:"logout",label:a("admin.action_logout")},{value:"create",label:a("admin.action_create")},{value:"update",label:a("admin.action_update")},{value:"delete",label:a("admin.action_delete")},{value:"revoke",label:a("admin.action_revoke")},{value:"reset_2fa",label:a("admin.action_reset_2fa")},{value:"generate_token",label:a("admin.action_generate_token")}],[n,b]=r.useState([]),[f,u]=r.useState(!0),[i,j]=r.useState(""),[o,g]=r.useState(""),[N,c]=r.useState(void 0),[x,m]=r.useState([]),[l,w]=r.useState(void 0),d=r.useCallback(async t=>{try{u(!0);const s={limit:"50"};t&&(s.cursor=t),i&&(s.action=i),o&&(s.user=o);const v=await k.get("admin/audit-logs",{searchParams:s}).json();b(v.data),w(v.nextCursor)}catch{}finally{u(!1)}},[i,o]);r.useEffect(()=>{c(void 0),m([]),d()},[d]);function _(){l&&(m(t=>[...t,N??""]),c(l),d(l))}function y(){if(x.length===0)return;const t=[...x],s=t.pop();m(t),c(s||void 0),d(s||void 0)}function p(t){return t.startsWith("delete")||t==="revoke"?"text-[var(--destructive)]":t.startsWith("create")||t==="generate_token"?"text-[var(--accent)]":t.startsWith("update")||t==="reset_2fa"?"text-[var(--warning)]":t==="login"?"text-[var(--info)]":"text-[var(--text-secondary)]"}return e.jsxs("div",{className:"font-mono",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("admin.audit_title")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("admin.audit_subtitle")})]}),e.jsxs("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center",children:[e.jsx(E,{value:i,onChange:j,options:h}),e.jsxs("div",{className:"relative w-full max-w-xs",children:[e.jsx(L,{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.filter_by_user"),value:o,onChange:t=>g(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] py-1.5 pl-8 pr-3 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})]}),f?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(A,{rows:5})}):n.length===0?e.jsx(T,{icon:F,title:a("admin.no_audit_entries"),description:a("admin.audit_logs_appear")}):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.timestamp")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.user_id")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.action")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.resource")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.detail")}),e.jsx("th",{className:"pb-2 font-normal",children:a("admin.ip")})]})}),e.jsx("tbody",{children:n.map(t=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"whitespace-nowrap py-2.5 pr-4 text-[var(--text-muted)]",children:new Date(t.createdAt).toLocaleString()}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:t.userId}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:p(t.action),children:t.action})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:t.resource}),e.jsx("td",{className:"max-w-xs truncate py-2.5 pr-4 text-[var(--text-muted)]",children:t.detail}),e.jsx("td",{className:"py-2.5 text-[var(--text-muted)]",children:t.ip})]},t.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3",children:n.map(t=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3",children:[e.jsx("div",{className:"text-[11px] text-[var(--text-muted)] mb-1",children:new Date(t.createdAt).toLocaleString()}),e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:`text-[11px] ${p(t.action)}`,children:t.action}),e.jsx("span",{className:"text-[11px] text-[var(--text-secondary)]",children:t.resource})]}),e.jsx("div",{className:"text-[11px] text-[var(--text-muted)] truncate",children:t.detail}),e.jsxs("div",{className:"flex items-center gap-3 mt-1 text-[11px] text-[var(--text-muted)]",children:[e.jsxs("span",{children:["User: ",t.userId]}),e.jsx("span",{children:t.ip})]})]},t.id))}),e.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("admin.showing_entries",{count:String(n.length)})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{type:"button",disabled:x.length===0,className:"flex items-center justify-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 min-h-[44px] min-w-[44px] md:min-h-0 md:min-w-0 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",onClick:y,children:[e.jsx(P,{className:"h-3.5 w-3.5"}),a("common.previous")]}),e.jsxs("button",{type:"button",disabled:!l,className:"flex items-center justify-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 min-h-[44px] min-w-[44px] md:min-h-0 md:min-w-0 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",onClick:_,children:[a("common.next"),e.jsx(I,{className:"h-3.5 w-3.5"})]})]})]})]})]})}export{$ as default};
6
+ */const P=C("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);function $(){const{t:a}=S(),h=[{value:"",label:a("admin.all_actions")},{value:"login",label:a("admin.action_login")},{value:"logout",label:a("admin.action_logout")},{value:"create",label:a("admin.action_create")},{value:"update",label:a("admin.action_update")},{value:"delete",label:a("admin.action_delete")},{value:"revoke",label:a("admin.action_revoke")},{value:"reset_2fa",label:a("admin.action_reset_2fa")},{value:"generate_token",label:a("admin.action_generate_token")}],[n,b]=r.useState([]),[f,u]=r.useState(!0),[i,j]=r.useState(""),[o,g]=r.useState(""),[N,c]=r.useState(void 0),[x,m]=r.useState([]),[l,w]=r.useState(void 0),d=r.useCallback(async t=>{try{u(!0);const s={limit:"50"};t&&(s.cursor=t),i&&(s.action=i),o&&(s.user=o);const v=await k.get("admin/audit-logs",{searchParams:s}).json();b(v.data),w(v.nextCursor)}catch{}finally{u(!1)}},[i,o]);r.useEffect(()=>{c(void 0),m([]),d()},[d]);function _(){l&&(m(t=>[...t,N??""]),c(l),d(l))}function y(){if(x.length===0)return;const t=[...x],s=t.pop();m(t),c(s||void 0),d(s||void 0)}function p(t){return t.startsWith("delete")||t==="revoke"?"text-[var(--destructive)]":t.startsWith("create")||t==="generate_token"?"text-[var(--accent)]":t.startsWith("update")||t==="reset_2fa"?"text-[var(--warning)]":t==="login"?"text-[var(--info)]":"text-[var(--text-secondary)]"}return e.jsxs("div",{className:"font-mono",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("admin.audit_title")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("admin.audit_subtitle")})]}),e.jsxs("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center",children:[e.jsx(E,{value:i,onChange:j,options:h}),e.jsxs("div",{className:"relative w-full max-w-xs",children:[e.jsx(L,{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.filter_by_user"),value:o,onChange:t=>g(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] py-1.5 pl-8 pr-3 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})]}),f?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(A,{rows:5})}):n.length===0?e.jsx(T,{icon:F,title:a("admin.no_audit_entries"),description:a("admin.audit_logs_appear")}):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.timestamp")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.user_id")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.action")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.resource")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.detail")}),e.jsx("th",{className:"pb-2 font-normal",children:a("admin.ip")})]})}),e.jsx("tbody",{children:n.map(t=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"whitespace-nowrap py-2.5 pr-4 text-[var(--text-muted)]",children:new Date(t.createdAt).toLocaleString()}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:t.userId}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:p(t.action),children:t.action})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:t.resource}),e.jsx("td",{className:"max-w-xs truncate py-2.5 pr-4 text-[var(--text-muted)]",children:t.detail}),e.jsx("td",{className:"py-2.5 text-[var(--text-muted)]",children:t.ip})]},t.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3",children:n.map(t=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3",children:[e.jsx("div",{className:"text-[11px] text-[var(--text-muted)] mb-1",children:new Date(t.createdAt).toLocaleString()}),e.jsxs("div",{className:"flex min-w-0 items-center gap-2 mb-1",children:[e.jsx("span",{className:`shrink-0 text-[11px] ${p(t.action)}`,children:t.action}),e.jsx("span",{className:"min-w-0 truncate text-[11px] text-[var(--text-secondary)]",children:t.resource})]}),e.jsx("div",{className:"text-[11px] text-[var(--text-muted)] truncate",children:t.detail}),e.jsxs("div",{className:"flex items-center gap-3 mt-1 text-[11px] text-[var(--text-muted)]",children:[e.jsxs("span",{children:["User: ",t.userId]}),e.jsx("span",{children:t.ip})]})]},t.id))}),e.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("admin.showing_entries",{count:String(n.length)})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{type:"button",disabled:x.length===0,className:"flex items-center justify-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 min-h-[44px] min-w-[44px] md:min-h-0 md:min-w-0 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",onClick:y,children:[e.jsx(P,{className:"h-3.5 w-3.5"}),a("common.previous")]}),e.jsxs("button",{type:"button",disabled:!l,className:"flex items-center justify-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 min-h-[44px] min-w-[44px] md:min-h-0 md:min-w-0 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",onClick:_,children:[a("common.next"),e.jsx(I,{className:"h-3.5 w-3.5"})]})]})]})]})]})}export{$ as default};
@@ -1 +1 @@
1
- import{a as u,z as h,e as g,r as s,g as v,j as e}from"./index-C5ry7bCb.js";function j(){const{t:r}=u(),[l]=h(),i=g(),a=l.get("token"),[n,o]=s.useState("loading"),[m,p]=s.useState(""),[b,c]=s.useState("");return s.useEffect(()=>{if(!a){o("error"),c(r("bind.no_token"));return}v.post("web/profile/bind-platform",{json:{token:a}}).json().then(t=>{p(t.platform),o("success")}).catch(async t=>{var x;o("error");try{const d=await((x=t.response)==null?void 0:x.json());c((d==null?void 0:d.message)??r("bind.error"))}catch{c(t instanceof Error?t.message:r("bind.error"))}})},[a]),e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--bg-primary)] px-4 font-mono",children:e.jsxs("div",{className:"w-full max-w-[400px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 md:p-6",children:[e.jsx("h1",{className:"mb-4 text-sm text-[var(--text-primary)]",children:r("bind.title")}),n==="loading"&&e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("bind.linking")}),n==="success"&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"rounded-[4px] border border-green-500/30 bg-green-500/10 px-3 py-2 text-xs text-green-400",children:r("bind.success")}),e.jsx("p",{className:"text-xs text-[var(--text-secondary)]",children:r("bind.success_detail").replace("{platform}",m)}),e.jsx("button",{onClick:()=>i("/home"),className:"rounded-[4px] bg-[var(--accent)] px-3 py-2 text-xs text-black hover:opacity-90 transition-opacity",children:r("bind.back_to_home")})]}),n==="error"&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400 break-words",children:b||r("bind.invalid_token")}),e.jsx("button",{onClick:()=>i("/home"),className:"rounded-[4px] border border-[var(--border)] px-3 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("bind.back_to_home")})]})]})})}export{j as default};
1
+ import{a as u,E as h,e as g,r as s,g as v,j as e}from"./index-BLXQrTv9.js";function j(){const{t:r}=u(),[l]=h(),i=g(),a=l.get("token"),[n,o]=s.useState("loading"),[m,p]=s.useState(""),[b,c]=s.useState("");return s.useEffect(()=>{if(!a){o("error"),c(r("bind.no_token"));return}v.post("web/profile/bind-platform",{json:{token:a}}).json().then(t=>{p(t.platform),o("success")}).catch(async t=>{var x;o("error");try{const d=await((x=t.response)==null?void 0:x.json());c((d==null?void 0:d.message)??r("bind.error"))}catch{c(t instanceof Error?t.message:r("bind.error"))}})},[a]),e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--bg-primary)] px-4 font-mono",children:e.jsxs("div",{className:"w-full max-w-[400px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 md:p-6",children:[e.jsx("h1",{className:"mb-4 text-sm text-[var(--text-primary)]",children:r("bind.title")}),n==="loading"&&e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("bind.linking")}),n==="success"&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"rounded-[4px] border border-green-500/30 bg-green-500/10 px-3 py-2 text-xs text-green-400",children:r("bind.success")}),e.jsx("p",{className:"text-xs text-[var(--text-secondary)]",children:r("bind.success_detail").replace("{platform}",m)}),e.jsx("button",{onClick:()=>i("/home"),className:"rounded-[4px] bg-[var(--accent)] px-3 py-2 text-xs text-black hover:opacity-90 transition-opacity",children:r("bind.back_to_home")})]}),n==="error"&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400 break-words",children:b||r("bind.invalid_token")}),e.jsx("button",{onClick:()=>i("/home"),className:"rounded-[4px] border border-[var(--border)] px-3 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("bind.back_to_home")})]})]})})}export{j as default};
@@ -0,0 +1 @@
1
+ import{j as e}from"./index-BLXQrTv9.js";function t(){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:"// bot integration"}),e.jsx("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:"advanced bot integration topics — interactive cards, troubleshooting, and the adapter pattern. for initial bot setup (lark, slack), see the bot setup 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-4",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> interactive cards"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"when a pipeline reaches a stage that requires user input, the bot sends an interactive card. there are three card modes:"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xs text-[var(--text-primary)]",children:"confirm mode"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"sent when a stage needs explicit approval before proceeding. the card shows a summary of what will happen and two buttons:"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] pl-4",children:[e.jsxs("li",{children:["- ",e.jsx("span",{className:"text-[var(--accent)]",children:"confirm"})," — advance the pipeline to the next stage"]}),e.jsxs("li",{children:["- ",e.jsx("span",{className:"text-[var(--accent)]",children:"cancel"})," — abort the pipeline"]})]}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"example: a deploy stage waiting for human sign-off before pushing to production. the bot updates the card in-place after the user responds, replacing the buttons with the outcome."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xs text-[var(--text-primary)]",children:"choice mode"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"sent when the pipeline branches and the user must pick one of several options. each option is rendered as a button. the selected option determines which branch the pipeline follows."}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"example: choosing a deploy target (staging / production / canary) mid-pipeline."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xs text-[var(--text-primary)]",children:"input mode"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"sent when the pipeline needs free-form text input from the user. the card includes a text field and a submit button. the submitted value is injected into the pipeline context as a variable."}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"example: providing a hotfix version number or a rollback reason."})]})]}),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:"> card lifecycle"}),e.jsxs("div",{className:"space-y-2 text-xs text-[var(--text-secondary)]",children:[e.jsx("p",{children:"1. bot sends the card when the stage starts"}),e.jsx("p",{children:"2. card remains active until a user responds or the stage times out (default: 30 minutes, configurable per stage)"}),e.jsx("p",{children:"3. on response, the bot updates the card to show the result and the pipeline continues"}),e.jsx("p",{children:"4. if the stage times out, the card is updated with a timeout message and the pipeline follows the timeout path (fail or fallback)"})]}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"only users with the appropriate project role can interact with cards. unauthorized clicks return an ephemeral error."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> troubleshooting"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"common issues when running bots in production:"}),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:"symptom"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"cause"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"fix"})]})}),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:"bot doesn't respond to mentions"}),e.jsx("td",{className:"py-2 pr-4",children:"webhook url not reachable"}),e.jsx("td",{className:"py-2",children:"verify the url is publicly accessible and returns 200 to the platform's verification challenge"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"401 on webhook"}),e.jsx("td",{className:"py-2 pr-4",children:"wrong verification token / signing secret"}),e.jsx("td",{className:"py-2",children:"check webhooktoken matches the platform's verification token (lark) or signing secret (slack)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"commands work but no cards"}),e.jsx("td",{className:"py-2 pr-4",children:"missing card event subscription"}),e.jsx("td",{className:"py-2",children:"lark: subscribe to card.action.trigger. slack: enable interactivity and set the interact url"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"user not found error"}),e.jsx("td",{className:"py-2 pr-4",children:"developer account not linked"}),e.jsx("td",{className:"py-2",children:"set platform_uid on the developer record to their platform user id"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"bot responds in wrong project"}),e.jsx("td",{className:"py-2 pr-4",children:"chat group bound to wrong project"}),e.jsx("td",{className:"py-2",children:"update the binding via admin - bot management or the bindings api"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"duplicate messages"}),e.jsx("td",{className:"py-2 pr-4",children:"multiple bot instances handling same event"}),e.jsx("td",{className:"py-2",children:"ensure only one overlord instance processes webhooks, or use the built-in dedup"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"card buttons do nothing"}),e.jsx("td",{className:"py-2 pr-4",children:"interact url misconfigured"}),e.jsx("td",{className:"py-2",children:"slack: check interactivity request url. lark: check card action callback url"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:"/overlord slash command 404"}),e.jsx("td",{className:"py-2 pr-4",children:"command url wrong"}),e.jsx("td",{className:"py-2",children:"verify the slash command request url matches your-server/webhook/slack/commands"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:"bot stops responding after deploy"}),e.jsx("td",{className:"py-2 pr-4",children:"webhook url changed"}),e.jsx("td",{className:"py-2",children:"update the request url in the platform's app settings to match the new server address"})]})]})]})})]}),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:"> adapter pattern"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"the bot system uses an adapter pattern internally. each platform (lark, slack, discord) implements an adapter interface:"}),e.jsxs("div",{className:"space-y-1 text-xs text-[var(--text-secondary)]",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("code",{className:"shrink-0 text-[var(--accent)]",children:"handleWebhook(req)"}),e.jsx("span",{children:"— receive platform events, verify signatures, parse into commands"})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("code",{className:"shrink-0 text-[var(--accent)]",children:"sendMessage(chatId, content)"}),e.jsx("span",{children:"— send messages (text or cards)"})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("code",{className:"shrink-0 text-[var(--accent)]",children:"updateMessage(msgId, content)"}),e.jsx("span",{children:"— update existing messages (progress updates)"})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("code",{className:"shrink-0 text-[var(--accent)]",children:"resolveUser(platformUid)"}),e.jsx("span",{children:"— map platform user id to overlord developer"})]})]}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"to add a custom platform adapter, implement the interface and register it in the bot service config. see the lark and slack adapters in the codebase for reference."})]}),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:"> multi-bot architecture"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"overlord supports multiple bot instances across different platforms simultaneously. each project or group can have its own bot. all bots share the same overlord backend."}),e.jsxs("div",{className:"space-y-2 text-xs text-[var(--text-secondary)]",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[var(--accent)]",children:"lark"})," — single webhook url (/webhook/lark), bot identified by app_id in the request payload"]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-[var(--accent)]",children:"slack"})," — separate endpoints for events, interactivity, and commands (/webhook/slack/events, /webhook/slack/interact, /webhook/slack/commands), bot identified by app_id in the request headers"]})]}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"you can run multiple bots on the same platform (e.g., one slack bot per team) by registering each with a unique app id. a discord adapter is planned for a future release."})]})]})]})}export{t as default};
@@ -0,0 +1,6 @@
1
+ import{c as z,a as E,r as n,j as e,X as D,g as _,s as W,t as U}from"./index-BLXQrTv9.js";import{S as M}from"./Select-BmSEj4-2.js";import{C as O}from"./DocsPrimitives-BiDMVOFl.js";import{T as F}from"./trash-2-YP06bYAN.js";import{P as q}from"./plus-NWcYLEIq.js";import{E as R}from"./EmptyState-C3yiKdL6.js";import{T}from"./Skeleton-B2I8dIUF.js";import{u as P}from"./useFetch-WwlQwbqf.js";import{d as A}from"./status-colors-CNClmRSt.js";import{B as H}from"./bot-3wzbq300.js";import{P as V}from"./pencil-BzyGpI8s.js";import"./copy-B1jQ4pbs.js";/**
2
+ * @license lucide-react v0.469.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const X=z("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]),G=[{value:"lark",label:"lark_(feishu)"},{value:"slack",label:"slack"}];function J({isOpen:r,onClose:j,onCreated:f,editBot:m,onEditClose:s}){const{t}=E(),i=!!m,[C,y]=n.useState(""),[o,b]=n.useState("lark"),[g,u]=n.useState(""),[c,N]=n.useState(""),[p,h]=n.useState(""),[k,w]=n.useState(!1),[S,x]=n.useState("");n.useEffect(()=>{r&&(m?(y(m.name),b(m.platform),u(m.appId),N(""),h("")):(y(""),b("lark"),u(""),N(""),h("")),w(!1),x(""))},[m,r]);function v(){i&&s?s():j()}async function a(){if(x(""),!C.trim()||!g.trim()){x(t("admin.name_and_app_id_required"));return}if(i){if(o==="slack"&&c.trim()&&!c.trim().startsWith("xoxb-")){x(t("admin.invalid_bot_token"));return}}else{if(!c.trim()){x(t("admin.app_secret_required"));return}if(o==="slack"){if(!c.trim().startsWith("xoxb-")){x(t("admin.invalid_bot_token"));return}if(!p.trim()){x(t("admin.signing_secret_required"));return}}}const l={name:C.trim(),platform:o,appId:g.trim()};c.trim()&&(l.appSecret=c.trim()),p.trim()&&(l.webhookToken=p.trim());try{w(!0),i?await _.put(`admin/bots/${m.id}`,{json:l}).json():await _.post("admin/bots",{json:l}).json(),v(),f()}catch(B){const K=B instanceof Error?B.message:t(i?"admin.failed_to_update_bot":"admin.failed_to_create_bot");x(K)}finally{w(!1)}}if(!r)return null;const I=window.location.origin,$=[{label:t("admin.webhook_events_url"),url:`${I}/webhook/slack/events`,hint:t("admin.slack_events_hint")},{label:t("admin.webhook_interact_url"),url:`${I}/webhook/slack/interact`,hint:t("admin.slack_interact_hint")},{label:t("admin.webhook_commands_url"),url:`${I}/webhook/slack/commands`,hint:t("admin.slack_commands_hint")}],d=[{label:t("admin.webhook_request_url"),url:`${I}/webhook/lark`,hint:t("admin.webhook_config_hint_lark")}],L=o==="slack"?$:d;return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:v}),e.jsxs("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsx("h3",{className:"text-sm text-[var(--text-primary)]",children:i?`// ${t("admin.edit_bot")}`:`// ${t("admin.create_bot")}`}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:v,children:e.jsx(D,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[S&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:S}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t("admin.bot_name")}),e.jsx("input",{type:"text",placeholder:"e.g. overlord lark bot",value:C,onChange:l=>y(l.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t("admin.platform")}),e.jsx(M,{value:o,onChange:b,options:G,disabled:i})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-3",children:[e.jsx("div",{className:"mb-2 text-xs text-[var(--text-muted)]",children:t("admin.webhook_config")}),e.jsx("div",{className:"text-xs text-[var(--text-muted)] mb-3",children:t(o==="slack"?"admin.webhook_config_hint_slack":"admin.webhook_config_hint_lark")}),e.jsx("div",{className:"space-y-2",children:L.map(l=>e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-[var(--text-muted)] mb-1",children:l.label}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("code",{className:"flex-1 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-2 py-1 text-xs text-[var(--text-primary)] select-all overflow-x-auto",children:l.url}),e.jsx(O,{text:l.url})]}),e.jsx("div",{className:"mt-0.5 text-xs text-[var(--text-muted)]",children:l.hint})]},l.label))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t("admin.app_id")}),e.jsx("div",{className:"mb-1 text-xs text-[var(--text-muted)]",children:t(o==="slack"?"admin.app_id_hint_slack":"admin.app_id_hint_lark")}),e.jsx("input",{type:"text",placeholder:"platform application id",value:g,onChange:l=>u(l.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),o==="slack"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t(i?"admin.bot_token_keep_current":"admin.bot_token")}),e.jsx("div",{className:"mb-1 text-xs text-[var(--text-muted)]",children:t("admin.bot_token_hint")}),e.jsx("input",{type:"password",placeholder:t("admin.bot_token_placeholder"),value:c,onChange:l=>N(l.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t(i?"admin.signing_secret_keep_current":"admin.signing_secret")}),e.jsx("div",{className:"mb-1 text-xs text-[var(--text-muted)]",children:t("admin.signing_secret_hint")}),e.jsx("input",{type:"password",placeholder:t("admin.signing_secret_placeholder"),value:p,onChange:l=>h(l.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})]}):e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t(i?"admin.app_secret_keep_current":"admin.app_secret")}),e.jsx("div",{className:"mb-1 text-xs text-[var(--text-muted)]",children:t("admin.app_secret_hint_lark")}),e.jsx("input",{type:"password",placeholder:"platform application secret",value:c,onChange:l=>N(l.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:v,children:t("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity disabled:opacity-50",disabled:k,onClick:a,children:t(k?i?"common.saving":"common.creating":i?"common.save_changes":"common.create")})]})]})]})}function Q({isOpen:r,bot:j,onClose:f,onUpdated:m}){const{t:s}=E(),[t,i]=n.useState([]),[C,y]=n.useState([]),[o,b]=n.useState(!1),[g,u]=n.useState(!1),[c,N]=n.useState(""),[p,h]=n.useState(""),[k,w]=n.useState(""),[S,x]=n.useState(""),v=n.useCallback(async()=>{try{const d=await _.get(`admin/bots/${j.id}/bindings`).json();i(d)}catch{}},[j.id]);n.useEffect(()=>{r&&v()},[r,v]);const a=n.useCallback(async()=>{try{const d=await _.get("web/projects").json();y(d)}catch{}},[]);n.useEffect(()=>{r&&a()},[r,a]);const I=async()=>{if(x(""),!c.trim()||!p.trim()||!k){x(s("admin.chat_binding_all_fields_required"));return}try{b(!0),await _.post(`admin/bots/${j.id}/bindings`,{json:{platformChatId:c.trim(),chatName:p.trim(),projectKey:k}}).json(),N(""),h(""),w(""),u(!1),m()}catch(d){const L=d instanceof Error?d.message:s("admin.failed_to_add_binding");x(L)}finally{b(!1)}},$=async d=>{try{await _.delete(`admin/bots/${j.id}/bindings`,{json:{platformChatId:d.platformChatId}}),i(L=>L.filter(l=>l.id!==d.id)),m()}catch{}};return r?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:f}),e.jsxs("div",{className:"relative z-10 w-full max-w-[600px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsx("h3",{className:"text-sm text-[var(--text-primary)]",children:s("admin.chat_binding_title",{name:j.name})}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:f,children:e.jsx(D,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"px-5 py-5",children:[S&&e.jsx("div",{className:"mb-4 rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:S}),t.length===0&&!g?e.jsx("p",{className:"py-4 text-center text-xs text-[var(--text-muted)]",children:s("admin.chat_binding_no_bindings")}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-left text-[var(--text-muted)]",children:[e.jsx("th",{className:"pb-2 pr-4 font-normal",children:s("admin.chat_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:s("admin.chat_id")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:s("admin.project")}),e.jsx("th",{className:"pb-2 font-normal",children:s("common.remove")})]})}),e.jsx("tbody",{children:t.map(d=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-primary)]",children:d.chatName}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:d.platformChatId}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:d.projectKey}),e.jsx("td",{className:"py-2.5",children:e.jsx("button",{type:"button",className:"rounded-[4px] p-1.5 text-red-400 hover:text-red-300 hover:bg-white/[0.05] transition-colors",onClick:()=>$(d),children:e.jsx(F,{className:"h-3.5 w-3.5"})})})]},d.id))})]})}),g&&e.jsxs("div",{className:"mt-4 space-y-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] p-4",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:s("admin.chat_binding_add")}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:s("admin.chat_id")}),e.jsx("input",{type:"text",placeholder:s("admin.chat_binding_id_placeholder"),value:c,onChange:d=>N(d.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:s("admin.chat_name")}),e.jsx("input",{type:"text",placeholder:s("admin.chat_binding_name_placeholder"),value:p,onChange:d=>h(d.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:s("admin.project")}),e.jsx(M,{value:k,onChange:w,options:C.map(d=>({value:d.key,label:`${d.name} (${d.key})`})),placeholder:s("admin.chat_binding_select_project")})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:()=>u(!1),children:s("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity disabled:opacity-50",disabled:o,onClick:I,children:s(o?"admin.chat_binding_adding":"admin.add_binding")})]})]})]}),e.jsxs("div",{className:"flex items-center justify-between border-t border-[var(--border)] px-5 py-4",children:[e.jsx("div",{children:!g&&e.jsxs("button",{type:"button",className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] transition-colors",onClick:()=>u(!0),children:[e.jsx(q,{className:"h-3.5 w-3.5"}),s("admin.add_binding")]})}),e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:f,children:s("common.close")})]})]})]}):null}function ce(){const{t:r}=E(),[j,f]=n.useState(!1),[m,s]=n.useState(null),[t,i]=n.useState(null),[C,y]=n.useState(!1),[o,b]=n.useState(null),[g,u]=n.useState(!1),{data:c,loading:N,refetch:p}=P(()=>_.get("admin/bots").json(),[]),{data:h,loading:k,refetch:w}=P(()=>_.get("admin/bots/all-bindings").json(),[]);async function S(){if(o){u(!0);try{await _.delete(`admin/bots/${o.id}`),y(!1),b(null),p()}catch{U.error(r("admin.failed_to_delete_bot"))}finally{u(!1)}}}function x(a){switch(a){case"lark":return"text-blue-400";case"slack":return"text-yellow-400";default:return"text-[var(--text-secondary)]"}}function v(a){return e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-white/[0.05] transition-colors",title:r("common.edit"),onClick:()=>s(a),children:e.jsx(V,{className:"h-3.5 w-3.5"})}),e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-white/[0.05] transition-colors",title:r("admin.chat_bindings"),onClick:()=>i(a),children:e.jsx(X,{className:"h-3.5 w-3.5"})}),e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-red-400 hover:text-red-300 hover:bg-white/[0.05] transition-colors",title:r("common.delete"),onClick:()=>{b(a),y(!0)},children:e.jsx(F,{className:"h-3.5 w-3.5"})})]})}return e.jsxs("div",{className:"font-mono",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:r("admin.bots_title")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("admin.bots_subtitle")})]}),e.jsxs("button",{type:"button",className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity",onClick:()=>{s(null),f(!0)},children:[e.jsx(q,{className:"h-3.5 w-3.5"}),r("admin.create_bot")]})]}),N?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(T,{rows:3})}):!c||c.length===0?e.jsx(R,{icon:H,title:r("admin.no_bots_configured"),description:r("admin.add_bot_desc"),actionLabel:r("admin.create_bot"),onAction:()=>{s(null),f(!0)}}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-left text-[var(--text-muted)]",children:[e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.bot_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.platform")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.app_id")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.status")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("common.created_at")}),e.jsx("th",{className:"pb-2 font-normal",children:r("common.actions")})]})}),e.jsx("tbody",{children:c.map(a=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-primary)]",children:a.name}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:x(a.platform),children:a.platform})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:a.appId}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:A(a.status),children:a.status})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-muted)]",children:new Date(a.createdAt).toLocaleDateString()}),e.jsx("td",{className:"py-2.5",children:v(a)})]},a.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3",children:c.map(a=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)] font-medium",children:a.name}),v(a)]}),e.jsxs("div",{className:"flex items-center gap-3 text-[11px]",children:[e.jsx("span",{className:x(a.platform),children:a.platform}),e.jsx("span",{className:A(a.status),children:a.status})]}),e.jsx("div",{className:"mt-1 text-[11px] text-[var(--text-secondary)] truncate",children:a.appId})]},a.id))})]}),e.jsx(J,{isOpen:j||!!m,onClose:()=>{f(!1),s(null)},onCreated:p,editBot:m,onEditClose:()=>s(null)}),t&&e.jsx(Q,{isOpen:!!t,bot:t,onClose:()=>i(null),onUpdated:()=>{p(),w()}}),e.jsx(W,{isOpen:C,onClose:()=>{y(!1),b(null)},onConfirm:S,title:r("admin.delete_bot"),message:r("admin.delete_bot_confirm",{name:(o==null?void 0:o.name)??""}),confirmLabel:r("common.delete"),confirmVariant:"danger",isLoading:g}),e.jsxs("div",{className:"mt-8",children:[e.jsxs("h2",{className:"mb-4 text-sm text-[var(--text-primary)]",children:[r("admin.chat_bindings"),e.jsx("span",{className:"ml-2 text-[var(--text-muted)]",children:r("admin.chat_bindings_subtitle")})]}),k?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(T,{rows:3})}):!h||h.length===0?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-8 text-center",children:e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("admin.no_chat_bindings")})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-left text-[var(--text-muted)]",children:[e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.bot")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.platform")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.chat_id")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.chat_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.project")}),e.jsx("th",{className:"pb-2 font-normal",children:r("common.created_at")})]})}),e.jsx("tbody",{children:h.map(a=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-primary)]",children:a.botName}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:x(a.platform),children:a.platform})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:a.platformChatId}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:a.chatName??"-"}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:a.projectKey??"-"}),e.jsx("td",{className:"py-2.5 text-[var(--text-muted)]",children:new Date(a.createdAt).toLocaleDateString()})]},a.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3",children:h.map(a=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)] font-medium",children:a.botName}),e.jsx("span",{className:`text-[11px] ${x(a.platform)}`,children:a.platform})]}),e.jsx("div",{className:"text-[11px] text-[var(--text-secondary)] truncate",children:a.platformChatId}),e.jsxs("div",{className:"flex items-center gap-3 mt-1 text-[11px] text-[var(--text-muted)]",children:[e.jsx("span",{children:a.chatName??"-"}),e.jsx("span",{children:a.projectKey??"-"})]})]},a.id))})]})]})]})}export{ce as default};
@@ -0,0 +1,33 @@
1
+ import{j as e}from"./index-BLXQrTv9.js";import{a as s}from"./DocsPrimitives-BiDMVOFl.js";import"./copy-B1jQ4pbs.js";const r=[{command:"develop",alias:"dev",example:'@bot develop "fix login bug" --project WEB',description:"create a new task"},{command:"develop",alias:"dev",example:'@bot develop "deploy" --on worker-1',description:"create a task on a specific worker"},{command:"progress",alias:"",example:"@bot progress #42",description:"check task progress"},{command:"cancel",alias:"",example:"@bot cancel #42",description:"cancel a running task"},{command:"retry",alias:"",example:"@bot retry #42",description:"retry a failed task"},{command:"list",alias:"ls",example:"@bot list --project WEB",description:"list recent tasks"},{command:"confirm",alias:"",example:"@bot confirm #42",description:"confirm a pending stage"},{command:"workspace",alias:"ws",example:"@bot workspace #42",description:"show task workspace info"},{command:"logs",alias:"log",example:"@bot logs #42",description:"view task logs"},{command:"drain",alias:"",example:"@bot drain worker-1",description:"drain a worker (stop accepting new tasks)"},{command:"undrain",alias:"",example:"@bot undrain worker-1",description:"resume a drained worker"},{command:"bind",alias:"",example:"@bot bind",description:"link your chat account to your overlord account"},{command:"info",alias:"",example:"@bot info",description:"show chat id, user id, and link status"},{command:"help",alias:"",example:"@bot help",description:"show available commands"}];function l(){return e.jsx("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// overview"}),e.jsxs("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:["overlord supports creating tasks via chat bots. users can ",e.jsx("code",{className:"text-[var(--accent)]",children:'@bot develop "fix the login bug"'})," in a group chat, and overlord dispatches the task automatically. notifications are sent back through the same channel."]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// lark setup"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 1. create a lark app"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["on ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"lark open platform"})," (open.larksuite.com) → custom app:"]}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsxs("li",{children:["— note the ",e.jsx("span",{className:"text-[var(--accent)]",children:"app id"})," and ",e.jsx("span",{className:"text-[var(--accent)]",children:"app secret"})]}),e.jsxs("li",{children:["— event subscriptions: ",e.jsx("code",{className:"text-[var(--accent)]",children:"im.message.receive_v1"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"card.action.trigger"})]}),e.jsxs("li",{children:["— request url: ",e.jsx("code",{className:"text-[var(--text-secondary)]",children:"https://your-overlord-server.com/webhook/lark"})]}),e.jsx("li",{children:"— enable bot capability"}),e.jsxs("li",{children:["— permissions: ",e.jsx("code",{className:"text-[var(--accent)]",children:"im:message"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"im:message:send_as_bot"})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 2. register in overlord"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"via admin → bot management → add bot, or via the api:"}),e.jsx(s,{code:`curl -X POST https://your-server:9000/api/admin/bots \\
2
+ -H "Authorization: Bearer $TOKEN" \\
3
+ -H "Content-Type: application/json" \\
4
+ -d '{
5
+ "platform": "lark",
6
+ "appId": "cli_xxx",
7
+ "appSecret": "your-app-secret",
8
+ "webhookToken": "your-verification-token",
9
+ "name": "Overlord Bot"
10
+ }'`})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 3. bind chat groups to projects"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"each chat group is bound to a default project so users don't need to specify --project every time:"}),e.jsx(s,{code:`curl -X POST https://your-server:9000/api/admin/bots/:botId/bindings \\
11
+ -H "Authorization: Bearer $TOKEN" \\
12
+ -H "Content-Type: application/json" \\
13
+ -d '{
14
+ "platformChatId": "oc_xxx",
15
+ "projectKey": "PROJ",
16
+ "chatName": "Project Dev Group"
17
+ }'`})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 4. link developer accounts"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["each developer's lark open id must be linked to their overlord account via the ",e.jsx("code",{className:"text-[var(--accent)]",children:"platform_uid"})," field. this mapping allows overlord to identify who is issuing bot commands."]}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"update via admin → developers → edit, setting the platform uid to their lark open id."})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// slack setup"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 1. create a slack app"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["go to ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"slack api"})," (api.slack.com/apps) → create new app → from scratch."]}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["note the ",e.jsx("span",{className:"text-[var(--accent)]",children:"app id"})," and ",e.jsx("span",{className:"text-[var(--accent)]",children:"signing secret"})," from basic information."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 2. configure bot token scopes"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"under oauth & permissions, add these bot token scopes:"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsxs("li",{children:["— ",e.jsx("code",{className:"text-[var(--accent)]",children:"chat:write"})," — send messages"]}),e.jsxs("li",{children:["— ",e.jsx("code",{className:"text-[var(--accent)]",children:"chat:write.public"})," — send messages to channels the bot isn't a member of"]}),e.jsxs("li",{children:["— ",e.jsx("code",{className:"text-[var(--accent)]",children:"app_mentions:read"})," — receive @bot mentions"]}),e.jsxs("li",{children:["— ",e.jsx("code",{className:"text-[var(--accent)]",children:"im:read"})," — read direct messages"]}),e.jsxs("li",{children:["— ",e.jsx("code",{className:"text-[var(--accent)]",children:"im:write"})," — send direct messages"]}),e.jsxs("li",{children:["— ",e.jsx("code",{className:"text-[var(--accent)]",children:"users:read"})," — look up user info"]})]}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["install the app to your workspace and copy the ",e.jsx("span",{className:"text-[var(--accent)]",children:"bot user oauth token"})," (xoxb-...)."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 3. configure event subscriptions"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"under event subscriptions:"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsx("li",{children:"— enable events"}),e.jsxs("li",{children:["— set request url: ",e.jsx("code",{className:"text-[var(--text-secondary)]",children:"https://your-overlord-server.com/webhook/slack/events"})]}),e.jsxs("li",{children:["— subscribe to bot events: ",e.jsx("code",{className:"text-[var(--accent)]",children:"app_mention"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"message.im"})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 4. enable interactivity"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"under interactivity & shortcuts:"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsx("li",{children:"— toggle on"}),e.jsxs("li",{children:["— set request url: ",e.jsx("code",{className:"text-[var(--text-secondary)]",children:"https://your-overlord-server.com/webhook/slack/interact"})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 5. add a slash command (optional)"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"under slash commands → create new command:"}),e.jsxs("ul",{className:"space-y-1 text-xs text-[var(--text-secondary)] list-none pl-0",children:[e.jsxs("li",{children:["— command: ",e.jsx("code",{className:"text-[var(--accent)]",children:"/overlord"})]}),e.jsxs("li",{children:["— request url: ",e.jsx("code",{className:"text-[var(--text-secondary)]",children:"https://your-overlord-server.com/webhook/slack/commands"})]}),e.jsx("li",{children:"— short description: run overlord bot commands"})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 6. register in overlord"}),e.jsx(s,{code:`curl -X POST https://your-server:9000/api/admin/bots \\
18
+ -H "Authorization: Bearer $TOKEN" \\
19
+ -H "Content-Type: application/json" \\
20
+ -d '{
21
+ "platform": "slack",
22
+ "appId": "A0XXXXXXX",
23
+ "appSecret": "xoxb-your-bot-token",
24
+ "webhookToken": "your-signing-secret",
25
+ "name": "Overlord Bot"
26
+ }'`}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["note: ",e.jsx("code",{className:"text-[var(--accent)]",children:"appSecret"})," = bot user oauth token, ",e.jsx("code",{className:"text-[var(--accent)]",children:"webhookToken"})," = signing secret."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 7. bind channels to projects"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["same as lark, but use the slack channel id (C0XXXXXXX) as ",e.jsx("code",{className:"text-[var(--accent)]",children:"platformChatId"}),":"]}),e.jsx(s,{code:`curl -X POST https://your-server:9000/api/admin/bots/:botId/bindings \\
27
+ -H "Authorization: Bearer $TOKEN" \\
28
+ -H "Content-Type: application/json" \\
29
+ -d '{
30
+ "platformChatId": "C0XXXXXXX",
31
+ "projectKey": "PROJ",
32
+ "chatName": "#project-dev"
33
+ }'`})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs text-[var(--accent)]",children:"> 8. link developer accounts"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["same as lark, but use the slack user id as ",e.jsx("code",{className:"text-[var(--accent)]",children:"platform_uid"}),". find it via the user's profile → more → copy member id."]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// bot commands"}),e.jsx("div",{className:"overflow-x-auto rounded-[4px] border border-[var(--border)]",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"command"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"alias"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"example"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsx("tbody",{children:r.map((t,a)=>e.jsxs("tr",{className:"border-b border-[var(--border)] last:border-b-0",children:[e.jsx("td",{className:"px-3 py-2 text-[var(--accent)] whitespace-nowrap",children:t.command}),e.jsx("td",{className:"px-3 py-2 text-[var(--text-secondary)]",children:t.alias||"—"}),e.jsx("td",{className:"px-3 py-2 text-[var(--text-secondary)] whitespace-nowrap",children:e.jsx("code",{children:t.example})}),e.jsx("td",{className:"px-3 py-2 text-[var(--text-muted)]",children:t.description})]},a))})]})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// interactive cards"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"when a pipeline reaches a confirmation stage, the bot sends an interactive card with action buttons (confirm / cancel / choice). users can respond directly from the chat interface without opening the web dashboard."})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// multi-bot architecture"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"overlord supports multiple bot instances. each project or group can have its own bot on any supported platform. all bots share the same overlord backend. the server identifies which bot to use based on the app_id in the incoming request."}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2",children:e.jsx("p",{className:"text-xs text-[var(--text-secondary)]",children:"// a discord adapter is planned for a future release. the adapter interface is extensible — custom platform support can be added by implementing the adapter interface."})})]})]})})}export{l as default};