@overlordai/server 1.0.60 → 1.0.62
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.
- package/database/migrations/002-task-type.sql +2 -0
- package/dist/adapters/lark/lark-message.parser.d.ts +1 -0
- package/dist/adapters/lark/lark-message.parser.d.ts.map +1 -1
- package/dist/adapters/lark/lark-message.parser.js +9 -0
- package/dist/adapters/lark/lark-message.parser.js.map +1 -1
- package/dist/adapters/slack/slack-message.parser.d.ts.map +1 -1
- package/dist/adapters/slack/slack-message.parser.js +9 -0
- package/dist/adapters/slack/slack-message.parser.js.map +1 -1
- package/dist/database/repositories/task.repository.d.ts +2 -0
- package/dist/database/repositories/task.repository.d.ts.map +1 -1
- package/dist/database/repositories/task.repository.js +6 -2
- package/dist/database/repositories/task.repository.js.map +1 -1
- package/dist/database/repositories/workspace.repository.d.ts +1 -0
- package/dist/database/repositories/workspace.repository.d.ts.map +1 -1
- package/dist/database/repositories/workspace.repository.js +14 -0
- package/dist/database/repositories/workspace.repository.js.map +1 -1
- package/dist/dispatcher/dispatcher.service.d.ts.map +1 -1
- package/dist/dispatcher/dispatcher.service.js +1 -0
- package/dist/dispatcher/dispatcher.service.js.map +1 -1
- package/dist/dispatcher/scheduler.service.d.ts.map +1 -1
- package/dist/dispatcher/scheduler.service.js +2 -0
- package/dist/dispatcher/scheduler.service.js.map +1 -1
- package/dist/dispatcher/task-creation.service.d.ts.map +1 -1
- package/dist/dispatcher/task-creation.service.js +2 -0
- package/dist/dispatcher/task-creation.service.js.map +1 -1
- package/dist/main.js.map +1 -1
- package/dist/web/frame-handlers/progress.handler.d.ts +3 -1
- package/dist/web/frame-handlers/progress.handler.d.ts.map +1 -1
- package/dist/web/frame-handlers/progress.handler.js +7 -1
- package/dist/web/frame-handlers/progress.handler.js.map +1 -1
- package/dist/web/task.controller.d.ts +2 -0
- package/dist/web/task.controller.d.ts.map +1 -1
- package/dist/web/worker-channel.gateway.d.ts +2 -1
- package/dist/web/worker-channel.gateway.d.ts.map +1 -1
- package/dist/web/worker-channel.gateway.js +5 -3
- package/dist/web/worker-channel.gateway.js.map +1 -1
- package/package.json +4 -4
- package/public/assets/{AccessTokensPage-CV8VN5V1.js → AccessTokensPage-DcOzH6vQ.js} +1 -1
- package/public/assets/{AdminPage-Bo3P5iZr.js → AdminPage-DjzkTi-Z.js} +1 -1
- package/public/assets/{ApiReferencePage-CmYuc51e.js → ApiReferencePage-Cn1nZmYJ.js} +1 -1
- package/public/assets/{AuditLogPage-AZg7lGzK.js → AuditLogPage-CkE1EJZh.js} +1 -1
- package/public/assets/{BindPlatformPage-B6UZICVu.js → BindPlatformPage-DYNztOnJ.js} +1 -1
- package/public/assets/{BotManage-BmO8KcyJ.js → BotManage-B4YAKqEk.js} +1 -1
- package/public/assets/{CliReferencePage-C94W05JK.js → CliReferencePage-DyfbBqGH.js} +1 -1
- package/public/assets/{DeveloperManage-DCDaMC7Q.js → DeveloperManage-DgwZWjLh.js} +1 -1
- package/public/assets/{EditProjectPage-BppWlins.js → EditProjectPage-DjGCEool.js} +1 -1
- package/public/assets/{EmptyState-Wu8ZN3Cr.js → EmptyState-C7-kuf8X.js} +1 -1
- package/public/assets/{HomePage-l0ArgLuo.js → HomePage-CWYmPB1e.js} +1 -1
- package/public/assets/{InfoRow-g3rebB-5.js → InfoRow-DGZv5P3m.js} +1 -1
- package/public/assets/{LandingPage-boW1qkFr.js → LandingPage-ZuEWmIZL.js} +1 -1
- package/public/assets/{LoginPage-BnrBN7Pm.js → LoginPage-ZN3nJzEX.js} +1 -1
- package/public/assets/{MetricBar-DJTYljvt.js → MetricBar-CH5ccxZr.js} +1 -1
- package/public/assets/{NotFoundPage-DJfS5CJ3.js → NotFoundPage-DkoNgmQ4.js} +1 -1
- package/public/assets/{OnboardingGuide-DnA7icKO.js → OnboardingGuide-dk4OyOgV.js} +1 -1
- package/public/assets/{PipelineEditorPage-CeJlcFvd.js → PipelineEditorPage-CtUnQDef.js} +1 -1
- package/public/assets/{ProfilePage-CA89g3ZV.js → ProfilePage-B0CWDm55.js} +1 -1
- package/public/assets/{ProjectDetailPage-BWbDAdFB.js → ProjectDetailPage-BbOgUrnR.js} +1 -1
- package/public/assets/{ProjectListPage-DS1H39MT.js → ProjectListPage-CtGknAYM.js} +1 -1
- package/public/assets/{task-constants-5g7L_hzP.js → PtyTerminal-C28RQ62I.js} +4 -4
- package/public/assets/{QuickAuth-Zna-TvoV.js → QuickAuth-8eT76fKz.js} +1 -1
- package/public/assets/{RemoveMemberConfirmDialog-l1wwa1W6.js → RemoveMemberConfirmDialog-Ctyx8n2a.js} +1 -1
- package/public/assets/{Select-DZq-bKgi.js → Select-8MUED_Fj.js} +1 -1
- package/public/assets/{SettingsPage-TEGcISlB.js → SettingsPage-CXDXq71S.js} +1 -1
- package/public/assets/{Skeleton-Dj8lxPoL.js → Skeleton-B0x9oN6a.js} +1 -1
- package/public/assets/{SkillPage-C8Ajp8QF.js → SkillPage-CeTlmMdA.js} +1 -1
- package/public/assets/{TaskDetailPage-BtKpmra7.js → TaskDetailPage-jyeOPtsb.js} +2 -2
- package/public/assets/TaskListPage-DMYTWhw_.js +1 -0
- package/public/assets/{TaskStatusBadge-acWzsl5J.js → TaskStatusBadge-yU5DIpkP.js} +1 -1
- package/public/assets/TerminalHomePage-D3Z-uJUx.js +16 -0
- package/public/assets/{TokenManage-BIb_820M.js → TokenManage-NYgoI8yJ.js} +1 -1
- package/public/assets/{TotpSetupPage-BqZ_9PoT.js → TotpSetupPage-lw418pBO.js} +1 -1
- package/public/assets/{WorkerDetailPage-DjJH105s.js → WorkerDetailPage-CF7FWzQn.js} +1 -1
- package/public/assets/{WorkerListPage-BtbmZFmW.js → WorkerListPage-Dd6P84ye.js} +1 -1
- package/public/assets/{WorkerSetupGuidePage-Dj4Uw6lE.js → WorkerSetupGuidePage-dRLxcC1D.js} +1 -1
- package/public/assets/{arrow-left-BIZegN7f.js → arrow-left-D3hlGpFa.js} +1 -1
- package/public/assets/{arrow-right-Cz2VYV06.js → arrow-right-DbRiIkn5.js} +1 -1
- package/public/assets/{bot-DEczKx10.js → bot-DJcm4TDu.js} +1 -1
- package/public/assets/{chevron-right-BP3RjJKD.js → chevron-right-Cz1_0u26.js} +1 -1
- package/public/assets/{copy--Yno9vb0.js → copy-BSpogfAn.js} +1 -1
- package/public/assets/{external-link-CcU-f6-c.js → external-link-BYnHDfTq.js} +1 -1
- package/public/assets/{index-BkCeTWBV.js → index-C5ry7bCb.js} +3 -3
- package/public/assets/index-DBZN6iTO.css +1 -0
- package/public/assets/{key-CMkJGiSp.js → key-B7y18xnM.js} +1 -1
- package/public/assets/{loader-circle-bii_pnUR.js → loader-circle-j2WCDelv.js} +1 -1
- package/public/assets/{pencil-D5GJfzl9.js → pencil-CkuHyqYU.js} +1 -1
- package/public/assets/{plus-D1YuxwcM.js → plus-DETa4kg0.js} +1 -1
- package/public/assets/{rotate-ccw-DowaAMVF.js → rotate-ccw-oPqSTHU8.js} +1 -1
- package/public/assets/{scroll-text-BUhyeA5Y.js → scroll-text--ZQgIRbt.js} +1 -1
- package/public/assets/{settings-CZ-y53-I.js → settings-COdENdI-.js} +1 -1
- package/public/assets/{status-colors-iyCXeYpO.js → status-colors-C_xltR1x.js} +1 -1
- package/public/assets/task-constants-BisV3uAk.js +1 -0
- package/public/assets/{trash-2-BOrTcn3-.js → trash-2-BLxwKGg4.js} +1 -1
- package/public/assets/{useFetch-HnnJMiuj.js → useFetch-CKA2R0HW.js} +1 -1
- package/public/assets/{users-3lnyKPXK.js → users-Cm06VaAm.js} +1 -1
- package/public/assets/{wifi-7vpmfpr3.js → wifi-CoOrgHWP.js} +1 -1
- package/public/assets/{zap-BWW7mt1l.js → zap-CZBm69SW.js} +1 -1
- package/public/index.html +2 -2
- package/public/sw.js +1 -1
- package/public/assets/TaskListPage-CvipzH6U.js +0 -1
- package/public/assets/TerminalHomePage-CcAC6dSC.js +0 -16
- package/public/assets/index-BS0Fbx5V.css +0 -1
- package/public/assets/task.store-CtHlNDEq.js +0 -1
- /package/public/assets/{task-constants-Beg8tuEN.css → PtyTerminal-Beg8tuEN.css} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.controller.d.ts","sourceRoot":"","sources":["../../src/web/task.controller.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAiB,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC/F,OAAO,EAAE,KAAK,IAAI,EAAE,UAAU,EAA8B,MAAM,sBAAsB,CAAC;AAGzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oDAAoD,CAAC;AAC7F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAG1E,qBAEa,cAAc;IAEvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IACrC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,cAAc;gBANd,UAAU,EAAE,iBAAiB,EAC7B,mBAAmB,EAAE,mBAAmB,EACxC,oBAAoB,EAAE,oBAAoB,EAC1C,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,YAAY,EAC1B,iBAAiB,EAAE,uBAAuB,EAC1C,c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C9B,GAAG,EAAE,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuB5B,UAAU,CACN,IAAI,EAAE,iBAAiB,EACxB,GAAG,EAAE,oBAAoB;;;IAoB5B,UAAU,CACa,EAAE,EAAE,MAAM,EAC9B,GAAG,EAAE,oBAAoB;;;IAc5B,SAAS,CACc,EAAE,EAAE,MAAM,EAC9B,GAAG,EAAE,oBAAoB;;;IAclC,aAAa,CACgB,EAAE,EAAE,MAAM,EAC9B,GAAG,EAAE,oBAAoB,GAC/B,gBAAgB;IAab,YAAY,CACW,EAAE,EAAE,MAAM,EAC7B,IAAI,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAC/C,GAAG,EAAE,oBAAoB;;;CAkBnC"}
|
|
@@ -12,6 +12,7 @@ import { DedupService } from '../dispatcher/dedup.service';
|
|
|
12
12
|
import { WorkerRepository } from '../database/repositories/worker.repository';
|
|
13
13
|
import { TaskRepository } from '../database/repositories/task.repository';
|
|
14
14
|
import { WorkerTokenRepository } from '../database/repositories/worker-token.repository';
|
|
15
|
+
import { WorkspaceRepository } from '../database/repositories/workspace.repository';
|
|
15
16
|
import { NotifierService } from '../notifier/notifier.service';
|
|
16
17
|
import { TunnelService } from './tunnel.service';
|
|
17
18
|
export declare class WorkerChannelGateway implements OnGatewayConnection, OnGatewayDisconnect {
|
|
@@ -25,7 +26,7 @@ export declare class WorkerChannelGateway implements OnGatewayConnection, OnGate
|
|
|
25
26
|
private readonly authedSockets;
|
|
26
27
|
private readonly AUTH_TIMEOUT_MS;
|
|
27
28
|
private readonly frameHandlerRegistry;
|
|
28
|
-
constructor(authService: AuthService, workerConnectionManager: WorkerConnectionManager, heartbeatService: HeartbeatService, reconciler: Reconciler, taskLifecycleService: TaskLifecycleService, taskLogBatcher: TaskLogBatcher, dedupService: DedupService, workerRepo: WorkerRepository, taskRepo: TaskRepository, workerTokenRepo: WorkerTokenRepository, notifierService: NotifierService, tunnelService: TunnelService, eventEmitter: EventEmitter2);
|
|
29
|
+
constructor(authService: AuthService, workerConnectionManager: WorkerConnectionManager, heartbeatService: HeartbeatService, reconciler: Reconciler, taskLifecycleService: TaskLifecycleService, taskLogBatcher: TaskLogBatcher, dedupService: DedupService, workerRepo: WorkerRepository, taskRepo: TaskRepository, workerTokenRepo: WorkerTokenRepository, notifierService: NotifierService, tunnelService: TunnelService, eventEmitter: EventEmitter2, workspaceRepo: WorkspaceRepository);
|
|
29
30
|
handleConnection(client: WebSocket, _req: IncomingMessage): void;
|
|
30
31
|
handleDisconnect(client: WebSocket): void;
|
|
31
32
|
private handleAuth;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-channel.gateway.d.ts","sourceRoot":"","sources":["../../src/web/worker-channel.gateway.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAc/B,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,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B,EACjE,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,oBAAoB,EAC1C,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,YAAY,EACT,UAAU,EAAE,gBAAgB,EAC7C,QAAQ,EAAE,cAAc,EACP,eAAe,EAAE,qBAAqB,EACvD,eAAe,EAAE,eAAe,EACf,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,aAAa,EAC5C,aAAa,EAAE,mBAAmB;IAkBpC,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,GAAG,IAAI;IA+ChE,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI;IAmBzC,OAAO,CAAC,UAAU;IA8ElB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;CA6C5B"}
|
|
@@ -26,6 +26,7 @@ const dedup_service_1 = require("../dispatcher/dedup.service");
|
|
|
26
26
|
const worker_repository_1 = require("../database/repositories/worker.repository");
|
|
27
27
|
const task_repository_1 = require("../database/repositories/task.repository");
|
|
28
28
|
const worker_token_repository_1 = require("../database/repositories/worker-token.repository");
|
|
29
|
+
const workspace_repository_1 = require("../database/repositories/workspace.repository");
|
|
29
30
|
const notifier_service_1 = require("../notifier/notifier.service");
|
|
30
31
|
const tunnel_service_1 = require("./tunnel.service");
|
|
31
32
|
const frame_handlers_1 = require("./frame-handlers");
|
|
@@ -40,7 +41,7 @@ let WorkerChannelGateway = WorkerChannelGateway_1 = class WorkerChannelGateway {
|
|
|
40
41
|
authedSockets = new Map();
|
|
41
42
|
AUTH_TIMEOUT_MS = 10_000;
|
|
42
43
|
frameHandlerRegistry;
|
|
43
|
-
constructor(authService, workerConnectionManager, heartbeatService, reconciler, taskLifecycleService, taskLogBatcher, dedupService, workerRepo, taskRepo, workerTokenRepo, notifierService, tunnelService, eventEmitter) {
|
|
44
|
+
constructor(authService, workerConnectionManager, heartbeatService, reconciler, taskLifecycleService, taskLogBatcher, dedupService, workerRepo, taskRepo, workerTokenRepo, notifierService, tunnelService, eventEmitter, workspaceRepo) {
|
|
44
45
|
this.authService = authService;
|
|
45
46
|
this.workerConnectionManager = workerConnectionManager;
|
|
46
47
|
this.workerRepo = workerRepo;
|
|
@@ -49,7 +50,7 @@ let WorkerChannelGateway = WorkerChannelGateway_1 = class WorkerChannelGateway {
|
|
|
49
50
|
this.eventEmitter = eventEmitter;
|
|
50
51
|
this.frameHandlerRegistry = new frame_handlers_1.FrameHandlerRegistry([
|
|
51
52
|
new frame_handlers_1.HeartbeatHandler(heartbeatService, tunnelService),
|
|
52
|
-
new frame_handlers_1.ProgressHandler(workerConnectionManager, reconciler, taskLifecycleService, taskLogBatcher, workerRepo, taskRepo),
|
|
53
|
+
new frame_handlers_1.ProgressHandler(workerConnectionManager, reconciler, taskLifecycleService, taskLogBatcher, workerRepo, taskRepo, workspaceRepo),
|
|
53
54
|
new frame_handlers_1.StageConfirmHandler(dedupService, taskRepo, notifierService),
|
|
54
55
|
new frame_handlers_1.TunnelHandler(tunnelService),
|
|
55
56
|
]);
|
|
@@ -224,6 +225,7 @@ exports.WorkerChannelGateway = WorkerChannelGateway = WorkerChannelGateway_1 = _
|
|
|
224
225
|
worker_token_repository_1.WorkerTokenRepository,
|
|
225
226
|
notifier_service_1.NotifierService,
|
|
226
227
|
tunnel_service_1.TunnelService,
|
|
227
|
-
event_emitter_1.EventEmitter2
|
|
228
|
+
event_emitter_1.EventEmitter2,
|
|
229
|
+
workspace_repository_1.WorkspaceRepository])
|
|
228
230
|
], WorkerChannelGateway);
|
|
229
231
|
//# sourceMappingURL=worker-channel.gateway.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-channel.gateway.js","sourceRoot":"","sources":["../../src/web/worker-channel.gateway.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAI4B;AAC5B,2CAAwC;AAIxC,mDAM8B;AAM9B,yDAAsD;AACtD,uDAAsF;AACtF,uDAAmD;AACnD,uFAAkF;AAClF,uEAAmE;AACnE,yDAAsD;AACtD,iFAA4E;AAC5E,qEAAgE;AAChE,+DAA2D;AAC3D,kFAA8E;AAC9E,8EAA0E;AAC1E,8FAAyF;AACzF,mEAA+D;AAC/D,qDAAiD;AACjD,qDAM0B;AAWnB,IAAM,oBAAoB,4BAA1B,MAAM,oBAAoB;IASZ;IACA;IAMA;IAEA;IAEA;IACA;IAlBF,MAAM,GAAG,IAAI,eAAM,CAAC,sBAAoB,CAAC,IAAI,CAAC,CAAC;IAC/C,aAAa,GAAG,IAAI,GAAG,EAAkC,CAAC;IAC1D,eAAe,GAAG,MAAM,CAAC;IACzB,oBAAoB,CAAuB;IAE5D,YACmB,WAAwB,EACxB,uBAAgD,EACjE,gBAAkC,EAClC,UAAsB,EACtB,oBAA0C,EAC1C,cAA8B,EAC9B,YAA0B,EACT,UAA4B,EAC7C,QAAwB,EACP,eAAsC,EACvD,eAAgC,EACf,aAA4B,EAC5B,YAA2B;
|
|
1
|
+
{"version":3,"file":"worker-channel.gateway.js","sourceRoot":"","sources":["../../src/web/worker-channel.gateway.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAI4B;AAC5B,2CAAwC;AAIxC,mDAM8B;AAM9B,yDAAsD;AACtD,uDAAsF;AACtF,uDAAmD;AACnD,uFAAkF;AAClF,uEAAmE;AACnE,yDAAsD;AACtD,iFAA4E;AAC5E,qEAAgE;AAChE,+DAA2D;AAC3D,kFAA8E;AAC9E,8EAA0E;AAC1E,8FAAyF;AACzF,wFAAoF;AACpF,mEAA+D;AAC/D,qDAAiD;AACjD,qDAM0B;AAWnB,IAAM,oBAAoB,4BAA1B,MAAM,oBAAoB;IASZ;IACA;IAMA;IAEA;IAEA;IACA;IAlBF,MAAM,GAAG,IAAI,eAAM,CAAC,sBAAoB,CAAC,IAAI,CAAC,CAAC;IAC/C,aAAa,GAAG,IAAI,GAAG,EAAkC,CAAC;IAC1D,eAAe,GAAG,MAAM,CAAC;IACzB,oBAA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,EAAE,sBAAsB,EAAE,CAAC;qCAUjB,0BAAW;QACC,mDAAuB;QAC/C,oCAAgB;QACtB,uBAAU;QACA,6CAAoB;QAC1B,iCAAc;QAChB,4BAAY;QACG,oCAAgB;QACnC,gCAAc;QACU,+CAAqB;QACtC,kCAAe;QACA,8BAAa;QACd,6BAAa;QAC7B,0CAAmB;GAtBzB,oBAAoB,CA0OhC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@overlordai/server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.62",
|
|
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.
|
|
32
|
-
"@overlordai/protocol": "1.0.
|
|
33
|
-
"@overlordai/validation": "1.0.
|
|
31
|
+
"@overlordai/command-parser": "1.0.62",
|
|
32
|
+
"@overlordai/protocol": "1.0.62",
|
|
33
|
+
"@overlordai/validation": "1.0.62",
|
|
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-
|
|
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 +1 @@
|
|
|
1
|
-
import{a as i,K as d,j as t,E as m,O as l}from"./index-
|
|
1
|
+
import{a as i,K as d,j as t,E as m,O as l}from"./index-C5ry7bCb.js";import{U as c}from"./users-Cm06VaAm.js";import{B as b}from"./bot-DJcm4TDu.js";import{S as x}from"./scroll-text--ZQgIRbt.js";import{S as p}from"./settings-COdENdI-.js";function _(){const{t:a}=i(),o=[{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:x},{to:"/admin/settings",label:a("admin.tab_settings"),icon:p}];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",children:o.map(({to:e,label:r,icon:s})=>t.jsxs(m,{to:e,className:({isActive:n})=>`flex shrink-0 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}),r]},e))}),t.jsx(l,{})]})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as d,a as o,n as p,r as n,j as t}from"./index-BkCeTWBV.js";import{Q as c}from"./QuickAuth-Zna-TvoV.js";import{P as h}from"./plus-D1YuxwcM.js";import"./copy--Yno9vb0.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-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,4 +1,4 @@
|
|
|
1
|
-
import{c as C,a as S,r,g as k,j as e,o as L}from"./index-
|
|
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";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u,z as h,e as g,r as s,g as v,j as e}from"./index-
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import{c as K,a as E,r as s,j as e,X as $,g,s as z,t as q}from"./index-
|
|
1
|
+
import{c as K,a as E,r as s,j as e,X as $,g,s as z,t as q}from"./index-C5ry7bCb.js";import{S as A}from"./Select-8MUED_Fj.js";import{T as D}from"./trash-2-BLxwKGg4.js";import{P as M}from"./plus-DETa4kg0.js";import{E as O}from"./EmptyState-C7-kuf8X.js";import{T}from"./Skeleton-B0x9oN6a.js";import{u as B}from"./useFetch-CKA2R0HW.js";import{d as P}from"./status-colors-C_xltR1x.js";import{B as R}from"./bot-DJcm4TDu.js";import{P as U}from"./pencil-CkuHyqYU.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as l,a as n,n as p,r as d,j as e,C as m}from"./index-
|
|
1
|
+
import{e as l,a as n,n as p,r as d,j as e,C as m}from"./index-C5ry7bCb.js";import{Q as x}from"./QuickAuth-8eT76fKz.js";import{P as u}from"./plus-DETa4kg0.js";import{C as v}from"./copy-BSpogfAn.js";const g=[{command:"ov setup",description:"quick setup — configure server connection and authenticate in one step",usage:"ov setup [--server <url>] [--token <token>]",flags:[{flag:"--server <url>",desc:"overlord server url"},{flag:"--token <token>",desc:"personal access token (skips prompt)"}],example:`ov setup
|
|
2
2
|
> Overlord server URL: http://localhost:9000
|
|
3
3
|
> Personal Access Token: ov_pat_xxxxx
|
|
4
4
|
✓ Connected to http://localhost:9000
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as I,D as C,a as D,r as l,j as e,X as R,g as E,u as z,o as V,F as k}from"./index-
|
|
1
|
+
import{c as I,D as C,a as D,r as l,j as e,X as R,g as E,u as z,o as V,F as k}from"./index-C5ry7bCb.js";import{S as O}from"./Select-8MUED_Fj.js";import{v as q}from"./password-CHk45-jw.js";import{E as $}from"./EmptyState-C7-kuf8X.js";import{T as G}from"./Skeleton-B0x9oN6a.js";import{u as H}from"./useFetch-CKA2R0HW.js";import{c as L}from"./status-colors-C_xltR1x.js";import{P as B}from"./plus-DETa4kg0.js";import{U as J}from"./users-Cm06VaAm.js";import{P as K}from"./pencil-CkuHyqYU.js";import{R as Q}from"./rotate-ccw-oPqSTHU8.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{v as me,e as be,a as ve,r as s,G as j,A as p,g as i,j as e,L as je,P as ee,t as c}from"./index-
|
|
1
|
+
import{v as me,e as be,a as ve,r as s,G as j,A as p,g as i,j as e,L as je,P as ee,t as c}from"./index-C5ry7bCb.js";import{S as te}from"./Select-8MUED_Fj.js";import{U as ge,A as he,R as ye}from"./RemoveMemberConfirmDialog-Ctyx8n2a.js";import{P as fe}from"./plus-DETa4kg0.js";function we(){const{key:n}=me(),l=be(),{t:r}=ve(),[o,re]=s.useState(null),[g,se]=s.useState([]),[ae,oe]=s.useState(!0),[w,h]=s.useState(!1),[y,S]=s.useState(""),[f,T]=s.useState(""),[M,I]=s.useState(""),[A,P]=s.useState(j.GITHUB),[R,U]=s.useState(""),[O,G]=s.useState(p.CLAUDE),[E,$]=s.useState(""),[D,L]=s.useState("50"),[B,F]=s.useState(""),[J,q]=s.useState(""),[z,H]=s.useState(""),[K,W]=s.useState("0"),[x,N]=s.useState(""),[X,k]=s.useState(null),[u,_]=s.useState(""),[Q,m]=s.useState(!1),[ne,V]=s.useState(!1),[d,C]=s.useState(null),[le,Y]=s.useState(!1),b=s.useCallback(async()=>{if(n)try{const[t,v]=await Promise.all([i.get(`web/projects/${n}`).json(),i.get(`web/projects/${n}/members`).json().catch(()=>[])]);if(re(t),se(v),k(t.gitTokenMasked??null),S(t.name),T(t.repoUrl),I(t.sshUrl??""),P(t.gitPlatform),U(t.defaultBranch),G(t.agentType),$(t.agentCommand??""),L(String(t.maxTurns)),F(t.workspaceRoot??""),q(t.setupCommands??""),H(t.testCommand??""),W(String(t.ptyOutputFilter??0)),t.pipeline)try{N(JSON.stringify(JSON.parse(t.pipeline),null,2))}catch{N(t.pipeline)}}catch{}finally{oe(!1)}},[n]);s.useEffect(()=>{b()},[b]);async function ce(t){if(t.preventDefault(),!o)return;h(!0);let v=null;if(x.trim())try{JSON.parse(x),v=x.trim()}catch{c.error(r("projects.invalid_pipeline_json")),h(!1);return}try{await i.put(`web/projects/${o.key}`,{json:{name:y,repoUrl:f,sshUrl:M||null,defaultBranch:R,gitPlatform:A,agentType:O,agentCommand:E||null,maxTurns:parseInt(D,10)||50,workspaceRoot:B||null,setupCommands:J||null,testCommand:z||null,ptyOutputFilter:parseInt(K,10)||0,pipeline:v}}),c.success(r("projects.project_saved")),l(`/projects/${o.key}`)}catch(Z){const ue=Z instanceof Error?Z.message:r("projects.failed_to_save_project");c.error(ue)}finally{h(!1)}}function de(){l(`/projects/${n}`)}async function ie(){if(!(!o||!u.trim())){m(!0);try{const t=await i.put(`web/projects/${o.key}/git-token`,{json:{token:u.trim()}}).json();k(t.gitTokenMasked),_(""),c.success(r("projects.git_token_saved"))}catch{c.error(r("projects.git_token_failed"))}finally{m(!1)}}}async function pe(){if(o){m(!0);try{await i.delete(`web/projects/${o.key}/git-token`),k(null),_(""),c.success(r("projects.git_token_cleared"))}catch{c.error(r("projects.git_token_failed"))}finally{m(!1)}}}async function xe(){if(!(!o||!d)){Y(!0);try{await i.delete(`web/projects/${o.key}/members`,{searchParams:{developerId:String(d.developerId)}}),await b()}catch{}finally{Y(!1),C(null)}}}return ae?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})}):o?e.jsxs("form",{onSubmit:ce,className:"mx-auto max-w-6xl px-4 md:px-6 py-8",children:[e.jsxs("div",{className:"mb-2 text-xs text-[var(--text-muted)]",children:[e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l("/projects"),children:r("projects.title")})," / ",e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l(`/projects/${o.key}`),children:o.key})," / ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:r("common.edit")})]}),e.jsx("h1",{className:"text-lg font-bold text-[var(--text-primary)] mb-4",children:r("projects.edit_project_title")}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_400px]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.basic_info")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.key"),children:e.jsx("input",{type:"text",value:o.key,readOnly:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-muted)] outline-none opacity-60 cursor-not-allowed"})}),e.jsx(a,{label:r("projects.name"),children:e.jsx("input",{type:"text",value:y,onChange:t=>S(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.repo_url"),children:e.jsx("input",{type:"text",value:f,onChange:t=>T(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsxs(a,{label:r("projects.ssh_url"),children:[e.jsx("input",{type:"text",value:M,onChange:t=>I(t.target.value),placeholder:r("projects.ssh_url_placeholder"),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:r("projects.ssh_url_hint")})]}),e.jsx(a,{label:r("projects.git_platform"),children:e.jsx(te,{value:A,onChange:t=>P(t),options:[{value:j.GITHUB,label:r("projects.github")},{value:j.GITLAB,label:r("projects.gitlab")},{value:j.GITEA,label:r("projects.gitea")}]})}),e.jsx(a,{label:r("projects.default_branch"),children:e.jsx("input",{type:"text",value:R,onChange:t=>U(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.agent_config")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.agent_type"),children:e.jsx(te,{value:O,onChange:t=>G(t),options:[{value:p.CLAUDE,label:r("projects.claude")},{value:p.CURSOR,label:r("projects.cursor")},{value:p.CODEX,label:r("projects.codex")},{value:p.CUSTOM,label:r("projects.custom")}]})}),e.jsx(a,{label:r("projects.agent_command"),children:e.jsx("input",{type:"text",value:E,onChange:t=>$(t.target.value),placeholder:"custom agent command",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.max_turns"),children:e.jsx("input",{type:"number",value:D,onChange:t=>L(t.target.value),min:1,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.workspace_root"),children:e.jsx("input",{type:"text",value:B,onChange:t=>F(t.target.value),placeholder:"/path/to/workspace",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.environment")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.setup_commands"),children:e.jsx("textarea",{value:J,onChange:t=>q(t.target.value),rows:3,placeholder:`npm install
|
|
2
2
|
npm run build`,className:"w-full resize-y rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.post_command"),children:e.jsx("input",{type:"text",value:z,onChange:t=>H(t.target.value),placeholder:"npm test",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.security")}),e.jsx("div",{className:"space-y-3",children:e.jsx(a,{label:r("projects.pty_output_filter"),children:e.jsx("input",{type:"text",value:K,onChange:t=>W(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.git_token")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.git_token_label"),children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:X??r("common.not_set")})})}),e.jsxs(a,{label:r("projects.git_token_set"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"password",value:u,onChange:t=>_(t.target.value),placeholder:"ghp_xxxx...",className:"flex-1 rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("button",{type:"button",disabled:Q||!u.trim(),onClick:ie,className:"shrink-0 rounded-[4px] bg-[var(--accent)] px-3 py-2 text-xs font-medium text-black hover:opacity-90 transition-opacity disabled:opacity-50",children:r("common.save")})]}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:r("projects.git_token_hint")})]}),X&&e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{type:"button",disabled:Q,onClick:pe,className:"rounded-[4px] border border-[var(--destructive)] px-3 py-1.5 text-xs text-[var(--destructive)] hover:opacity-70 transition-opacity disabled:opacity-50",children:r("projects.git_token_clear")})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--accent)]",children:r("projects.pipeline_section")}),e.jsx(je,{to:"/projects/"+n+"/pipeline",className:"text-xs text-[var(--accent)] hover:underline",children:r("projects.edit_pipeline")})]}),e.jsx("textarea",{value:x,onChange:t=>N(t.target.value),rows:20,spellCheck:!1,placeholder:'{"stages": []}',className:"w-full resize-y rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]",style:{fontFamily:'"JetBrains Mono", monospace',textTransform:"none"}})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--accent)]",children:r("projects.members")}),e.jsxs("button",{type:"button",onClick:()=>V(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs font-medium text-black",children:[e.jsx(fe,{className:"h-3.5 w-3.5"}),r("projects.add_member")]})]}),g.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("projects.no_members_yet")})]}):e.jsx("div",{className:"space-y-2",children:g.map(t=>e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-[var(--accent)]/20 text-xs font-bold text-[var(--accent)]",children:(t.developerName??String(t.developerId)).charAt(0).toUpperCase()}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:t.developerName??`#${t.developerId}`}),e.jsx("span",{className:"ml-2 rounded-[4px] px-1.5 py-0.5 text-[11px] font-medium",style:{color:t.role===ee.MAINTAINER?"var(--warning)":"var(--text-secondary)",background:t.role===ee.MAINTAINER?"rgba(245,158,11,0.1)":"rgba(163,163,163,0.1)"},children:t.role})]})]}),e.jsx("button",{type:"button",onClick:()=>C(t),className:"text-[var(--destructive)] hover:opacity-70 transition-opacity","aria-label":r("projects.remove_member"),children:e.jsx(ge,{className:"h-3.5 w-3.5"})})]},t.developerId))})]})]})]}),e.jsxs("div",{className:"mt-8 flex items-center justify-end gap-3 border-t border-[var(--border)] pt-6",children:[e.jsx("button",{type:"button",onClick:de,className:"rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("common.discard")}),e.jsx("button",{type:"submit",disabled:w||!y||!f,className:"rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-medium text-black hover:opacity-90 transition-opacity disabled:opacity-50",children:r(w?"common.saving":"projects.save_changes")})]}),e.jsx(he,{isOpen:ne,onClose:()=>V(!1),projectKey:o.key,existingMemberIds:g.map(t=>t.developerId),onAdded:b}),e.jsx(ye,{isOpen:!!d,onClose:()=>C(null),onConfirm:xe,memberName:d?d.developerName??`#${d.developerId}`:"",loading:le})]}):e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 text-center",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:r("projects.project_not_found")}),e.jsx("button",{onClick:()=>l("/projects"),className:"mt-4 rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:r("projects.back_to_projects")})]})}function a({label:n,children:l}){return e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-1 sm:gap-3",children:[e.jsx("label",{className:"sm:w-36 shrink-0 sm:pt-2 text-xs text-[var(--text-muted)]",children:n}),e.jsx("div",{className:"flex-1",children:l})]})}export{we as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as W,a as A,h as $,i as w,r as S,j as e,L as b,W as v,g as x}from"./index-BkCeTWBV.js";import{T as L}from"./TaskStatusBadge-acWzsl5J.js";import{T as u}from"./Skeleton-Dj8lxPoL.js";import{O as B}from"./OnboardingGuide-DnA7icKO.js";import{f as j}from"./date-BdNtiQTP.js";import{t as D}from"./string-B39tzdVK.js";import{g as F}from"./status-colors-iyCXeYpO.js";import{u as o}from"./useFetch-HnnJMiuj.js";import{A as g}from"./arrow-right-Cz2VYV06.js";import"./chevron-right-BP3RjJKD.js";const M=3e5,O=[{key:"active_tasks",labelKey:"dashboard.active_tasks"},{key:"queued_tasks",labelKey:"dashboard.queued_tasks"},{key:"online_workers",labelKey:"dashboard.online_workers"},{key:"completed_today",labelKey:"dashboard.completed_today"}],P=["mon","tue","wed","thu","fri","sat","sun"];function G({dailyRates:l,overallRate:t}){const{t:m}=A(),n=P.map((r,c)=>({label:r,value:l[c]??0})),i=Math.max(...n.map(r=>r.value),1);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 flex items-baseline gap-2",children:[e.jsxs("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:[t,"%"]}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:m("dashboard.last_7_days")})]}),e.jsx("div",{className:"flex gap-2",style:{height:80},children:n.map(r=>{const c=i>0?Math.max(r.value/i*100,4):4;return e.jsxs("div",{className:"flex flex-1 flex-col items-center gap-1",children:[e.jsx("div",{className:"relative w-full h-full rounded-[4px]",style:{backgroundColor:"rgba(34,197,94,0.1)"},children:e.jsx("div",{className:"absolute bottom-0 left-0 right-0 rounded-[4px]",style:{height:`${c}%`,backgroundColor:r.value>=80?"var(--accent)":r.value>=50?"var(--warning)":"var(--destructive)"}})}),e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:r.label})]},r.label)})})]})}function se(){const l=W(),{t}=A(),m=$(),n=w(s=>s.taskSeq),i=w(s=>s.workerSeq),[r,c]=S.useState(0),{data:a,loading:f}=o(()=>x.get("web/dashboard/stats").json(),[r,n,i]),{data:T,loading:R}=o(()=>x.get("web/dashboard/recent-tasks",{searchParams:{limit:"5"}}).json(),[r,n]),{data:C,loading:I}=o(()=>x.get("web/workers").json(),[r,i]),{data:E,loading:q}=o(()=>x.get("web/dashboard/recent-activity").json(),[]);S.useEffect(()=>{const s=setInterval(()=>{c(d=>d+1)},M);return()=>clearInterval(s)},[]);const N=(a==null?void 0:a.success_rate_daily)??null,y=(a==null?void 0:a.task_success_rate_7d)??0,k=T??[],h=C??[],_=E??[];function K(s){switch(s){case v.ONLINE:return t("dashboard.online");case v.DRAINING:return t("dashboard.idle");case v.OFFLINE:default:return t("dashboard.offline")}}return e.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-4 md:px-6 md:py-8 font-mono",children:[e.jsx("div",{className:"mb-4 md:hidden",children:e.jsxs("span",{className:"text-base font-bold text-[var(--accent)]",children:["// ",t("dashboard.title")]})}),e.jsx("div",{className:"mb-6 md:mb-8 grid grid-cols-2 gap-3 md:gap-4 lg:grid-cols-4",children:O.map(({key:s,labelKey:d})=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-4",children:[e.jsxs("span",{className:"text-[11px] md:text-xs text-[var(--text-muted)]",children:[t(d),":"]}),f?e.jsx("div",{className:"mt-1 h-6 md:h-8 w-12 md:w-16 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):e.jsx("div",{className:"mt-1 flex items-baseline gap-2",children:e.jsx("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:(a==null?void 0:a[s])??0})})]},s))}),e.jsx(B,{data:{activeTasks:((a==null?void 0:a.active_tasks)??0)+((a==null?void 0:a.queued_tasks)??0),totalWorkers:h.length,totalProjects:(a==null?void 0:a.project_count)??0,totalDevelopers:(a==null?void 0:a.developer_count)??0}}),e.jsxs("div",{className:"mb-6 grid gap-6 lg:grid-cols-3 items-stretch",children:[e.jsx("div",{className:"flex flex-col gap-6 lg:col-span-2",children:e.jsxs("div",{className:"flex flex-1 flex-col rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("div",{className:"border-b border-[var(--border)] px-5 py-3",children:e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.task_success_rate")})}),e.jsx("div",{className:"flex flex-1 flex-col justify-center p-5",children:f?e.jsx("div",{className:"h-24 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):N?e.jsx(G,{dailyRates:N,overallRate:y}):e.jsxs("div",{className:"flex flex-col items-center gap-2 py-6",children:[e.jsxs("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:[y,"%"]}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.daily_breakdown_not_available")})]})})]})}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:border",children:[e.jsxs("div",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.recent_tasks")}),e.jsxs(b,{to:"/tasks",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[t("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"flex md:hidden items-center justify-between px-3 py-3",children:e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:t("dashboard.recent_tasks")})}),e.jsx("div",{className:"px-3 pb-3 md:px-5 md:pb-4 md:pt-0",children:R?e.jsx(u,{rows:4}):k.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.no_tasks_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2 md:gap-0",children:k.map(s=>e.jsxs("div",{onClick:()=>l(`/tasks/${s.id}`),className:"flex cursor-pointer items-center gap-3 rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)] md:rounded-none md:border-0 md:border-b md:border-[var(--border-row)] md:p-0 md:py-2.5 last:md:border-b-0",children:[e.jsxs("div",{className:"flex-1 min-w-0 md:hidden",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("span",{className:"text-[11px] text-[var(--text-primary)] leading-tight",style:{wordBreak:"break-word"},children:["#",s.id," ",s.description]}),e.jsx("span",{className:"shrink-0",children:e.jsx(L,{status:s.status})})]}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)] mt-1 block",children:j(s.createdAt)})]}),e.jsxs("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:["#",s.id]}),e.jsx("span",{className:"hidden md:inline flex-1 text-xs text-[var(--text-primary)] truncate",children:D(s.description,40)}),e.jsx("span",{className:"hidden md:inline",children:e.jsx(L,{status:s.status})}),e.jsx("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:j(s.createdAt)})]},s.id))})})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.worker_status")}),e.jsxs(b,{to:"/workers",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[t("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:I?e.jsx(u,{rows:3}):h.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.no_workers_registered")})]}):e.jsx("div",{className:"flex flex-col",children:h.map(s=>e.jsxs("div",{onClick:()=>l(`/workers/${s.id}`),className:"flex cursor-pointer items-center justify-between border-b border-[var(--border-row)] py-2.5 transition-colors hover:bg-[var(--bg-input)] last:border-b-0",children:[e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:s.host??"--"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:[s.activeSlots,"/",s.maxSlots," ",t("dashboard.slots")]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs",style:{color:F(s.status)},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),K(s.status)]})]})]},s.id))})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.recent_activity")}),m&&e.jsxs(b,{to:"/admin/audit-logs",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[t("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:q?e.jsx(u,{rows:4}):_.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.no_recent_activity")})]}):e.jsx("div",{className:"flex flex-col",children:_.map(s=>{const d=s.message.match(/task\s*#?(\d+)/i),p=d?d[1]:null;return e.jsxs("div",{className:`flex items-start gap-3 border-b border-[var(--border-row)] py-2 last:border-b-0 ${p?"cursor-pointer hover:bg-[var(--bg-input)] transition-colors":""}`,onClick:()=>p&&l(`/tasks/${p}`),children:[e.jsx("span",{className:"shrink-0 text-xs text-[var(--text-muted)]",children:j(s.timestamp)}),e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:s.message})]},s.id)})})})]})]})]})}export{se as default};
|
|
1
|
+
import{e as W,a as A,h as $,i as w,r as S,j as e,L as b,W as v,g as x}from"./index-C5ry7bCb.js";import{T as L}from"./TaskStatusBadge-yU5DIpkP.js";import{T as u}from"./Skeleton-B0x9oN6a.js";import{O as B}from"./OnboardingGuide-dk4OyOgV.js";import{f as j}from"./date-BdNtiQTP.js";import{t as D}from"./string-B39tzdVK.js";import{g as F}from"./status-colors-C_xltR1x.js";import{u as o}from"./useFetch-CKA2R0HW.js";import{A as g}from"./arrow-right-DbRiIkn5.js";import"./chevron-right-Cz1_0u26.js";const M=3e5,O=[{key:"active_tasks",labelKey:"dashboard.active_tasks"},{key:"queued_tasks",labelKey:"dashboard.queued_tasks"},{key:"online_workers",labelKey:"dashboard.online_workers"},{key:"completed_today",labelKey:"dashboard.completed_today"}],P=["mon","tue","wed","thu","fri","sat","sun"];function G({dailyRates:l,overallRate:t}){const{t:m}=A(),n=P.map((r,c)=>({label:r,value:l[c]??0})),i=Math.max(...n.map(r=>r.value),1);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 flex items-baseline gap-2",children:[e.jsxs("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:[t,"%"]}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:m("dashboard.last_7_days")})]}),e.jsx("div",{className:"flex gap-2",style:{height:80},children:n.map(r=>{const c=i>0?Math.max(r.value/i*100,4):4;return e.jsxs("div",{className:"flex flex-1 flex-col items-center gap-1",children:[e.jsx("div",{className:"relative w-full h-full rounded-[4px]",style:{backgroundColor:"rgba(34,197,94,0.1)"},children:e.jsx("div",{className:"absolute bottom-0 left-0 right-0 rounded-[4px]",style:{height:`${c}%`,backgroundColor:r.value>=80?"var(--accent)":r.value>=50?"var(--warning)":"var(--destructive)"}})}),e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:r.label})]},r.label)})})]})}function se(){const l=W(),{t}=A(),m=$(),n=w(s=>s.taskSeq),i=w(s=>s.workerSeq),[r,c]=S.useState(0),{data:a,loading:f}=o(()=>x.get("web/dashboard/stats").json(),[r,n,i]),{data:T,loading:R}=o(()=>x.get("web/dashboard/recent-tasks",{searchParams:{limit:"5"}}).json(),[r,n]),{data:C,loading:I}=o(()=>x.get("web/workers").json(),[r,i]),{data:E,loading:q}=o(()=>x.get("web/dashboard/recent-activity").json(),[]);S.useEffect(()=>{const s=setInterval(()=>{c(d=>d+1)},M);return()=>clearInterval(s)},[]);const N=(a==null?void 0:a.success_rate_daily)??null,y=(a==null?void 0:a.task_success_rate_7d)??0,k=T??[],h=C??[],_=E??[];function K(s){switch(s){case v.ONLINE:return t("dashboard.online");case v.DRAINING:return t("dashboard.idle");case v.OFFLINE:default:return t("dashboard.offline")}}return e.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-4 md:px-6 md:py-8 font-mono",children:[e.jsx("div",{className:"mb-4 md:hidden",children:e.jsxs("span",{className:"text-base font-bold text-[var(--accent)]",children:["// ",t("dashboard.title")]})}),e.jsx("div",{className:"mb-6 md:mb-8 grid grid-cols-2 gap-3 md:gap-4 lg:grid-cols-4",children:O.map(({key:s,labelKey:d})=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-4",children:[e.jsxs("span",{className:"text-[11px] md:text-xs text-[var(--text-muted)]",children:[t(d),":"]}),f?e.jsx("div",{className:"mt-1 h-6 md:h-8 w-12 md:w-16 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):e.jsx("div",{className:"mt-1 flex items-baseline gap-2",children:e.jsx("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:(a==null?void 0:a[s])??0})})]},s))}),e.jsx(B,{data:{activeTasks:((a==null?void 0:a.active_tasks)??0)+((a==null?void 0:a.queued_tasks)??0),totalWorkers:h.length,totalProjects:(a==null?void 0:a.project_count)??0,totalDevelopers:(a==null?void 0:a.developer_count)??0}}),e.jsxs("div",{className:"mb-6 grid gap-6 lg:grid-cols-3 items-stretch",children:[e.jsx("div",{className:"flex flex-col gap-6 lg:col-span-2",children:e.jsxs("div",{className:"flex flex-1 flex-col rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("div",{className:"border-b border-[var(--border)] px-5 py-3",children:e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.task_success_rate")})}),e.jsx("div",{className:"flex flex-1 flex-col justify-center p-5",children:f?e.jsx("div",{className:"h-24 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):N?e.jsx(G,{dailyRates:N,overallRate:y}):e.jsxs("div",{className:"flex flex-col items-center gap-2 py-6",children:[e.jsxs("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:[y,"%"]}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.daily_breakdown_not_available")})]})})]})}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:border",children:[e.jsxs("div",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.recent_tasks")}),e.jsxs(b,{to:"/tasks",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[t("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"flex md:hidden items-center justify-between px-3 py-3",children:e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:t("dashboard.recent_tasks")})}),e.jsx("div",{className:"px-3 pb-3 md:px-5 md:pb-4 md:pt-0",children:R?e.jsx(u,{rows:4}):k.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.no_tasks_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2 md:gap-0",children:k.map(s=>e.jsxs("div",{onClick:()=>l(`/tasks/${s.id}`),className:"flex cursor-pointer items-center gap-3 rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)] md:rounded-none md:border-0 md:border-b md:border-[var(--border-row)] md:p-0 md:py-2.5 last:md:border-b-0",children:[e.jsxs("div",{className:"flex-1 min-w-0 md:hidden",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("span",{className:"text-[11px] text-[var(--text-primary)] leading-tight",style:{wordBreak:"break-word"},children:["#",s.id," ",s.description]}),e.jsx("span",{className:"shrink-0",children:e.jsx(L,{status:s.status})})]}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)] mt-1 block",children:j(s.createdAt)})]}),e.jsxs("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:["#",s.id]}),e.jsx("span",{className:"hidden md:inline flex-1 text-xs text-[var(--text-primary)] truncate",children:D(s.description,40)}),e.jsx("span",{className:"hidden md:inline",children:e.jsx(L,{status:s.status})}),e.jsx("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:j(s.createdAt)})]},s.id))})})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.worker_status")}),e.jsxs(b,{to:"/workers",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[t("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:I?e.jsx(u,{rows:3}):h.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.no_workers_registered")})]}):e.jsx("div",{className:"flex flex-col",children:h.map(s=>e.jsxs("div",{onClick:()=>l(`/workers/${s.id}`),className:"flex cursor-pointer items-center justify-between border-b border-[var(--border-row)] py-2.5 transition-colors hover:bg-[var(--bg-input)] last:border-b-0",children:[e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:s.host??"--"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:[s.activeSlots,"/",s.maxSlots," ",t("dashboard.slots")]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs",style:{color:F(s.status)},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),K(s.status)]})]})]},s.id))})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:t("dashboard.recent_activity")}),m&&e.jsxs(b,{to:"/admin/audit-logs",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[t("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:q?e.jsx(u,{rows:4}):_.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("dashboard.no_recent_activity")})]}):e.jsx("div",{className:"flex flex-col",children:_.map(s=>{const d=s.message.match(/task\s*#?(\d+)/i),p=d?d[1]:null;return e.jsxs("div",{className:`flex items-start gap-3 border-b border-[var(--border-row)] py-2 last:border-b-0 ${p?"cursor-pointer hover:bg-[var(--bg-input)] transition-colors":""}`,onClick:()=>p&&l(`/tasks/${p}`),children:[e.jsx("span",{className:"shrink-0 text-xs text-[var(--text-muted)]",children:j(s.timestamp)}),e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:s.message})]},s.id)})})})]})]})]})}export{se as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./index-
|
|
1
|
+
import{j as e}from"./index-C5ry7bCb.js";function c({label:s,value:t,href:r,variant:a="between",labelWidth:n="w-20 md:w-28"}){return a==="fixed-label"?e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-0.5 sm:gap-3 py-1",children:[e.jsx("span",{className:`${n} shrink-0 text-xs text-[var(--text-muted)]`,children:s}),r?e.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"truncate text-sm text-[var(--accent)] hover:underline",children:t}):e.jsx("span",{className:"truncate text-sm text-[var(--text-primary)]",children:t})]}):e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:s}),e.jsx("span",{className:"truncate text-[var(--text-primary)]",children:t})]})}export{c as I};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as r,u,a as b,r as x,j as e,T as _,L as l,S as f,b as y,d as j,C as N}from"./index-
|
|
1
|
+
import{c as r,u,a as b,r as x,j as e,T as _,L as l,S as f,b as y,d as j,C as N}from"./index-C5ry7bCb.js";import{A as m}from"./arrow-right-DbRiIkn5.js";import{Z as w}from"./zap-CZBm69SW.js";import{B as k}from"./bot-DJcm4TDu.js";import{U as K}from"./users-Cm06VaAm.js";import{C as z}from"./copy-BSpogfAn.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as E,f as I,u as g,a as W,r as m,j as t,N as B}from"./index-
|
|
1
|
+
import{e as E,f as I,u as g,a as W,r as m,j as t,N as B}from"./index-C5ry7bCb.js";function v(i){const a=i==null?void 0:i.from,s=a==null?void 0:a.pathname;return!s||s==="/totp-setup"||s==="/login"?"/home":`${s}${(a==null?void 0:a.search)??""}`}function q(i,a,s){const p=i==null?void 0:i.from;return p?{from:p}:{from:{pathname:a,search:s}}}function A(){const i=E(),a=I(),s=g(e=>e.login),p=g(e=>e.requireTotpSetup),_=g(e=>e.user),{t:n}=W(),[C,S]=m.useState("credentials"),[f,k]=m.useState(""),[h,F]=m.useState(""),[l,x]=m.useState(""),[d,y]=m.useState(!1),[j,c]=m.useState(""),b=m.useRef([]);if(_&&!p)return t.jsx(B,{to:v(a.state),replace:!0});if(p){const e=q(a.state,a.pathname,a.search);return e.from.pathname==="/bind"&&sessionStorage.setItem("overlord_bind_redirect",JSON.stringify(e.from)),t.jsx(B,{to:"/totp-setup",state:e,replace:!0})}async function z(e){if(e.preventDefault(),c(""),!f.trim()||!h.trim()){c(n("auth.username_and_password_required"));return}y(!0);try{await s({username:f.trim(),password:h});const r=g.getState();if(r.requireTotpSetup)return;r.user&&i(v(a.state),{replace:!0})}catch(r){const o=r instanceof Error?r.message:n("auth.login_failed");o==="TOTP_REQUIRED"?(S("totp"),c("")):c(o)}finally{y(!1)}}async function M(e){if(e.preventDefault(),c(""),!l.trim()||l.trim().length!==6){c(n("auth.please_enter_valid_6_digit_code"));return}y(!0);try{await s({username:f.trim(),password:h,totpCode:l.trim()}),g.getState().user&&i(v(a.state),{replace:!0})}catch(r){const o=r instanceof Error?r.message:n("auth.invalid_totp_code");c(o)}finally{y(!1)}}function J(){S("credentials"),x(""),c("")}function R(e,r){var w;const o=r.replace(/\D/g,"").slice(-1),u=l.split("");for(;u.length<6;)u.push("");u[e]=o,x(u.join("")),o&&e<5&&((w=b.current[e+1])==null||w.focus())}function T(e,r){var o;r.key==="Backspace"&&!l[e]&&e>0&&((o=b.current[e-1])==null||o.focus())}function D(e){var u;e.preventDefault();const r=e.clipboardData.getData("text").replace(/\D/g,"").slice(0,6);x(r);const o=Math.min(r.length,5);(u=b.current[o])==null||u.focus()}return t.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--bg-primary)",padding:"1rem",fontFamily:"'JetBrains Mono', monospace"},children:t.jsxs("div",{style:{width:"100%",maxWidth:"400px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"2rem"},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"0.625rem",marginBottom:"0.25rem"},children:[t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"2rem",height:"2rem",borderRadius:"4px",backgroundColor:"var(--accent)",fontFamily:"'JetBrains Mono', monospace"},"aria-hidden":!0,children:t.jsx("span",{style:{fontSize:"1.25rem",fontWeight:600,color:"#0C0C0C"},children:"~"})}),t.jsx("span",{style:{fontSize:"1.25rem",fontWeight:700,color:"var(--text-primary)",fontFamily:"'JetBrains Mono', monospace"},children:n("landing.overlord")})]}),t.jsx("div",{style:{textAlign:"center",color:"var(--text-muted)",fontSize:"0.75rem",marginBottom:"2rem",fontFamily:"'JetBrains Mono', monospace"},children:n(C==="credentials"?"auth.ai_powered_development_system":"auth.two_factor_verification")}),j&&t.jsx("div",{style:{marginBottom:"1rem",padding:"0.5rem 0.75rem",borderRadius:"4px",backgroundColor:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)",color:"var(--destructive)",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",overflowWrap:"break-word",wordBreak:"break-word"},children:j}),C==="credentials"?t.jsxs("form",{onSubmit:z,style:{display:"flex",flexDirection:"column",gap:"1rem"},children:[t.jsxs("div",{children:[t.jsx("label",{style:{display:"block",color:"var(--text-secondary)",fontSize:"0.75rem",marginBottom:"0.375rem",fontFamily:"'JetBrains Mono', monospace"},children:n("auth.username")}),t.jsx("input",{type:"text",placeholder:n("auth.enter_username"),value:f,onChange:e=>k(e.target.value),autoFocus:!0,autoComplete:"username",required:!0,style:{width:"100%",padding:"0.625rem 0.75rem",backgroundColor:"var(--bg-input)",border:"1px solid var(--border)",borderRadius:"4px",color:"var(--text-primary)",fontSize:"0.875rem",fontFamily:"'JetBrains Mono', monospace",outline:"none",boxSizing:"border-box"},onFocus:e=>e.target.style.borderColor="var(--accent)",onBlur:e=>e.target.style.borderColor="var(--border)"})]}),t.jsxs("div",{children:[t.jsx("label",{style:{display:"block",color:"var(--text-secondary)",fontSize:"0.75rem",marginBottom:"0.375rem",fontFamily:"'JetBrains Mono', monospace"},children:n("auth.password")}),t.jsx("input",{type:"password",placeholder:n("auth.enter_password"),value:h,onChange:e=>F(e.target.value),autoComplete:"current-password",required:!0,style:{width:"100%",padding:"0.625rem 0.75rem",backgroundColor:"var(--bg-input)",border:"1px solid var(--border)",borderRadius:"4px",color:"var(--text-primary)",fontSize:"0.875rem",fontFamily:"'JetBrains Mono', monospace",outline:"none",boxSizing:"border-box"},onFocus:e=>e.target.style.borderColor="var(--accent)",onBlur:e=>e.target.style.borderColor="var(--border)"})]}),t.jsx("button",{type:"submit",disabled:d,style:{width:"100%",padding:"0.625rem",backgroundColor:"var(--accent)",color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.875rem",fontWeight:600,fontFamily:"'JetBrains Mono', monospace",cursor:d?"not-allowed":"pointer",opacity:d?.7:1,marginTop:"0.5rem"},children:n(d?"common.signing_in":"auth.sign_in")}),t.jsx("button",{type:"button",onClick:()=>i("/"),style:{width:"100%",padding:"0.5rem",backgroundColor:"transparent",border:"none",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",cursor:"pointer"},className:"text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:n("common.back")})]},"credentials"):t.jsxs("form",{onSubmit:M,style:{display:"flex",flexDirection:"column",gap:"1rem"},children:[t.jsxs("div",{children:[t.jsx("label",{style:{display:"block",color:"var(--text-secondary)",fontSize:"0.75rem",marginBottom:"0.5rem",fontFamily:"'JetBrains Mono', monospace",textAlign:"center"},children:n("auth.enter_totp_code")}),t.jsx("div",{style:{display:"flex",gap:"0.5rem",justifyContent:"center"},onPaste:D,children:Array.from({length:6}).map((e,r)=>t.jsx("input",{ref:o=>{b.current[r]=o},type:"text",inputMode:"numeric",maxLength:1,value:l[r]||"",onChange:o=>R(r,o.target.value),onKeyDown:o=>T(r,o),autoFocus:r===0,autoComplete:r===0?"one-time-code":"off",style:{width:"2.75rem",height:"3rem",textAlign:"center",backgroundColor:"var(--bg-input)",border:"1px solid var(--border)",borderRadius:"4px",color:"var(--text-primary)",fontSize:"1.25rem",fontFamily:"'JetBrains Mono', monospace",fontWeight:600,outline:"none",boxSizing:"border-box"},onFocus:o=>o.target.style.borderColor="var(--accent)",onBlur:o=>o.target.style.borderColor="var(--border)"},r))})]}),t.jsx("button",{type:"submit",disabled:d||l.length!==6,style:{width:"100%",padding:"0.625rem",backgroundColor:"var(--accent)",color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.875rem",fontWeight:600,fontFamily:"'JetBrains Mono', monospace",cursor:d||l.length!==6?"not-allowed":"pointer",opacity:d||l.length!==6?.7:1,marginTop:"0.5rem"},children:n(d?"common.verifying":"auth.verify")}),t.jsx("button",{type:"button",onClick:J,style:{width:"100%",padding:"0.5rem",backgroundColor:"transparent",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:"4px",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",cursor:"pointer"},children:n("common.back")})]},"totp")]})})}export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./index-
|
|
1
|
+
import{j as s}from"./index-C5ry7bCb.js";import{b as a}from"./status-colors-C_xltR1x.js";function x({label:r,value:t,variant:n="stacked"}){const e=Math.round(t*100);return n==="inline"?s.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[s.jsx("span",{className:"w-8 text-[var(--text-muted)]",children:r}),s.jsx("div",{className:"h-1.5 flex-1 rounded-[2px] bg-[var(--bg-input)]",children:s.jsx("div",{className:"h-full rounded-[2px] transition-all",style:{width:`${e}%`,backgroundColor:a(t)}})}),s.jsxs("span",{className:"w-8 text-right text-[var(--text-secondary)]",children:[e,"%"]})]}):s.jsxs("div",{children:[s.jsxs("div",{className:"mb-1 flex items-center justify-between text-xs",children:[s.jsx("span",{className:"text-[var(--text-secondary)]",children:r}),s.jsxs("span",{className:"text-[var(--text-primary)]",children:[e,"%"]})]}),s.jsx("div",{className:"h-1.5 w-full rounded-[2px] bg-[var(--bg-input)]",children:s.jsx("div",{className:"h-full rounded-[2px] transition-all",style:{width:`${e}%`,backgroundColor:a(t)}})})]})}export{x as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as a,a as n,j as e,L as o}from"./index-
|
|
1
|
+
import{e as a,a as n,j as e,L as o}from"./index-C5ry7bCb.js";function x(){const r=a(),{t}=n();return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--bg-primary)] p-8 font-mono",children:e.jsxs("div",{className:"flex flex-col items-center justify-center gap-5 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-12 py-16",children:[e.jsx("span",{className:"text-7xl font-bold text-[var(--border)]",children:t("common.not_found")}),e.jsx("span",{className:"text-base font-bold text-red-500",children:t("common.page_not_found")}),e.jsx("span",{className:"max-w-[340px] text-center text-xs text-[var(--text-muted)]",children:t("common.the_page_does_not_exist")}),e.jsxs("div",{className:"w-full max-w-[380px] rounded-[4px] bg-[#0C0C0C] px-4 py-3",children:[e.jsxs("p",{className:"font-mono text-xs leading-relaxed text-[var(--text-muted)]",children:[e.jsx("span",{className:"text-[var(--accent)]",children:"> overlord $"})," ",e.jsx("span",{className:"text-[#e4e4e4]",children:"page --get /unknown"})]}),e.jsx("p",{className:"mt-1 font-mono text-xs leading-relaxed text-red-500",children:t("common.not_found_terminal_error")})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(o,{to:"/",className:"rounded-[4px] bg-[var(--accent)] px-5 py-2 text-[11px] font-bold text-black transition-all hover:brightness-110",children:t("common.go_home")}),e.jsx("button",{type:"button",onClick:()=>r(-1),className:"rounded-[4px] border border-[var(--border)] bg-transparent px-5 py-2 text-[11px] font-bold text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)] hover:text-[var(--text-primary)]",children:t("common.go_back")})]})]})})}export{x as default};
|