@overlordai/server 1.0.52 → 1.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/database/migrations/001-init-schema.sql +73 -9
- package/dist/adapters/adapter.interface.d.ts +1 -4
- package/dist/adapters/adapter.interface.d.ts.map +1 -1
- package/dist/adapters/adapter.interface.js.map +1 -1
- package/dist/adapters/adapter.module.d.ts.map +1 -1
- package/dist/adapters/adapter.module.js +8 -7
- package/dist/adapters/adapter.module.js.map +1 -1
- package/dist/adapters/lark/lark-card.builder.d.ts +1 -25
- package/dist/adapters/lark/lark-card.builder.d.ts.map +1 -1
- package/dist/adapters/lark/lark-card.builder.js +6 -110
- package/dist/adapters/lark/lark-card.builder.js.map +1 -1
- package/dist/adapters/lark/lark-message.parser.d.ts +4 -4
- package/dist/adapters/lark/lark-message.parser.d.ts.map +1 -1
- package/dist/adapters/lark/lark-message.parser.js +20 -13
- package/dist/adapters/lark/lark-message.parser.js.map +1 -1
- package/dist/adapters/lark/lark-signature.d.ts.map +1 -1
- package/dist/adapters/lark/lark-signature.js +6 -0
- package/dist/adapters/lark/lark-signature.js.map +1 -1
- package/dist/adapters/lark/lark.adapter.d.ts +14 -9
- package/dist/adapters/lark/lark.adapter.d.ts.map +1 -1
- package/dist/adapters/lark/lark.adapter.js +99 -177
- package/dist/adapters/lark/lark.adapter.js.map +1 -1
- package/dist/adapters/lark/lark.controller.d.ts +10 -1
- package/dist/adapters/lark/lark.controller.d.ts.map +1 -1
- package/dist/adapters/lark/lark.controller.js +48 -14
- package/dist/adapters/lark/lark.controller.js.map +1 -1
- package/dist/adapters/slack/slack-block.builder.d.ts +8 -0
- package/dist/adapters/slack/slack-block.builder.d.ts.map +1 -0
- package/dist/adapters/slack/slack-block.builder.js +117 -0
- package/dist/adapters/slack/slack-block.builder.js.map +1 -0
- package/dist/adapters/slack/slack-message.parser.d.ts +15 -0
- package/dist/adapters/slack/slack-message.parser.d.ts.map +1 -0
- package/dist/adapters/slack/slack-message.parser.js +158 -0
- package/dist/adapters/slack/slack-message.parser.js.map +1 -0
- package/dist/adapters/slack/slack-signature.d.ts +7 -0
- package/dist/adapters/slack/slack-signature.d.ts.map +1 -0
- package/dist/adapters/slack/slack-signature.js +59 -0
- package/dist/adapters/slack/slack-signature.js.map +1 -0
- package/dist/adapters/slack/slack.adapter.d.ts +67 -13
- package/dist/adapters/slack/slack.adapter.d.ts.map +1 -1
- package/dist/adapters/slack/slack.adapter.js +468 -19
- package/dist/adapters/slack/slack.adapter.js.map +1 -1
- package/dist/adapters/slack/slack.controller.d.ts +20 -0
- package/dist/adapters/slack/slack.controller.d.ts.map +1 -0
- package/dist/adapters/slack/slack.controller.js +257 -0
- package/dist/adapters/slack/slack.controller.js.map +1 -0
- package/dist/app.module.d.ts.map +1 -1
- package/dist/app.module.js +4 -0
- package/dist/app.module.js.map +1 -1
- package/dist/auth/auth.controller.d.ts.map +1 -1
- package/dist/auth/auth.controller.js +1 -0
- package/dist/auth/auth.controller.js.map +1 -1
- package/dist/auth/auth.module.d.ts.map +1 -1
- package/dist/auth/auth.module.js +4 -5
- package/dist/auth/auth.module.js.map +1 -1
- package/dist/auth/auth.service.d.ts +9 -2
- package/dist/auth/auth.service.d.ts.map +1 -1
- package/dist/auth/auth.service.js +50 -79
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/auth/authenticated-request.d.ts +10 -0
- package/dist/auth/authenticated-request.d.ts.map +1 -0
- package/dist/auth/authenticated-request.js +3 -0
- package/dist/auth/authenticated-request.js.map +1 -0
- package/dist/auth/extract-user.middleware.d.ts.map +1 -1
- package/dist/auth/extract-user.middleware.js +2 -1
- package/dist/auth/extract-user.middleware.js.map +1 -1
- package/dist/auth/guards/jwt-auth.guard.d.ts.map +1 -1
- package/dist/auth/guards/jwt-auth.guard.js +5 -2
- package/dist/auth/guards/jwt-auth.guard.js.map +1 -1
- package/dist/auth/guards/project-role.guard.d.ts.map +1 -1
- package/dist/auth/guards/project-role.guard.js +6 -8
- package/dist/auth/guards/project-role.guard.js.map +1 -1
- package/dist/auth/jwt.strategy.d.ts +6 -3
- package/dist/auth/jwt.strategy.d.ts.map +1 -1
- package/dist/auth/jwt.strategy.js +15 -5
- package/dist/auth/jwt.strategy.js.map +1 -1
- package/dist/common/command-parser.d.ts +29 -0
- package/dist/common/command-parser.d.ts.map +1 -0
- package/dist/common/command-parser.js +133 -0
- package/dist/common/command-parser.js.map +1 -0
- package/dist/common/config.d.ts +17 -0
- package/dist/common/config.d.ts.map +1 -0
- package/dist/common/config.js +47 -0
- package/dist/common/config.js.map +1 -0
- package/dist/common/crypto.service.d.ts +4 -1
- package/dist/common/crypto.service.d.ts.map +1 -1
- package/dist/common/crypto.service.js +14 -7
- package/dist/common/crypto.service.js.map +1 -1
- package/dist/common/error-filter.d.ts +1 -0
- package/dist/common/error-filter.d.ts.map +1 -1
- package/dist/common/error-filter.js +6 -2
- package/dist/common/error-filter.js.map +1 -1
- package/dist/common/git-utils.d.ts +9 -0
- package/dist/common/git-utils.d.ts.map +1 -0
- package/dist/common/git-utils.js +41 -0
- package/dist/common/git-utils.js.map +1 -0
- package/dist/common/health.controller.d.ts.map +1 -1
- package/dist/common/health.controller.js +3 -5
- package/dist/common/health.controller.js.map +1 -1
- package/dist/common/machine-utils.d.ts +32 -0
- package/dist/common/machine-utils.d.ts.map +1 -0
- package/dist/common/machine-utils.js +12 -0
- package/dist/common/machine-utils.js.map +1 -0
- package/dist/common/pagination.d.ts +12 -5
- package/dist/common/pagination.d.ts.map +1 -1
- package/dist/common/pagination.js +27 -17
- package/dist/common/pagination.js.map +1 -1
- package/dist/common/project-validation.d.ts +7 -0
- package/dist/common/project-validation.d.ts.map +1 -0
- package/dist/common/project-validation.js +86 -0
- package/dist/common/project-validation.js.map +1 -0
- package/dist/common/rate-limit.guard.d.ts +4 -3
- package/dist/common/rate-limit.guard.d.ts.map +1 -1
- package/dist/common/rate-limit.guard.js +14 -5
- package/dist/common/rate-limit.guard.js.map +1 -1
- package/dist/common/sql-utils.d.ts +6 -0
- package/dist/common/sql-utils.d.ts.map +1 -0
- package/dist/common/sql-utils.js +11 -0
- package/dist/common/sql-utils.js.map +1 -0
- package/dist/common/string-utils.d.ts +6 -0
- package/dist/common/string-utils.d.ts.map +1 -0
- package/dist/common/string-utils.js +15 -0
- package/dist/common/string-utils.js.map +1 -0
- package/dist/common/worker-utils.d.ts +31 -0
- package/dist/common/worker-utils.d.ts.map +1 -0
- package/dist/common/worker-utils.js +12 -0
- package/dist/common/worker-utils.js.map +1 -0
- package/dist/database/base.repository.d.ts +56 -0
- package/dist/database/base.repository.d.ts.map +1 -0
- package/dist/database/base.repository.js +82 -0
- package/dist/database/base.repository.js.map +1 -0
- package/dist/database/database.service.d.ts.map +1 -1
- package/dist/database/database.service.js +9 -1
- package/dist/database/database.service.js.map +1 -1
- package/dist/database/migration-runner.d.ts.map +1 -1
- package/dist/database/migration-runner.js +2 -1
- package/dist/database/migration-runner.js.map +1 -1
- package/dist/database/repositories/audit-log.repository.d.ts.map +1 -1
- package/dist/database/repositories/audit-log.repository.js +16 -18
- package/dist/database/repositories/audit-log.repository.js.map +1 -1
- package/dist/database/repositories/bot.repository.d.ts +18 -32
- package/dist/database/repositories/bot.repository.d.ts.map +1 -1
- package/dist/database/repositories/bot.repository.js +42 -21
- package/dist/database/repositories/bot.repository.js.map +1 -1
- package/dist/database/repositories/developer-token.repository.d.ts +7 -17
- package/dist/database/repositories/developer-token.repository.d.ts.map +1 -1
- package/dist/database/repositories/developer-token.repository.js +24 -15
- package/dist/database/repositories/developer-token.repository.js.map +1 -1
- package/dist/database/repositories/developer.repository.d.ts +5 -1
- package/dist/database/repositories/developer.repository.d.ts.map +1 -1
- package/dist/database/repositories/developer.repository.js +60 -49
- package/dist/database/repositories/developer.repository.js.map +1 -1
- package/dist/database/repositories/machine.repository.d.ts.map +1 -1
- package/dist/database/repositories/machine.repository.js +2 -7
- package/dist/database/repositories/machine.repository.js.map +1 -1
- package/dist/database/repositories/notification.repository.d.ts +1 -0
- package/dist/database/repositories/notification.repository.d.ts.map +1 -1
- package/dist/database/repositories/notification.repository.js +25 -20
- package/dist/database/repositories/notification.repository.js.map +1 -1
- package/dist/database/repositories/project-member.repository.d.ts +7 -16
- package/dist/database/repositories/project-member.repository.d.ts.map +1 -1
- package/dist/database/repositories/project-member.repository.js +34 -24
- package/dist/database/repositories/project-member.repository.js.map +1 -1
- package/dist/database/repositories/project.repository.d.ts +2 -1
- package/dist/database/repositories/project.repository.d.ts.map +1 -1
- package/dist/database/repositories/project.repository.js +70 -71
- package/dist/database/repositories/project.repository.js.map +1 -1
- package/dist/database/repositories/session.repository.d.ts.map +1 -1
- package/dist/database/repositories/session.repository.js +22 -25
- package/dist/database/repositories/session.repository.js.map +1 -1
- package/dist/database/repositories/task.repository.d.ts +31 -7
- package/dist/database/repositories/task.repository.d.ts.map +1 -1
- package/dist/database/repositories/task.repository.js +134 -86
- package/dist/database/repositories/task.repository.js.map +1 -1
- package/dist/database/repositories/worker-token.repository.d.ts.map +1 -1
- package/dist/database/repositories/worker-token.repository.js +18 -16
- package/dist/database/repositories/worker-token.repository.js.map +1 -1
- package/dist/database/repositories/worker.repository.d.ts +50 -0
- package/dist/database/repositories/worker.repository.d.ts.map +1 -0
- package/dist/database/repositories/worker.repository.js +215 -0
- package/dist/database/repositories/worker.repository.js.map +1 -0
- package/dist/database/repositories/workspace.repository.d.ts +3 -2
- package/dist/database/repositories/workspace.repository.d.ts.map +1 -1
- package/dist/database/repositories/workspace.repository.js +29 -21
- package/dist/database/repositories/workspace.repository.js.map +1 -1
- package/dist/database/repository.module.d.ts +3 -0
- package/dist/database/repository.module.d.ts.map +1 -0
- package/dist/database/repository.module.js +45 -0
- package/dist/database/repository.module.js.map +1 -0
- package/dist/dispatcher/capability.service.d.ts +19 -14
- package/dist/dispatcher/capability.service.d.ts.map +1 -1
- package/dist/dispatcher/capability.service.js +77 -69
- package/dist/dispatcher/capability.service.js.map +1 -1
- package/dist/dispatcher/cleanup.service.d.ts +1 -1
- package/dist/dispatcher/cleanup.service.d.ts.map +1 -1
- package/dist/dispatcher/cleanup.service.js +13 -13
- package/dist/dispatcher/cleanup.service.js.map +1 -1
- package/dist/dispatcher/dedup.service.d.ts +17 -3
- package/dist/dispatcher/dedup.service.d.ts.map +1 -1
- package/dist/dispatcher/dedup.service.js +76 -82
- package/dist/dispatcher/dedup.service.js.map +1 -1
- package/dist/dispatcher/dispatcher.module.d.ts.map +1 -1
- package/dist/dispatcher/dispatcher.module.js +11 -18
- package/dist/dispatcher/dispatcher.module.js.map +1 -1
- package/dist/dispatcher/dispatcher.service.d.ts +14 -116
- package/dist/dispatcher/dispatcher.service.d.ts.map +1 -1
- package/dist/dispatcher/dispatcher.service.js +62 -940
- package/dist/dispatcher/dispatcher.service.js.map +1 -1
- package/dist/dispatcher/dispatcher.types.d.ts +33 -0
- package/dist/dispatcher/dispatcher.types.d.ts.map +1 -0
- package/dist/dispatcher/dispatcher.types.js +3 -0
- package/dist/dispatcher/dispatcher.types.js.map +1 -0
- package/dist/dispatcher/heartbeat.service.d.ts +17 -10
- package/dist/dispatcher/heartbeat.service.d.ts.map +1 -1
- package/dist/dispatcher/heartbeat.service.js +47 -51
- package/dist/dispatcher/heartbeat.service.js.map +1 -1
- package/dist/dispatcher/pty-relay.service.d.ts.map +1 -1
- package/dist/dispatcher/pty-relay.service.js +7 -15
- package/dist/dispatcher/pty-relay.service.js.map +1 -1
- package/dist/dispatcher/reconciler.d.ts +18 -8
- package/dist/dispatcher/reconciler.d.ts.map +1 -1
- package/dist/dispatcher/reconciler.js +219 -130
- package/dist/dispatcher/reconciler.js.map +1 -1
- package/dist/dispatcher/scheduler.service.d.ts +15 -9
- package/dist/dispatcher/scheduler.service.d.ts.map +1 -1
- package/dist/dispatcher/scheduler.service.js +95 -53
- package/dist/dispatcher/scheduler.service.js.map +1 -1
- package/dist/dispatcher/state-machine.d.ts.map +1 -1
- package/dist/dispatcher/state-machine.js +1 -5
- package/dist/dispatcher/state-machine.js.map +1 -1
- package/dist/dispatcher/task-creation.service.d.ts +30 -0
- package/dist/dispatcher/task-creation.service.d.ts.map +1 -0
- package/dist/dispatcher/task-creation.service.js +242 -0
- package/dist/dispatcher/task-creation.service.js.map +1 -0
- package/dist/dispatcher/task-lifecycle.service.d.ts +63 -0
- package/dist/dispatcher/task-lifecycle.service.d.ts.map +1 -0
- package/dist/dispatcher/task-lifecycle.service.js +584 -0
- package/dist/dispatcher/task-lifecycle.service.js.map +1 -0
- package/dist/dispatcher/task-log-batcher.d.ts.map +1 -1
- package/dist/dispatcher/task-log-batcher.js +4 -11
- package/dist/dispatcher/task-log-batcher.js.map +1 -1
- package/dist/dispatcher/worker-auth.service.d.ts +29 -0
- package/dist/dispatcher/worker-auth.service.d.ts.map +1 -0
- package/dist/dispatcher/worker-auth.service.js +296 -0
- package/dist/dispatcher/worker-auth.service.js.map +1 -0
- package/dist/dispatcher/worker-connection.manager.d.ts +15 -15
- package/dist/dispatcher/worker-connection.manager.d.ts.map +1 -1
- package/dist/dispatcher/worker-connection.manager.js +35 -43
- package/dist/dispatcher/worker-connection.manager.js.map +1 -1
- package/dist/dispatcher/worker-selector.d.ts +18 -0
- package/dist/dispatcher/worker-selector.d.ts.map +1 -0
- package/dist/dispatcher/worker-selector.js +150 -0
- package/dist/dispatcher/worker-selector.js.map +1 -0
- package/dist/events/event-types.d.ts +31 -0
- package/dist/events/event-types.d.ts.map +1 -0
- package/dist/events/event-types.js +16 -0
- package/dist/events/event-types.js.map +1 -0
- package/dist/events/events.module.d.ts +7 -0
- package/dist/events/events.module.d.ts.map +1 -0
- package/dist/events/events.module.js +26 -0
- package/dist/events/events.module.js.map +1 -0
- package/dist/main.js +22 -0
- package/dist/main.js.map +1 -1
- package/dist/notifier/debouncer.d.ts +1 -1
- package/dist/notifier/debouncer.d.ts.map +1 -1
- package/dist/notifier/debouncer.js +2 -1
- package/dist/notifier/debouncer.js.map +1 -1
- package/dist/notifier/notification-consumer.d.ts +1 -1
- package/dist/notifier/notification-consumer.d.ts.map +1 -1
- package/dist/notifier/notification-consumer.js +5 -5
- package/dist/notifier/notification-consumer.js.map +1 -1
- package/dist/notifier/notifier.module.d.ts.map +1 -1
- package/dist/notifier/notifier.module.js +0 -6
- package/dist/notifier/notifier.module.js.map +1 -1
- package/dist/notifier/notifier.service.d.ts +1 -1
- package/dist/notifier/notifier.service.d.ts.map +1 -1
- package/dist/notifier/notifier.service.js +7 -9
- package/dist/notifier/notifier.service.js.map +1 -1
- package/dist/notifier/template.service.d.ts +1 -1
- package/dist/notifier/template.service.d.ts.map +1 -1
- package/dist/notifier/template.service.js +6 -10
- package/dist/notifier/template.service.js.map +1 -1
- package/dist/redis/redis.service.d.ts.map +1 -1
- package/dist/redis/redis.service.js +2 -2
- package/dist/redis/redis.service.js.map +1 -1
- package/dist/web/admin/admin-audit.controller.d.ts.map +1 -1
- package/dist/web/admin/admin-audit.controller.js +2 -1
- package/dist/web/admin/admin-audit.controller.js.map +1 -1
- package/dist/web/admin/admin-bot.controller.d.ts +11 -48
- package/dist/web/admin/admin-bot.controller.d.ts.map +1 -1
- package/dist/web/admin/admin-bot.controller.js +50 -18
- package/dist/web/admin/admin-bot.controller.js.map +1 -1
- package/dist/web/admin/admin-developer.controller.d.ts +14 -27
- package/dist/web/admin/admin-developer.controller.d.ts.map +1 -1
- package/dist/web/admin/admin-developer.controller.js +62 -28
- package/dist/web/admin/admin-developer.controller.js.map +1 -1
- package/dist/web/admin/admin-machine.controller.d.ts +1 -8
- package/dist/web/admin/admin-machine.controller.d.ts.map +1 -1
- package/dist/web/admin/admin-machine.controller.js +3 -6
- package/dist/web/admin/admin-machine.controller.js.map +1 -1
- package/dist/web/admin/admin-project.controller.d.ts +9 -30
- package/dist/web/admin/admin-project.controller.d.ts.map +1 -1
- package/dist/web/admin/admin-project.controller.js +15 -60
- package/dist/web/admin/admin-project.controller.js.map +1 -1
- package/dist/web/admin/admin-settings.controller.d.ts +7 -10
- package/dist/web/admin/admin-settings.controller.d.ts.map +1 -1
- package/dist/web/admin/admin-settings.controller.js +14 -6
- package/dist/web/admin/admin-settings.controller.js.map +1 -1
- package/dist/web/admin/admin-token.controller.d.ts +6 -13
- package/dist/web/admin/admin-token.controller.d.ts.map +1 -1
- package/dist/web/admin/admin-token.controller.js +15 -27
- package/dist/web/admin/admin-token.controller.js.map +1 -1
- package/dist/web/admin/admin-worker.controller.d.ts +26 -0
- package/dist/web/admin/admin-worker.controller.d.ts.map +1 -0
- package/dist/web/admin/admin-worker.controller.js +184 -0
- package/dist/web/admin/admin-worker.controller.js.map +1 -0
- package/dist/web/dashboard.controller.d.ts +6 -12
- package/dist/web/dashboard.controller.d.ts.map +1 -1
- package/dist/web/dashboard.controller.js +30 -18
- package/dist/web/dashboard.controller.js.map +1 -1
- package/dist/web/dashboard.service.d.ts +21 -12
- package/dist/web/dashboard.service.d.ts.map +1 -1
- package/dist/web/dashboard.service.js +169 -119
- package/dist/web/dashboard.service.js.map +1 -1
- package/dist/web/event.gateway.d.ts +32 -0
- package/dist/web/event.gateway.d.ts.map +1 -0
- package/dist/web/event.gateway.js +168 -0
- package/dist/web/event.gateway.js.map +1 -0
- package/dist/web/frame-handlers/frame-handler.interface.d.ts +24 -0
- package/dist/web/frame-handlers/frame-handler.interface.d.ts.map +1 -0
- package/dist/web/frame-handlers/frame-handler.interface.js +3 -0
- package/dist/web/frame-handlers/frame-handler.interface.js.map +1 -0
- package/dist/web/frame-handlers/frame-handler.registry.d.ts +16 -0
- package/dist/web/frame-handlers/frame-handler.registry.d.ts.map +1 -0
- package/dist/web/frame-handlers/frame-handler.registry.js +39 -0
- package/dist/web/frame-handlers/frame-handler.registry.js.map +1 -0
- package/dist/web/frame-handlers/heartbeat.handler.d.ts +13 -0
- package/dist/web/frame-handlers/heartbeat.handler.d.ts.map +1 -0
- package/dist/web/frame-handlers/heartbeat.handler.js +35 -0
- package/dist/web/frame-handlers/heartbeat.handler.js.map +1 -0
- package/dist/web/frame-handlers/index.d.ts +7 -0
- package/dist/web/frame-handlers/index.d.ts.map +1 -0
- package/dist/web/frame-handlers/index.js +14 -0
- package/dist/web/frame-handlers/index.js.map +1 -0
- package/dist/web/frame-handlers/progress.handler.d.ts +25 -0
- package/dist/web/frame-handlers/progress.handler.d.ts.map +1 -0
- package/dist/web/frame-handlers/progress.handler.js +69 -0
- package/dist/web/frame-handlers/progress.handler.js.map +1 -0
- package/dist/web/frame-handlers/stage-confirm.handler.d.ts +15 -0
- package/dist/web/frame-handlers/stage-confirm.handler.d.ts.map +1 -0
- package/dist/web/frame-handlers/stage-confirm.handler.js +39 -0
- package/dist/web/frame-handlers/stage-confirm.handler.js.map +1 -0
- package/dist/web/frame-handlers/tunnel.handler.d.ts +10 -0
- package/dist/web/frame-handlers/tunnel.handler.d.ts.map +1 -0
- package/dist/web/frame-handlers/tunnel.handler.js +31 -0
- package/dist/web/frame-handlers/tunnel.handler.js.map +1 -0
- package/dist/web/interaction.service.d.ts +0 -4
- package/dist/web/interaction.service.d.ts.map +1 -1
- package/dist/web/interaction.service.js +0 -10
- package/dist/web/interaction.service.js.map +1 -1
- package/dist/web/machine.controller.d.ts +1 -8
- package/dist/web/machine.controller.d.ts.map +1 -1
- package/dist/web/machine.controller.js +6 -9
- package/dist/web/machine.controller.js.map +1 -1
- package/dist/web/notification.controller.d.ts +1 -8
- package/dist/web/notification.controller.d.ts.map +1 -1
- package/dist/web/notification.controller.js +3 -2
- package/dist/web/notification.controller.js.map +1 -1
- package/dist/web/profile.controller.d.ts +19 -10
- package/dist/web/profile.controller.d.ts.map +1 -1
- package/dist/web/profile.controller.js +100 -13
- package/dist/web/profile.controller.js.map +1 -1
- package/dist/web/project-member.service.d.ts +16 -0
- package/dist/web/project-member.service.d.ts.map +1 -0
- package/dist/web/project-member.service.js +90 -0
- package/dist/web/project-member.service.js.map +1 -0
- package/dist/web/project.controller.d.ts +43 -26
- package/dist/web/project.controller.d.ts.map +1 -1
- package/dist/web/project.controller.js +73 -46
- package/dist/web/project.controller.js.map +1 -1
- package/dist/web/pty.gateway.d.ts +9 -3
- package/dist/web/pty.gateway.d.ts.map +1 -1
- package/dist/web/pty.gateway.js +56 -22
- package/dist/web/pty.gateway.js.map +1 -1
- package/dist/web/search.service.d.ts +9 -2
- package/dist/web/search.service.d.ts.map +1 -1
- package/dist/web/search.service.js +53 -26
- package/dist/web/search.service.js.map +1 -1
- package/dist/web/task.controller.d.ts +15 -24
- package/dist/web/task.controller.d.ts.map +1 -1
- package/dist/web/task.controller.js +70 -53
- package/dist/web/task.controller.js.map +1 -1
- package/dist/web/tunnel.service.d.ts +74 -0
- package/dist/web/tunnel.service.d.ts.map +1 -0
- package/dist/web/tunnel.service.js +250 -0
- package/dist/web/tunnel.service.js.map +1 -0
- package/dist/web/web-event.service.d.ts +25 -0
- package/dist/web/web-event.service.d.ts.map +1 -0
- package/dist/web/web-event.service.js +116 -0
- package/dist/web/web-event.service.js.map +1 -0
- package/dist/web/web.module.d.ts.map +1 -1
- package/dist/web/web.module.js +13 -28
- package/dist/web/web.module.js.map +1 -1
- package/dist/web/worker-channel.gateway.d.ts +10 -18
- package/dist/web/worker-channel.gateway.d.ts.map +1 -1
- package/dist/web/worker-channel.gateway.js +70 -144
- package/dist/web/worker-channel.gateway.js.map +1 -1
- package/dist/web/worker-web.controller.d.ts +15 -0
- package/dist/web/worker-web.controller.d.ts.map +1 -0
- package/dist/web/worker-web.controller.js +143 -0
- package/dist/web/worker-web.controller.js.map +1 -0
- package/dist/web/worker.controller.d.ts +3 -3
- package/dist/web/worker.controller.d.ts.map +1 -1
- package/dist/web/worker.controller.js +8 -8
- package/dist/web/worker.controller.js.map +1 -1
- package/dist/web/workspace.controller.d.ts +8 -33
- package/dist/web/workspace.controller.d.ts.map +1 -1
- package/dist/web/workspace.controller.js +93 -205
- package/dist/web/workspace.controller.js.map +1 -1
- package/package.json +10 -2
- package/public/apple-touch-icon-120x120.png +0 -0
- package/public/apple-touch-icon-152x152.png +0 -0
- package/public/apple-touch-icon-180x180.png +0 -0
- package/public/assets/AccessTokensPage-DPQB2fbi.js +1 -0
- package/public/assets/AdminPage-BqVelYNu.js +1 -0
- package/public/assets/ApiReferencePage-CiGvbLxL.js +1 -0
- package/public/assets/AuditLogPage-DSo4jVYm.js +6 -0
- package/public/assets/BindPlatformPage-CTqzpOmt.js +1 -0
- package/public/assets/BotManage-CIR0rrK7.js +6 -0
- package/public/assets/CliReferencePage-C8GmlwUz.js +14 -0
- package/public/assets/DeveloperManage-r6y2AoB4.js +16 -0
- package/public/assets/EditProjectPage-7WCsNltj.js +2 -0
- package/public/assets/{EmptyState-BOXPalWI.js → EmptyState-D3foEiul.js} +1 -1
- package/public/assets/HomePage-D4yv4orb.js +1 -0
- package/public/assets/InfoRow-DhdTYoY9.js +1 -0
- package/public/assets/LandingPage-CqS0E2eC.js +43 -0
- package/public/assets/LoginPage-DDXkdcz_.js +1 -0
- package/public/assets/MetricBar-DMMHfS0A.js +1 -0
- package/public/assets/{NotFoundPage-griwga5q.js → NotFoundPage-D5x5BrlX.js} +1 -1
- package/public/assets/OnboardingGuide-D8RyPcEd.js +1 -0
- package/public/assets/PipelineEditorPage-y2-Q8ofQ.js +3 -0
- package/public/assets/ProfilePage-DN7usHOi.js +1 -0
- package/public/assets/ProjectDetailPage-DJexg49z.js +7 -0
- package/public/assets/ProjectListPage-Bz7I2D0H.js +6 -0
- package/public/assets/QuickAuth-Dr0Q50ld.js +1 -0
- package/public/assets/{RemoveMemberConfirmDialog-I3k9sPON.js → RemoveMemberConfirmDialog-BCrue0AP.js} +2 -2
- package/public/assets/Select-BnV8yZlD.js +6 -0
- package/public/assets/SettingsPage-HaUCcsgl.js +6 -0
- package/public/assets/{Skeleton-0JE10nwo.js → Skeleton-DUgWc2LJ.js} +1 -1
- package/public/assets/SkillPage-BInwZTQh.js +1 -0
- package/public/assets/TaskDetailPage-CfwEj1hy.js +31 -0
- package/public/assets/TaskListPage-Dh59ldSZ.js +1 -0
- package/public/assets/TaskStatusBadge-DuOoGIwE.js +1 -0
- package/public/assets/TerminalHomePage-BwXJjr-a.js +16 -0
- package/public/assets/TokenManage-B0Cpv6SO.js +1 -0
- package/public/assets/TotpSetupPage-MSCCURj9.js +9 -0
- package/public/assets/WorkerDetailPage-R2veIzKo.js +1 -0
- package/public/assets/WorkerListPage-CserMjGO.js +6 -0
- package/public/assets/WorkerSetupGuidePage-SqO2lzVa.js +11 -0
- package/public/assets/{arrow-left-C-OTbm1J.js → arrow-left-DklRsENx.js} +1 -1
- package/public/assets/{arrow-right-B5aaHrGs.js → arrow-right-MDrzFe3K.js} +1 -1
- package/public/assets/{bot-KMbKzBkt.js → bot-DPaziJPf.js} +1 -1
- package/public/assets/{chevron-right-CVPdQ-cP.js → chevron-right-CqyufMDW.js} +1 -1
- package/public/assets/{copy-Dd1cNNWz.js → copy-BUH7P2Hf.js} +1 -1
- package/public/assets/date-BdNtiQTP.js +1 -0
- package/public/assets/{external-link-F-d1_j4T.js → external-link-ChPgQ7N_.js} +1 -1
- package/public/assets/index-BS0Fbx5V.css +1 -0
- package/public/assets/index-vL7aQJNr.js +225 -0
- package/public/assets/{key-CT_RkMPI.js → key-CxvwwHnW.js} +1 -1
- package/public/assets/{loader-circle-BnJr5Xpn.js → loader-circle-DS5g1-Od.js} +1 -1
- package/public/assets/password-CHk45-jw.js +1 -0
- package/public/assets/{pencil-Srq1Z7Yh.js → pencil-B6spIBcw.js} +1 -1
- package/public/assets/{plus-Ry_MQV9O.js → plus-Bnd1Vz2Y.js} +1 -1
- package/public/assets/{rotate-ccw-B1ZO6xeO.js → rotate-ccw-CgcLAXNR.js} +1 -1
- package/public/assets/{scroll-text-CP6Z7Xff.js → scroll-text-CecZ0Fk5.js} +1 -1
- package/public/assets/{settings-Ac7uhvR0.js → settings-C1uOD3PZ.js} +1 -1
- package/public/assets/status-colors-BPEUp90-.js +1 -0
- package/public/assets/string-B39tzdVK.js +1 -0
- package/public/assets/task-constants-BbFyCyKk.js +14 -0
- package/public/assets/task.store-BE6fEPu4.js +1 -0
- package/public/assets/{trash-2-DWv3OoER.js → trash-2-A2FsT1yG.js} +1 -1
- package/public/assets/useFetch-vGZMAvGi.js +1 -0
- package/public/assets/{users-BsM5ZXj8.js → users-CEdRS_A3.js} +1 -1
- package/public/assets/wifi-D60NkK6F.js +6 -0
- package/public/assets/zap-DXw1NrWz.js +6 -0
- package/public/icon-192x192.png +0 -0
- package/public/icon-512x512.png +0 -0
- package/public/icon-maskable-192x192.png +0 -0
- package/public/icon-maskable-512x512.png +0 -0
- package/public/index.html +21 -4
- package/public/manifest.webmanifest +1 -0
- package/public/og-image.png +0 -0
- package/public/registerSW.js +1 -0
- package/public/sw.js +1 -0
- package/public/workbox-6e9b121d.js +1 -0
- package/database/migrations/002-add-indexes.sql +0 -17
- package/database/migrations/003-add-settings-table.sql +0 -4
- package/database/migrations/004-add-developer-id-index.sql +0 -5
- package/database/migrations/005-add-worker-version.sql +0 -2
- package/database/migrations/006-add-decommission-fields.sql +0 -2
- package/database/migrations/007-add-ssh-url.sql +0 -1
- package/public/assets/AccessTokensPage-DypSjrzB.js +0 -1
- package/public/assets/AdminPage-BY1ub8Ur.js +0 -1
- package/public/assets/ApiReferencePage-X0c9Bj31.js +0 -1
- package/public/assets/AuditLogPage-B0bBeD2B.js +0 -6
- package/public/assets/BotManage-D7UIzmUX.js +0 -6
- package/public/assets/CliReferencePage-DAqUe3dC.js +0 -8
- package/public/assets/DeveloperManage-Df4qgJ4d.js +0 -16
- package/public/assets/EditProjectPage-B05CUiFx.js +0 -2
- package/public/assets/HomePage-YM1Wcq5V.js +0 -1
- package/public/assets/LandingPage-Dn64_5F4.js +0 -36
- package/public/assets/LoginPage-CcBF1jm-.js +0 -1
- package/public/assets/MachineDetailPage-BHzHO-jG.js +0 -1
- package/public/assets/MachineListPage-sTx1mDtP.js +0 -6
- package/public/assets/PipelineEditorPage-CZQJn5Qd.js +0 -3
- package/public/assets/ProfilePage-CM-HnNqC.js +0 -1
- package/public/assets/ProjectDetailPage-d59hpM1f.js +0 -7
- package/public/assets/ProjectListPage-j4xLknRG.js +0 -6
- package/public/assets/QuickAuth-vbGZYKLu.js +0 -1
- package/public/assets/Select-CmUwVfWJ.js +0 -6
- package/public/assets/SettingsPage-CDTheJqk.js +0 -6
- package/public/assets/SkillPage-ClOtPiNe.js +0 -1
- package/public/assets/TaskDetailPage-CG8zmgwV.js +0 -44
- package/public/assets/TaskListPage-BUjNGBKm.js +0 -1
- package/public/assets/TaskStatusBadge-C8TEMiVe.js +0 -1
- package/public/assets/TokenManage-U3YbhV_d.js +0 -1
- package/public/assets/TotpSetupPage-BlRM2OEF.js +0 -9
- package/public/assets/WorkerSetupGuidePage-BUTz9NXE.js +0 -16
- package/public/assets/index-CQojj7Zu.css +0 -1
- package/public/assets/index-DJxZmj6O.js +0 -212
- package/public/assets/protocol-C5uQmiiB.js +0 -1
- package/public/assets/task.store-DSX--5cK.js +0 -1
- /package/public/assets/{TaskDetailPage-Beg8tuEN.css → task-constants-Beg8tuEN.css} +0 -0
|
@@ -1,36 +0,0 @@
|
|
|
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-DJxZmj6O.js";import{A as c}from"./arrow-right-B5aaHrGs.js";import{B as u}from"./bot-KMbKzBkt.js";import{U as b}from"./users-BsM5ZXj8.js";import{C as j}from"./copy-Dd1cNNWz.js";/**
|
|
2
|
-
* @license lucide-react v0.469.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const f=n("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
7
|
-
* @license lucide-react v0.469.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const _=n("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
|
|
12
|
-
* @license lucide-react v0.469.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const k=n("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
|
17
|
-
* @license lucide-react v0.469.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const N=n("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
22
|
-
* @license lucide-react v0.469.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const w=n("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
|
|
27
|
-
* @license lucide-react v0.469.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const K=n("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
32
|
-
* @license lucide-react v0.469.0 - ISC
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the ISC license.
|
|
35
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const M=n("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]),d=[{icon:_,titleKey:"landing.step_define",descKey:"landing.step_define_desc"},{icon:k,titleKey:"landing.step_dispatch",descKey:"landing.step_dispatch_desc"},{icon:f,titleKey:"landing.step_monitor",descKey:"landing.step_monitor_desc"}],C=[{icon:x,titleKey:"landing.feature_terminal",descKey:"landing.feature_terminal_desc"},{icon:u,titleKey:"landing.feature_multi_agent",descKey:"landing.feature_multi_agent_desc"},{icon:N,titleKey:"landing.feature_routing",descKey:"landing.feature_routing_desc"},{icon:M,titleKey:"landing.feature_pipeline",descKey:"landing.feature_pipeline_desc"},{icon:b,titleKey:"landing.feature_collab",descKey:"landing.feature_collab_desc"},{icon:y,titleKey:"landing.feature_security",descKey:"landing.feature_security_desc"}],z=[{num:"01",titleKey:"landing.setup_step_1_title",descKey:"landing.setup_step_1_desc",commandKey:"landing.setup_step_1_command",linkLabel:"landing.setup_step_1_link",linkTo:"/docs/cli",icon:K},{num:"02",titleKey:"landing.setup_step_2_title",descKey:"landing.setup_step_2_desc",commandKey:"landing.setup_step_2_command",linkLabel:"landing.setup_step_2_link",linkTo:"/docs/cli",icon:w},{num:"03",titleKey:"landing.setup_step_3_title",descKey:"landing.setup_step_3_desc",commandKey:"landing.setup_step_3_command",linkLabel:"landing.setup_step_3_link",linkTo:"/docs/cli",icon:x}];function L({step:r,t:s}){const[t,a]=g.useState(!1),i=s(r.commandKey),o=async()=>{try{await navigator.clipboard.writeText(i),a(!0),setTimeout(()=>a(!1),2e3)}catch{}};return e.jsx("div",{className:"group rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] transition-shadow hover:shadow-md",children:e.jsxs("div",{className:"flex flex-col gap-4 p-5 sm:flex-row sm:items-start sm:gap-6",children:[e.jsxs("div",{className:"flex items-center gap-4 sm:w-56 sm:flex-shrink-0",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-[4px] bg-[var(--accent)]/10 text-[var(--accent)]",children:e.jsx(r.icon,{size:20})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest text-[var(--text-muted)]",children:s("landing.step_n",{n:r.num})}),e.jsx("h3",{className:"text-sm font-semibold text-[var(--text-primary)]",children:s(r.titleKey)})]})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-xs leading-relaxed text-[var(--text-secondary)]",children:s(r.descKey)}),e.jsxs("div",{className:"mt-3 flex items-center justify-between gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-4 py-2.5",children:[e.jsxs("code",{className:"overflow-x-auto whitespace-nowrap text-[11px] text-[var(--text-primary)]",children:[e.jsx("span",{className:"select-none text-[var(--text-muted)]",children:"$ "}),i]}),e.jsx("button",{onClick:o,className:"ml-2 flex-shrink-0 rounded-[4px] p-1.5 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)]","aria-label":s("landing.copy_install_command"),children:t?e.jsx(v,{size:14,className:"text-[var(--accent)]"}):e.jsx(j,{size:14})})]}),e.jsx("div",{className:"mt-2",children:e.jsxs(l,{to:r.linkTo,className:"inline-flex items-center gap-1 text-[11px] text-[var(--accent)] transition-colors hover:brightness-110",children:[s(r.linkLabel),e.jsx(c,{size:12})]})})]})]})})}function G(){const s=m(a=>a.user)?"/home":"/login",{t}=h();return e.jsxs("div",{className:"min-h-screen bg-[var(--bg-primary)]",children:[e.jsx("nav",{className:"sticky top-0 z-50 border-b border-[var(--border)] bg-[var(--bg-primary)]/80 backdrop-blur-md",children:e.jsxs("div",{className:"mx-auto flex h-14 max-w-6xl items-center justify-between px-4 sm:px-6",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-[4px] bg-[var(--accent)]","aria-hidden":!0,style:{fontFamily:"'JetBrains Mono', monospace"},children:e.jsx("span",{className:"text-xl font-semibold",style:{color:"#0C0C0C"},children:"~"})}),e.jsx("span",{className:"text-lg font-bold text-[var(--text-primary)]",style:{fontSize:"20px",fontFamily:"'JetBrains Mono', monospace"},children:t("landing.overlord")})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(p,{}),e.jsx(l,{to:s,className:"text-xs font-medium text-[var(--accent)] transition-colors hover:opacity-80",children:t("landing.go_to_app")})]})]})}),e.jsxs("section",{className:"relative overflow-hidden",children:[e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute -top-40 left-1/2 h-[600px] w-[900px] -translate-x-1/2 rounded-full opacity-20 blur-3xl",style:{background:"radial-gradient(ellipse at center, var(--accent), transparent 70%)"}}),e.jsxs("div",{className:"relative mx-auto max-w-5xl px-4 pb-20 pt-24 text-center sm:px-6 sm:pb-28 sm:pt-32",children:[e.jsx("div",{className:"mb-6 inline-flex items-center rounded-full border border-[var(--accent)]/20 bg-[var(--accent)]/5 px-4 py-1.5 text-xs text-[var(--accent)]",children:t("landing.version_badge")}),e.jsxs("h1",{className:"text-3xl font-extrabold leading-tight tracking-tight text-[var(--text-primary)] sm:text-4xl md:text-5xl",children:[t("landing.hero_line1"),e.jsx("br",{}),e.jsx("span",{className:"text-[var(--accent)]",children:t("landing.hero_highlight")})]}),e.jsx("p",{className:"mx-auto mt-6 max-w-3xl text-sm leading-relaxed text-[var(--text-secondary)] sm:text-base",children:t("landing.hero_desc")}),e.jsxs("div",{className:"mt-10",children:[e.jsxs(l,{to:s,className:"inline-flex items-center gap-2 rounded-[4px] bg-[var(--accent)] px-8 py-3 text-sm font-semibold text-black shadow-lg shadow-[var(--accent)]/25 transition-all hover:brightness-110 active:scale-[0.98]",children:[t("landing.get_started"),e.jsx(c,{size:16})]}),e.jsxs(l,{to:"/docs/cli",className:"ml-4 inline-flex items-center gap-1 text-sm text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",children:[t("landing.read_docs")," ",e.jsx(c,{size:14})]})]})]})]}),e.jsx("section",{className:"border-t border-[var(--border)] bg-[var(--bg-card)]",children:e.jsxs("div",{className:"mx-auto max-w-5xl px-4 py-20 sm:px-6 sm:py-28",children:[e.jsx("h2",{className:"text-center text-xl font-bold text-[var(--text-primary)] sm:text-2xl",children:t("landing.how_it_works")}),e.jsx("p",{className:"mx-auto mt-3 max-w-xl text-center text-sm text-[var(--text-secondary)]",children:t("landing.three_steps")}),e.jsx("div",{className:"mt-14 grid gap-8 sm:grid-cols-3",children:d.map((a,i)=>e.jsxs("div",{className:"relative text-center",children:[i<d.length-1&&e.jsx("div",{"aria-hidden":!0,className:"absolute right-0 top-8 hidden h-px w-8 translate-x-full bg-[var(--border)] sm:block"}),e.jsx("div",{className:"mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-[var(--accent)]/10 text-[var(--accent)] text-sm font-bold",children:String(i+1).padStart(2,"0")}),e.jsx("div",{className:"mt-1 text-[10px] font-semibold uppercase tracking-widest text-[var(--text-muted)]",children:t("landing.step_n",{n:i+1})}),e.jsx("h3",{className:"mt-2 text-sm font-semibold text-[var(--text-primary)]",children:t(a.titleKey)}),e.jsx("p",{className:"mt-2 text-xs leading-relaxed text-[var(--text-secondary)]",children:t(a.descKey)})]},a.titleKey))})]})}),e.jsx("section",{className:"border-t border-[var(--border)]",children:e.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-20 sm:px-6 sm:py-28",children:[e.jsx("h2",{className:"text-center text-xl font-bold text-[var(--text-primary)] sm:text-2xl",children:t("landing.everything_you_need")}),e.jsx("p",{className:"mx-auto mt-3 max-w-xl text-center text-sm text-[var(--text-secondary)]",children:t("landing.complete_platform")}),e.jsx("div",{className:"mt-14 grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:C.map(a=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5 transition-shadow hover:shadow-md",children:[e.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-[4px] bg-[var(--accent)]/10 text-[var(--accent)]",children:e.jsx(a.icon,{size:18})}),e.jsx("h3",{className:"mt-3 text-sm font-semibold text-[var(--text-primary)]",children:t(a.titleKey)}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-[var(--text-secondary)]",children:t(a.descKey)})]},a.titleKey))})]})}),e.jsx("section",{className:"border-t border-[var(--border)] bg-[var(--bg-card)]",children:e.jsxs("div",{className:"mx-auto max-w-5xl px-4 py-20 sm:px-6 sm:py-28",children:[e.jsx("h2",{className:"text-center text-xl font-bold text-[var(--text-primary)] sm:text-2xl",children:t("landing.install_title")}),e.jsx("p",{className:"mx-auto mt-3 max-w-xl text-center text-sm text-[var(--text-secondary)]",children:t("landing.install_desc")}),e.jsx("div",{className:"mt-14 space-y-4",children:z.map(a=>e.jsx(L,{step:a,t},a.num))}),e.jsx("div",{className:"mt-12 text-center",children:e.jsxs(l,{to:s,className:"inline-flex items-center gap-2 rounded-[4px] bg-[var(--accent)] px-8 py-3 text-sm font-semibold text-black shadow-lg shadow-[var(--accent)]/25 transition-all hover:brightness-110 active:scale-[0.98]",children:[t("landing.get_started"),e.jsx(c,{size:16})]})})]})}),e.jsx("footer",{className:"border-t border-[var(--border)]",children:e.jsxs("div",{className:"mx-auto flex max-w-6xl flex-col items-center gap-4 px-4 py-8 text-xs text-[var(--text-secondary)] sm:flex-row sm:justify-between sm:px-6",children:[e.jsxs("span",{children:["© ",new Date().getFullYear()," ",t("landing.overlord")]}),e.jsxs("div",{className:"flex gap-6",children:[e.jsx("a",{href:"/docs/cli",className:"transition-colors hover:text-[var(--text-primary)]",children:t("landing.documentation")}),e.jsx("a",{href:"/docs/api",className:"transition-colors hover:text-[var(--text-primary)]",children:t("landing.api")})]})]})})]})}export{G as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as W,e as q,u as m,a as I,r as c,j as t,N as k}from"./index-DJxZmj6O.js";function P(){var w,B;const h=W(),y=q(),x=m(e=>e.login),v=m(e=>e.requireTotpSetup),_=m(e=>e.user),{t:n}=I(),[C,S]=c.useState("credentials"),[u,F]=c.useState(""),[p,z]=c.useState(""),[i,b]=c.useState(""),[l,g]=c.useState(!1),[j,d]=c.useState(""),f=c.useRef([]);if(_&&!v){let e=(B=(w=y.state)==null?void 0:w.from)==null?void 0:B.pathname;return(e==="/totp-setup"||e==="/login")&&(e=void 0),t.jsx(k,{to:e??"/home",replace:!0})}if(v)return t.jsx(k,{to:"/totp-setup",replace:!0});const M=async e=>{var r,o;if(e.preventDefault(),d(""),!u.trim()||!p.trim()){d(n("auth.username_and_password_required"));return}g(!0);try{await x({username:u.trim(),password:p});const a=m.getState();if(a.requireTotpSetup)return;if(a.user){let s=(o=(r=y.state)==null?void 0:r.from)==null?void 0:o.pathname;(s==="/totp-setup"||s==="/login")&&(s=void 0),h(s??"/home",{replace:!0})}}catch(a){const s=a instanceof Error?a.message:n("auth.login_failed");s==="TOTP_REQUIRED"?(S("totp"),d("")):d(s)}finally{g(!1)}},J=async e=>{var r,o;if(e.preventDefault(),d(""),!i.trim()||i.trim().length!==6){d(n("auth.please_enter_valid_6_digit_code"));return}g(!0);try{if(await x({username:u.trim(),password:p,totpCode:i.trim()}),m.getState().user){let s=(o=(r=y.state)==null?void 0:r.from)==null?void 0:o.pathname;(s==="/totp-setup"||s==="/login")&&(s=void 0),h(s??"/home",{replace:!0})}}catch(a){const s=a instanceof Error?a.message:n("auth.invalid_totp_code");d(s)}finally{g(!1)}},R=()=>{S("credentials"),b(""),d("")},T=(e,r)=>{var s;const o=r.replace(/\D/g,"").slice(-1),a=i.split("");for(;a.length<6;)a.push("");a[e]=o,b(a.join("")),o&&e<5&&((s=f.current[e+1])==null||s.focus())},D=(e,r)=>{var o;r.key==="Backspace"&&!i[e]&&e>0&&((o=f.current[e-1])==null||o.focus())},E=e=>{var a;e.preventDefault();const r=e.clipboardData.getData("text").replace(/\D/g,"").slice(0,6);b(r);const o=Math.min(r.length,5);(a=f.current[o])==null||a.focus()};return t.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--bg-primary)",padding:"1rem",fontFamily:"'JetBrains Mono', monospace"},children:t.jsxs("div",{style:{width:"100%",maxWidth:"400px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"2rem"},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"0.625rem",marginBottom:"0.25rem"},children:[t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"2rem",height:"2rem",borderRadius:"4px",backgroundColor:"var(--accent)",fontFamily:"'JetBrains Mono', monospace"},"aria-hidden":!0,children:t.jsx("span",{style:{fontSize:"1.25rem",fontWeight:600,color:"#0C0C0C"},children:"~"})}),t.jsx("span",{style:{fontSize:"1.25rem",fontWeight:700,color:"var(--text-primary)",fontFamily:"'JetBrains Mono', monospace"},children:n("landing.overlord")})]}),t.jsx("div",{style:{textAlign:"center",color:"var(--text-muted)",fontSize:"0.75rem",marginBottom:"2rem",fontFamily:"'JetBrains Mono', monospace"},children:n(C==="credentials"?"auth.ai_powered_development_system":"auth.two_factor_verification")}),j&&t.jsx("div",{style:{marginBottom:"1rem",padding:"0.5rem 0.75rem",borderRadius:"4px",backgroundColor:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)",color:"var(--destructive)",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",overflowWrap:"break-word",wordBreak:"break-word"},children:j}),C==="credentials"?t.jsxs("form",{onSubmit:M,style:{display:"flex",flexDirection:"column",gap:"1rem"},children:[t.jsxs("div",{children:[t.jsx("label",{style:{display:"block",color:"var(--text-secondary)",fontSize:"0.75rem",marginBottom:"0.375rem",fontFamily:"'JetBrains Mono', monospace"},children:n("auth.username")}),t.jsx("input",{type:"text",placeholder:n("auth.enter_username"),value:u,onChange:e=>F(e.target.value),autoFocus:!0,autoComplete:"username",required:!0,style:{width:"100%",padding:"0.625rem 0.75rem",backgroundColor:"var(--bg-input)",border:"1px solid var(--border)",borderRadius:"4px",color:"var(--text-primary)",fontSize:"0.875rem",fontFamily:"'JetBrains Mono', monospace",outline:"none",boxSizing:"border-box"},onFocus:e=>e.target.style.borderColor="var(--accent)",onBlur:e=>e.target.style.borderColor="var(--border)"})]}),t.jsxs("div",{children:[t.jsx("label",{style:{display:"block",color:"var(--text-secondary)",fontSize:"0.75rem",marginBottom:"0.375rem",fontFamily:"'JetBrains Mono', monospace"},children:n("auth.password")}),t.jsx("input",{type:"password",placeholder:n("auth.enter_password"),value:p,onChange:e=>z(e.target.value),autoComplete:"current-password",required:!0,style:{width:"100%",padding:"0.625rem 0.75rem",backgroundColor:"var(--bg-input)",border:"1px solid var(--border)",borderRadius:"4px",color:"var(--text-primary)",fontSize:"0.875rem",fontFamily:"'JetBrains Mono', monospace",outline:"none",boxSizing:"border-box"},onFocus:e=>e.target.style.borderColor="var(--accent)",onBlur:e=>e.target.style.borderColor="var(--border)"})]}),t.jsx("button",{type:"submit",disabled:l,style:{width:"100%",padding:"0.625rem",backgroundColor:"var(--accent)",color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.875rem",fontWeight:600,fontFamily:"'JetBrains Mono', monospace",cursor:l?"not-allowed":"pointer",opacity:l?.7:1,marginTop:"0.5rem"},children:n(l?"common.signing_in":"auth.sign_in")}),t.jsx("button",{type:"button",onClick:()=>h("/"),style:{width:"100%",padding:"0.5rem",backgroundColor:"transparent",border:"none",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",cursor:"pointer"},className:"text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:n("common.back")})]},"credentials"):t.jsxs("form",{onSubmit:J,style:{display:"flex",flexDirection:"column",gap:"1rem"},children:[t.jsxs("div",{children:[t.jsx("label",{style:{display:"block",color:"var(--text-secondary)",fontSize:"0.75rem",marginBottom:"0.5rem",fontFamily:"'JetBrains Mono', monospace",textAlign:"center"},children:n("auth.enter_totp_code")}),t.jsx("div",{style:{display:"flex",gap:"0.5rem",justifyContent:"center"},onPaste:E,children:Array.from({length:6}).map((e,r)=>t.jsx("input",{ref:o=>{f.current[r]=o},type:"text",inputMode:"numeric",maxLength:1,value:i[r]||"",onChange:o=>T(r,o.target.value),onKeyDown:o=>D(r,o),autoFocus:r===0,autoComplete:r===0?"one-time-code":"off",style:{width:"2.75rem",height:"3rem",textAlign:"center",backgroundColor:"var(--bg-input)",border:"1px solid var(--border)",borderRadius:"4px",color:"var(--text-primary)",fontSize:"1.25rem",fontFamily:"'JetBrains Mono', monospace",fontWeight:600,outline:"none",boxSizing:"border-box"},onFocus:o=>o.target.style.borderColor="var(--accent)",onBlur:o=>o.target.style.borderColor="var(--border)"},r))})]}),t.jsx("button",{type:"submit",disabled:l||i.length!==6,style:{width:"100%",padding:"0.625rem",backgroundColor:"var(--accent)",color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.875rem",fontWeight:600,fontFamily:"'JetBrains Mono', monospace",cursor:l||i.length!==6?"not-allowed":"pointer",opacity:l||i.length!==6?.7:1,marginTop:"0.5rem"},children:n(l?"common.verifying":"auth.verify")}),t.jsx("button",{type:"button",onClick:R,style:{width:"100%",padding:"0.5rem",backgroundColor:"transparent",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:"4px",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",cursor:"pointer"},children:n("common.back")})]},"totp")]})})}export{P as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as E,j as e,l as M,m as H,d as V,r as m,u as z,h as B,f as b,L as Q,s as C}from"./index-DJxZmj6O.js";import{M as i,T as x}from"./protocol-C5uQmiiB.js";import{T as S}from"./trash-2-DWv3OoER.js";import{A as D}from"./arrow-left-C-OTbm1J.js";function q({isOpen:r,onClose:t,onConfirm:a,machineName:s,isDraining:o,loading:c}){const{t:d}=E();return e.jsx(M,{isOpen:r,onClose:t,onConfirm:a,title:d(o?"machines.undrain_machine_title":"machines.drain_machine_title"),message:o?d("machines.undrain_confirm",{name:s}):d("machines.drain_confirm",{name:s}),confirmLabel:d(o?"machines.undrain":"machines.drain"),confirmVariant:o?"accent":"warning",isLoading:c})}const J={[i.ONLINE]:"var(--accent)",[i.OFFLINE]:"var(--destructive)",[i.DRAINING]:"var(--warning)",[i.DECOMMISSIONED]:"var(--text-muted)"},K={[x.QUEUED]:"var(--text-muted)",[x.ASSIGNED]:"#60a5fa",[x.RUNNING]:"var(--accent)",[x.SUSPENDED]:"var(--warning)",[x.COMPLETED]:"var(--accent)",[x.FAILED]:"var(--destructive)",[x.CANCELLED]:"var(--text-muted)"};function g(r){return r?new Date(r).toLocaleString():"n/a"}function W(r){if(!r)return"never";const t=new Date(r).getTime();if(Number.isNaN(t))return"never";const a=Date.now()-t,s=Math.floor(a/1e3);if(s<60)return`${s}s ago`;const o=Math.floor(s/60);if(o<60)return`${o}m ago`;const c=Math.floor(o/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}function I(r){return r>80?"var(--destructive)":r>60?"var(--warning)":"var(--accent)"}function se(){const{id:r}=H(),t=V(),{t:a}=E(),[s,o]=m.useState(null),[c,d]=m.useState([]),[L,O]=m.useState(!0),[$,h]=m.useState(!1),[T,y]=m.useState(!1),[A,u]=m.useState(!1),[U,w]=m.useState(!1),p=z(l=>{var v;return(v=l.user)==null?void 0:v.role});B(m.useMemo(()=>!s||s.status===i.DECOMMISSIONED?null:e.jsxs("div",{className:"flex items-center gap-2",children:[s.status===i.ONLINE&&e.jsxs("button",{onClick:()=>h(!0),className:"rounded-[4px] border border-[var(--warning)]/40 px-3 py-1.5 text-xs text-[var(--warning)] hover:bg-[var(--warning)]/10 transition-colors",children:["> ",a("machines.drain")]}),p==="admin"&&e.jsxs("button",{onClick:()=>u(!0),className:"flex items-center gap-1 rounded-[4px] border border-[var(--destructive)]/40 px-3 py-1.5 text-xs text-[var(--destructive)] hover:bg-[var(--destructive)]/10 transition-colors",children:[e.jsx(S,{className:"h-3 w-3"}),a("machines.decommission")]})]}),[s,p,a]));const j=m.useCallback(async()=>{if(r)try{const[l,v]=await Promise.all([b.get(`web/machines/${r}`).json(),b.get(`web/machines/${r}/tasks`).json().catch(()=>[])]);o(l),d(v)}catch{}finally{O(!1)}},[r]);m.useEffect(()=>{j()},[j]);async function G(){if(s){y(!0);try{const l=s.status===i.DRAINING?"undrain":"drain";await b.post(`web/machines/${s.id}/${l}`),await j()}catch{}finally{y(!1),h(!1)}}}async function F(){if(s){w(!0);try{await b.delete(`admin/machines/${s.id}`),t("/machines")}catch{}finally{w(!1),u(!1)}}}if(L)return e.jsx("div",{className:"mx-auto max-w-5xl px-6 py-8 font-mono",children:e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:a("machines.loading_machine")})});if(!s)return e.jsxs("div",{className:"mx-auto max-w-5xl px-6 py-8 font-mono lowercase text-center",children:[e.jsx("p",{className:"text-sm text-[var(--text-secondary)]",children:a("machines.machine_not_found")}),e.jsxs("button",{onClick:()=>t("/machines"),className:"mt-4 rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:["< ",a("machines.back_to_machines")]})]});const _=s.status===i.DRAINING,R=e.jsxs("div",{className:"mx-auto max-w-5xl font-mono lowercase",children:[e.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] bg-[var(--bg-primary)] px-4 shrink-0 md:hidden",style:{height:56},children:[e.jsx("button",{onClick:()=>t("/machines"),className:"shrink-0 text-[var(--text-muted)]",children:e.jsx(D,{className:"h-4 w-4"})}),e.jsx("span",{className:"truncate text-sm font-medium text-[var(--text-primary)]",children:s.name})]}),e.jsxs("div",{className:"px-6 py-8",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx(Q,{to:"/machines",className:"text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors",children:a("machines.title")}),e.jsx("span",{className:"text-[var(--text-muted)]",children:"/"}),e.jsx("span",{className:"text-[var(--text-secondary)]",children:s.name})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[s.status!==i.DECOMMISSIONED&&e.jsxs("button",{onClick:()=>h(!0),className:"rounded-[4px] border border-[var(--accent)] px-4 py-1.5 text-xs text-[var(--accent)] hover:bg-[var(--accent)]/10 transition-colors",children:["> ",a("machines.undrain")]}),p==="admin"&&s.status!==i.DECOMMISSIONED&&e.jsxs("button",{onClick:()=>u(!0),className:"flex items-center gap-1 rounded-[4px] border border-[var(--destructive)]/40 px-3 py-1.5 text-xs text-[var(--destructive)] hover:bg-[var(--destructive)]/10 transition-colors",children:[e.jsx(S,{className:"h-3 w-3"}),a("machines.decommission")]})]})]}),e.jsx("div",{className:"mb-4",children:e.jsx("span",{className:"rounded-[4px] bg-[var(--warning)]/20 px-2.5 py-1 text-xs font-medium text-[var(--warning)]",children:a("machines.draining")})}),e.jsxs("div",{className:"mb-6 rounded-[4px] border border-[var(--warning)]/40 bg-[var(--warning)]/10 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(C,{className:"h-3.5 w-3.5 text-[var(--warning)]"}),e.jsx("span",{className:"text-xs text-[var(--warning)]",children:a("machines.draining_warning")})]}),e.jsx("p",{className:"text-xs text-[var(--warning)]/70 ml-5.5",children:a("machines.draining_active_tasks")})]}),e.jsxs("div",{className:"mb-6 grid grid-cols-2 gap-4",children:[e.jsx(N,{label:a("machines.cpu"),value:s.cpuUsage,unit:"%"}),e.jsx(N,{label:a("machines.memory"),value:s.memoryUsage,unit:"%"}),e.jsx(N,{label:a("machines.disk"),value:s.diskUsage,unit:"%"}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("machines.slots")}),e.jsxs("p",{className:"mt-2 text-lg font-semibold text-[var(--text-primary)]",children:[s.activeSlots,"/",s.maxSlots]})]})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"mb-4 text-sm font-medium text-[var(--accent)]",children:a("machines.active_tasks")}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:c.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:a("machines.no_active_tasks")})]}):e.jsx(k,{tasks:c,navigate:t,t:a})})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"mb-4 text-sm font-medium text-[var(--accent)]",children:a("machines.capabilities")}),s.capabilities.length>0?e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:s.capabilities.map(l=>e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx("p",{className:"text-xs text-[var(--text-primary)]",children:l})},l))}):e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("machines.no_capabilities_short")})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"mb-4 text-sm font-medium text-[var(--accent)]",children:a("machines.machine_info")}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:e.jsxs("div",{className:"flex flex-col gap-2 text-xs",children:[e.jsx(n,{label:a("machines.host"),value:s.host}),e.jsx(n,{label:a("machines.port"),value:String(s.port)}),s.sshUrl&&e.jsx(n,{label:"ssh url",value:s.sshUrl}),e.jsx(n,{label:a("machines.os"),value:s.os??a("machines.unknown")}),e.jsx(n,{label:a("machines.cpu_model"),value:s.cpuModel??a("machines.n_a")}),e.jsx(n,{label:a("machines.cpu_cores"),value:s.cpuCores!=null?String(s.cpuCores):a("machines.n_a")}),e.jsx(n,{label:a("machines.memory"),value:s.memoryGb!=null?`${s.memoryGb} gb`:a("machines.n_a")}),e.jsx(n,{label:a("machines.machine_id"),value:s.id}),e.jsx(n,{label:a("machines.last_heartbeat_label"),value:g(s.lastHeartbeat)}),e.jsx(n,{label:a("machines.slots"),value:`${s.activeSlots}/${s.maxSlots}`}),e.jsx(n,{label:a("machines.status_label"),value:s.status.toLowerCase()}),e.jsx(n,{label:a("machines.worker_version"),value:s.workerVersion??a("machines.n_a")})]})})]})]})]}),P=e.jsxs("div",{className:"mx-auto max-w-5xl font-mono lowercase",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] bg-[var(--bg-primary)] px-4 shrink-0 md:hidden",style:{height:56},children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("button",{onClick:()=>t("/machines"),className:"shrink-0 text-[var(--text-muted)]",children:e.jsx(D,{className:"h-4 w-4"})}),e.jsx("span",{className:"truncate text-sm font-medium text-[var(--text-primary)]",children:s.name})]}),s.status!==i.OFFLINE&&s.status!==i.DECOMMISSIONED&&e.jsxs("button",{onClick:()=>h(!0),className:"shrink-0 rounded-[4px] border border-[var(--warning)]/40 px-3 py-1.5 text-xs text-[var(--warning)] hover:bg-[var(--warning)]/10 transition-colors",children:["> ",a("machines.drain")]})]}),e.jsxs("div",{className:"px-6 py-8",children:[e.jsxs("button",{onClick:()=>t("/machines"),className:"mb-4 text-xs text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors",children:["< ",a("machines.back_to_machines")]}),e.jsxs("h1",{className:"mb-2 text-lg font-bold text-[var(--text-primary)] flex items-center gap-2",children:[s.name,e.jsxs("span",{className:"flex items-center gap-1.5 text-sm font-normal",style:{color:J[s.status]},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),s.status.toLowerCase()]})]}),e.jsx("p",{className:"mb-6 text-xs text-[var(--text-muted)]",children:a("machines.last_heartbeat",{time:W(s.lastHeartbeat)})}),s.status===i.DECOMMISSIONED&&e.jsx("div",{className:"mb-6 rounded-[4px] border border-[var(--text-muted)]/40 bg-[var(--text-muted)]/10 p-4",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(C,{className:"h-3.5 w-3.5 text-[var(--text-muted)]"}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["this machine has been decommissioned",s.decommissionedAt?` on ${g(s.decommissionedAt)}`:""," and can no longer accept tasks."]})]})}),e.jsxs("div",{className:"mb-6 grid gap-4 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:[e.jsx("h2",{className:"mb-3 text-xs text-[var(--text-muted)]",children:a("machines.resource_usage")}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(f,{label:a("machines.cpu"),value:s.cpuUsage}),e.jsx(f,{label:a("machines.mem"),value:s.memoryUsage}),e.jsx(f,{label:a("machines.disk"),value:s.diskUsage})]})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:[e.jsx("h2",{className:"mb-3 text-xs text-[var(--text-muted)]",children:a("machines.connection_info")}),e.jsxs("div",{className:"flex flex-col gap-2 text-xs",children:[e.jsx(n,{label:a("machines.machine_id"),value:s.id}),e.jsx(n,{label:a("machines.host"),value:s.host}),e.jsx(n,{label:a("machines.port"),value:String(s.port)}),s.sshUrl&&e.jsx(n,{label:"ssh url",value:s.sshUrl}),e.jsx(n,{label:a("machines.os"),value:s.os??a("machines.unknown")}),e.jsx(n,{label:a("machines.cpu_model"),value:s.cpuModel??a("machines.n_a")}),e.jsx(n,{label:a("machines.cpu_cores"),value:s.cpuCores!=null?String(s.cpuCores):a("machines.n_a")}),e.jsx(n,{label:a("machines.memory"),value:s.memoryGb!=null?`${s.memoryGb} gb`:a("machines.n_a")}),e.jsx(n,{label:a("machines.last_heartbeat_label"),value:g(s.lastHeartbeat)}),e.jsx(n,{label:a("machines.slots"),value:`${s.activeSlots}/${s.maxSlots}`})]})]})]}),s.capabilities.length>0&&e.jsxs("div",{className:"mb-6 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:[e.jsx("h2",{className:"mb-3 text-xs text-[var(--text-muted)]",children:a("machines.capabilities")}),e.jsx("div",{className:"flex flex-wrap gap-2",children:s.capabilities.map(l=>e.jsx("span",{className:"rounded-[4px] border border-[var(--border)] px-2.5 py-1 text-xs text-[var(--text-secondary)]",children:l},l))})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:[e.jsxs("h2",{className:"mb-3 text-xs text-[var(--text-muted)]",children:[a("machines.current_tasks")," (",c.length,")"]}),c.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:a("machines.no_active_tasks")})]}):e.jsx(k,{tasks:c,navigate:t,t:a})]})]})]});return e.jsxs(e.Fragment,{children:[_?R:P,e.jsx(q,{isOpen:$,onClose:()=>h(!1),onConfirm:G,machineName:s.name,isDraining:_,loading:T}),e.jsx(M,{isOpen:A,onClose:()=>u(!1),onConfirm:F,title:a("machines.decommission_title"),message:a("machines.decommission_confirm",{name:s.name}),confirmLabel:a("machines.decommission"),confirmVariant:"danger",isLoading:U})]})}function k({tasks:r,navigate:t,t:a}){return e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border-row)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left font-normal text-[var(--text-muted)]",children:a("machines.id")}),e.jsx("th",{className:"py-2 pr-4 text-left font-normal text-[var(--text-muted)]",children:a("machines.description")}),e.jsx("th",{className:"py-2 pr-4 text-left font-normal text-[var(--text-muted)]",children:a("machines.status_label")}),e.jsx("th",{className:"py-2 text-left font-normal text-[var(--text-muted)]",children:a("machines.stage")})]})}),e.jsx("tbody",{children:r.map(s=>e.jsxs("tr",{onClick:()=>t(`/tasks/${s.id}`),className:"cursor-pointer border-b border-[var(--border-row)] hover:bg-[var(--bg-input)] transition-colors",children:[e.jsxs("td",{className:"py-2 pr-4 text-[var(--text-primary)]",children:["#",s.id]}),e.jsx("td",{className:"max-w-xs truncate py-2 pr-4 text-[var(--text-secondary)]",children:s.description}),e.jsx("td",{className:"py-2 pr-4",children:e.jsxs("span",{style:{color:K[s.status]},children:["● ",s.status.toLowerCase()]})}),e.jsx("td",{className:"py-2 text-[var(--text-secondary)]",children:s.currentStage??"-"})]},s.id))})]})})}function N({label:r,value:t,unit:a}){return e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r}),e.jsxs("p",{className:"mt-2 text-lg font-semibold text-[var(--text-primary)]",children:[t,a]}),e.jsx("div",{className:"mt-3 h-1.5 w-full rounded-sm bg-[var(--bg-input)]",children:e.jsx("div",{className:"h-full rounded-sm transition-all",style:{width:`${t}%`,backgroundColor:I(t)}})})]})}function f({label:r,value:t}){return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-1 flex items-center justify-between text-xs",children:[e.jsx("span",{className:"text-[var(--text-secondary)]",children:r}),e.jsxs("span",{className:"text-[var(--text-primary)]",children:[t,"%"]})]}),e.jsx("div",{className:"h-1.5 w-full rounded-sm bg-[var(--bg-input)]",children:e.jsx("div",{className:"h-full rounded-sm transition-all",style:{width:`${t}%`,backgroundColor:I(t)}})})]})}function n({label:r,value:t}){return e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:r}),e.jsx("span",{className:"truncate text-[var(--text-primary)]",children:t})]})}export{se as default};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{c as B,a as I,j as e,r as s,f as C,X as K,o as q,d as W,u as H,h as V,q as O}from"./index-DJxZmj6O.js";import{M as u}from"./protocol-C5uQmiiB.js";import X from"./WorkerSetupGuidePage-BUTz9NXE.js";import{C as z}from"./copy-Dd1cNNWz.js";import{L as J}from"./loader-circle-BnJr5Xpn.js";import{S as Q}from"./Select-CmUwVfWJ.js";import{E as Y}from"./EmptyState-BOXPalWI.js";import{C as Z}from"./Skeleton-0JE10nwo.js";import{P as ee}from"./plus-Ry_MQV9O.js";import"./key-CT_RkMPI.js";import"./settings-Ac7uhvR0.js";/**
|
|
2
|
-
* @license lucide-react v0.469.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const te=B("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),F={[u.ONLINE]:"var(--accent)",[u.OFFLINE]:"var(--destructive)",[u.DRAINING]:"var(--warning)",[u.DECOMMISSIONED]:"var(--text-muted)"};function ae(a){return a>80?"var(--destructive)":a>60?"var(--warning)":"var(--accent)"}function re({machine:a,onPress:r}){const{t:i}=I();return e.jsxs("div",{onClick:r,className:`rounded border border-[var(--border)] bg-[var(--bg-card)] p-4 font-mono lowercase transition-colors ${r?"cursor-pointer hover:border-[var(--accent)]/40 hover:bg-[var(--bg-input)]":""}`,children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsxs("h3",{className:"truncate text-sm text-[var(--text-primary)]",children:[e.jsx("span",{style:{color:F[a.status],fontSize:"0.6rem"},children:"●"})," ",a.name]}),e.jsx("span",{className:"text-xs",style:{color:F[a.status]},children:a.status})]}),e.jsxs("div",{className:"mb-3 text-xs text-[var(--text-muted)]",children:[a.host,a.os?`:${a.os}`:""]}),e.jsxs("div",{className:"mb-3 flex flex-col gap-2",children:[e.jsx(S,{label:i("machines.cpu"),value:a.cpuUsage}),e.jsx(S,{label:i("machines.mem"),value:a.memoryUsage}),e.jsx(S,{label:i("machines.disk"),value:a.diskUsage})]}),e.jsx("div",{className:"flex items-center justify-between text-xs",children:e.jsx("span",{className:"text-[var(--text-secondary)]",children:i("machines.tasks_slots",{active:String(a.activeSlots),max:String(a.maxSlots)})})}),a.capabilities.length>0&&e.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:a.capabilities.map(t=>e.jsx("span",{className:"rounded border border-[var(--border)] px-1.5 py-0.5 text-[10px] text-[var(--text-muted)]",children:t},t))})]})}function S({label:a,value:r}){return e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-8 text-[var(--text-muted)]",children:a}),e.jsx("div",{className:"h-1.5 flex-1 rounded-sm bg-[var(--bg-input)]",children:e.jsx("div",{className:"h-full rounded-sm transition-all",style:{width:`${r}%`,backgroundColor:ae(r)}})}),e.jsxs("span",{className:"w-8 text-right text-[var(--text-secondary)]",children:[r,"%"]})]})}function se({isOpen:a,onClose:r,onRegistered:i}){const{t}=I(),[c,m]=s.useState(1),[d,h]=s.useState(!1),[o,v]=s.useState(""),[g,f]=s.useState(null),[y,b]=s.useState(""),[j,N]=s.useState(""),[l,x]=s.useState(!1),[_,w]=s.useState(!1),[P,E]=s.useState(""),[T,M]=s.useState(""),p=s.useRef(null),A={1:t("machines.reg_step_generate_token"),2:t("machines.reg_step_install_worker"),3:t("machines.reg_step_waiting_activation"),4:t("machines.reg_step_activated")};s.useEffect(()=>(a&&(m(1),v(""),f(null),b(""),N(""),x(!1),w(!1),E(""),M(""),h(!1)),()=>{p.current&&clearInterval(p.current)}),[a]);const $=async()=>{const n=y.trim();if(!n){N(t("admin.pat_label_required"));return}N(""),h(!0);try{const k=await C.post("admin/worker-tokens",{json:{label:n}}).json();v(k.token),f(k.tokenId),m(2)}catch{}finally{h(!1)}},D=typeof window<"u"?window.location.origin:"https://overlord.example.com",L=o?`overlord setup worker --token ${o} --server ${D}`:"",G=()=>{navigator.clipboard.writeText(o),x(!0),setTimeout(()=>x(!1),2e3)},R=()=>{navigator.clipboard.writeText(L),w(!0),setTimeout(()=>w(!1),2e3)},U=s.useCallback(()=>{g&&(m(3),p.current=setInterval(async()=>{try{const n=await C.get(`admin/worker-tokens/${g}/status`).json();n.used&&n.machineName&&(E(n.machineName),M(n.machineId??""),m(4),p.current&&clearInterval(p.current),i==null||i())}catch{}},3e3))},[g,i]);return s.useEffect(()=>()=>{p.current&&clearInterval(p.current)},[]),a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center font-mono lowercase",children:[e.jsx("div",{className:"absolute inset-0 bg-[var(--bg-primary)]/60 backdrop-blur-sm",onClick:r}),e.jsxs("div",{className:"relative z-10 w-full max-w-[1080px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-8",children:[e.jsx("button",{type:"button",onClick:r,className:"absolute right-4 top-4 text-[var(--text-muted)] hover:text-[var(--text-primary)]",children:e.jsx(K,{className:"h-4 w-4"})}),e.jsx("h2",{className:"text-lg font-bold text-[var(--accent)]",children:t("machines.reg_title")}),e.jsx("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:t("machines.reg_subtitle")}),e.jsx("div",{className:"mt-6 flex items-center justify-center gap-2",children:[1,2,3,4].map((n,k)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:`rounded-[4px] px-3 py-1.5 text-[11px] font-bold ${n===c?"bg-[var(--accent)] text-black":n<c?"bg-[var(--accent)]/20 text-[var(--accent)]":"border border-[var(--border)] bg-[var(--bg-primary)] text-[var(--text-muted)]"}`,children:[n,". ",A[n]]}),k<3&&e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"→"})]},n))}),e.jsxs("div",{className:"mt-6 grid grid-cols-1 gap-4 lg:grid-cols-2",children:[e.jsxs("div",{className:`rounded-[4px] border p-4 ${c===1?"border-[var(--accent)] bg-[var(--bg-primary)]":"border-[var(--border)] bg-[var(--bg-primary)]"}`,children:[e.jsxs("p",{className:"text-[13px] font-bold text-[var(--accent)]",children:["> ",t("machines.reg_step_generate_token")]}),c===1&&!o?e.jsxs("div",{className:"mt-3 space-y-3",children:[e.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:t("machines.reg_click_to_generate")}),j&&e.jsx("p",{className:"text-[10px] text-red-400",children:j}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-[10px] text-[var(--text-muted)]",children:t("admin.label")}),e.jsx("input",{type:"text",placeholder:t("admin.pat_label_placeholder"),value:y,onChange:n=>b(n.target.value),onKeyDown:n=>{n.key==="Enter"&&$()},className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-1.5 text-[11px] text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:border-[var(--accent)] focus:outline-none"})]}),e.jsx("button",{type:"button",onClick:$,disabled:d,className:"rounded-[4px] bg-[var(--accent)] px-4 py-1.5 text-xs font-bold text-black disabled:opacity-50",children:t(d?"admin.generating":"machines.reg_step_generate_token")})]}):o?e.jsxs("div",{className:"mt-3 space-y-3",children:[e.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:t("machines.reg_token_generated")}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-[10px] text-[var(--text-muted)]",children:"Token"}),e.jsxs("div",{className:"relative rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-3 py-2 pr-16",children:[e.jsx("code",{className:"block break-all text-[10px] text-[var(--text-primary)]",children:o}),e.jsx("button",{type:"button",onClick:G,className:"absolute right-2 top-1.5 text-[10px] text-[var(--text-muted)] hover:text-[var(--text-primary)]",children:l?e.jsx("span",{className:"text-[var(--accent)]",children:t("common.copied")}):e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(z,{className:"h-3 w-3"})," ",t("common.copy")]})})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-[10px] text-[var(--text-muted)]",children:t("admin.setup_command")}),e.jsxs("div",{className:"relative rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-3 py-2 pr-16",children:[e.jsxs("code",{className:"block break-all text-[10px] text-[var(--accent)]",children:["$ ",L]}),e.jsx("button",{type:"button",onClick:R,className:"absolute right-2 top-1.5 text-[10px] text-[var(--text-muted)] hover:text-[var(--text-primary)]",children:_?e.jsx("span",{className:"text-[var(--accent)]",children:t("common.copied")}):e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(z,{className:"h-3 w-3"})," ",t("common.copy")]})})]})]}),e.jsx("div",{className:"rounded-[4px] border border-yellow-500/30 bg-yellow-500/10 px-3 py-2 text-[10px] text-yellow-400",children:t("admin.token_shown_once")})]}):e.jsx("p",{className:"mt-2 text-[10px] text-[var(--text-muted)]",children:t("machines.reg_completed")})]}),e.jsxs("div",{className:`rounded-[4px] border p-4 ${c===2?"border-[var(--accent)] bg-[var(--bg-primary)]":"border-[var(--border)] bg-[var(--bg-primary)]"}`,children:[e.jsxs("p",{className:"text-[13px] font-bold text-[var(--text-primary)]",children:["> ",t("machines.reg_step_install_worker")]}),e.jsx("p",{className:"mt-2 text-[11px] text-[var(--text-muted)]",children:t("machines.reg_running_installation")}),c>=2&&e.jsxs("div",{className:"mt-3 space-y-1 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] p-3",children:[e.jsx("p",{className:"text-[10px] text-[var(--text-primary)]",children:"$ overlord setup worker"}),e.jsx("p",{className:"text-[10px] text-[var(--text-muted)]",children:"server url: https://..."}),e.jsx("p",{className:"text-[10px] text-[var(--text-muted)]",children:"worker token: ovw_..."}),e.jsx("p",{className:"text-[10px] text-[var(--text-muted)]",children:"machine name: my-worker"}),e.jsx("p",{className:"text-[10px] text-[var(--accent)]",children:"config written. starting worker..."}),c===2&&e.jsx("p",{className:"text-[10px] text-[var(--accent)] animate-pulse",children:"█"})]}),c===2&&e.jsx("button",{type:"button",onClick:U,className:"mt-3 rounded-[4px] bg-[var(--accent)] px-4 py-1.5 text-xs font-bold text-black",children:t("machines.reg_installed_wait")})]}),e.jsxs("div",{className:`rounded-[4px] border p-4 ${c===3?"border-amber-500 bg-[var(--bg-primary)]":"border-[var(--border)] bg-[var(--bg-primary)]"}`,children:[e.jsxs("p",{className:"text-[13px] font-bold text-[var(--text-primary)]",children:["> ",t("machines.reg_step_waiting_activation")]}),c>=3?e.jsx("div",{className:"mt-3 flex flex-col items-center justify-center gap-3 py-6",children:c===3?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full border-2 border-amber-500",children:e.jsx(J,{className:"h-5 w-5 animate-spin text-amber-500"})}),e.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:t("machines.reg_listening_for_worker")})]}):e.jsx("p",{className:"text-[10px] text-[var(--accent)]",children:t("machines.reg_worker_connected")})}):e.jsx("p",{className:"mt-2 text-[11px] text-[var(--text-muted)]",children:t("machines.reg_waiting_for_worker")})]}),e.jsxs("div",{className:`rounded-[4px] border p-4 ${c===4?"border-[var(--accent)] bg-[var(--bg-primary)]":"border-[var(--border)] bg-[var(--bg-primary)]"}`,children:[e.jsxs("p",{className:"text-[13px] font-bold text-[var(--text-primary)]",children:["> ",t("machines.reg_step_activated")]}),c===4?e.jsxs("div",{className:"mt-3 flex flex-col items-center justify-center gap-3 py-6",children:[e.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-[var(--accent)]/20",children:e.jsx(q,{className:"h-6 w-6 text-[var(--accent)]"})}),e.jsx("p",{className:"text-xs font-bold text-[var(--accent)]",children:t("machines.reg_worker_activated",{name:P})}),T&&e.jsxs("p",{className:"text-[10px] text-[var(--text-muted)]",children:["machine_id: ",T]})]}):e.jsx("p",{className:"mt-2 text-[11px] text-[var(--text-muted)]",children:t("machines.reg_worker_registered")})]})]}),c===4&&e.jsx("div",{className:"mt-6 flex justify-end",children:e.jsx("button",{type:"button",onClick:r,className:"rounded-[4px] bg-[var(--accent)] px-5 py-2 text-xs font-bold text-black",children:t("machines.reg_done")})})]})]}):null}function be(){const a=W(),{t:r}=I(),[i,t]=s.useState([]),[c,m]=s.useState(!0),[d,h]=s.useState("all"),[o,v]=s.useState("fleet"),[g,f]=s.useState(!1),[y,b]=s.useState(0),j=H(l=>{var x;return(x=l.user)==null?void 0:x.role}),N=s.useMemo(()=>[{value:"all",label:r("machines.all_statuses")},{value:u.ONLINE,label:r("machines.online")},{value:u.OFFLINE,label:r("machines.offline")},{value:u.DRAINING,label:r("machines.draining")}],[r]);return V(s.useMemo(()=>j==="admin"?e.jsxs("button",{type:"button",onClick:()=>f(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity",children:[e.jsx(ee,{size:14}),r("machines.register_worker")]}):null,[j,r])),s.useEffect(()=>{async function l(){m(!0);try{const x=new URLSearchParams;d!=="all"&&x.set("status",d);const _=await C.get("web/machines",{searchParams:x}).json();t(_)}catch{}finally{m(!1)}}l()},[d,y]),e.jsxs("div",{className:"mx-auto max-w-6xl px-6 py-8 font-mono lowercase",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between border-b border-[var(--border)]",children:[e.jsxs("div",{className:"flex",children:[e.jsxs("button",{type:"button",onClick:()=>{v("fleet"),b(l=>l+1)},className:`flex items-center gap-2 px-4 py-2.5 text-xs transition-colors ${o==="fleet"?"border-b-2 border-[var(--accent)] text-[var(--text-primary)]":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"}`,children:[e.jsx(O,{size:14}),r("machines.fleet")]}),e.jsxs("button",{type:"button",onClick:()=>v("setup_guide"),className:`flex items-center gap-2 px-4 py-2.5 text-xs transition-colors ${o==="setup_guide"?"border-b-2 border-[var(--accent)] text-[var(--text-primary)]":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"}`,children:[e.jsx(te,{size:14}),r("machines.setup_guide")]})]}),o==="fleet"&&e.jsx(Q,{value:d,onChange:h,options:N})]}),o==="fleet"?c?e.jsx(Z,{cards:6}):i.length===0?e.jsx(Y,{icon:O,title:r("machines.no_machines_found"),description:r(d!=="all"?"machines.try_changing_status_filter":"machines.no_machines_registered"),action:e.jsx("button",{type:"button",onClick:()=>v("setup_guide"),className:"rounded-[4px] bg-[var(--accent)] px-5 py-2 text-[11px] font-bold text-black",children:r("machines.view_setup_guide")})}):e.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:i.map(l=>e.jsx(re,{machine:l,onPress:()=>a(`/machines/${l.id}`)},l.id))}):e.jsx(X,{}),e.jsx(se,{isOpen:g,onClose:()=>{f(!1),b(l=>l+1)},onRegistered:()=>{b(l=>l+1)}})]})}export{be as default};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as g,r as p,j as e,m as M,d as T,f as k,t as y}from"./index-DJxZmj6O.js";import{S as B}from"./Select-CmUwVfWJ.js";const C={timeout:600,retries:0,confirm:!1,irreversible:!1};function D(){return{name:"",command:"",executor:"claude_code",timeout:600,retries:0,confirm:!1}}const F={claude_code:{label:"claude",color:"var(--accent)"},cursor:{label:"cursor",color:"var(--info)"},shell:{label:"shell",color:"var(--warning)"}};function V(t){switch(t){case"claude":case"claude_code":return"var(--accent)";case"cursor":return"var(--info)";case"shell":return"var(--warning)";default:return"#737373"}}function W({executor:t}){const o=F[t??"claude_code"]??F.claude_code;return e.jsx("span",{className:"inline-block rounded px-1.5 py-0.5 text-[10px] font-semibold uppercase leading-none",style:{color:o.color,border:`1px solid ${o.color}`,opacity:.85},children:o.label})}function u({children:t}){return e.jsx("label",{className:"mb-1 block font-mono text-[11px] text-[var(--text-secondary)]",children:t})}function f({value:t,onChange:o,placeholder:n,type:r="text",className:a=""}){return e.jsx("input",{type:r,value:t,onChange:c=>o(c.target.value),placeholder:n,className:`w-full rounded border border-[var(--border)] bg-[var(--bg-primary)] px-2.5 py-1.5 font-mono text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:border-[var(--accent)] focus:outline-none ${a}`})}function N({value:t,onChange:o,options:n,className:r=""}){return e.jsx(B,{value:t,onChange:o,options:n,className:r})}function $({checked:t,onChange:o}){return e.jsx("button",{type:"button",role:"switch","aria-checked":t,onClick:()=>o(!t),className:`relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-[var(--border)] transition-colors ${t?"bg-[var(--accent)]":"bg-[var(--bg-primary)]"}`,children:e.jsx("span",{className:`inline-block h-3.5 w-3.5 rounded-full bg-white shadow transition-transform ${t?"translate-x-[18px]":"translate-x-[2px]"}`})})}function L({value:t,onChange:o,placeholder:n,rows:r=4}){return e.jsx("textarea",{value:t,onChange:a=>o(a.target.value),placeholder:n,rows:r,className:"w-full rounded border border-[var(--border)] bg-[var(--bg-primary)] px-2.5 py-1.5 font-mono text-xs leading-relaxed text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:border-[var(--accent)] focus:outline-none"})}function q({stage:t,index:o,selected:n,onSelect:r,onDelete:a}){const{t:c}=g(),l=t.confirm?t.type?`confirm:${t.type}`:"confirm":null;return e.jsxs("button",{type:"button",onClick:r,className:`group relative flex w-full items-start gap-3 rounded-[4px] border px-4 py-3 text-left transition-colors ${n?"border-[var(--accent)] bg-[var(--bg-card)]":"border-[var(--border)] bg-[var(--bg-card)] hover:border-[var(--text-muted)]"}`,style:{borderLeftWidth:3,borderLeftColor:V(t.executor)},children:[e.jsx("span",{className:"mt-0.5 shrink-0 font-mono text-[10px] text-[var(--text-muted)]",children:String(o+1).padStart(2,"0")}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs font-bold text-[var(--text-primary)]",children:t.name||"unnamed"}),e.jsx(W,{executor:t.executor})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2 font-mono text-[10px] text-[var(--text-muted)]",children:[l&&e.jsx("span",{children:l}),t.timeout!=null&&e.jsxs("span",{children:["timeout:",t.timeout,"s"]})]})]}),e.jsx("button",{type:"button",onClick:x=>{x.stopPropagation(),a()},className:"mt-0.5 shrink-0 rounded p-0.5 text-[var(--text-muted)] opacity-0 transition-opacity hover:text-[var(--destructive)] group-hover:opacity-100","aria-label":c("pipeline.delete_stage"),children:e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("polyline",{points:"3 6 5 6 21 6"}),e.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})})]})}function A({stage:t,onChange:o}){const{t:n}=g();return e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"font-mono text-sm font-semibold text-[var(--accent)]",children:n("pipeline.stage_properties")}),e.jsx("p",{className:"font-mono text-[11px] text-[var(--text-muted)]",children:n("pipeline.editing",{name:t.name||n("pipeline.unnamed")})}),e.jsxs("div",{children:[e.jsx(u,{children:n("pipeline.name")}),e.jsx(f,{value:t.name,onChange:r=>o({name:r}),placeholder:n("pipeline.stage_name")})]}),e.jsxs("div",{children:[e.jsx(u,{children:n("pipeline.executor")}),e.jsx(N,{value:t.executor??"claude_code",onChange:r=>o({executor:r}),options:[{value:"claude_code",label:"claude_code"},{value:"cursor",label:"cursor"},{value:"shell",label:"shell"}]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(u,{children:n("pipeline.timeout")}),e.jsx(f,{type:"number",value:String(t.timeout??""),onChange:r=>o({timeout:r?parseInt(r,10):void 0}),placeholder:"600"})]}),e.jsxs("div",{children:[e.jsx(u,{children:n("pipeline.max_turns")}),e.jsx(f,{type:"number",value:String(t.max_turns??""),onChange:r=>o({max_turns:r?parseInt(r,10):void 0}),placeholder:"50"})]})]}),e.jsxs("div",{children:[e.jsx(u,{children:n("pipeline.confirm_mode")}),e.jsx(N,{value:t.confirm?t.type??"confirm":"none",onChange:r=>{o(r==="none"?{confirm:!1,type:void 0}:{confirm:!0,type:r})},options:[{value:"none",label:"none"},{value:"confirm",label:"confirm"},{value:"choice",label:"choice"},{value:"input",label:"input"}]})]}),t.confirm&&e.jsxs("div",{children:[e.jsx(u,{children:n("pipeline.confirm_timeout")}),e.jsx(f,{type:"number",value:String(t.confirm_timeout??""),onChange:r=>o({confirm_timeout:r?parseInt(r,10):void 0}),placeholder:"300"})]}),e.jsxs("div",{className:"border-t border-[var(--border)] pt-3",children:[e.jsx("p",{className:"mb-3 font-mono text-[11px] text-[var(--text-muted)]",children:n("pipeline.overrides")}),e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsx(u,{children:n("pipeline.pty_only")}),e.jsx($,{checked:t.pty_only??!1,onChange:r=>o({pty_only:r})})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx(u,{children:n("pipeline.allowed_tools")}),e.jsx(f,{value:t.allowed_tools??"",onChange:r=>o({allowed_tools:r||void 0}),placeholder:"tool1, tool2, ..."})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(u,{children:n("pipeline.irreversible")}),e.jsx($,{checked:t.irreversible??!1,onChange:r=>o({irreversible:r})})]})]}),e.jsxs("div",{className:"border-t border-[var(--border)] pt-3",children:[e.jsx("p",{className:"mb-3 font-mono text-[11px] text-[var(--text-muted)]",children:n("pipeline.on_failure_section")}),e.jsxs("div",{className:"mb-3",children:[e.jsx(u,{children:n("pipeline.on_failure")}),e.jsx(N,{value:t.onFailure?"goto":"stop",onChange:r=>{o(r==="stop"?{onFailure:void 0}:{onFailure:{goto:"",maxLoops:3}})},options:[{value:"stop",label:n("pipeline.stop")},{value:"goto",label:n("pipeline.goto_stage")}]})]}),t.onFailure&&e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(u,{children:n("pipeline.goto")}),e.jsx(f,{value:t.onFailure.goto,onChange:r=>{var a;return o({onFailure:{goto:r,maxLoops:((a=t.onFailure)==null?void 0:a.maxLoops)??3}})},placeholder:n("pipeline.stage_name")})]}),e.jsxs("div",{children:[e.jsx(u,{children:n("pipeline.max_loops")}),e.jsx(f,{type:"number",value:String(t.onFailure.maxLoops),onChange:r=>{var a;return o({onFailure:{goto:((a=t.onFailure)==null?void 0:a.goto)??"",maxLoops:r?parseInt(r,10):3}})},placeholder:"3"})]})]})]}),e.jsxs("div",{className:"border-t border-[var(--border)] pt-3",children:[e.jsx("h4",{className:"mb-2 font-mono text-xs font-semibold text-[var(--accent)]",children:n("pipeline.stage_commands")}),e.jsx(L,{value:t.command??"",onChange:r=>o({command:r}),placeholder:n("pipeline.commands_placeholder"),rows:6})]}),e.jsxs("div",{className:"border-t border-[var(--border)] pt-3",children:[e.jsx("h4",{className:"mb-2 font-mono text-xs font-semibold text-[var(--accent)]",children:n("pipeline.environment")}),e.jsx(L,{value:t.env?Object.entries(t.env).map(([r,a])=>`${r}=${a}`).join(`
|
|
2
|
-
`):"",onChange:r=>{if(!r.trim()){o({env:void 0});return}const a={};r.split(`
|
|
3
|
-
`).forEach(c=>{const l=c.indexOf("=");l>0&&(a[c.slice(0,l).trim()]=c.slice(l+1).trim())}),o({env:a})},placeholder:n("pipeline.env_placeholder"),rows:3})]})]})}function H({value:t,onChange:o,onSave:n,saving:r,projectName:a}){const{t:c}=g(),[l,x]=p.useState(null),[h,j]=p.useState(!1),i=(t==null?void 0:t.stages)??[],_=(t==null?void 0:t.defaults)??C,w=l!=null?i[l]??null:null,b=p.useCallback(s=>{o({stages:s,defaults:_})},[o,_]),E=p.useCallback(()=>{const s=[...i,D()];b(s),x(s.length-1)},[i,b]),I=p.useCallback(s=>{const d=i.filter((m,v)=>v!==s);b(d),l===s?x(d.length>0?Math.min(s,d.length-1):null):l!=null&&l>s&&x(l-1)},[i,l,b]),P=p.useCallback((s,d)=>{const m=i.map((v,O)=>O===s?{...v,...d}:v);b(m)},[i,b]),S=p.useCallback((s,d)=>{const m=d==="up"?s-1:s+1;if(m<0||m>=i.length)return;const v=[...i];[v[s],v[m]]=[v[m],v[s]],b(v),l===s?x(m):l===m&&x(s)},[i,l,b]),J=p.useMemo(()=>JSON.stringify(t??{stages:[],defaults:C},null,2),[t]);return e.jsxs("div",{className:"flex flex-col gap-0",children:[e.jsx("div",{className:"mb-4 flex items-center gap-2",children:e.jsxs("button",{type:"button",onClick:()=>j(s=>!s),className:`rounded-[4px] border px-2 py-1 font-mono text-[10px] transition-colors ${h?"border-[var(--accent)] text-[var(--accent)]":"border-[var(--border)] text-[var(--text-muted)] hover:text-[var(--text-primary)]"}`,children:[c("pipeline.json_toggle")," ⇅"]})}),h&&e.jsx("pre",{className:"mb-4 max-h-[400px] overflow-auto rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] p-3 font-mono text-[11px] leading-relaxed text-[var(--text-primary)]",children:J}),e.jsxs("div",{className:"flex gap-6",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[i.map((s,d)=>{var m;return e.jsxs("div",{children:[e.jsx(q,{stage:s,index:d,selected:l===d,onSelect:()=>x(d),onDelete:()=>I(d)}),d<i.length-1&&e.jsxs("div",{className:"flex items-center justify-center gap-2 py-2",children:[e.jsx("div",{className:"h-6 w-px bg-[var(--border)]"}),e.jsx("span",{className:"text-[10px] text-[var(--text-muted)]",children:"▼"}),e.jsx("div",{className:"h-6 w-px bg-[var(--border)]"})]}),((m=s.onFailure)==null?void 0:m.goto)&&e.jsx("div",{className:"flex items-center justify-center gap-1.5 py-1",children:e.jsxs("span",{className:"text-[10px] text-[var(--warning)]",children:["↺ loop → ",s.onFailure.goto," (max ",s.onFailure.maxLoops,")"]})})]},`${d}-${s.name}`)}),l!=null&&i.length>1&&e.jsxs("div",{className:"flex items-center gap-1 pl-7 pt-2",children:[e.jsxs("button",{type:"button",disabled:l===0,onClick:()=>S(l,"up"),className:"rounded border border-[var(--border)] px-2 py-0.5 font-mono text-[10px] text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)] disabled:opacity-30",children:["▲ ",c("pipeline.up")]}),e.jsxs("button",{type:"button",disabled:l===i.length-1,onClick:()=>S(l,"down"),className:"rounded border border-[var(--border)] px-2 py-0.5 font-mono text-[10px] text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)] disabled:opacity-30",children:["▼ ",c("pipeline.down")]})]}),e.jsx("div",{className:"flex items-center justify-center py-3",children:e.jsxs("button",{type:"button",onClick:E,className:"flex items-center gap-1.5 rounded-[4px] border border-dashed border-[var(--border)] px-4 py-2 font-mono text-xs text-[var(--accent)] transition-colors hover:border-[var(--accent)] hover:bg-[var(--bg-secondary)]",children:[e.jsx("span",{className:"text-sm leading-none",children:"+"})," ",c("pipeline.add_stage")]})})]}),e.jsx("div",{className:"hidden w-[360px] shrink-0 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5 lg:block",style:{alignSelf:"flex-start",position:"sticky",top:0},children:w?e.jsx(A,{stage:w,onChange:s=>P(l,s)}):e.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:e.jsx("p",{className:"font-mono text-xs text-[var(--text-muted)]",children:c("pipeline.select_stage")})})})]})]})}function G(){const{key:t}=M(),o=T(),{t:n}=g(),[r,a]=p.useState(null),[c,l]=p.useState(!0),[x,h]=p.useState(!1);p.useEffect(()=>{t&&k.get(`web/projects/${t}`).json().then(i=>{if(i.pipeline)try{a(JSON.parse(i.pipeline))}catch{a(null)}}).catch(()=>y.error(n("pipeline.failed_to_load_project"))).finally(()=>l(!1))},[t,n]);const j=p.useCallback(async()=>{if(t){h(!0);try{await k.put(`web/projects/${t}`,{json:{pipeline:r?JSON.stringify(r):null}}),y.success(n("pipeline.saved"))}catch{y.error(n("pipeline.failed_to_save"))}finally{h(!1)}}},[t,r,n]);return c?e.jsx("div",{className:"flex h-full items-center justify-center font-mono",children:e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:n("pipeline.loading_pipeline")})}):e.jsxs("div",{className:"flex h-full flex-col font-mono lowercase",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-8 py-5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-base font-medium text-[var(--text-primary)]",children:n("pipeline.title")}),e.jsx("span",{className:"text-sm text-[var(--text-muted)]",children:n("pipeline.subtitle",{key:t??""})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:j,disabled:x,className:"rounded-[4px] bg-[var(--accent)] px-4 py-1.5 text-xs font-bold text-black disabled:opacity-50",children:n(x?"common.saving":"pipeline.save")}),e.jsx("button",{type:"button",onClick:()=>o(`/projects/${t}`),className:"rounded-[4px] border border-[var(--border)] px-4 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:n("pipeline.cancel")})]})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto p-8",children:e.jsx(H,{value:r,onChange:a,onSave:j,saving:x,projectName:t})})]})}export{G as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as L,r as a,f as m,t as i,j as e,L as S,K as R}from"./index-DJxZmj6O.js";function D(){const{t:r}=L(),[t,k]=a.useState(null),[P,u]=a.useState(!0),[x,f]=a.useState(""),[o,b]=a.useState(""),[v,g]=a.useState(""),[h,j]=a.useState(!1),[_,n]=a.useState(""),[c,w]=a.useState(""),[y,N]=a.useState(!1),p=a.useCallback(async()=>{try{u(!0);const s=await m.get("web/profile").json();k(s)}catch{i.error(r("profile.failed_to_load_profile"))}finally{u(!1)}},[r]);a.useEffect(()=>{p()},[p]);const C=async()=>{if(n(""),!x){n(r("profile.current_password_required"));return}if(!o){n(r("profile.new_password_required"));return}if(o.length<10||o.length>20){n(r("profile.password_length_10_20"));return}if(o!==v){n(r("profile.passwords_do_not_match"));return}try{j(!0),await m.put("web/profile/password",{json:{currentPassword:x,newPassword:o}}),i.success(r("profile.password_changed")),f(""),b(""),g("")}catch(s){const d=s instanceof Error?s.message:r("profile.failed_to_change_password");n(d)}finally{j(!1)}},E=async()=>{if(!c||c.length!==6){i.error(r("profile.totp_code_required"));return}try{N(!0),await m.post("web/profile/totp/regenerate",{json:{code:c}}),i.success(r("profile.two_fa_regenerated")),w(""),p()}catch(s){const d=s instanceof Error?s.message:r("profile.totp_code_invalid");i.error(d)}finally{N(!1)}};return P?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})}):e.jsxs("div",{className:"mx-auto max-w-xl space-y-8 px-6 py-8 font-mono lowercase",children:[e.jsxs("h1",{className:"text-lg text-[var(--text-primary)]",children:[r("profile.title")," ",e.jsx("span",{className:"text-[var(--text-muted)]",children:r("profile.personal_settings")})]}),e.jsxs("section",{className:"rounded-[4px] bg-[var(--bg-card)] border border-[var(--border)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("profile.profile_info")}),t?e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{label:r("profile.username"),value:t.name}),e.jsx(l,{label:r("common.role"),value:t.role}),e.jsx(l,{label:r("profile.git_name"),value:t.gitName||r("common.not_set")}),e.jsx(l,{label:r("profile.git_email"),value:t.gitEmail||r("common.not_set")}),e.jsx(l,{label:r("profile.status"),value:t.status}),e.jsx(l,{label:r("profile.created_at"),value:new Date(t.createdAt).toLocaleDateString()})]}):e.jsx("p",{className:"text-sm text-[var(--text-secondary)]",children:r("profile.unable_to_load_profile")})]}),e.jsxs("section",{className:"rounded-[4px] bg-[var(--bg-card)] border border-[var(--border)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("profile.change_password")}),e.jsxs("div",{className:"space-y-4",children:[_&&e.jsx("div",{className:"rounded-[4px] border border-[var(--destructive)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--destructive)]",children:_}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-secondary)]",children:r("profile.current_password")}),e.jsx("input",{type:"password",value:x,onChange:s=>f(s.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-secondary)]",children:r("profile.new_password")}),e.jsx("input",{type:"password",value:o,onChange:s=>b(s.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:r("profile.password_hint_10_20")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-secondary)]",children:r("profile.confirm_password")}),e.jsx("input",{type:"password",value:v,onChange:s=>g(s.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{onClick:C,disabled:h,className:"rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-medium text-black disabled:opacity-50",children:r(h?"common.updating":"profile.update_password")})})]})]}),e.jsxs("section",{className:"rounded-[4px] bg-[var(--bg-card)] border border-[var(--border)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("profile.two_factor_auth")}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex items-center gap-2 text-sm",children:t!=null&&t.totpEnabled?e.jsxs("span",{className:"text-[var(--accent)]",children:["● ",r("profile.two_fa_enabled")]}):e.jsxs("span",{className:"text-[var(--text-muted)]",children:["● ",r("profile.two_fa_not_setup")]})}),(t==null?void 0:t.totpEnabled)&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("profile.regenerate_2fa_warning")}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-secondary)]",children:r("profile.current_totp_code")}),e.jsx("input",{type:"text",inputMode:"numeric",maxLength:6,placeholder:r("profile.totp_code_placeholder"),value:c,onChange:s=>{const d=s.target.value.replace(/\D/g,"").slice(0,6);w(d)},className:"w-full max-w-xs rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--text-primary)] outline-none focus:border-[var(--accent)] font-mono tracking-widest"})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{onClick:E,disabled:y||c.length!==6,className:"rounded-[4px] border border-[var(--warning)] bg-transparent px-4 py-2 text-xs font-medium text-[var(--warning)] hover:bg-[var(--warning)] hover:text-black disabled:opacity-50 transition-colors",children:r(y?"profile.regenerating":"profile.regenerate_2fa")})})]})]})]}),e.jsxs(S,{to:"/access-tokens",className:"flex items-center gap-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 transition-colors hover:border-[var(--accent)]",children:[e.jsx(R,{size:16,className:"text-[var(--accent)]"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-[var(--text-primary)]",children:r("profile.access_tokens")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("profile.access_tokens_desc")})]})]})]})}function l({label:r,value:t}){return e.jsxs("div",{className:"flex items-center gap-3 py-1",children:[e.jsx("span",{className:"w-28 shrink-0 text-xs text-[var(--text-muted)]",children:r}),e.jsx("span",{className:"text-sm text-[var(--text-primary)]",children:t})]})}export{D as default};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{c as F,a as S,j as e,l as G,m as K,d as q,u as B,r as l,h as H,f as j,v as J}from"./index-DJxZmj6O.js";import{T as d}from"./protocol-C5uQmiiB.js";import{U as Q,A as V,R as z}from"./RemoveMemberConfirmDialog-I3k9sPON.js";import{P as W}from"./pencil-Srq1Z7Yh.js";import{T as X}from"./trash-2-DWv3OoER.js";import{P as Y}from"./plus-Ry_MQV9O.js";import"./Select-CmUwVfWJ.js";/**
|
|
2
|
-
* @license lucide-react v0.469.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Z=F("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);function ee({isOpen:n,onClose:a,onConfirm:t,projectName:o,loading:p}){const{t:r}=S();return e.jsx(G,{isOpen:n,onClose:a,onConfirm:t,title:`> ${r("projects.delete_project")}`,message:r("projects.delete_project_confirm",{name:o}),confirmLabel:r("projects.delete_project"),confirmVariant:"danger",isLoading:p})}const te={[d.QUEUED]:"var(--text-muted)",[d.ASSIGNED]:"var(--info)",[d.RUNNING]:"var(--info)",[d.SUSPENDED]:"var(--warning)",[d.COMPLETED]:"var(--accent)",[d.FAILED]:"var(--destructive)",[d.CANCELLED]:"var(--text-muted)"};function D(n){return new Date(n).toLocaleString()}function de(){const{key:n}=K(),a=q(),{t}=S(),o=B(s=>s.user),p=(o==null?void 0:o.role)==="admin",[r,M]=l.useState(null),[u,P]=l.useState([]),i=p||u.some(s=>s.developerId===(o==null?void 0:o.id)&&s.role==="maintainer"),[w,L]=l.useState([]),[A,E]=l.useState(!0),[x,f]=l.useState(null),[I,N]=l.useState(!1),[T,k]=l.useState(!1),[$,_]=l.useState(!1),[m,y]=l.useState(null),[U,C]=l.useState(!1);H(l.useMemo(()=>r?e.jsxs(e.Fragment,{children:[i&&e.jsxs("button",{onClick:()=>a(`/projects/${r.key}/edit`),className:"flex items-center gap-1.5 rounded-[4px] border border-[var(--border)] bg-transparent px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[e.jsx(W,{className:"h-3 w-3"}),t("common.edit")]}),p&&e.jsxs("button",{onClick:()=>N(!0),className:"flex items-center gap-1.5 rounded-[4px] border border-[var(--destructive)] bg-transparent px-3 py-1.5 text-xs text-[var(--destructive)] hover:bg-[var(--destructive)] hover:text-white",children:[e.jsx(X,{className:"h-3 w-3"}),t("common.delete")]})]}):null,[r,i,p,a,t]));const v=l.useCallback(async()=>{if(n)try{const[s,g,h]=await Promise.all([j.get(`web/projects/${n}`).json(),j.get(`web/projects/${n}/members`).json().catch(()=>[]),j.get("web/tasks",{searchParams:{projectKey:n,limit:"20"}}).json().then(b=>b.data).catch(()=>[])]);if(M(s),P(g),L(h),s.pipeline)try{f(JSON.parse(s.pipeline))}catch{f(null)}else f(null)}catch{}finally{E(!1)}},[n]);l.useEffect(()=>{v()},[v]);async function O(){if(r){k(!0);try{await j.delete(`admin/projects/${r.key}`),a("/projects")}catch{}finally{k(!1),N(!1)}}}async function R(){if(!(!r||!m)){C(!0);try{await j.delete(`web/projects/${r.key}/members`,{searchParams:{developerId:String(m.developerId)}}),await v()}catch{}finally{C(!1),y(null)}}}return A?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})}):r?e.jsxs("div",{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:()=>a("/projects"),children:t("projects.title")})," / ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:r.key})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_340px]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded 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:t("projects.project_info")}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{label:t("projects.key"),value:r.key}),e.jsx(c,{label:t("projects.name"),value:r.name}),e.jsx(c,{label:t("projects.repo_url"),value:r.repoUrl,href:r.repoUrl}),r.sshUrl&&e.jsx(c,{label:t("projects.ssh_url"),value:r.sshUrl}),e.jsx(c,{label:t("projects.git_platform"),value:r.gitPlatform}),e.jsx(c,{label:t("projects.default_branch"),value:r.defaultBranch}),e.jsx(c,{label:t("projects.agent_type"),value:r.agentType}),e.jsx(c,{label:t("projects.max_turns"),value:String(r.maxTurns)}),e.jsx(c,{label:t("projects.allowed_tools"),value:r.allowedTools??"all"}),e.jsx(c,{label:t("projects.auto_merge"),value:r.isDefault?"yes":"no"})]})]}),e.jsxs("section",{className:"rounded 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:t("projects.members")}),i&&e.jsxs("button",{onClick:()=>_(!0),className:"flex items-center gap-1.5 rounded bg-[var(--accent)] px-3 py-1.5 text-xs font-medium text-black",children:[e.jsx(Y,{className:"h-3.5 w-3.5"}),t("projects.add_member")]})]}),u.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:t("projects.no_members_yet")})]}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border-row)]",children:[e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:t("projects.name")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:t("projects.role")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:t("projects.added_at")}),i&&e.jsx("th",{className:"pb-2 text-right text-xs font-medium text-[var(--text-muted)]",children:t("common.actions")})]})}),e.jsx("tbody",{children:u.map(s=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] last:border-b-0",children:[e.jsx("td",{className:"py-2.5 text-sm text-[var(--text-primary)]",children:s.developerName??`#${s.developerId}`}),e.jsx("td",{className:"py-2.5 text-sm",style:{color:s.role==="maintainer"?"var(--warning)":"var(--text-secondary)"},children:s.role}),e.jsx("td",{className:"py-2.5 text-sm text-[var(--text-secondary)]",children:D(s.createdAt)}),i&&e.jsx("td",{className:"py-2.5 text-right",children:e.jsx("button",{onClick:()=>y(s),className:"text-[var(--destructive)] hover:underline","aria-label":t("projects.remove_member"),children:e.jsx(Q,{className:"h-3.5 w-3.5"})})})]},s.developerId))})]})})]}),e.jsxs("section",{className:"rounded 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:t("projects.recent_tasks")}),w.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:t("projects.no_tasks_for_project")})]}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border-row)]",children:[e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:t("projects.id")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:t("projects.description")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:t("projects.status")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:t("projects.created")})]})}),e.jsx("tbody",{children:w.map(s=>e.jsxs("tr",{className:"cursor-pointer border-b border-[var(--border-row)] last:border-b-0 hover:bg-[var(--bg-input)]",onClick:()=>a(`/tasks/${s.id}`),children:[e.jsxs("td",{className:"py-2.5 text-sm text-[var(--text-secondary)]",children:["#",s.id]}),e.jsx("td",{className:"max-w-xs truncate py-2.5 text-sm text-[var(--text-primary)]",children:s.description}),e.jsx("td",{className:"py-2.5 text-sm",style:{color:te[s.status]},children:s.status}),e.jsx("td",{className:"py-2.5 text-sm text-[var(--text-secondary)]",children:D(s.createdAt)})]},s.id))})]})})]})]}),e.jsx("div",{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-[13px] font-medium text-[var(--accent)]",children:t("projects.pipeline")}),e.jsx("div",{className:"mb-3 h-px bg-[var(--border)]"}),x!=null&&x.stages&&x.stages.length>0?e.jsx("div",{className:"flex flex-col items-center",children:x.stages.map((s,g)=>{var h,b;return e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-input)] px-3 py-2.5 cursor-pointer hover:bg-[var(--bg-secondary)]",style:{borderLeft:"3px solid var(--accent)"},onClick:()=>a(`/projects/${r.key}/pipeline`),children:[e.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--text-primary)]",children:s.name}),s.command&&e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)] truncate",children:["// ",s.command.split(`
|
|
7
|
-
`)[0].slice(0,40)]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[s.confirm&&e.jsx("span",{className:"rounded-[4px] px-2 py-0.5 text-[10px] font-medium text-[var(--warning)]",style:{backgroundColor:"rgba(245,158,11,0.12)"},children:t("projects.confirm_label")}),s.irreversible&&e.jsx("span",{className:"rounded-[4px] px-2 py-0.5 text-[10px] font-medium text-[var(--destructive)]",style:{backgroundColor:"rgba(239,68,68,0.12)"},children:t("pipeline.irreversible")})]})]}),((h=s.onFailure)==null?void 0:h.goto)&&e.jsxs("div",{className:"flex items-center justify-center gap-1.5 py-1",children:[e.jsx(J,{className:"h-3 w-3 text-[var(--warning)]"}),e.jsxs("span",{className:"text-[10px] text-[var(--warning)]",children:["onFailure.goto: ",s.onFailure.goto,", maxLoops: ",s.onFailure.maxLoops]})]}),g<x.stages.length-1&&!((b=s.onFailure)!=null&&b.goto)&&e.jsx("div",{className:"flex justify-center py-1",children:e.jsx(Z,{className:"h-3.5 w-3.5 text-[var(--text-muted)]"})})]},s.name)})}):e.jsx("div",{className:"py-6 text-center text-xs text-[var(--text-muted)]",children:t("projects.no_pipeline_configured")}),i&&e.jsx("button",{onClick:()=>a(`/projects/${r.key}/pipeline`),className:"mt-3 flex w-full items-center justify-center gap-1.5 py-2 text-xs text-[var(--accent)] hover:text-[var(--accent)]",children:t("projects.add_stage")})]})})]}),e.jsx(ee,{isOpen:I,onClose:()=>N(!1),onConfirm:O,projectName:r.name,loading:T}),e.jsx(V,{isOpen:$,onClose:()=>_(!1),projectKey:r.key,existingMemberIds:u.map(s=>s.developerId),onAdded:v}),e.jsx(z,{isOpen:!!m,onClose:()=>y(null),onConfirm:R,memberName:m?m.developerName??`#${m.developerId}`:"",loading:U})]}):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:t("projects.project_not_found")}),e.jsx("button",{onClick:()=>a("/projects"),className:"mt-4 rounded border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:t("projects.back_to_projects")})]})}function c({label:n,value:a,href:t}){return e.jsxs("div",{className:"flex items-center gap-3 py-1",children:[e.jsx("span",{className:"w-32 shrink-0 text-xs text-[var(--text-muted)]",children:n}),t?e.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"truncate text-sm text-[var(--accent)] hover:underline",children:a}):e.jsx("span",{className:"truncate text-sm text-[var(--text-primary)]",children:a})]})}export{de as default};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{c as L,a as E,r as a,j as e,f as z,d as D,h as R}from"./index-DJxZmj6O.js";import{G as h,A as b}from"./protocol-C5uQmiiB.js";import{S as F}from"./Select-CmUwVfWJ.js";import{E as G}from"./EmptyState-BOXPalWI.js";import{T as I}from"./Skeleton-0JE10nwo.js";import{P as H}from"./plus-Ry_MQV9O.js";/**
|
|
2
|
-
* @license lucide-react v0.469.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const O=L("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),v={width:"100%",padding:"0.5rem 0.75rem",backgroundColor:"var(--bg-input)",border:"1px solid var(--border)",borderRadius:"4px",color:"var(--text-primary)",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",outline:"none",boxSizing:"border-box"},p={display:"block",color:"var(--text-secondary)",fontSize:"0.7rem",marginBottom:"0.25rem",fontFamily:"'JetBrains Mono', monospace"};function J({isOpen:c,onClose:s,onCreated:u}){const{t:r}=E(),[n,l]=a.useState(""),[d,x]=a.useState(""),[i,g]=a.useState(""),[o,f]=a.useState(""),[m,S]=a.useState("main"),[k,N]=a.useState(h.GITHUB),[B,T]=a.useState(b.CLAUDE),[j,w]=a.useState(!1),[U,C]=a.useState("");a.useEffect(()=>{c&&A()},[c]);function A(){l(""),x(""),g(""),f(""),S("main"),N(h.GITHUB),T(b.CLAUDE),C("")}function _(){A(),s()}async function M(t){t.preventDefault(),C(""),w(!0);try{const y=await z.post("admin/projects",{json:{name:n,key:d,repoUrl:i,sshUrl:o||void 0,defaultBranch:m,gitPlatform:k,agentType:B}}).json();u(y),_()}catch(y){const P=y instanceof Error?y.message:r("projects.failed_to_create_project");C(P)}finally{w(!1)}}return c?e.jsx("div",{onClick:_,style:{position:"fixed",inset:0,zIndex:50,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--modal-backdrop, rgba(12,12,12,0.6))"},children:e.jsxs("div",{onClick:t=>t.stopPropagation(),style:{width:"100%",maxWidth:"480px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"1.5rem",fontFamily:"'JetBrains Mono', monospace"},children:[e.jsxs("div",{style:{marginBottom:"1.25rem"},children:[e.jsxs("div",{style:{color:"var(--accent)",fontSize:"0.875rem",fontWeight:600},children:["> ",r("projects.create_project")]}),e.jsx("div",{style:{color:"var(--text-muted)",fontSize:"0.7rem",marginTop:"0.25rem"},children:r("projects.add_project_desc")})]}),U&&e.jsx("div",{style:{marginBottom:"1rem",padding:"0.5rem 0.75rem",borderRadius:"4px",backgroundColor:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)",color:"var(--destructive)",fontSize:"0.7rem"},children:U}),e.jsxs("form",{onSubmit:M,style:{display:"flex",flexDirection:"column",gap:"0.875rem"},children:[e.jsxs("div",{children:[e.jsx("label",{style:p,children:r("projects.project_name")}),e.jsx("input",{type:"text",value:n,onChange:t=>l(t.target.value),placeholder:r("projects.project_name_placeholder"),required:!0,autoFocus:!0,style:v,onFocus:t=>t.target.style.borderColor="var(--accent)",onBlur:t=>t.target.style.borderColor="var(--border)"})]}),e.jsxs("div",{children:[e.jsx("label",{style:p,children:r("projects.project_key")}),e.jsx("input",{type:"text",value:d,onChange:t=>x(t.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"")),placeholder:r("projects.project_key_placeholder"),required:!0,style:v,onFocus:t=>t.target.style.borderColor="var(--accent)",onBlur:t=>t.target.style.borderColor="var(--border)"}),e.jsx("div",{style:{color:"var(--text-muted)",fontSize:"0.65rem",marginTop:"0.25rem"},children:r("projects.project_key_hint")})]}),e.jsxs("div",{children:[e.jsx("label",{style:p,children:r("projects.repo_url")}),e.jsx("input",{type:"text",value:i,onChange:t=>g(t.target.value),placeholder:r("projects.repo_url_placeholder"),required:!0,style:v,onFocus:t=>t.target.style.borderColor="var(--accent)",onBlur:t=>t.target.style.borderColor="var(--border)"})]}),e.jsxs("div",{children:[e.jsx("label",{style:p,children:r("projects.ssh_url")}),e.jsx("input",{type:"text",value:o,onChange:t=>f(t.target.value),placeholder:r("projects.ssh_url_placeholder"),style:v,onFocus:t=>t.target.style.borderColor="var(--accent)",onBlur:t=>t.target.style.borderColor="var(--border)"}),e.jsx("div",{style:{color:"var(--text-muted)",fontSize:"0.65rem",marginTop:"0.25rem"},children:r("projects.ssh_url_hint")})]}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:"0.75rem"},children:[e.jsxs("div",{children:[e.jsx("label",{style:p,children:r("projects.default_branch")}),e.jsx("input",{type:"text",value:m,onChange:t=>S(t.target.value),placeholder:r("projects.main"),style:v,onFocus:t=>t.target.style.borderColor="var(--accent)",onBlur:t=>t.target.style.borderColor="var(--border)"})]}),e.jsxs("div",{children:[e.jsx("label",{style:p,children:r("projects.git_platform")}),e.jsx(F,{value:k,onChange:t=>N(t),options:[{value:h.GITHUB,label:r("projects.github")},{value:h.GITLAB,label:r("projects.gitlab")},{value:h.GITEA,label:r("projects.gitea")}]})]}),e.jsxs("div",{children:[e.jsx("label",{style:p,children:r("projects.agent_type")}),e.jsx(F,{value:B,onChange:t=>T(t),options:[{value:b.CLAUDE,label:r("projects.claude")},{value:b.CURSOR,label:r("projects.cursor")},{value:b.CODEX,label:r("projects.codex")},{value:b.CUSTOM,label:r("projects.custom")}]})]})]}),e.jsxs("div",{style:{display:"flex",gap:"0.75rem",marginTop:"0.5rem"},children:[e.jsx("button",{type:"button",onClick:_,disabled:j,style:{flex:1,padding:"0.5rem",backgroundColor:"transparent",border:"1px solid var(--border)",borderRadius:"4px",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",cursor:"pointer",transition:"color 0.15s, border-color 0.15s"},className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:border-[var(--text-muted)]",children:r("common.cancel")}),e.jsx("button",{type:"submit",disabled:j||!n||!d||!i,style:{flex:1,padding:"0.5rem",backgroundColor:"var(--accent)",color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.75rem",fontWeight:600,fontFamily:"'JetBrains Mono', monospace",cursor:j||!n||!d||!i?"not-allowed":"pointer",opacity:j||!n||!d||!i?.7:1},children:r(j?"common.creating":"common.create")})]})]})]})}):null}function $(c){if(!c)return"-";const s=new Date(c).getTime();if(Number.isNaN(s))return"-";const u=Date.now()-s,r=Math.floor(u/1e3);if(r<60)return`${r}s ago`;const n=Math.floor(r/60);if(n<60)return`${n}m ago`;const l=Math.floor(n/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`}function Y(){const c=D(),{t:s}=E(),[u,r]=a.useState([]),[n,l]=a.useState(!0),[d,x]=a.useState(!1);R(a.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 font-medium text-black",children:[e.jsx(H,{className:"h-3.5 w-3.5"}),s("projects.create_project")]}),[s]));async function i(){l(!0);try{const o=await z.get("web/projects").json();r(o)}catch{}finally{l(!1)}}a.useEffect(()=>{i()},[]);function g(o){i()}return e.jsxs("div",{className:"mx-auto max-w-5xl px-6 py-8",children:[n?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(I,{rows:4})}):u.length===0?e.jsx(G,{icon:O,title:s("projects.no_projects_yet"),description:s("projects.create_first_project"),actionLabel:s("projects.create_project"),onAction:()=>x(!0)}):e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"grid grid-cols-[36px_90px_1fr_120px_60px_80px] gap-3 border-b border-[var(--border-row)] px-4 py-2.5 text-xs font-medium text-[var(--text-muted)]",children:[e.jsx("span",{children:"#"}),e.jsx("span",{children:s("projects.key")}),e.jsx("span",{children:s("projects.name")}),e.jsx("span",{children:s("projects.members")}),e.jsx("span",{children:s("projects.tasks_count")}),e.jsx("span",{children:s("projects.last_activity")})]}),u.map((o,f)=>e.jsxs("div",{onClick:()=>c(`/projects/${o.key}`),className:"grid cursor-pointer grid-cols-[36px_90px_1fr_120px_60px_80px] gap-3 border-b border-[var(--border-row)] px-4 py-3 last:border-b-0 hover:bg-[var(--bg-input)] transition-colors items-center",children:[e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:f+1}),e.jsx("span",{className:"truncate text-xs text-[var(--accent)]",children:o.key}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"block truncate text-xs text-[var(--text-primary)]",children:o.name}),e.jsxs("span",{className:"block truncate text-[10px] text-[var(--text-muted)]",children:[o.agentType," · ",o.repoUrl.replace(/^https?:\/\//,"").split("/").slice(-2).join("/")]})]}),e.jsx("div",{className:"flex items-center",children:e.jsxs("div",{className:"flex -space-x-1.5",children:[(o.members??[]).map(m=>e.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-full border-2 border-[var(--bg-card)] bg-[var(--accent)]/20 text-[9px] font-bold text-[var(--accent)]",title:m.name,children:m.name.charAt(0).toUpperCase()},m.id)),(o.memberCount??0)>5&&e.jsxs("div",{className:"flex h-6 w-6 items-center justify-center rounded-full border-2 border-[var(--bg-card)] bg-[var(--bg-input)] text-[9px] text-[var(--text-muted)]",children:["+",o.memberCount-5]})]})}),e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:o.taskCount??0}),e.jsx("span",{className:"text-[10px] text-[var(--text-muted)]",children:$(o.lastActivity??null)})]},o.key))]}),e.jsx(J,{isOpen:d,onClose:()=>x(!1),onCreated:g})]})}export{Y as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as b,r as s,f as h,j as e,C as v}from"./index-DJxZmj6O.js";import{C as f}from"./copy-Dd1cNNWz.js";function k({mode:l}){const{t:o}=b(),[n,d]=s.useState([]),[x,c]=s.useState(null),[u,i]=s.useState(!1);s.useEffect(()=>{h.get("web/profile/tokens").json().then(t=>{const r=t.filter(m=>m.status==="active");d(r),r.length>0&&c(r[0].id)}).catch(()=>{})},[]);const a=l==="cli"?"ov login --token <your-token>":'curl -H "authorization: bearer <your-token>" http://localhost:9000/api/web/tasks',p=s.useCallback(()=>{navigator.clipboard.writeText(a),i(!0),setTimeout(()=>i(!1),2e3)},[a]);return n.length===0?null:e.jsxs("div",{className:"mb-8 rounded-[4px] border border-[var(--accent)]/20 bg-[var(--bg-card)] p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:o("docs.quick_start_with_token")}),e.jsx("select",{value:x??"",onChange:t=>c(Number(t.target.value)),className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-2 py-1 text-xs text-[var(--text-primary)]",children:n.map(t=>e.jsx("option",{value:t.id,children:t.label},t.id))})]}),e.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-[4px] bg-[var(--bg-primary)] px-3 py-2",children:[e.jsx("code",{className:"text-xs text-[var(--accent)] break-all",children:a}),e.jsx("button",{onClick:p,className:"shrink-0 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:u?e.jsx(v,{size:14}):e.jsx(f,{size:14})})]}),e.jsx("p",{className:"mt-2 text-[10px] text-[var(--text-muted)]",children:o("docs.replace_token_hint")})]})}export{k as Q};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{c as f,r as c,j as t}from"./index-DJxZmj6O.js";/**
|
|
2
|
-
* @license lucide-react v0.469.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const b=f("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);function h({value:r,onChange:u,options:l,placeholder:x,disabled:a=!1,className:d=""}){var i;const[n,s]=c.useState(!1),o=c.useRef(null),m=((i=l.find(e=>e.value===r))==null?void 0:i.label)??x??"";return c.useEffect(()=>{function e(v){o.current&&!o.current.contains(v.target)&&s(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),t.jsxs("div",{ref:o,className:`relative ${d}`,children:[t.jsxs("button",{type:"button",disabled:a,onClick:()=>!a&&s(!n),className:`flex w-full items-center justify-between rounded-[4px] border bg-[var(--bg-input)] px-3 py-2 font-mono text-xs outline-none transition-colors ${n?"border-[var(--accent)] text-[var(--text-primary)]":"border-[var(--border)] text-[var(--text-primary)] hover:border-[var(--text-muted)]"} ${a?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[t.jsx("span",{className:r?"":"text-[var(--text-muted)]",children:m}),t.jsx(b,{size:12,className:`ml-2 shrink-0 text-[var(--text-muted)] transition-transform ${n?"rotate-180":""}`})]}),n&&t.jsx("div",{className:"absolute right-0 z-50 mt-1 max-h-48 min-w-full w-max overflow-auto rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] py-1 shadow-lg",children:l.map(e=>t.jsxs("button",{type:"button",onClick:()=>{u(e.value),s(!1)},className:`flex w-full items-center px-3 py-1.5 text-left font-mono text-xs transition-colors ${e.value===r?"bg-[var(--accent)]/10 text-[var(--accent)]":"text-[var(--text-secondary)] hover:bg-[var(--bg-input)] hover:text-[var(--text-primary)]"}`,children:[e.value===r&&t.jsx("span",{className:"mr-2 text-[var(--accent)]",children:">"}),e.label]},e.value))})]})}export{h as S};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{c as h,a as v,r,j as e,f as m,t as x}from"./index-DJxZmj6O.js";/**
|
|
2
|
-
* @license lucide-react v0.469.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const _=h("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),b=[{nameKey:"admin.scheduling",fields:[{key:"max_concurrent_tasks_per_machine",labelKey:"admin.max_concurrent_tasks",descKey:"admin.max_concurrent_tasks_desc",type:"number",placeholder:"3"},{key:"task_timeout_minutes",labelKey:"admin.task_timeout",descKey:"admin.task_timeout_desc",type:"number",placeholder:"120"}]},{nameKey:"admin.heartbeat",fields:[{key:"heartbeat_interval_seconds",labelKey:"admin.heartbeat_interval",descKey:"admin.heartbeat_interval_desc",type:"number",placeholder:"30"}]},{nameKey:"admin.output",fields:[{key:"machine_offline_threshold_seconds",labelKey:"admin.machine_offline_threshold",descKey:"admin.machine_offline_threshold_desc",type:"number",placeholder:"90"}]},{nameKey:"admin.defaults",fields:[{key:"default_agent_type",labelKey:"admin.default_agent_type",descKey:"admin.default_agent_type_desc",type:"text",placeholder:"claude-code"},{key:"server_url",labelKey:"admin.server_url",descKey:"admin.server_url_desc",type:"text",placeholder:"https://overlord.example.com"}]}];function f(){const{t:a}=v(),[i,d]=r.useState({}),[c,u]=r.useState(!0),[l,o]=r.useState(!1);r.useEffect(()=>{async function s(){try{const t=await m.get("admin/settings").json();d(t)}catch{}finally{u(!1)}}s()},[]);const y=(s,t)=>{d(n=>({...n,[s]:t}))},p=async()=>{o(!0);try{const s=await m.put("admin/settings",{json:i}).json();d(s),x.success(a("admin.settings_saved"))}catch{x.error(a("admin.failed_to_save_settings"))}finally{o(!1)}};return e.jsxs("div",{className:"font-mono",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("admin.settings_title")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("admin.settings_subtitle")})]}),c?e.jsx("div",{className:"py-16 text-center text-xs text-[var(--text-muted)]",children:a("admin.loading_settings")}):e.jsxs("div",{className:"space-y-6",children:[b.map(s=>e.jsxs("div",{children:[e.jsx("h3",{className:"mb-3 text-xs font-medium text-[var(--text-primary)]",children:a(s.nameKey)}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-4",children:s.fields.map(t=>e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-primary)]",children:a(t.labelKey)}),e.jsx("p",{className:"mb-2 text-[10px] text-[var(--text-muted)]",children:a(t.descKey)}),e.jsx("input",{type:"text",inputMode:t.type==="number"?"numeric":void 0,pattern:t.type==="number"?"[0-9]*":void 0,value:i[t.key]??"",onChange:n=>{t.type==="number"&&n.target.value&&!/^\d*$/.test(n.target.value)||y(t.key,n.target.value)},placeholder:t.placeholder,className:"w-full max-w-[200px] 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)]"})]},t.key))})]},s.nameKey)),e.jsx("div",{children:e.jsxs("button",{type:"button",onClick:p,disabled:l||c,className:"flex items-center gap-2 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs font-medium text-black transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:[e.jsx(_,{size:12}),a(l?"common.saving":"admin.save_settings")]})})]})]})}export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as c,j as e,r as n,C as o}from"./index-DJxZmj6O.js";import{E as i}from"./external-link-F-d1_j4T.js";import{C as d}from"./copy-Dd1cNNWz.js";function a({text:t}){const[s,r]=n.useState(!1);return e.jsx("button",{onClick:async()=>{await navigator.clipboard.writeText(t),r(!0),setTimeout(()=>r(!1),2e3)},className:"rounded-[4px] p-1 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",children:s?e.jsx(o,{className:"h-3 w-3 text-[var(--accent)]"}):e.jsx(d,{className:"h-3 w-3"})})}function x({text:t}){return e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-primary)] px-3 py-2",children:[e.jsx("code",{className:"text-xs text-[var(--accent)]",children:t}),e.jsx(a,{text:t})]})}const l=[{action:"create tasks",desc:"describe what you want done, overlord dispatches to a worker"},{action:"list & monitor tasks",desc:"check status, read execution logs, track progress"},{action:"cancel & retry tasks",desc:"manage task lifecycle"},{action:"confirm pipeline stages",desc:"approve or provide input for suspended stages"},{action:"manage projects",desc:"list projects, view members"},{action:"check cluster health",desc:"see machine status, online workers, queue depth"},{action:"search",desc:"find tasks, projects, and machines by keyword"},{action:"read notifications",desc:"check and clear your notification inbox"}],m=['create a task in project "frontend" to fix the login page styling',"what tasks are running right now?","show me the logs for task 42","how many machines are online?","cancel task 15"],p=[{name:"claude code",url:"https://claude.com/claude-code"},{name:"cursor",url:"https://cursor.com"},{name:"windsurf",url:"https://windsurf.com"},{name:"codex",url:"https://openai.com/codex"}];function b(){c();const t=typeof window<"u"?window.location.origin:"https://your-server";return e.jsxs("div",{className:"mx-auto max-w-4xl px-6 py-8 font-mono lowercase",children:[e.jsx("div",{className:"mb-8",children:e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"// use overlord from your ai coding assistant — claude code, cursor, windsurf, codex, and more. install the skill and your assistant can create tasks, monitor execution, and manage your fleet."})}),e.jsxs("div",{className:"mb-8 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"// install"}),e.jsx(x,{text:"npx skills add overlord-run/skill"})]}),e.jsxs("div",{className:"mb-8 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"// configure — set these environment variables"}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-primary)] px-3 py-2",children:[e.jsxs("code",{className:"text-xs text-[var(--text-primary)]",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"export "}),"OVERLORD_SERVER=",e.jsx("span",{className:"text-[var(--accent)]",children:t})]}),e.jsx(a,{text:`export OVERLORD_SERVER=${t}`})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-primary)] px-3 py-2",children:[e.jsxs("code",{className:"text-xs text-[var(--text-primary)]",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"export "}),"OVERLORD_TOKEN=",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"your-token"})]}),e.jsx(a,{text:"export OVERLORD_TOKEN=your-token"})]})]}),e.jsxs("p",{className:"text-[10px] text-[var(--text-muted)]",children:["// create a token at ",e.jsx("a",{href:"/access-tokens",className:"text-[var(--accent)] hover:underline",children:"/access-tokens"})]})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"mb-4 text-sm text-[var(--accent)]",children:"> capabilities"}),e.jsx("div",{className:"space-y-2",children:l.map(s=>e.jsxs("div",{className:"flex items-start gap-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-4 py-3",children:[e.jsx("span",{className:"shrink-0 text-xs font-medium text-[var(--text-primary)]",children:s.action}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["// ",s.desc]})]},s.action))})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"mb-4 text-sm text-[var(--accent)]",children:"> example usage"}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-2",children:[e.jsx("p",{className:"mb-3 text-xs text-[var(--text-muted)]",children:"// just ask your ai agent naturally"}),m.map(s=>e.jsx("div",{className:"rounded-[4px] bg-[var(--bg-primary)] px-3 py-2",children:e.jsxs("code",{className:"text-xs text-[var(--text-secondary)]",children:[e.jsx("span",{className:"text-[var(--accent)]",children:"> "}),s]})},s))]})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"mb-4 text-sm text-[var(--accent)]",children:"> compatible tools"}),e.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:p.map(s=>e.jsxs("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-1.5 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2.5 text-xs text-[var(--text-primary)] transition-colors hover:border-[var(--accent)]",children:[s.name,e.jsx(i,{className:"h-3 w-3 text-[var(--text-muted)]"})]},s.name))}),e.jsx("p",{className:"mt-2 text-[10px] text-[var(--text-muted)]",children:"// and any ai coding assistant that supports the skills protocol"})]}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["// open source:"," ",e.jsx("a",{href:"https://github.com/overlord-run/skill",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--accent)] hover:underline",children:"github.com/overlord-run/skill"})]})})]})}export{b as default};
|