lockbot 3.0.0__tar.gz → 3.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. {lockbot-3.0.0/python/lockbot.egg-info → lockbot-3.0.2}/PKG-INFO +28 -54
  2. {lockbot-3.0.0 → lockbot-3.0.2}/README.md +26 -52
  3. {lockbot-3.0.0 → lockbot-3.0.2}/pyproject.toml +2 -2
  4. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/agent_skill/SKILL.md +1 -1
  5. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/discovery.py +1 -1
  6. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/event_log.py +16 -3
  7. {lockbot-3.0.0 → lockbot-3.0.2/python/lockbot.egg-info}/PKG-INFO +28 -54
  8. {lockbot-3.0.0 → lockbot-3.0.2}/LICENSE +0 -0
  9. {lockbot-3.0.0 → lockbot-3.0.2}/MANIFEST.in +0 -0
  10. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/__init__.py +0 -0
  11. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/agent_client/__init__.py +0 -0
  12. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/agent_client/handoff.py +0 -0
  13. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/__init__.py +0 -0
  14. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/__init__.py +0 -0
  15. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/admin/__init__.py +0 -0
  16. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/admin/router.py +0 -0
  17. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/audit/__init__.py +0 -0
  18. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/audit/models.py +0 -0
  19. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/audit/router.py +0 -0
  20. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/audit/service.py +0 -0
  21. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/auth/__init__.py +0 -0
  22. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/auth/dependencies.py +0 -0
  23. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/auth/models.py +0 -0
  24. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/auth/router.py +0 -0
  25. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/auth/schemas.py +0 -0
  26. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/backup/__init__.py +0 -0
  27. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/backup/router.py +0 -0
  28. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/backup/scheduler.py +0 -0
  29. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/backup/service.py +0 -0
  30. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/bot_audit/__init__.py +0 -0
  31. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/bot_audit/models.py +0 -0
  32. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/bot_audit/router.py +0 -0
  33. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/bot_audit/service.py +0 -0
  34. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/bots/__init__.py +0 -0
  35. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/bots/datasource.py +0 -0
  36. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/bots/encryption.py +0 -0
  37. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/bots/manager.py +0 -0
  38. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/bots/metrics_access.py +0 -0
  39. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/bots/metrics_signers.py +0 -0
  40. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/bots/models.py +0 -0
  41. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/bots/router.py +0 -0
  42. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/bots/schemas.py +0 -0
  43. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/bots/webhook_handler.py +0 -0
  44. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/broadcast/__init__.py +0 -0
  45. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/broadcast/models.py +0 -0
  46. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/broadcast/router.py +0 -0
  47. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/broadcast/service.py +0 -0
  48. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/config.py +0 -0
  49. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/database.py +0 -0
  50. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/deployment.py +0 -0
  51. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/feishu/__init__.py +0 -0
  52. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/feishu/backup.py +0 -0
  53. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/feishu/connectors.py +0 -0
  54. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/feishu/display_names.py +0 -0
  55. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/feishu/models.py +0 -0
  56. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/feishu/proxy_settings.py +0 -0
  57. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/feishu/router.py +0 -0
  58. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/feishu/service.py +0 -0
  59. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/feishu/traffic.py +0 -0
  60. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/feishu/unbound.py +0 -0
  61. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/feishu/ws_process.py +0 -0
  62. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/feishu/ws_proxy.py +0 -0
  63. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/logs/__init__.py +0 -0
  64. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/main.py +0 -0
  65. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/managed_paths.py +0 -0
  66. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/op_skill/SKILL.md +0 -0
  67. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/rate_limit.py +0 -0
  68. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/__init__.py +0 -0
  69. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/activity.py +0 -0
  70. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/commands.py +0 -0
  71. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/errors.py +0 -0
  72. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/ingress.py +0 -0
  73. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/lease_history.py +0 -0
  74. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/notification_queue.py +0 -0
  75. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/notifications.py +0 -0
  76. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/observability.py +0 -0
  77. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/op_skill.py +0 -0
  78. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/operator.py +0 -0
  79. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/privacy.py +0 -0
  80. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/resources.py +0 -0
  81. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/rules.py +0 -0
  82. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/skill.py +0 -0
  83. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/snapshot.py +0 -0
  84. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/sources.py +0 -0
  85. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/traffic.py +0 -0
  86. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/usage.py +0 -0
  87. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/usage_cleanup.py +0 -0
  88. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/versioning.py +0 -0
  89. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/view_links.py +0 -0
  90. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_api/views.py +0 -0
  91. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_auth/__init__.py +0 -0
  92. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_auth/authority.py +0 -0
  93. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_auth/credentials.py +0 -0
  94. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_auth/dependencies.py +0 -0
  95. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_auth/http_errors.py +0 -0
  96. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_auth/models.py +0 -0
  97. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_auth/pending.py +0 -0
  98. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_auth/router.py +0 -0
  99. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/resource_auth/service.py +0 -0
  100. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/service_traffic.py +0 -0
  101. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/settings/__init__.py +0 -0
  102. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/settings/models.py +0 -0
  103. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/settings/router.py +0 -0
  104. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/sqlite_paths.py +0 -0
  105. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/state_migration.py +0 -0
  106. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/state_ownership.py +0 -0
  107. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/backend/app/static.py +0 -0
  108. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/__init__.py +0 -0
  109. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/base_bot.py +0 -0
  110. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/bot_instance.py +0 -0
  111. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/command_context.py +0 -0
  112. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/config.py +0 -0
  113. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/device_bot.py +0 -0
  114. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/device_usage_alert.py +0 -0
  115. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/device_usage_utils.py +0 -0
  116. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/handler.py +0 -0
  117. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/i18n/__init__.py +0 -0
  118. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/i18n/en.py +0 -0
  119. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/i18n/zh.py +0 -0
  120. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/io.py +0 -0
  121. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/message_adapter.py +0 -0
  122. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/msg_utils.py +0 -0
  123. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/node_bot.py +0 -0
  124. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/platforms/__init__.py +0 -0
  125. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/platforms/feishu.py +0 -0
  126. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/platforms/feishu_events.py +0 -0
  127. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/platforms/feishu_proxy.py +0 -0
  128. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/platforms/infoflow.py +0 -0
  129. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/platforms/registry.py +0 -0
  130. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/queue_bot.py +0 -0
  131. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/queue_device_bot.py +0 -0
  132. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/request.py +0 -0
  133. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/resource_policy.py +0 -0
  134. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/scheduler.py +0 -0
  135. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/core/utils.py +0 -0
  136. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/metrics/__init__.py +0 -0
  137. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/metrics/exporter.py +0 -0
  138. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot/metrics/gateway.py +0 -0
  139. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot.egg-info/SOURCES.txt +0 -0
  140. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot.egg-info/dependency_links.txt +0 -0
  141. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot.egg-info/requires.txt +0 -0
  142. {lockbot-3.0.0 → lockbot-3.0.2}/python/lockbot.egg-info/top_level.txt +0 -0
  143. {lockbot-3.0.0 → lockbot-3.0.2}/setup.cfg +0 -0
  144. {lockbot-3.0.0 → lockbot-3.0.2}/tests/test_op_history_report.py +0 -0
  145. {lockbot-3.0.0 → lockbot-3.0.2}/tools/create_super_admin.py +0 -0
  146. {lockbot-3.0.0 → lockbot-3.0.2}/tools/deployment_preflight.py +0 -0
  147. {lockbot-3.0.0 → lockbot-3.0.2}/tools/gen_keys.py +0 -0
  148. {lockbot-3.0.0 → lockbot-3.0.2}/tools/reset_super_admin_password.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lockbot
