@overlordai/server 1.0.38 → 1.0.39
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/dist/database/repositories/machine.repository.d.ts +2 -0
- package/dist/database/repositories/machine.repository.d.ts.map +1 -1
- package/dist/database/repositories/machine.repository.js +4 -0
- package/dist/database/repositories/machine.repository.js.map +1 -1
- package/dist/dispatcher/heartbeat.service.d.ts +2 -1
- package/dist/dispatcher/heartbeat.service.d.ts.map +1 -1
- package/dist/dispatcher/heartbeat.service.js +4 -1
- package/dist/dispatcher/heartbeat.service.js.map +1 -1
- package/dist/web/worker-channel.gateway.d.ts.map +1 -1
- package/dist/web/worker-channel.gateway.js +1 -1
- package/dist/web/worker-channel.gateway.js.map +1 -1
- package/package.json +2 -2
- package/public/assets/{AccessTokensPage-oPweGG_z.js → AccessTokensPage-DuICKFJy.js} +1 -1
- package/public/assets/{AdminPage-Dw1ng1n4.js → AdminPage-B8Yq8GnM.js} +1 -1
- package/public/assets/{ApiReferencePage-FUskCdjw.js → ApiReferencePage-DZDCJQI4.js} +1 -1
- package/public/assets/{AuditLogPage-nwiONLEk.js → AuditLogPage-MoCRMzqP.js} +1 -1
- package/public/assets/{BotManage-D2QsEBCS.js → BotManage-CVWwoYy3.js} +1 -1
- package/public/assets/{CliReferencePage-BdzdHAsN.js → CliReferencePage-DVB7E2Jv.js} +1 -1
- package/public/assets/{DeveloperManage-C8-2MMwr.js → DeveloperManage-BtO-lkvD.js} +1 -1
- package/public/assets/{EditProjectPage-DPTc1yRc.js → EditProjectPage-Bl2LyAeT.js} +1 -1
- package/public/assets/{EmptyState-CEWQv5SU.js → EmptyState-Bvs1SJo_.js} +1 -1
- package/public/assets/{HomePage-BkKwaAgJ.js → HomePage-BSubk1iR.js} +1 -1
- package/public/assets/{LandingPage-BBF_PnWk.js → LandingPage-COmKh2PR.js} +1 -1
- package/public/assets/{LoginPage-BXdJBXbE.js → LoginPage-DFIy5_AG.js} +1 -1
- package/public/assets/{MachineDetailPage-DeLR95cj.js → MachineDetailPage-BLOhWYiw.js} +1 -1
- package/public/assets/MachineListPage-CIqrEM7O.js +6 -0
- package/public/assets/{NotFoundPage-CDsk2FBZ.js → NotFoundPage-BqLQpkaf.js} +1 -1
- package/public/assets/{PipelineEditorPage-DRxoetje.js → PipelineEditorPage-CyOhoLwR.js} +1 -1
- package/public/assets/{ProfilePage-DYw8NzPC.js → ProfilePage-D8UfMNDf.js} +1 -1
- package/public/assets/{ProjectDetailPage-BVi8nkb1.js → ProjectDetailPage-8DxQkhBt.js} +1 -1
- package/public/assets/{ProjectListPage-BJxuXui-.js → ProjectListPage-Dwcp60o1.js} +1 -1
- package/public/assets/{QuickAuth-CAi3n0Qs.js → QuickAuth-CWpVD-8o.js} +1 -1
- package/public/assets/{RemoveMemberConfirmDialog-sqtFnOvO.js → RemoveMemberConfirmDialog-DQ3dXuC6.js} +1 -1
- package/public/assets/{Select-CRpdafWl.js → Select-GhXJ5uKF.js} +1 -1
- package/public/assets/{SettingsPage-B9lw8C-c.js → SettingsPage-DDsctH7X.js} +1 -1
- package/public/assets/{Skeleton-CbeWT2zl.js → Skeleton-CSAb9g25.js} +1 -1
- package/public/assets/{SkillPage-Bq35rago.js → SkillPage-CtZTtfF8.js} +1 -1
- package/public/assets/{TaskDetailPage-C4ICC3OM.js → TaskDetailPage-CgT_txYn.js} +1 -1
- package/public/assets/{TaskListPage-CUHGBvyU.js → TaskListPage-D_tZ75c7.js} +1 -1
- package/public/assets/{TaskStatusBadge-C6DS5OWP.js → TaskStatusBadge-yxoaV45g.js} +1 -1
- package/public/assets/{TokenManage-B4uqYclW.js → TokenManage-DWk-4hAE.js} +1 -1
- package/public/assets/{TotpSetupPage-CEGN1xn8.js → TotpSetupPage-C3IixO0t.js} +1 -1
- package/public/assets/{WorkerSetupGuidePage-CwuvVUoB.js → WorkerSetupGuidePage-CuXz1Cp5.js} +1 -1
- package/public/assets/{arrow-left-BXI8dEuv.js → arrow-left-tpTJv4kJ.js} +1 -1
- package/public/assets/{arrow-right-BvAzhW8L.js → arrow-right-DpePBWE7.js} +1 -1
- package/public/assets/{bot-BsTtqvxQ.js → bot-BChGjdPm.js} +1 -1
- package/public/assets/{chevron-right-CHP2kF25.js → chevron-right-B-JssgBf.js} +1 -1
- package/public/assets/{copy-CTHNYjlv.js → copy-MDuQXvvx.js} +1 -1
- package/public/assets/{external-link-CAJ7Idcz.js → external-link-ExQuyXwZ.js} +1 -1
- package/public/assets/{index-BwKDWAeG.js → index-CtAu_XZ5.js} +2 -2
- package/public/assets/{key-BgCZ-y1U.js → key-Cix4k6UI.js} +1 -1
- package/public/assets/{loader-circle-DfGhh0Ty.js → loader-circle-COcLl-bl.js} +1 -1
- package/public/assets/{pencil-Bq3Z1U82.js → pencil-KZjOYmxG.js} +1 -1
- package/public/assets/{plus-kyLBS24g.js → plus-B1SMCBOe.js} +1 -1
- package/public/assets/{rotate-ccw-DSGQ_NEe.js → rotate-ccw-DpBJ4jZw.js} +1 -1
- package/public/assets/{scroll-text-D2EdgNAO.js → scroll-text-CrlR_VG0.js} +1 -1
- package/public/assets/{settings-CZ6ELt0Z.js → settings-H-4c0_mh.js} +1 -1
- package/public/assets/{task.store-DT4yU2EV.js → task.store-ATNoa4p7.js} +1 -1
- package/public/assets/{trash-2-CNnnORdj.js → trash-2-BzT2LBkf.js} +1 -1
- package/public/assets/{users-DbVTGZbU.js → users-BsLS_-Dg.js} +1 -1
- package/public/index.html +1 -1
- package/public/assets/MachineListPage-D79p6rD6.js +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine.repository.d.ts","sourceRoot":"","sources":["../../../src/database/repositories/machine.repository.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAc,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAwCtD,qBACa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EAAE,MAAM,CAAC;KACvB,CAAC,GACD,IAAI;
|
|
1
|
+
{"version":3,"file":"machine.repository.d.ts","sourceRoot":"","sources":["../../../src/database/repositories/machine.repository.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAc,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAwCtD,qBACa,iBAAiB;IAChB,OAAO,CAAC,EAAE;gBAAF,EAAE,EAAE,eAAe;IAEvC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI;IAQpC,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI;IAQ9C,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI;IAQxC,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAO1C,OAAO,CAAC,qBAAqB,UAAQ,GAAG,OAAO,EAAE;IAUjD,UAAU,IAAI,OAAO,EAAE;IAQvB,MAAM,CAAC,IAAI,EAAE;QACX,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,eAAe,EAAE,MAAM,CAAC;KACzB,GAAG,OAAO;IA6BX,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO;IAQxD,oBAAoB,CAClB,OAAO,EAAE,KAAK,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC,GACD,IAAI;IAmCP,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO;IAQnD,wBAAwB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IAQ3D,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO;IAQ3D,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAWpC,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO;CAc5D"}
|
|
@@ -134,6 +134,8 @@ let MachineRepository = class MachineRepository {
|
|
|
134
134
|
SET cpu_usage = @cpuUsage,
|
|
135
135
|
memory_usage = @memoryUsage,
|
|
136
136
|
disk_usage = @diskUsage,
|
|
137
|
+
active_slots = @activeSlots,
|
|
138
|
+
max_slots = COALESCE(@maxSlots, max_slots),
|
|
137
139
|
capabilities = @capabilities,
|
|
138
140
|
worker_version = @workerVersion,
|
|
139
141
|
cpu_model = @cpuModel,
|
|
@@ -147,6 +149,8 @@ let MachineRepository = class MachineRepository {
|
|
|
147
149
|
cpuUsage: update.cpuUsage,
|
|
148
150
|
memoryUsage: update.memoryUsage,
|
|
149
151
|
diskUsage: update.diskUsage,
|
|
152
|
+
activeSlots: update.activeSlots,
|
|
153
|
+
maxSlots: update.maxSlots,
|
|
150
154
|
capabilities: JSON.stringify(update.capabilities),
|
|
151
155
|
workerVersion: update.workerVersion,
|
|
152
156
|
cpuModel: update.cpuModel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine.repository.js","sourceRoot":"","sources":["../../../src/database/repositories/machine.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,mDAAiE;AACjE,0DAAsD;AAEtD,MAAM,aAAa,GAAiB;IAClC,qBAAU,CAAC,QAAQ;IACnB,qBAAU,CAAC,OAAO;IAClB,qBAAU,CAAC,SAAS;CACrB,CAAC;AAEF,SAAS,MAAM,CAAC,GAA4B;IAC1C,OAAO;QACL,EAAE,EAAE,GAAG,CAAC,EAAY;QACpB,IAAI,EAAE,GAAG,CAAC,IAAc;QACxB,IAAI,EAAE,GAAG,CAAC,IAAc;QACxB,IAAI,EAAE,GAAG,CAAC,IAAc;QACxB,OAAO,EAAE,GAAG,CAAC,QAAkB;QAC/B,EAAE,EAAG,GAAG,CAAC,EAAa,IAAI,IAAI;QAC9B,QAAQ,EAAG,GAAG,CAAC,SAAoB,IAAI,IAAI;QAC3C,QAAQ,EAAG,GAAG,CAAC,SAAoB,IAAI,IAAI;QAC3C,QAAQ,EAAG,GAAG,CAAC,SAAoB,IAAI,IAAI;QAC3C,QAAQ,EAAE,GAAG,CAAC,SAAmB;QACjC,WAAW,EAAE,GAAG,CAAC,YAAsB;QACvC,QAAQ,EAAE,GAAG,CAAC,SAAmB;QACjC,WAAW,EAAE,GAAG,CAAC,YAAsB;QACvC,SAAS,EAAE,GAAG,CAAC,UAAoB;QACnC,aAAa,EAAE,GAAG,CAAC,cAAwB;QAC3C,IAAI,EAAE,IAAI,CAAC,KAAK,CAAE,GAAG,CAAC,IAAe,IAAI,IAAI,CAAa;QAC1D,YAAY,EAAE,IAAI,CAAC,KAAK,CACrB,GAAG,CAAC,YAAuB,IAAI,IAA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AAE,IAAI,CAAC,OAAO;YACrB,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,IAAI;YACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI;YAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI;YAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI;YAC/B,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,IAAI,EAAE,CAAC;YACrD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;YACrC,eAAe,EAAE,IAAI,CAAC,eAAe;SACtC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAE,CAAC;IACjC,CAAC;IAED,YAAY,CAAC,EAAU,EAAE,MAAqB;QAC5C,MAAM,MAAM,GAAG,IAAI,CAAC,EAAE;aACnB,KAAK,EAAE;aACP,OAAO,CAAC,6CAA6C,CAAC;aACtD,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACnB,OAAO,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC;IAC5B,CAAC;IAED,oBAAoB,CAClB,
|
|
1
|
+
{"version":3,"file":"machine.repository.js","sourceRoot":"","sources":["../../../src/database/repositories/machine.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,mDAAiE;AACjE,0DAAsD;AAEtD,MAAM,aAAa,GAAiB;IAClC,qBAAU,CAAC,QAAQ;IACnB,qBAAU,CAAC,OAAO;IAClB,qBAAU,CAAC,SAAS;CACrB,CAAC;AAEF,SAAS,MAAM,CAAC,GAA4B;IAC1C,OAAO;QACL,EAAE,EAAE,GAAG,CAAC,EAAY;QACpB,IAAI,EAAE,GAAG,CAAC,IAAc;QACxB,IAAI,EAAE,GAAG,CAAC,IAAc;QACxB,IAAI,EAAE,GAAG,CAAC,IAAc;QACxB,OA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|
|
7
7
|
memoryUsage: number;
|
|
8
8
|
diskUsage: number;
|
|
9
9
|
activeSlots: number;
|
|
10
|
+
maxSlots?: number;
|
|
10
11
|
capabilities: string[];
|
|
11
12
|
workerVersion?: string;
|
|
12
13
|
cpuModel?: string;
|
|
@@ -32,7 +33,7 @@ export declare class HeartbeatService implements OnModuleInit, OnModuleDestroy {
|
|
|
32
33
|
memoryUsage: number;
|
|
33
34
|
diskUsage: number;
|
|
34
35
|
activeSlots: number;
|
|
35
|
-
}, capabilities: string[], workerVersion?: string, cpuModel?: string): void;
|
|
36
|
+
}, capabilities: string[], workerVersion?: string, cpuModel?: string, maxSlots?: number): void;
|
|
36
37
|
/**
|
|
37
38
|
* Flush all cached heartbeat data to the database in a single batch update.
|
|
38
39
|
* After flushing, check if any machine has high disk usage and auto-drain it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heartbeat.service.d.ts","sourceRoot":"","sources":["../../src/dispatcher/heartbeat.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAMnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,qBACa,gBAAiB,YAAW,YAAY,EAAE,eAAe;IAOlE,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OA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ACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,qBACa,gBAAiB,YAAW,YAAY,EAAE,eAAe;IAOlE,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAR3B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqC;IAC5D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAoC;IAC1D,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,iBAAiB,CAAkB;gBAGxB,WAAW,EAAE,iBAAiB,EAC9B,YAAY,EAAE,kBAAkB,EAChC,QAAQ,EAAE,eAAe;IAG5C,YAAY,IAAI,IAAI;IAepB,eAAe,IAAI,IAAI;IAOvB;;;OAGG;IACH,gBAAgB,CACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE;QACP,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;KACrB,EACD,YAAY,EAAE,MAAM,EAAE,EACtB,aAAa,CAAC,EAAE,MAAM,EACtB,QAAQ,CAAC,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,MAAM,GAChB,IAAI;IAcP;;;OAGG;IACH,KAAK,IAAI,IAAI;IAiFb;;;;OAIG;IACH,YAAY,IAAI,IAAI;IAmCpB;;OAEG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;CAGzD"}
|
|
@@ -45,12 +45,13 @@ let HeartbeatService = HeartbeatService_1 = class HeartbeatService {
|
|
|
45
45
|
* Cache a heartbeat from a worker in memory.
|
|
46
46
|
* The data will be flushed to the database in batch on the next interval.
|
|
47
47
|
*/
|
|
48
|
-
processHeartbeat(machineId, metrics, capabilities, workerVersion, cpuModel) {
|
|
48
|
+
processHeartbeat(machineId, metrics, capabilities, workerVersion, cpuModel, maxSlots) {
|
|
49
49
|
this.cache.set(machineId, {
|
|
50
50
|
cpuUsage: metrics.cpuUsage,
|
|
51
51
|
memoryUsage: metrics.memoryUsage,
|
|
52
52
|
diskUsage: metrics.diskUsage,
|
|
53
53
|
activeSlots: metrics.activeSlots,
|
|
54
|
+
maxSlots,
|
|
54
55
|
capabilities,
|
|
55
56
|
workerVersion,
|
|
56
57
|
cpuModel,
|
|
@@ -73,6 +74,8 @@ let HeartbeatService = HeartbeatService_1 = class HeartbeatService {
|
|
|
73
74
|
cpuUsage: data.cpuUsage,
|
|
74
75
|
memoryUsage: data.memoryUsage,
|
|
75
76
|
diskUsage: data.diskUsage,
|
|
77
|
+
activeSlots: data.activeSlots,
|
|
78
|
+
maxSlots: data.maxSlots ?? null,
|
|
76
79
|
capabilities: data.capabilities,
|
|
77
80
|
workerVersion: data.workerVersion ?? null,
|
|
78
81
|
cpuModel: data.cpuModel ?? null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heartbeat.service.js","sourceRoot":"","sources":["../../src/dispatcher/heartbeat.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAmF;AACnF,mDAI8B;AAC9B,oFAAgF;AAChF,wFAAmF;AACnF,mEAA+D;
|
|
1
|
+
{"version":3,"file":"heartbeat.service.js","sourceRoot":"","sources":["../../src/dispatcher/heartbeat.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAmF;AACnF,mDAI8B;AAC9B,oFAAgF;AAChF,wFAAmF;AACnF,mEAA+D;AAexD,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IAOR;IACA;IACA;IARF,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAgB,CAAC,IAAI,CAAC,CAAC;IAC3C,KAAK,GAAG,IAAI,GAAG,EAAyB,CAAC;IAClD,UAAU,CAAkB;IAC5B,iBAAiB,CAAkB;IAE3C,YACmB,WAA8B,EAC9B,Y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;IAUzC,OAAO,CAAC,UAAU;IAuElB,OAAO,CAAC,eAAe;IA8BvB,OAAO,CAAC,SAAS;YAIH,eAAe;IAe7B,OAAO,CAAC,cAAc;IAoBtB,OAAO,CAAC,uBAAuB;YASjB,yBAAyB;IAmCvC;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;CA6C5B"}
|
|
@@ -180,7 +180,7 @@ let WorkerChannelGateway = WorkerChannelGateway_1 = class WorkerChannelGateway {
|
|
|
180
180
|
memoryUsage: frame.metrics.memoryUsage,
|
|
181
181
|
diskUsage: frame.metrics.diskUsage,
|
|
182
182
|
activeSlots: frame.metrics.activeSlots,
|
|
183
|
-
}, frame.capabilities, frame.workerVersion);
|
|
183
|
+
}, frame.capabilities, frame.workerVersion, frame.cpuModel, frame.maxSlots);
|
|
184
184
|
// Send heartbeat_ack
|
|
185
185
|
const ack = {
|
|
186
186
|
type: 'heartbeat_ack',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-channel.gateway.js","sourceRoot":"","sources":["../../src/web/worker-channel.gateway.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAI4B;AAC5B,2CAAwC;AAExC,2BAA+B;AAE/B,mDAM8B;AAa9B,uDAAmD;AACnD,uFAAkF;AAClF,uEAAmE;AACnE,yDAAsD;AACtD,qEAAgE;AAChE,+DAA2D;AAC3D,oFAAgF;AAChF,8EAA0E;AAC1E,8FAAyF;AACzF,mEAA+D;AAC/D,mDAAmD;AAW5C,IAAM,oBAAoB,4BAA1B,MAAM,oBAAoB;IAQZ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAdF,MAAM,GAAG,IAAI,eAAM,CAAC,sBAAoB,CAAC,IAAI,CAAC,CAAC;IAC/C,aAAa,GAAG,IAAI,GAAG,EAAkC,CAAC;IAC1D,eAAe,GAAG,MAAM,CAAC;IAE1C,YACmB,WAAwB,EACxB,uBAAgD,EAChD,gBAAkC,EAClC,UAAsB,EACtB,cAA8B,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C;YACH,CAAC;YAED,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,qDAAqD,SAAS,iBAAiB,CAChF,CAAC;YACF,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC;YACxC,OAAO;QACT,CAAC;QAED,qCAAqC;QACrC,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC3D,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YACpD,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,qCAAqC,OAAO,4BAA4B,CACzE,CAAC;YACF,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAC;YAC9C,OAAO;QACT,CAAC;IACH,CAAC;CACF,CAAA;AA9UY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,6BAAgB,EAAC,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC;qCASjB,0BAAW;QACC,mDAAuB;QAC9B,oCAAgB;QACtB,uBAAU;QACN,iCAAc;QAChB,4BAAY;QACb,sCAAiB;QACpB,gCAAc;QACP,+CAAqB;QACrB,kCAAe;GAjBxC,oBAAoB,CA8UhC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@overlordai/server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.39",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@nestjs/platform-express": "^10.4.0",
|
|
27
27
|
"@nestjs/platform-ws": "^10.4.0",
|
|
28
28
|
"@nestjs/websockets": "^10.4.0",
|
|
29
|
-
"@overlordai/protocol": "1.0.
|
|
29
|
+
"@overlordai/protocol": "1.0.39",
|
|
30
30
|
"bcrypt": "^6.0.0",
|
|
31
31
|
"better-sqlite3": "^11.0.0",
|
|
32
32
|
"bullmq": "^5.0.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _,r as o,j as e,f as j,l as w,h as C,t as y,o as T,K as S}from"./index-
|
|
1
|
+
import{a as _,r as o,j as e,f as j,l as w,h as C,t as y,o as T,K as S}from"./index-CtAu_XZ5.js";import{S as D}from"./Select-GhXJ5uKF.js";import{E as A}from"./EmptyState-Bvs1SJo_.js";import{T as E}from"./Skeleton-CSAb9g25.js";import{P as L}from"./plus-B1SMCBOe.js";import{C as R}from"./copy-MDuQXvvx.js";import{T as M}from"./trash-2-BzT2LBkf.js";function O({isOpen:t,onClose:d,onCreated:l}){const{t:s}=_(),[n,i]=o.useState(""),[x,m]=o.useState("never"),[u,v]=o.useState(!1),[p,c]=o.useState(""),b=[{value:"never",label:s("access_tokens.no_expiry")},{value:"30",label:s("access_tokens.days_30")},{value:"90",label:s("access_tokens.days_90")},{value:"365",label:s("access_tokens.days_365")}],h=()=>{i(""),m("never"),c(""),d()},f=async()=>{if(c(""),!n.trim()){c(s("access_tokens.token_label_required"));return}try{v(!0);const a=await j.post("web/profile/tokens",{json:{label:n.trim(),...x!=="never"&&{expiresAt:new Date(Date.now()+parseInt(x,10)*864e5).toISOString()}}}).json();i(""),m("never"),l({token:a.token,name:a.name})}catch(a){const k=a instanceof Error?a.message:s("access_tokens.failed_to_create_token");c(k)}finally{v(!1)}};return t?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-40 bg-[var(--modal-backdrop)]",onClick:h}),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:a=>a.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:s("access_tokens.create_personal_access_token")}),e.jsx("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:s("access_tokens.tokens_authenticate_desc")})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[p&&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:p}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:s("access_tokens.token_name")}),e.jsx("input",{type:"text",placeholder:s("access_tokens.token_name_placeholder"),value:n,onChange:a=>i(a.target.value),onKeyDown:a=>{a.key==="Enter"&&f()},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:s("access_tokens.expires")}),e.jsx(D,{value:x,onChange:m,options:b})]})]}),e.jsxs("div",{className:"flex justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{onClick:h,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:s("common.cancel")}),e.jsx("button",{onClick:f,disabled:u,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:s(u?"common.creating":"access_tokens.create_token")})]})]})})]}):null}function P({isOpen:t,onClose:d,onConfirm:l,tokenLabel:s,isLoading:n}){const{t:i}=_();return e.jsx(w,{isOpen:t,onClose:d,onConfirm:l,title:i("access_tokens.revoke_token_title"),message:i("access_tokens.revoke_confirm",{name:s}),confirmLabel:i("access_tokens.revoke"),confirmVariant:"danger",isLoading:n})}function $(t){const d=Date.now()-new Date(t).getTime(),l=Math.floor(d/1e3);if(l<60)return`${l}s ago`;const s=Math.floor(l/60);if(s<60)return`${s}m ago`;const n=Math.floor(s/60);return n<24?`${n} hours ago`:`${Math.floor(n/24)}d ago`}function V(){const{t}=_(),[d,l]=o.useState([]),[s,n]=o.useState(!0),[i,x]=o.useState(!1),[m,u]=o.useState(null),[v,p]=o.useState(!1),[c,b]=o.useState(null),[h,f]=o.useState(null);C(o.useMemo(()=>e.jsxs("button",{onClick:()=>x(!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(L,{className:"h-3.5 w-3.5"}),t("access_tokens.create_token")]}),[t]));const a=o.useCallback(async()=>{try{n(!0);const r=await j.get("web/profile/tokens").json();l(r)}catch{y.error(t("access_tokens.failed_to_load_tokens"))}finally{n(!1)}},[t]);o.useEffect(()=>{a()},[a]);const k=r=>{x(!1),u(r.token),p(!1),a()},g=async()=>{if(m)try{await navigator.clipboard.writeText(m),p(!0),setTimeout(()=>p(!1),2e3)}catch{}},N=async()=>{if(c)try{f(c.id),await j.post(`web/profile/tokens/${c.id}/revoke`),y.success(t("access_tokens.token_revoked")),b(null),a()}catch{y.error(t("access_tokens.failed_to_revoke_token"))}finally{f(null)}};return e.jsxs("div",{className:"mx-auto max-w-4xl px-6 py-8 font-mono lowercase",children:[m&&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:t("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:m}),e.jsxs("button",{onClick:g,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:[v?e.jsx(T,{className:"h-3.5 w-3.5 text-[var(--accent)]"}):e.jsx(R,{className:"h-3.5 w-3.5"}),t(v?"common.copied":"common.copy")]})]}),e.jsx("div",{className:"mt-2 flex justify-end",children:e.jsx("button",{onClick:()=>u(null),className:"text-xs text-[var(--text-muted)] hover:text-[var(--text-secondary)]",children:t("common.dismiss")})})]}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:s?e.jsx("div",{className:"p-4",children:e.jsx(E,{rows:3})}):d.length===0?e.jsx(A,{icon:S,title:t("access_tokens.no_tokens"),description:t("access_tokens.create_token_desc"),actionLabel:t("access_tokens.create_token"),onAction:()=>x(!0)}):e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-left text-[var(--text-muted)]",children:[e.jsx("th",{className:"px-4 py-2.5 font-normal",children:t("common.name")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:t("common.status")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:t("access_tokens.created")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:t("access_tokens.last_used")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:t("access_tokens.expires")}),e.jsx("th",{className:"px-4 py-2.5 font-normal text-right",children:t("common.actions")})]})}),e.jsx("tbody",{children:d.map(r=>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:r.label}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:r.status==="active"?"text-green-400":"text-[var(--text-muted)]",children:r.status})}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-secondary)]",children:new Date(r.createdAt).toLocaleDateString()}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-secondary)]",children:r.lastUsedAt?$(r.lastUsedAt):t("common.never")}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-secondary)]",children:r.expiresAt?new Date(r.expiresAt).toLocaleDateString():t("common.never")}),e.jsx("td",{className:"px-4 py-3 text-right",children:r.status==="active"&&e.jsxs("button",{onClick:()=>b(r),disabled:h===r.id,className:"inline-flex items-center gap-1 text-xs text-[var(--destructive)] hover:underline disabled:opacity-50",children:[e.jsx(M,{className:"h-3 w-3"}),t("access_tokens.revoke")]})})]},r.id))})]})}),e.jsx(O,{isOpen:i,onClose:()=>x(!1),onCreated:k}),e.jsx(P,{isOpen:!!c,onClose:()=>b(null),onConfirm:N,tokenLabel:(c==null?void 0:c.label)??"",isLoading:h!==null})]})}export{V as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as d,e as l,d as c,K as p,r as b,j as e,w as x,O as v}from"./index-
|
|
1
|
+
import{a as d,e as l,d as c,K as p,r as b,j as e,w as x,O as v}from"./index-CtAu_XZ5.js";import{U as f}from"./users-BsLS_-Dg.js";import{B as u}from"./bot-BChGjdPm.js";import{S as g}from"./scroll-text-CrlR_VG0.js";import{S as h}from"./settings-H-4c0_mh.js";function S(){const{t:a}=d(),t=l(),o=c(),r=[{to:"/admin/developers",label:a("admin.tab_developers"),icon:f},{to:"/admin/bots",label:a("admin.tab_bots"),icon:u},{to:"/admin/tokens",label:a("admin.tab_tokens"),icon:p},{to:"/admin/audit-logs",label:a("admin.tab_audit_logs"),icon:g},{to:"/admin/settings",label:a("admin.tab_settings"),icon:h}];return b.useEffect(()=>{(t.pathname==="/admin"||t.pathname==="/admin/")&&o("/admin/developers",{replace:!0})},[t.pathname,o]),e.jsxs("div",{children:[e.jsx("div",{className:"mb-6 flex flex-nowrap gap-2 overflow-x-auto border-b border-[var(--border)] no-scrollbar",children:r.map(({to:s,label:n,icon:i})=>e.jsxs(x,{to:s,className:({isActive:m})=>`flex shrink-0 items-center gap-2 border-b-2 px-4 py-2 text-sm transition-colors ${m?"border-[var(--accent)] text-[var(--accent)]":"border-transparent text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:[e.jsx(i,{size:16}),n]},s))}),e.jsx(v,{})]})}export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d,a as n,h as p,r as o,j as t}from"./index-BwKDWAeG.js";import{Q as c}from"./QuickAuth-CAi3n0Qs.js";import{P as h}from"./plus-kyLBS24g.js";import"./copy-CTHNYjlv.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", "machineId?": "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:"machines",prefix:"/api/web/machines",endpoints:[{method:"GET",path:"",description:"list all machines",auth:"jwt"},{method:"GET",path:"/:id",description:"get machine details",auth:"jwt"},{method:"GET",path:"/:id/tasks",description:"list tasks assigned to a machine",auth:"jwt"},{method:"POST",path:"/:id/drain",description:"start draining a machine",auth:"jwt"},{method:"POST",path:"/:id/undrain",description:"cancel machine 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"}]},{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, machines, 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 machine",auth:"jwt"}]},{title:"admin — machines",prefix:"/api/admin/machines",endpoints:[{method:"GET",path:"",description:"list all machines (admin)",auth:"jwt"},{method:"PUT",path:"/:id",description:"update machine 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:s}){const[a,i]=o.useState(!1),{t:r}=n();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-3 px-4 py-2.5 text-left transition-colors hover:bg-[var(--bg-input)]",onClick:()=>i(!a),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",children:[s,e.path]}),t.jsxs("span",{className:"text-xs text-[var(--text-muted)] hidden sm:inline truncate max-w-[200px]",children:["// ",e.description]})]}),a&&t.jsxs("div",{className:"border-t border-[var(--border-row)] bg-[var(--bg-primary)] 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-[10px]",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-[10px] 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-[10px] 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:s}=n();return p(o.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"}),s("access_tokens.create_token")]}),[e,s])),t.jsxs("div",{className:"mx-auto max-w-4xl 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:s("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:s("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(a=>t.jsxs("div",{children:[t.jsxs("h2",{className:"mb-2 text-sm text-[var(--accent)]",children:["> ",a.title]}),t.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:a.endpoints.map((i,r)=>t.jsx(x,{ep:i,prefix:a.prefix},`${i.method}-${i.path}-${r}`))})]},a.title))})]})}export{g as default};
|
|
1
|
+
import{d,a as n,h as p,r as o,j as t}from"./index-CtAu_XZ5.js";import{Q as c}from"./QuickAuth-CWpVD-8o.js";import{P as h}from"./plus-B1SMCBOe.js";import"./copy-MDuQXvvx.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", "machineId?": "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:"machines",prefix:"/api/web/machines",endpoints:[{method:"GET",path:"",description:"list all machines",auth:"jwt"},{method:"GET",path:"/:id",description:"get machine details",auth:"jwt"},{method:"GET",path:"/:id/tasks",description:"list tasks assigned to a machine",auth:"jwt"},{method:"POST",path:"/:id/drain",description:"start draining a machine",auth:"jwt"},{method:"POST",path:"/:id/undrain",description:"cancel machine 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"}]},{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, machines, 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 machine",auth:"jwt"}]},{title:"admin — machines",prefix:"/api/admin/machines",endpoints:[{method:"GET",path:"",description:"list all machines (admin)",auth:"jwt"},{method:"PUT",path:"/:id",description:"update machine 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:s}){const[a,i]=o.useState(!1),{t:r}=n();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-3 px-4 py-2.5 text-left transition-colors hover:bg-[var(--bg-input)]",onClick:()=>i(!a),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",children:[s,e.path]}),t.jsxs("span",{className:"text-xs text-[var(--text-muted)] hidden sm:inline truncate max-w-[200px]",children:["// ",e.description]})]}),a&&t.jsxs("div",{className:"border-t border-[var(--border-row)] bg-[var(--bg-primary)] 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-[10px]",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-[10px] 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-[10px] 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:s}=n();return p(o.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"}),s("access_tokens.create_token")]}),[e,s])),t.jsxs("div",{className:"mx-auto max-w-4xl 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:s("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:s("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(a=>t.jsxs("div",{children:[t.jsxs("h2",{className:"mb-2 text-sm text-[var(--accent)]",children:["> ",a.title]}),t.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:a.endpoints.map((i,r)=>t.jsx(x,{ep:i,prefix:a.prefix},`${i.method}-${i.path}-${r}`))})]},a.title))})]})}export{g as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as C,a as S,r,f as k,j as e,i as L}from"./index-
|
|
1
|
+
import{c as C,a as S,r,f as k,j as e,i as L}from"./index-CtAu_XZ5.js";import{S as E}from"./Select-GhXJ5uKF.js";import{E as T}from"./EmptyState-Bvs1SJo_.js";import{T as F}from"./Skeleton-CSAb9g25.js";import{S as A}from"./scroll-text-CrlR_VG0.js";import{C as P}from"./chevron-right-B-JssgBf.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{c as M,a as B,r as a,j as e,X as I,f as _,l as z,t as K}from"./index-
|
|
1
|
+
import{c as M,a as B,r as a,j as e,X as I,f as _,l as z,t as K}from"./index-CtAu_XZ5.js";import{S as P}from"./Select-GhXJ5uKF.js";import{T as $}from"./trash-2-BzT2LBkf.js";import{P as D}from"./plus-B1SMCBOe.js";import{E as q}from"./EmptyState-Bvs1SJo_.js";import{T}from"./Skeleton-CSAb9g25.js";import{B as F}from"./bot-BChGjdPm.js";import{P as O}from"./pencil-KZjOYmxG.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{d as l,a as c,h as p,r as d,j as e,C as m}from"./index-
|
|
1
|
+
import{d as l,a as c,h as p,r as d,j as e,C as m}from"./index-CtAu_XZ5.js";import{Q as x}from"./QuickAuth-CWpVD-8o.js";import{P as u}from"./plus-B1SMCBOe.js";import{C as v}from"./copy-MDuQXvvx.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 k,a as _,r as s,j as e,X as S,f as w,u as E,i as M}from"./index-
|
|
1
|
+
import{c as k,a as _,r as s,j as e,X as S,f as w,u as E,i as M}from"./index-CtAu_XZ5.js";import{S as D}from"./Select-GhXJ5uKF.js";import{E as O}from"./EmptyState-Bvs1SJo_.js";import{T}from"./Skeleton-CSAb9g25.js";import{P}from"./plus-B1SMCBOe.js";import{U as q}from"./users-BsLS_-Dg.js";import{P as $}from"./pencil-KZjOYmxG.js";import{R as F}from"./rotate-ccw-DpBJ4jZw.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{m as le,d as ce,a as de,r as a,f as u,j as e,L as ie,t as N}from"./index-
|
|
1
|
+
import{m as le,d as ce,a as de,r as a,f as u,j as e,L as ie,t as N}from"./index-CtAu_XZ5.js";import{G as m,A as d}from"./protocol-C5uQmiiB.js";import{S as Q}from"./Select-GhXJ5uKF.js";import{U as pe,A as xe,R as ue}from"./RemoveMemberConfirmDialog-DQ3dXuC6.js";import{P as me}from"./plus-B1SMCBOe.js";function fe(){const{key:o}=le(),l=ce(),{t:r}=de(),[n,V]=a.useState(null),[b,Y]=a.useState([]),[Z,ee]=a.useState(!0),[C,v]=a.useState(!1),[j,w]=a.useState(""),[h,_]=a.useState(""),[S,k]=a.useState(""),[M,T]=a.useState(m.GITHUB),[U,O]=a.useState(""),[P,I]=a.useState(d.CLAUDE),[R,A]=a.useState(""),[D,$]=a.useState("50"),[E,G]=a.useState(""),[L,B]=a.useState(""),[F,J]=a.useState(""),[q,z]=a.useState("0"),[g,H]=a.useState(!1),[i,f]=a.useState(""),[te,K]=a.useState(!1),[c,y]=a.useState(null),[re,W]=a.useState(!1),p=a.useCallback(async()=>{if(o)try{const[t,x]=await Promise.all([u.get(`web/projects/${o}`).json(),u.get(`web/projects/${o}/members`).json().catch(()=>[])]);if(V(t),Y(x),w(t.name),_(t.repoUrl),k(t.sshUrl??""),T(t.gitPlatform),O(t.defaultBranch),I(t.agentType),A(t.agentCommand??""),$(String(t.maxTurns)),G(t.workspaceRoot??""),B(t.setupCommands??""),J(t.testCommand??""),z(String(t.ptyOutputFilter??0)),H(t.isDefault),t.pipeline)try{f(JSON.stringify(JSON.parse(t.pipeline),null,2))}catch{f(t.pipeline)}}catch{}finally{ee(!1)}},[o]);a.useEffect(()=>{p()},[p]);async function ae(t){if(t.preventDefault(),!n)return;v(!0);let x=null;if(i.trim())try{JSON.parse(i),x=i.trim()}catch{N.error(r("projects.invalid_pipeline_json")),v(!1);return}try{await u.put(`web/projects/${n.key}`,{json:{name:j,repoUrl:h,sshUrl:S||null,defaultBranch:U,gitPlatform:M,agentType:P,agentCommand:R||null,maxTurns:parseInt(D,10)||50,workspaceRoot:E||null,setupCommands:L||null,testCommand:F||null,ptyOutputFilter:parseInt(q,10)||0,pipeline:x}}),N.success(r("projects.project_saved")),l(`/projects/${n.key}`)}catch(X){const oe=X instanceof Error?X.message:r("projects.failed_to_save_project");N.error(oe)}finally{v(!1)}}function se(){l(`/projects/${o}`)}async function ne(){if(!(!n||!c)){W(!0);try{await u.delete(`web/projects/${n.key}/members`,{searchParams:{developerId:String(c.developerId)}}),await p()}catch{}finally{W(!1),y(null)}}}return Z?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)]"})}):n?e.jsxs("form",{onSubmit:ae,className:"mx-auto max-w-6xl 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/${n.key}`),children:n.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(s,{label:r("projects.key"),children:e.jsx("input",{type:"text",value:n.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(s,{label:r("projects.name"),children:e.jsx("input",{type:"text",value:j,onChange:t=>w(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(s,{label:r("projects.repo_url"),children:e.jsx("input",{type:"text",value:h,onChange: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(s,{label:r("projects.ssh_url"),children:[e.jsx("input",{type:"text",value:S,onChange:t=>k(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-[10px] text-[var(--text-muted)]",children:r("projects.ssh_url_hint")})]}),e.jsx(s,{label:r("projects.git_platform"),children:e.jsx(Q,{value:M,onChange:t=>T(t),options:[{value:m.GITHUB,label:r("projects.github")},{value:m.GITLAB,label:r("projects.gitlab")},{value:m.GITEA,label:r("projects.gitea")}]})}),e.jsx(s,{label:r("projects.default_branch"),children:e.jsx("input",{type:"text",value:U,onChange:t=>O(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(s,{label:r("projects.agent_type"),children:e.jsx(Q,{value:P,onChange:t=>I(t),options:[{value:d.CLAUDE,label:r("projects.claude")},{value:d.CURSOR,label:r("projects.cursor")},{value:d.CODEX,label:r("projects.codex")},{value:d.CUSTOM,label:r("projects.custom")}]})}),e.jsx(s,{label:r("projects.agent_command"),children:e.jsx("input",{type:"text",value:R,onChange:t=>A(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(s,{label:r("projects.max_turns"),children:e.jsx("input",{type:"number",value:D,onChange:t=>$(t.target.value),min:1,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(s,{label:r("projects.workspace_root"),children:e.jsx("input",{type:"text",value:E,onChange:t=>G(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(s,{label:r("projects.setup_commands"),children:e.jsx("textarea",{value:L,onChange:t=>B(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(s,{label:r("projects.post_command"),children:e.jsx("input",{type:"text",value:F,onChange:t=>J(t.target.value),placeholder:"npm test",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.security")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(s,{label:r("projects.pty_output_filter"),children:e.jsx("input",{type:"text",value:q,onChange:t=>z(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(s,{label:r("projects.git_clean"),children:e.jsx("button",{type:"button",onClick:()=>H(!g),className:`relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full transition-colors ${g?"bg-[var(--accent)]":"bg-[var(--border)]"}`,children:e.jsx("span",{className:`inline-block h-4 w-4 rounded-full bg-white transition-transform ${g?"translate-x-6":"translate-x-1"}`})})})]})]})]}),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.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(ie,{to:"/projects/"+o+"/pipeline",className:"text-xs text-[var(--accent)] hover:underline",children:r("projects.edit_pipeline")})]}),e.jsx("textarea",{value:i,onChange:t=>f(t.target.value),rows:20,spellCheck:!1,placeholder:'{"stages": [], "defaults": {}}',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:()=>K(!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(me,{className:"h-3.5 w-3.5"}),r("projects.add_member")]})]}),b.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:b.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-[10px] font-medium",style:{color:t.role==="maintainer"?"var(--warning)":"var(--text-secondary)",background:t.role==="maintainer"?"rgba(245,158,11,0.1)":"rgba(163,163,163,0.1)"},children:t.role})]})]}),e.jsx("button",{type:"button",onClick:()=>y(t),className:"text-[var(--destructive)] hover:opacity-70 transition-opacity","aria-label":r("projects.remove_member"),children:e.jsx(pe,{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:se,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:C||!j||!h,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(C?"common.saving":"projects.save_changes")})]}),e.jsx(xe,{isOpen:te,onClose:()=>K(!1),projectKey:n.key,existingMemberIds:b.map(t=>t.developerId),onAdded:p}),e.jsx(ue,{isOpen:!!c,onClose:()=>y(null),onConfirm:ne,memberName:c?c.developerName??`#${c.developerId}`:"",loading:re})]}):e.jsxs("div",{className:"mx-auto max-w-4xl 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 s({label:o,children:l}){return e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("label",{className:"w-36 shrink-0 pt-2 text-xs text-[var(--text-muted)]",children:o}),e.jsx("div",{className:"flex-1",children:l})]})}export{fe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as I,r as i,j as e,X as z,C as X,L as N,d as Q,a as $,f as u}from"./index-BwKDWAeG.js";import{M as h}from"./protocol-C5uQmiiB.js";import{T as A}from"./TaskStatusBadge-C6DS5OWP.js";import{T as w}from"./Skeleton-CbeWT2zl.js";import{C as U}from"./chevron-right-CHP2kF25.js";import{A as S}from"./arrow-right-BvAzhW8L.js";function W(){return[{id:"admin_create_project",title:"create your first project",description:"set up a project with a git repo and pipeline",link:"/projects",linkLabel:"go to projects",autoDetect:!0},{id:"admin_register_worker",title:"register a worker machine",description:"generate a token and set up a worker to run tasks",link:"/machines",linkLabel:"go to machines",autoDetect:!0},{id:"admin_create_developer",title:"create a developer account",description:"add team members who can create and monitor tasks",link:"/admin/developers",linkLabel:"manage developers",autoDetect:!0},{id:"admin_first_task",title:"create your first task",description:"verify the full pipeline works end-to-end",link:"/tasks",linkLabel:"go to tasks",autoDetect:!0}]}function Z(){return[{id:"lead_view_projects",title:"view your projects",description:"check the projects assigned to you",link:"/projects",linkLabel:"go to projects"},{id:"lead_configure_pipeline",title:"configure a pipeline",description:"set up stages for your project workflow",link:"/projects",linkLabel:"go to projects"},{id:"lead_add_member",title:"add a team member",description:"invite developers to your project",link:"/projects",linkLabel:"go to projects"},{id:"lead_first_task",title:"create your first task",description:"submit a task and watch it execute",link:"/tasks",linkLabel:"go to tasks"}]}function ee(){return[{id:"dev_install_cli",title:"install the ov cli",description:"npm install -g @overlordai/developer-cli",link:"/docs/cli",linkLabel:"cli"},{id:"dev_setup_cli",title:"run ov setup",description:"connect to the server and authenticate",link:"/docs/cli",linkLabel:"setup guide"},{id:"dev_view_projects",title:"explore projects",description:"browse available projects and their pipelines",link:"/projects",linkLabel:"go to projects"},{id:"dev_first_task",title:"create your first task",description:"submit a task via web or cli",link:"/tasks",linkLabel:"go to tasks",autoDetect:!0}]}const O="overlord_onboarding";function te(){try{const n=localStorage.getItem(O);if(n)return JSON.parse(n)}catch{}return{dismissed:!1,completed:{}}}function E(n){localStorage.setItem(O,JSON.stringify(n))}function se({data:n}){const s=I(r=>{var c;return(c=r.user)==null?void 0:c.role}),[o,a]=i.useState(te),d=s==="admin"?W():s==="lead"||s==="maintainer"?Z():ee(),l=i.useCallback(r=>{if(o.completed[r.id])return!0;if(!r.autoDetect)return!1;switch(r.id){case"admin_create_project":return n.totalProjects>0;case"admin_register_worker":return n.totalMachines>0;case"admin_create_developer":return n.totalDevelopers>1;case"admin_first_task":case"dev_first_task":return n.activeTasks>0;default:return!1}},[o.completed,n]),x=d.filter(l).length,p=x===d.length,k=i.useCallback(r=>{a(c=>{const f={...c,completed:{...c.completed,[r]:!c.completed[r]}};return E(f),f})},[]),v=i.useCallback(()=>{a(r=>{const c={...r,dismissed:!0};return E(c),c})},[]);if(o.dismissed)return null;const b=Math.round(x/d.length*100);return e.jsxs("div",{className:"mb-6 md:mb-8 rounded-[4px] border border-[var(--accent)]/30 bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-xs font-bold text-[var(--accent)]",children:"// getting started"}),e.jsxs("span",{className:"text-[10px] text-[var(--text-muted)]",children:[x,"/",d.length," completed"]})]}),e.jsx("button",{onClick:v,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",title:"dismiss",children:e.jsx(z,{className:"h-3.5 w-3.5"})})]}),e.jsx("div",{className:"h-0.5 bg-[var(--border)]",children:e.jsx("div",{className:"h-full bg-[var(--accent)] transition-all duration-500",style:{width:`${b}%`}})}),e.jsx("div",{className:"divide-y divide-[var(--border)]",children:d.map(r=>{const c=l(r);return e.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 transition-colors hover:bg-[var(--bg-input)]",children:[e.jsx("button",{onClick:()=>!r.autoDetect&&k(r.id),className:`flex h-4 w-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors ${c?"border-[var(--accent)] bg-[var(--accent)]":"border-[var(--border)] hover:border-[var(--text-muted)]"} ${r.autoDetect?"cursor-default":"cursor-pointer"}`,children:c&&e.jsx(X,{className:"h-2.5 w-2.5 text-black"})}),e.jsxs("div",{className:"flex flex-1 items-center justify-between min-w-0",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:`text-xs ${c?"text-[var(--text-muted)] line-through":"text-[var(--text-primary)]"}`,children:r.title}),e.jsx("p",{className:"text-[10px] text-[var(--text-muted)] truncate",children:r.description})]}),r.link&&!c&&e.jsxs(N,{to:r.link,className:"ml-3 flex shrink-0 items-center gap-1 text-[10px] text-[var(--accent)] hover:underline",children:[r.linkLabel," ",e.jsx(U,{className:"h-3 w-3"})]})]})]},r.id)})}),p&&e.jsxs("div",{className:"border-t border-[var(--border)] px-4 py-3 text-center",children:[e.jsx("span",{className:"text-xs text-[var(--accent)]",children:"all set! you're ready to go."}),e.jsx("button",{onClick:v,className:"ml-3 text-[10px] text-[var(--text-muted)] underline hover:text-[var(--text-primary)]",children:"dismiss"})]})]})}const ae=3e4,re=[{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"}],ne=["mon","tue","wed","thu","fri","sat","sun"];function L(n){const s=Date.now(),o=new Date(n).getTime(),a=s-o,d=Math.floor(a/6e4);if(d<1)return"just now";if(d<60)return`${d}m ago`;const l=Math.floor(d/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`}function ie(n,s){return n.length<=s?n:n.slice(0,s)+"..."}function le({dailyRates:n,overallRate:s}){const{t:o}=$(),a=ne.map((l,x)=>({label:l,value:n[x]??0})),d=Math.max(...a.map(l=>l.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:[s,"%"]}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:o("dashboard.last_7_days")})]}),e.jsx("div",{className:"flex gap-2",style:{height:80},children:a.map(l=>{const x=d>0?Math.max(l.value/d*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:`${x}%`,backgroundColor:l.value>=80?"var(--accent)":l.value>=50?"var(--warning)":"var(--destructive)"}})}),e.jsx("span",{className:"shrink-0 text-[10px] text-[var(--text-muted)]",children:l.label})]},l.label)})})]})}function he(){const n=Q(),{t:s}=$(),o=I(t=>{var m;return((m=t.user)==null?void 0:m.role)==="admin"}),[a,d]=i.useState(null),[l,x]=i.useState([]),[p,k]=i.useState([]),[v,b]=i.useState([]),[r,c]=i.useState(0),[f,F]=i.useState(0),[C,K]=i.useState(!0),[P,G]=i.useState(!0),[q,B]=i.useState(!0),[H,J]=i.useState(!0),j=i.useCallback(async()=>{try{const t=await u.get("web/dashboard/stats").json();d(t)}catch{}finally{K(!1)}},[]),g=i.useCallback(async()=>{try{const t=await u.get("web/dashboard/recent-tasks",{searchParams:{limit:"5"}}).json();x(t)}catch{}finally{G(!1)}},[]),D=i.useCallback(async()=>{try{const t=await u.get("web/machines").json();k(t)}catch{}finally{B(!1)}},[]),M=i.useCallback(async()=>{try{const t=await u.get("web/dashboard/recent-activity").json();b(t)}catch{b([])}finally{J(!1)}},[]);i.useEffect(()=>{j(),g(),D(),M(),u.get("web/projects").json().then(t=>c(t.length)).catch(()=>{}),o&&u.get("admin/developers").json().then(t=>F(t.length)).catch(()=>{})},[j,g,D,M,o]);const y=i.useRef(null);i.useEffect(()=>(y.current=setInterval(()=>{j(),g()},ae),()=>{y.current&&clearInterval(y.current)}),[j,g]);const R=(a==null?void 0:a.success_rate_daily)??null,T=(a==null?void 0:a.task_success_rate_7d)??0;function V(t){switch(t){case h.ONLINE:return"var(--accent)";case h.DRAINING:return"var(--warning)";case h.OFFLINE:default:return"var(--text-muted)"}}function Y(t){switch(t){case h.ONLINE:return s("dashboard.online");case h.DRAINING:return s("dashboard.idle");case h.OFFLINE:default:return s("dashboard.offline")}}return e.jsxs("div",{className:"mx-auto max-w-6xl px-2 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:["// ",s("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:re.map(({key:t,labelKey:m})=>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-[9px] md:text-xs text-[var(--text-muted)]",children:[s(m),":"]}),C?e.jsx("div",{className:"mt-1 h-6 md:h-8 w-12 md:w-16 animate-pulse rounded 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[t])??0})})]},t))}),e.jsx(se,{data:{activeTasks:((a==null?void 0:a.active_tasks)??0)+((a==null?void 0:a.queued_tasks)??0),totalMachines:p.length,totalProjects:r,totalDevelopers:f}}),e.jsxs("div",{className:"mb-6 grid gap-6 lg:grid-cols-3 items-stretch",children:[e.jsx("div",{className:"hidden md: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:s("dashboard.task_success_rate")})}),e.jsx("div",{className:"flex flex-1 flex-col justify-center p-5",children:C?e.jsx("div",{className:"h-24 animate-pulse rounded bg-[var(--bg-input)]"}):R?e.jsx(le,{dailyRates:R,overallRate:T}):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:[T,"%"]}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:s("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:s("dashboard.recent_tasks")}),e.jsxs(N,{to:"/tasks",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[s("common.view_all")," ",e.jsx(S,{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:s("dashboard.recent_tasks")})}),e.jsx("div",{className:"px-3 pb-3 md:p-4",children:P?e.jsx(w,{rows:4}):l.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:s("dashboard.no_tasks_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2 md:gap-0",children:l.map(t=>e.jsxs("div",{onClick:()=>n(`/tasks/${t.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-[10px] text-[var(--text-primary)] leading-tight",style:{wordBreak:"break-word"},children:["#",t.id," ",t.description]}),e.jsx("span",{className:"shrink-0",children:e.jsx(A,{status:t.status})})]}),e.jsx("span",{className:"text-[9px] text-[var(--text-muted)] mt-1 block",children:L(t.created_at)})]}),e.jsxs("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:["#",t.id]}),e.jsx("span",{className:"hidden md:inline flex-1 text-xs text-[var(--text-primary)] truncate",children:ie(t.description,40)}),e.jsx("span",{className:"hidden md:inline",children:e.jsx(A,{status:t.status})}),e.jsx("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:L(t.created_at)})]},t.id))})})]})]}),e.jsxs("div",{className:"hidden md: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:s("dashboard.worker_status")}),e.jsxs(N,{to:"/machines",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[s("common.view_all")," ",e.jsx(S,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:q?e.jsx(w,{rows:3}):p.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:s("dashboard.no_workers_registered")})]}):e.jsx("div",{className:"flex flex-col",children:p.map(t=>e.jsxs("div",{onClick:()=>n(`/machines/${t.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:t.name}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t.host??"--"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:[t.activeSlots,"/",t.maxSlots," ",s("dashboard.slots")]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs",style:{color:V(t.status)},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),Y(t.status)]})]})]},t.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:s("dashboard.recent_activity")}),o&&e.jsxs(N,{to:"/admin/audit-logs",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[s("common.view_all")," ",e.jsx(S,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:H?e.jsx(w,{rows:4}):v.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:s("dashboard.no_recent_activity")})]}):e.jsx("div",{className:"flex flex-col",children:v.map(t=>{const m=t.message.match(/task\s*#?(\d+)/i),_=m?m[1]:null;return e.jsxs("div",{className:`flex items-start gap-3 border-b border-[var(--border-row)] py-2 last:border-b-0 ${_?"cursor-pointer hover:bg-[var(--bg-input)] transition-colors":""}`,onClick:()=>_&&n(`/tasks/${_}`),children:[e.jsx("span",{className:"shrink-0 text-xs text-[var(--text-muted)]",children:L(t.timestamp)}),e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:t.message})]},t.id)})})})]})]})]})}export{he as default};
|
|
1
|
+
import{u as I,r as i,j as e,X as z,C as X,L as N,d as Q,a as $,f as u}from"./index-CtAu_XZ5.js";import{M as h}from"./protocol-C5uQmiiB.js";import{T as A}from"./TaskStatusBadge-yxoaV45g.js";import{T as w}from"./Skeleton-CSAb9g25.js";import{C as U}from"./chevron-right-B-JssgBf.js";import{A as S}from"./arrow-right-DpePBWE7.js";function W(){return[{id:"admin_create_project",title:"create your first project",description:"set up a project with a git repo and pipeline",link:"/projects",linkLabel:"go to projects",autoDetect:!0},{id:"admin_register_worker",title:"register a worker machine",description:"generate a token and set up a worker to run tasks",link:"/machines",linkLabel:"go to machines",autoDetect:!0},{id:"admin_create_developer",title:"create a developer account",description:"add team members who can create and monitor tasks",link:"/admin/developers",linkLabel:"manage developers",autoDetect:!0},{id:"admin_first_task",title:"create your first task",description:"verify the full pipeline works end-to-end",link:"/tasks",linkLabel:"go to tasks",autoDetect:!0}]}function Z(){return[{id:"lead_view_projects",title:"view your projects",description:"check the projects assigned to you",link:"/projects",linkLabel:"go to projects"},{id:"lead_configure_pipeline",title:"configure a pipeline",description:"set up stages for your project workflow",link:"/projects",linkLabel:"go to projects"},{id:"lead_add_member",title:"add a team member",description:"invite developers to your project",link:"/projects",linkLabel:"go to projects"},{id:"lead_first_task",title:"create your first task",description:"submit a task and watch it execute",link:"/tasks",linkLabel:"go to tasks"}]}function ee(){return[{id:"dev_install_cli",title:"install the ov cli",description:"npm install -g @overlordai/developer-cli",link:"/docs/cli",linkLabel:"cli"},{id:"dev_setup_cli",title:"run ov setup",description:"connect to the server and authenticate",link:"/docs/cli",linkLabel:"setup guide"},{id:"dev_view_projects",title:"explore projects",description:"browse available projects and their pipelines",link:"/projects",linkLabel:"go to projects"},{id:"dev_first_task",title:"create your first task",description:"submit a task via web or cli",link:"/tasks",linkLabel:"go to tasks",autoDetect:!0}]}const O="overlord_onboarding";function te(){try{const n=localStorage.getItem(O);if(n)return JSON.parse(n)}catch{}return{dismissed:!1,completed:{}}}function E(n){localStorage.setItem(O,JSON.stringify(n))}function se({data:n}){const s=I(r=>{var c;return(c=r.user)==null?void 0:c.role}),[o,a]=i.useState(te),d=s==="admin"?W():s==="lead"||s==="maintainer"?Z():ee(),l=i.useCallback(r=>{if(o.completed[r.id])return!0;if(!r.autoDetect)return!1;switch(r.id){case"admin_create_project":return n.totalProjects>0;case"admin_register_worker":return n.totalMachines>0;case"admin_create_developer":return n.totalDevelopers>1;case"admin_first_task":case"dev_first_task":return n.activeTasks>0;default:return!1}},[o.completed,n]),x=d.filter(l).length,p=x===d.length,k=i.useCallback(r=>{a(c=>{const f={...c,completed:{...c.completed,[r]:!c.completed[r]}};return E(f),f})},[]),v=i.useCallback(()=>{a(r=>{const c={...r,dismissed:!0};return E(c),c})},[]);if(o.dismissed)return null;const b=Math.round(x/d.length*100);return e.jsxs("div",{className:"mb-6 md:mb-8 rounded-[4px] border border-[var(--accent)]/30 bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-xs font-bold text-[var(--accent)]",children:"// getting started"}),e.jsxs("span",{className:"text-[10px] text-[var(--text-muted)]",children:[x,"/",d.length," completed"]})]}),e.jsx("button",{onClick:v,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",title:"dismiss",children:e.jsx(z,{className:"h-3.5 w-3.5"})})]}),e.jsx("div",{className:"h-0.5 bg-[var(--border)]",children:e.jsx("div",{className:"h-full bg-[var(--accent)] transition-all duration-500",style:{width:`${b}%`}})}),e.jsx("div",{className:"divide-y divide-[var(--border)]",children:d.map(r=>{const c=l(r);return e.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 transition-colors hover:bg-[var(--bg-input)]",children:[e.jsx("button",{onClick:()=>!r.autoDetect&&k(r.id),className:`flex h-4 w-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors ${c?"border-[var(--accent)] bg-[var(--accent)]":"border-[var(--border)] hover:border-[var(--text-muted)]"} ${r.autoDetect?"cursor-default":"cursor-pointer"}`,children:c&&e.jsx(X,{className:"h-2.5 w-2.5 text-black"})}),e.jsxs("div",{className:"flex flex-1 items-center justify-between min-w-0",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:`text-xs ${c?"text-[var(--text-muted)] line-through":"text-[var(--text-primary)]"}`,children:r.title}),e.jsx("p",{className:"text-[10px] text-[var(--text-muted)] truncate",children:r.description})]}),r.link&&!c&&e.jsxs(N,{to:r.link,className:"ml-3 flex shrink-0 items-center gap-1 text-[10px] text-[var(--accent)] hover:underline",children:[r.linkLabel," ",e.jsx(U,{className:"h-3 w-3"})]})]})]},r.id)})}),p&&e.jsxs("div",{className:"border-t border-[var(--border)] px-4 py-3 text-center",children:[e.jsx("span",{className:"text-xs text-[var(--accent)]",children:"all set! you're ready to go."}),e.jsx("button",{onClick:v,className:"ml-3 text-[10px] text-[var(--text-muted)] underline hover:text-[var(--text-primary)]",children:"dismiss"})]})]})}const ae=3e4,re=[{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"}],ne=["mon","tue","wed","thu","fri","sat","sun"];function L(n){const s=Date.now(),o=new Date(n).getTime(),a=s-o,d=Math.floor(a/6e4);if(d<1)return"just now";if(d<60)return`${d}m ago`;const l=Math.floor(d/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`}function ie(n,s){return n.length<=s?n:n.slice(0,s)+"..."}function le({dailyRates:n,overallRate:s}){const{t:o}=$(),a=ne.map((l,x)=>({label:l,value:n[x]??0})),d=Math.max(...a.map(l=>l.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:[s,"%"]}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:o("dashboard.last_7_days")})]}),e.jsx("div",{className:"flex gap-2",style:{height:80},children:a.map(l=>{const x=d>0?Math.max(l.value/d*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:`${x}%`,backgroundColor:l.value>=80?"var(--accent)":l.value>=50?"var(--warning)":"var(--destructive)"}})}),e.jsx("span",{className:"shrink-0 text-[10px] text-[var(--text-muted)]",children:l.label})]},l.label)})})]})}function he(){const n=Q(),{t:s}=$(),o=I(t=>{var m;return((m=t.user)==null?void 0:m.role)==="admin"}),[a,d]=i.useState(null),[l,x]=i.useState([]),[p,k]=i.useState([]),[v,b]=i.useState([]),[r,c]=i.useState(0),[f,F]=i.useState(0),[C,K]=i.useState(!0),[P,G]=i.useState(!0),[q,B]=i.useState(!0),[H,J]=i.useState(!0),j=i.useCallback(async()=>{try{const t=await u.get("web/dashboard/stats").json();d(t)}catch{}finally{K(!1)}},[]),g=i.useCallback(async()=>{try{const t=await u.get("web/dashboard/recent-tasks",{searchParams:{limit:"5"}}).json();x(t)}catch{}finally{G(!1)}},[]),D=i.useCallback(async()=>{try{const t=await u.get("web/machines").json();k(t)}catch{}finally{B(!1)}},[]),M=i.useCallback(async()=>{try{const t=await u.get("web/dashboard/recent-activity").json();b(t)}catch{b([])}finally{J(!1)}},[]);i.useEffect(()=>{j(),g(),D(),M(),u.get("web/projects").json().then(t=>c(t.length)).catch(()=>{}),o&&u.get("admin/developers").json().then(t=>F(t.length)).catch(()=>{})},[j,g,D,M,o]);const y=i.useRef(null);i.useEffect(()=>(y.current=setInterval(()=>{j(),g()},ae),()=>{y.current&&clearInterval(y.current)}),[j,g]);const R=(a==null?void 0:a.success_rate_daily)??null,T=(a==null?void 0:a.task_success_rate_7d)??0;function V(t){switch(t){case h.ONLINE:return"var(--accent)";case h.DRAINING:return"var(--warning)";case h.OFFLINE:default:return"var(--text-muted)"}}function Y(t){switch(t){case h.ONLINE:return s("dashboard.online");case h.DRAINING:return s("dashboard.idle");case h.OFFLINE:default:return s("dashboard.offline")}}return e.jsxs("div",{className:"mx-auto max-w-6xl px-2 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:["// ",s("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:re.map(({key:t,labelKey:m})=>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-[9px] md:text-xs text-[var(--text-muted)]",children:[s(m),":"]}),C?e.jsx("div",{className:"mt-1 h-6 md:h-8 w-12 md:w-16 animate-pulse rounded 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[t])??0})})]},t))}),e.jsx(se,{data:{activeTasks:((a==null?void 0:a.active_tasks)??0)+((a==null?void 0:a.queued_tasks)??0),totalMachines:p.length,totalProjects:r,totalDevelopers:f}}),e.jsxs("div",{className:"mb-6 grid gap-6 lg:grid-cols-3 items-stretch",children:[e.jsx("div",{className:"hidden md: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:s("dashboard.task_success_rate")})}),e.jsx("div",{className:"flex flex-1 flex-col justify-center p-5",children:C?e.jsx("div",{className:"h-24 animate-pulse rounded bg-[var(--bg-input)]"}):R?e.jsx(le,{dailyRates:R,overallRate:T}):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:[T,"%"]}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:s("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:s("dashboard.recent_tasks")}),e.jsxs(N,{to:"/tasks",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[s("common.view_all")," ",e.jsx(S,{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:s("dashboard.recent_tasks")})}),e.jsx("div",{className:"px-3 pb-3 md:p-4",children:P?e.jsx(w,{rows:4}):l.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:s("dashboard.no_tasks_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2 md:gap-0",children:l.map(t=>e.jsxs("div",{onClick:()=>n(`/tasks/${t.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-[10px] text-[var(--text-primary)] leading-tight",style:{wordBreak:"break-word"},children:["#",t.id," ",t.description]}),e.jsx("span",{className:"shrink-0",children:e.jsx(A,{status:t.status})})]}),e.jsx("span",{className:"text-[9px] text-[var(--text-muted)] mt-1 block",children:L(t.created_at)})]}),e.jsxs("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:["#",t.id]}),e.jsx("span",{className:"hidden md:inline flex-1 text-xs text-[var(--text-primary)] truncate",children:ie(t.description,40)}),e.jsx("span",{className:"hidden md:inline",children:e.jsx(A,{status:t.status})}),e.jsx("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:L(t.created_at)})]},t.id))})})]})]}),e.jsxs("div",{className:"hidden md: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:s("dashboard.worker_status")}),e.jsxs(N,{to:"/machines",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[s("common.view_all")," ",e.jsx(S,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:q?e.jsx(w,{rows:3}):p.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:s("dashboard.no_workers_registered")})]}):e.jsx("div",{className:"flex flex-col",children:p.map(t=>e.jsxs("div",{onClick:()=>n(`/machines/${t.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:t.name}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t.host??"--"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:[t.activeSlots,"/",t.maxSlots," ",s("dashboard.slots")]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs",style:{color:V(t.status)},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),Y(t.status)]})]})]},t.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:s("dashboard.recent_activity")}),o&&e.jsxs(N,{to:"/admin/audit-logs",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[s("common.view_all")," ",e.jsx(S,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:H?e.jsx(w,{rows:4}):v.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:s("dashboard.no_recent_activity")})]}):e.jsx("div",{className:"flex flex-col",children:v.map(t=>{const m=t.message.match(/task\s*#?(\d+)/i),_=m?m[1]:null;return e.jsxs("div",{className:`flex items-start gap-3 border-b border-[var(--border-row)] py-2 last:border-b-0 ${_?"cursor-pointer hover:bg-[var(--bg-input)] transition-colors":""}`,onClick:()=>_&&n(`/tasks/${_}`),children:[e.jsx("span",{className:"shrink-0 text-xs text-[var(--text-muted)]",children:L(t.timestamp)}),e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:t.message})]},t.id)})})})]})]})]})}export{he as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as n,u as m,a as h,j as e,T as p,L as l,b as x,S as y,r as g,C as v}from"./index-
|
|
1
|
+
import{c as n,u as m,a as h,j as e,T as p,L as l,b as x,S as y,r as g,C as v}from"./index-CtAu_XZ5.js";import{A as c}from"./arrow-right-DpePBWE7.js";import{B as u}from"./bot-BChGjdPm.js";import{U as b}from"./users-BsLS_-Dg.js";import{C as j}from"./copy-MDuQXvvx.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|