3
- Version: 3.0.0
4
- Summary: Cluster resource management bot for IM platforms
3
+ Version: 3.0.2
4
+ Summary: Cluster resource management and queuing for Infoflow and Feishu
5
5
  Author-email: Jianbang Yang <yangjianbang112@gmail.com>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://github.com/dynamicheart/lockbot
@@ -46,7 +46,7 @@ Dynamic: license-file
46
46
 
47
47
  # lockbot
48
48
 
49
- Cluster resource management bot for IM platforms (e.g., Baidu InfoFlow).
49
+ Cluster resource management and queuing for Infoflow and Feishu.
50
50
 
51
51
  Lock and unlock GPU devices, cluster nodes, and queue slots via chat commands.
52
52
  Runs as a multi-bot platform with FastAPI and a Vue.js frontend.
@@ -63,73 +63,47 @@ Runs as a multi-bot platform with FastAPI and a Vue.js frontend.
63
63
  - **Device Lock Bot** — Lock/unlock individual GPUs or devices on a cluster
64
64
  - **Node Lock Bot** — Lock/unlock entire cluster nodes
65
65
  - **Queue Bot** — Manage a queue for resource allocation with booking and preemption
66
+ - **Device Queue Bot** — Book and queue for individual cards with `QUEUE_DEVICE`
67
+ - **Agent integration** — Personal authorization, resource discovery and versioned Skills
68
+ - **Utilization** — Optional browser/Agent access to independent Prometheus data sources
66
69
  - **Platform Mode** — Web UI (Vue 3 + Element Plus) for managing multiple bots, user authentication (JWT), role-based access control, and real-time logs
67
70
  - **State Persistence** — Bot state survives restarts (JSON file)
68
71
  - **Bilingual** — English and Chinese UI and bot responses
69
72
 
70
- ## Quick Start — Platform Mode (Recommended)
73
+ ## Quick Start — Docker
71
74
 
72
- Full management platform with Web UI, multi-bot orchestration, user authentication, and admin panel.
73
-
74
- 1. Install:
75
-
76
- ```bash
77
- pip install lockbot
78
- ```
79
-
80
- 2. Set environment variables:
75
+ The published image includes the web UI and Feishu dependencies. Prepare a private environment file with `JWT_SECRET` and `ENCRYPTION_KEY` following the [deployment guide](docs/agents/deployment/AGENTS.md). For upgrades, keep the original keys and data volume.
81
76
 
82
77
  ```bash
83
- export JWT_SECRET="your-jwt-secret"
84
- export ENCRYPTION_KEY="your-fernet-key" # python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
85
- export DEV_MODE="true" # dev mode, auto-create admin user
86
- ```
87
-
88
- 3. Start:
89
-
90
- ```bash
91
- # Backend
92
- uvicorn lockbot.backend.app.main:app --host 0.0.0.0 --port 8000 --reload
93
-
94
- # Frontend (another terminal)
95
- cd frontend && npm install && npm run dev
96
- ```
97
-
98
- 4. Open `http://localhost:8000` in your browser.
99
-
100
- ### Docker
101
-
102
- ```bash
103
- # 1. Generate ENCRYPTION_KEY and JWT_SECRET
104
- python tools/gen_keys.py
105
-
106
- # 2. Pull pre-built image (or build from source)
107
- docker pull ghcr.io/dynamicheart/lockbot:latest
108
- # docker build -f docker/Dockerfile -t lockbot .
109
-
110
- # 3. Run (replace the keys with generated values)
78
+ docker pull ghcr.io/dynamicheart/lockbot:v3.0.0
111
79
  docker run -d --name lockbot -p 8000:8000 \
112
- -e JWT_SECRET=your-secret \
113
- -e ENCRYPTION_KEY=your-fernet-key \
80
+ --env-file /private/path/lockbot.env \
114
81
  -v lockbot-data:/data \
115
- ghcr.io/dynamicheart/lockbot:latest
82
+ ghcr.io/dynamicheart/lockbot:v3.0.0
116
83
 
117
- # 4. Create super_admin (password auto-generated and printed)
84
+ # New installation only: create the initial super administrator interactively.
118
85
  docker exec -it lockbot python tools/create_super_admin.py --username admin --email admin@example.com
119
86
  ```
120
87
 
121
- > **Data persistence**: All data (SQLite DB, bot state files) stored under `/data`. Override with `DATA_DIR` env var.
88
+ Open `http://localhost:8000`. Data persists under `/data`; select the intended host port without replacing an upgrade's existing mount. Run a single process/instance per data directory.
89
+
90
+ - [Agent-assisted deployment and upgrades](docs/agents/deployment/AGENTS.md), including environment validation and a Compose template
91
+ - [Infoflow and Feishu setup](docs/agents/platforms/AGENTS.md) and [illustrated Feishu guide](docs/usage/feishu-setup.md)
92
+ - [Agent API and Skill](docs/agent-api/SKILL.md)
93
+ - [Independent telemetry deployment](docs/usage/telemetry-deployment.md) and [browser utilization](docs/usage/browser-utilization.md)
94
+
95
+ In Feishu, one enterprise application can serve multiple resource groups, with a separate resource bot per group. Direct messages are unsupported. Platform credentials and users remain separate from Infoflow; copying configuration does not share live locks or authorizations.
122
96
 
123
97
  ## Bot Configuration
124
98
 
125
99
  | Key | Description | Default |
126
100
  |---|---|---|
127
- | `BOT_TYPE` | `DEVICE`, `NODE`, or `QUEUE` | (required) |
101
+ | `BOT_TYPE` | `NODE`, `DEVICE`, `QUEUE`, or `QUEUE_DEVICE` | (required) |
128
102
  | `BOT_NAME` | Bot instance name | `demo_bot` |
129
103
  | `CLUSTER_CONFIGS` | Cluster layout (dict or list) | `{}` |
130
- | `TOKEN` | Bot signature verification token | `""` |
131
- | `AESKEY` | Message decryption AES key | `""` |
132
- | `WEBHOOK_URL` | Message webhook URL | `""` |
104
+ | `TOKEN` | Infoflow signature verification token | `""` |
105
+ | `AESKEY` | Infoflow message decryption AES key | `""` |
106
+ | `WEBHOOK_URL` | Infoflow message webhook URL | `""` |
133
107
  | `DEFAULT_DURATION` | Default lock duration (seconds) | `7200` (2h) |
134
108
  | `MAX_LOCK_DURATION` | Max lock duration (seconds) | `-1` (unlimited) |
135
109
  | `EARLY_NOTIFY` | Notify before lock expiry | `false` |
@@ -158,7 +132,7 @@ See `python/lockbot/core/config.py` for the full configuration reference.
158
132
 
159
133
  ```bash
160
134
  # Install dependencies
161
- pip install -e ".[dev]"
135
+ pip install -e ".[dev,feishu]"
162
136
  cd frontend && npm install && cd ..
163
137
 
164
138
  # Start backend (port 8002, hot-reload)
@@ -168,13 +142,13 @@ bash scripts/dev/backend.sh
168
142
  bash scripts/dev/frontend.sh
169
143
  ```
170
144
 
171
- Both servers support hot-reload — code changes take effect automatically.
145
+ Open the frontend at `http://localhost:8001`; it proxies API requests to port 8002. These hot-reload scripts are for development, not production. New development targets `main`.
172
146
 
173
147
  ### Testing
174
148
 
175
149
  ```bash
176
- # Run tests
177
- pytest
150
+ # Run tests with file-isolated parallel workers
151
+ pytest -n auto --maxprocesses=4 --dist=loadfile
178
152
 
179
153
  # Lint + format check
180
154
  ruff check python/ tests/
@@ -1,6 +1,6 @@
1
1
  # lockbot
2
2
 
3
- Cluster resource management bot for IM platforms (e.g., Baidu InfoFlow).
3
+ Cluster resource management and queuing for Infoflow and Feishu.
4
4
 
5
5
  Lock and unlock GPU devices, cluster nodes, and queue slots via chat commands.
6
6
  Runs as a multi-bot platform with FastAPI and a Vue.js frontend.
@@ -17,73 +17,47 @@ Runs as a multi-bot platform with FastAPI and a Vue.js frontend.
17
17
  - **Device Lock Bot** — Lock/unlock individual GPUs or devices on a cluster
18
18
  - **Node Lock Bot** — Lock/unlock entire cluster nodes
19
19
  - **Queue Bot** — Manage a queue for resource allocation with booking and preemption
20
+ - **Device Queue Bot** — Book and queue for individual cards with `QUEUE_DEVICE`
21
+ - **Agent integration** — Personal authorization, resource discovery and versioned Skills
22
+ - **Utilization** — Optional browser/Agent access to independent Prometheus data sources
20
23
  - **Platform Mode** — Web UI (Vue 3 + Element Plus) for managing multiple bots, user authentication (JWT), role-based access control, and real-time logs
21
24
  - **State Persistence** — Bot state survives restarts (JSON file)
22
25
  - **Bilingual** — English and Chinese UI and bot responses
23
26
 
24
- ## Quick Start — Platform Mode (Recommended)
27
+ ## Quick Start — Docker
25
28
 
26
- Full management platform with Web UI, multi-bot orchestration, user authentication, and admin panel.
27
-
28
- 1. Install:
29
-
30
- ```bash
31
- pip install lockbot
32
- ```
33
-
34
- 2. Set environment variables:
29
+ The published image includes the web UI and Feishu dependencies. Prepare a private environment file with `JWT_SECRET` and `ENCRYPTION_KEY` following the [deployment guide](docs/agents/deployment/AGENTS.md). For upgrades, keep the original keys and data volume.
35
30
 
36
31
  ```bash
37
- export JWT_SECRET="your-jwt-secret"
38
- export ENCRYPTION_KEY="your-fernet-key" # python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
39
- export DEV_MODE="true" # dev mode, auto-create admin user
40
- ```
41
-
42
- 3. Start:
43
-
44
- ```bash
45
- # Backend
46
- uvicorn lockbot.backend.app.main:app --host 0.0.0.0 --port 8000 --reload
47
-
48
- # Frontend (another terminal)
49
- cd frontend && npm install && npm run dev
50
- ```
51
-
52
- 4. Open `http://localhost:8000` in your browser.
53
-
54
- ### Docker
55
-
56
- ```bash
57
- # 1. Generate ENCRYPTION_KEY and JWT_SECRET
58
- python tools/gen_keys.py
59
-
60
- # 2. Pull pre-built image (or build from source)
61
- docker pull ghcr.io/dynamicheart/lockbot:latest
62
- # docker build -f docker/Dockerfile -t lockbot .
63
-
64
- # 3. Run (replace the keys with generated values)
32
+ docker pull ghcr.io/dynamicheart/lockbot:v3.0.0
65
33
  docker run -d --name lockbot -p 8000:8000 \
66
- -e JWT_SECRET=your-secret \
67
- -e ENCRYPTION_KEY=your-fernet-key \
34
+ --env-file /private/path/lockbot.env \
68
35
  -v lockbot-data:/data \
69
- ghcr.io/dynamicheart/lockbot:latest
36
+ ghcr.io/dynamicheart/lockbot:v3.0.0
70
37
 
71
- # 4. Create super_admin (password auto-generated and printed)
38
+ # New installation only: create the initial super administrator interactively.
72
39
  docker exec -it lockbot python tools/create_super_admin.py --username admin --email admin@example.com
73
40
  ```
74
41
 
75
- > **Data persistence**: All data (SQLite DB, bot state files) stored under `/data`. Override with `DATA_DIR` env var.
42
+ Open `http://localhost:8000`. Data persists under `/data`; select the intended host port without replacing an upgrade's existing mount. Run a single process/instance per data directory.
43
+
44
+ - [Agent-assisted deployment and upgrades](docs/agents/deployment/AGENTS.md), including environment validation and a Compose template
45
+ - [Infoflow and Feishu setup](docs/agents/platforms/AGENTS.md) and [illustrated Feishu guide](docs/usage/feishu-setup.md)
46
+ - [Agent API and Skill](docs/agent-api/SKILL.md)
47
+ - [Independent telemetry deployment](docs/usage/telemetry-deployment.md) and [browser utilization](docs/usage/browser-utilization.md)
48
+
49
+ In Feishu, one enterprise application can serve multiple resource groups, with a separate resource bot per group. Direct messages are unsupported. Platform credentials and users remain separate from Infoflow; copying configuration does not share live locks or authorizations.
76
50
 
77
51
  ## Bot Configuration
78
52
 
79
53
  | Key | Description | Default |
80
54
  |---|---|---|
81
- | `BOT_TYPE` | `DEVICE`, `NODE`, or `QUEUE` | (required) |
55
+ | `BOT_TYPE` | `NODE`, `DEVICE`, `QUEUE`, or `QUEUE_DEVICE` | (required) |
82
56
  | `BOT_NAME` | Bot instance name | `demo_bot` |
83
57
  | `CLUSTER_CONFIGS` | Cluster layout (dict or list) | `{}` |
84
- | `TOKEN` | Bot signature verification token | `""` |
85
- | `AESKEY` | Message decryption AES key | `""` |
86
- | `WEBHOOK_URL` | Message webhook URL | `""` |
58
+ | `TOKEN` | Infoflow signature verification token | `""` |
59
+ | `AESKEY` | Infoflow message decryption AES key | `""` |
60
+ | `WEBHOOK_URL` | Infoflow message webhook URL | `""` |
87
61
  | `DEFAULT_DURATION` | Default lock duration (seconds) | `7200` (2h) |
88
62
  | `MAX_LOCK_DURATION` | Max lock duration (seconds) | `-1` (unlimited) |
89
63
  | `EARLY_NOTIFY` | Notify before lock expiry | `false` |
@@ -112,7 +86,7 @@ See `python/lockbot/core/config.py` for the full configuration reference.
112
86
 
113
87
  ```bash
114
88
  # Install dependencies
115
- pip install -e ".[dev]"
89
+ pip install -e ".[dev,feishu]"
116
90
  cd frontend && npm install && cd ..
117
91
 
118
92
  # Start backend (port 8002, hot-reload)
@@ -122,13 +96,13 @@ bash scripts/dev/backend.sh
122
96
  bash scripts/dev/frontend.sh
123
97
  ```
124
98
 
125
- Both servers support hot-reload — code changes take effect automatically.
99
+ Open the frontend at `http://localhost:8001`; it proxies API requests to port 8002. These hot-reload scripts are for development, not production. New development targets `main`.
126
100
 
127
101
  ### Testing
128
102
 
129
103
  ```bash
130
- # Run tests
131
- pytest
104
+ # Run tests with file-isolated parallel workers
105
+ pytest -n auto --maxprocesses=4 --dist=loadfile
132
106
 
133
107
  # Lint + format check
134
108
  ruff check python/ tests/
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "lockbot"
7
- version = "3.0.0"
8
- description = "Cluster resource management bot for IM platforms"
7
+ version = "3.0.2"
8
+ description = "Cluster resource management and queuing for Infoflow and Feishu"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
11
11
  requires-python = ">=3.10"
@@ -597,7 +597,7 @@ outside the child's writable state; check the final encoded payload against it r
597
597
  trusting a child summary. Default to command-only, allow public categories only under an
598
598
  explicit policy, and send private fields only when that policy and current server capability
599
599
  both permit them. A changed scope/policy means stop, never try another key or replay a command.
600
- An optional stdlib [handoff/payload-gate reference](https://github.com/dynamicheart/lockbot/blob/release/2.x/docs/usage/agent-handoff.md)
600
+ An optional stdlib [handoff/payload-gate reference](https://github.com/dynamicheart/lockbot/blob/main/docs/usage/agent-handoff.md)
601
601
  provides executable checks and an offline example; clients may implement equivalent checks
602
602
  without installing a Python SDK. Lease evidence uses real actor/start time, never Agent labels.
603
603
 
@@ -148,7 +148,7 @@ def _context_payload(request, response, db, row):
148
148
  "access": issue_metrics_access(db, bot, expires_at=row.credential_expires_at)
149
149
  if bot.resource_auth_enabled
150
150
  else None,
151
- "guide_url": "https://github.com/dynamicheart/lockbot/blob/release/2.x/docs/usage/browser-utilization.md",
151
+ "guide_url": "https://github.com/dynamicheart/lockbot/blob/main/docs/usage/browser-utilization.md",
152
152
  }
153
153
  if public_datasource(bot)
154
154
  else None,
@@ -315,10 +315,23 @@ def read_history(bot_id, *, limit=25, cursor=None, query="", private=False, stre
315
315
  )
316
316
  if isinstance(row.get("command"), str):
317
317
  row["command"] = redact_command_text(row["command"])
318
- if not private:
319
- from lockbot.backend.app.resource_api.privacy import public_event
318
+ from lockbot.backend.app.resource_api.privacy import public_event
320
319
 
321
- row = public_event(row)
320
+ public = public_event(row)
321
+ if private:
322
+ # Labels always come from the validated catalog, never legacy prose.
323
+ # Preserve private details only in this already-authorized projection.
324
+ for field in (
325
+ "task_category",
326
+ "public_task",
327
+ "previous_task_category",
328
+ "previous_public_task",
329
+ ):
330
+ row.pop(field, None)
331
+ if field in public:
332
+ row[field] = public[field]
333
+ else:
334
+ row = public
322
335
  if needle and needle not in json.dumps(row, ensure_ascii=False).casefold():
323
336
  continue
324
337
  row["id"] = f"{inode}:{position}"
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lockbot
3
- Version: 3.0.0
4
- Summary: Cluster resource management bot for IM platforms
3
+ Version: 3.0.2
4
+ Summary: Cluster resource management and queuing for Infoflow and Feishu
5
5
  Author-email: Jianbang Yang <yangjianbang112@gmail.com>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://github.com/dynamicheart/lockbot
@@ -46,7 +46,7 @@ Dynamic: license-file
46
46
 
47
47
  # lockbot
48
48
 
49
- Cluster resource management bot for IM platforms (e.g., Baidu InfoFlow).
49
+ Cluster resource management and queuing for Infoflow and Feishu.
50
50
 
51
51
  Lock and unlock GPU devices, cluster nodes, and queue slots via chat commands.
52
52
  Runs as a multi-bot platform with FastAPI and a Vue.js frontend.
@@ -63,73 +63,47 @@ Runs as a multi-bot platform with FastAPI and a Vue.js frontend.
63
63
  - **Device Lock Bot** — Lock/unlock individual GPUs or devices on a cluster
64
64
  - **Node Lock Bot** — Lock/unlock entire cluster nodes
65
65
  - **Queue Bot** — Manage a queue for resource allocation with booking and preemption
66
+ - **Device Queue Bot** — Book and queue for individual cards with `QUEUE_DEVICE`
67
+ - **Agent integration** — Personal authorization, resource discovery and versioned Skills
68
+ - **Utilization** — Optional browser/Agent access to independent Prometheus data sources
66
69
  - **Platform Mode** — Web UI (Vue 3 + Element Plus) for managing multiple bots, user authentication (JWT), role-based access control, and real-time logs
67
70
  - **State Persistence** — Bot state survives restarts (JSON file)
68
71
  - **Bilingual** — English and Chinese UI and bot responses
69
72
 
70
- ## Quick Start — Platform Mode (Recommended)
73
+ ## Quick Start — Docker
71
74
 
72
- Full management platform with Web UI, multi-bot orchestration, user authentication, and admin panel.
73
-
74
- 1. Install:
75
-
76
- ```bash
77
- pip install lockbot
78
- ```
79
-
80
- 2. Set environment variables:
75
+ The published image includes the web UI and Feishu dependencies. Prepare a private environment file with `JWT_SECRET` and `ENCRYPTION_KEY` following the [deployment guide](docs/agents/deployment/AGENTS.md). For upgrades, keep the original keys and data volume.
81
76
 
82
77
  ```bash
83
- export JWT_SECRET="your-jwt-secret"
84
- export ENCRYPTION_KEY="your-fernet-key" # python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
85
- export DEV_MODE="true" # dev mode, auto-create admin user
86
- ```
87
-
88
- 3. Start:
89
-
90
- ```bash
91
- # Backend
92
- uvicorn lockbot.backend.app.main:app --host 0.0.0.0 --port 8000 --reload
93
-
94
- # Frontend (another terminal)
95
- cd frontend && npm install && npm run dev
96
- ```
97
-
98
- 4. Open `http://localhost:8000` in your browser.
99
-
100
- ### Docker
101
-
102
- ```bash
103
- # 1. Generate ENCRYPTION_KEY and JWT_SECRET
104
- python tools/gen_keys.py
105
-
106
- # 2. Pull pre-built image (or build from source)
107
- docker pull ghcr.io/dynamicheart/lockbot:latest
108
- # docker build -f docker/Dockerfile -t lockbot .
109
-
110
- # 3. Run (replace the keys with generated values)
78
+ docker pull ghcr.io/dynamicheart/lockbot:v3.0.0
111
79
  docker run -d --name lockbot -p 8000:8000 \
112
- -e JWT_SECRET=your-secret \
113
- -e ENCRYPTION_KEY=your-fernet-key \
80
+ --env-file /private/path/lockbot.env \
114
81
  -v lockbot-data:/data \
115
- ghcr.io/dynamicheart/lockbot:latest
82
+ ghcr.io/dynamicheart/lockbot:v3.0.0
116
83
 
117
- # 4. Create super_admin (password auto-generated and printed)
84
+ # New installation only: create the initial super administrator interactively.
118
85
  docker exec -it lockbot python tools/create_super_admin.py --username admin --email admin@example.com
119
86
  ```
120
87
 
121
- > **Data persistence**: All data (SQLite DB, bot state files) stored under `/data`. Override with `DATA_DIR` env var.
88
+ Open `http://localhost:8000`. Data persists under `/data`; select the intended host port without replacing an upgrade's existing mount. Run a single process/instance per data directory.
89
+
90
+ - [Agent-assisted deployment and upgrades](docs/agents/deployment/AGENTS.md), including environment validation and a Compose template
91
+ - [Infoflow and Feishu setup](docs/agents/platforms/AGENTS.md) and [illustrated Feishu guide](docs/usage/feishu-setup.md)
92
+ - [Agent API and Skill](docs/agent-api/SKILL.md)
93
+ - [Independent telemetry deployment](docs/usage/telemetry-deployment.md) and [browser utilization](docs/usage/browser-utilization.md)
94
+
95
+ In Feishu, one enterprise application can serve multiple resource groups, with a separate resource bot per group. Direct messages are unsupported. Platform credentials and users remain separate from Infoflow; copying configuration does not share live locks or authorizations.
122
96
 
123
97
  ## Bot Configuration
124
98
 
125
99
  | Key | Description | Default |
126
100
  |---|---|---|
127
- | `BOT_TYPE` | `DEVICE`, `NODE`, or `QUEUE` | (required) |
101
+ | `BOT_TYPE` | `NODE`, `DEVICE`, `QUEUE`, or `QUEUE_DEVICE` | (required) |
128
102
  | `BOT_NAME` | Bot instance name | `demo_bot` |
129
103
  | `CLUSTER_CONFIGS` | Cluster layout (dict or list) | `{}` |
130
- | `TOKEN` | Bot signature verification token | `""` |
131
- | `AESKEY` | Message decryption AES key | `""` |
132
- | `WEBHOOK_URL` | Message webhook URL | `""` |
104
+ | `TOKEN` | Infoflow signature verification token | `""` |
105
+ | `AESKEY` | Infoflow message decryption AES key | `""` |
106
+ | `WEBHOOK_URL` | Infoflow message webhook URL | `""` |
133
107
  | `DEFAULT_DURATION` | Default lock duration (seconds) | `7200` (2h) |
134
108
  | `MAX_LOCK_DURATION` | Max lock duration (seconds) | `-1` (unlimited) |
135
109
  | `EARLY_NOTIFY` | Notify before lock expiry | `false` |
@@ -158,7 +132,7 @@ See `python/lockbot/core/config.py` for the full configuration reference.
158
132
 
159
133
  ```bash
160
134
  # Install dependencies
161
- pip install -e ".[dev]"
135
+ pip install -e ".[dev,feishu]"
162
136
  cd frontend && npm install && cd ..
163
137
 
164
138
  # Start backend (port 8002, hot-reload)
@@ -168,13 +142,13 @@ bash scripts/dev/backend.sh
168
142
  bash scripts/dev/frontend.sh
169
143
  ```
170
144
 
171
- Both servers support hot-reload — code changes take effect automatically.
145
+ Open the frontend at `http://localhost:8001`; it proxies API requests to port 8002. These hot-reload scripts are for development, not production. New development targets `main`.
172
146
 
173
147
  ### Testing
174
148
 
175
149
  ```bash
176
- # Run tests
177
- pytest
150
+ # Run tests with file-isolated parallel workers
151
+ pytest -n auto --maxprocesses=4 --dist=loadfile
178
152
 
179
153
  # Lint + format check
180
154
  ruff check python/ tests/
File without changes
File without changes
File without changes
File without changes