lockbot 2.6.0__tar.gz → 2.6.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.
- {lockbot-2.6.0/python/lockbot.egg-info → lockbot-2.6.2}/PKG-INFO +1 -1
- {lockbot-2.6.0 → lockbot-2.6.2}/pyproject.toml +1 -1
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/bots/router.py +2 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/i18n/en.py +9 -9
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/i18n/zh.py +9 -9
- {lockbot-2.6.0 → lockbot-2.6.2/python/lockbot.egg-info}/PKG-INFO +1 -1
- {lockbot-2.6.0 → lockbot-2.6.2}/LICENSE +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/MANIFEST.in +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/README.md +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/__init__.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/__init__.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/__init__.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/admin/__init__.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/admin/router.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/audit/__init__.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/audit/models.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/audit/router.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/audit/service.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/auth/__init__.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/auth/dependencies.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/auth/models.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/auth/router.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/auth/schemas.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/backup/__init__.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/backup/router.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/backup/scheduler.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/backup/service.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/bots/__init__.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/bots/encryption.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/bots/manager.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/bots/models.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/bots/schemas.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/bots/webhook_handler.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/config.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/database.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/logs/__init__.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/main.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/rate_limit.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/settings/__init__.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/settings/models.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/backend/app/settings/router.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/__init__.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/base_bot.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/bot_instance.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/config.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/device_bot.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/device_usage_alert.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/device_usage_utils.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/entry.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/env.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/handler.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/i18n/__init__.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/io.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/message_adapter.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/msg_utils.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/node_bot.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/platforms/__init__.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/platforms/infoflow.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/queue_bot.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/request.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/scheduler.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot/core/utils.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot.egg-info/SOURCES.txt +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot.egg-info/dependency_links.txt +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot.egg-info/requires.txt +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/python/lockbot.egg-info/top_level.txt +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/setup.cfg +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/tools/create_super_admin.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/tools/gen_keys.py +0 -0
- {lockbot-2.6.0 → lockbot-2.6.2}/tools/reset_super_admin_password.py +0 -0
|
@@ -1322,4 +1322,6 @@ def api_opkick(
|
|
|
1322
1322
|
except ValueError as e:
|
|
1323
1323
|
raise HTTPException(status_code=404, detail=str(e)) from None
|
|
1324
1324
|
|
|
1325
|
+
freed_str = ", ".join(result["freed"])
|
|
1326
|
+
_write_log(bot_id, f"[API] opkick {body.target_user} -> {freed_str}", category="command")
|
|
1325
1327
|
return result
|
|
@@ -102,17 +102,17 @@ MESSAGES = {
|
|
|
102
102
|
"help.query_node_example": " query {node} (query node {node})\n",
|
|
103
103
|
# ── Help text (DEVICE) command examples ──
|
|
104
104
|
"help.lock_all_devices_example": " lock {node} (lock all devices on node)\n",
|
|
105
|
-
"help.lock_device_example": " lock {node}
|
|
106
|
-
"help.lock_device_duration_example": " lock {node}
|
|
107
|
-
"help.lock_device_range_example": " lock {node}
|
|
108
|
-
"help.slock_device_range_example": " slock {node}
|
|
105
|
+
"help.lock_device_example": " lock {node} dev0 (lock device 0 on {node})\n",
|
|
106
|
+
"help.lock_device_duration_example": " lock {node} dev0 2h (lock device 0 on {node} for 2h)\n",
|
|
107
|
+
"help.lock_device_range_example": " lock {node} dev0-3 (lock devices 0-3 on {node})\n",
|
|
108
|
+
"help.slock_device_range_example": " slock {node} dev0-3 (shared-lock devices 0-3 on {node})\n",
|
|
109
109
|
"help.unlock_device_example": " unlock {node} (release all your devices on node)\n",
|
|
110
|
-
"help.unlock_device_range_example": " unlock {node}
|
|
111
|
-
"help.free_device_range_example": " free {node}
|
|
110
|
+
"help.unlock_device_range_example": " unlock {node} dev0-3 (release devices 0-3 on {node})\n",
|
|
111
|
+
"help.free_device_range_example": " free {node} dev0-3 (release devices 0-3 on {node})\n",
|
|
112
112
|
"help.free_node_all_example": " free {node} (release all your devices on {node})\n",
|
|
113
113
|
"help.kickout_device_example": " kickout {node} (force-release all devices on node)\n",
|
|
114
|
-
"help.kickout_device_range_example": " kickout {node}
|
|
115
|
-
"help.kickout_device_range2_example": " kickout {node}
|
|
114
|
+
"help.kickout_device_range_example": " kickout {node} dev0-3 (force-release devices 0-3 on {node})\n",
|
|
115
|
+
"help.kickout_device_range2_example": " kickout {node} dev0 (force-release device 0 on {node})\n",
|
|
116
116
|
"help.resource_list_title": "Resource list:\n",
|
|
117
117
|
"help.resource_list_item": " {node_key}: dev_id 0~{max_dev}\n",
|
|
118
118
|
# ── Help text (QUEUE) extras ──
|
|
@@ -171,7 +171,7 @@ MESSAGES = {
|
|
|
171
171
|
"opkick.debounce": "Duplicate operation, please wait",
|
|
172
172
|
"opkick.invalid_format": "Invalid opkick format. Usage: opkick <username> [node] [dev x,y]",
|
|
173
173
|
"opkick.notify_kicked": "⚠️ [Operator Release]\n\nNode: {node_key}\n",
|
|
174
|
-
"opkick.notify_kicked_reason": "Reason: {reason}\n",
|
|
174
|
+
"opkick.notify_kicked_reason": "Reason: {reason}\n\n",
|
|
175
175
|
# ── Webhook: bot not running ──
|
|
176
176
|
"webhook.bot_not_running": "⚠️ Bot {bot_name}(ID:{bot_id}) is not running. " # noqa: E501
|
|
177
177
|
"Please contact the owner @{owner_username} to start it.",
|
|
@@ -96,17 +96,17 @@ MESSAGES = {
|
|
|
96
96
|
"help.query_node_example": " query {node} (查询{node}节点)\n",
|
|
97
97
|
# ── Help text (DEVICE) command examples ──
|
|
98
98
|
"help.lock_all_devices_example": " lock {node} (锁定当前节点的所有设备)\n",
|
|
99
|
-
"help.lock_device_example": " lock {node}
|
|
100
|
-
"help.lock_device_duration_example": " lock {node}
|
|
101
|
-
"help.lock_device_range_example": " lock {node}
|
|
102
|
-
"help.slock_device_range_example": " slock {node}
|
|
99
|
+
"help.lock_device_example": " lock {node} dev0 (锁定{node}节点的0号设备)\n",
|
|
100
|
+
"help.lock_device_duration_example": " lock {node} dev0 2h (锁定{node}节点的0号设备2小时)\n",
|
|
101
|
+
"help.lock_device_range_example": " lock {node} dev0-3 (锁定{node}节点的0-3号设备)\n",
|
|
102
|
+
"help.slock_device_range_example": " slock {node} dev0-3 (共享锁定{node}节点的0-3号设备)\n",
|
|
103
103
|
"help.unlock_device_example": " unlock {node} (释放当前节点所有申请过的设备)\n",
|
|
104
|
-
"help.unlock_device_range_example": " unlock {node}
|
|
105
|
-
"help.free_device_range_example": " free {node}
|
|
104
|
+
"help.unlock_device_range_example": " unlock {node} dev0-3 (释放{node}节点的0-3号设备)\n",
|
|
105
|
+
"help.free_device_range_example": " free {node} dev0-3 (释放{node}节点的0-3号设备)\n",
|
|
106
106
|
"help.free_node_all_example": " free {node} (释放{node}节点所有申请过的设备)\n",
|
|
107
107
|
"help.kickout_device_example": " kickout {node} (强制释放当前节点的所有设备)\n",
|
|
108
|
-
"help.kickout_device_range_example": " kickout {node}
|
|
109
|
-
"help.kickout_device_range2_example": " kickout {node}
|
|
108
|
+
"help.kickout_device_range_example": " kickout {node} dev0-3 (强制释放{node}节点的0-3号设备)\n",
|
|
109
|
+
"help.kickout_device_range2_example": " kickout {node} dev0 (强制释放{node}节点的0号设备)\n",
|
|
110
110
|
"help.resource_list_title": "资源列表:\n",
|
|
111
111
|
"help.resource_list_item": " {node_key}: dev_id 0~{max_dev}\n",
|
|
112
112
|
# ── Help text (QUEUE) extras ──
|
|
@@ -163,7 +163,7 @@ MESSAGES = {
|
|
|
163
163
|
"opkick.debounce": "重复操作,请稍后",
|
|
164
164
|
"opkick.invalid_format": "opkick命令格式错误,正确格式: opkick <username> [node] [dev x,y]",
|
|
165
165
|
"opkick.notify_kicked": "⚠️【运维释放】\n\n节点: {node_key}\n",
|
|
166
|
-
"opkick.notify_kicked_reason": "原因: {reason}\n",
|
|
166
|
+
"opkick.notify_kicked_reason": "原因: {reason}\n\n",
|
|
167
167
|
# ── Webhook: bot not running ──
|
|
168
168
|
"webhook.bot_not_running": (
|
|
169
169
|
"⚠️ 机器人 {bot_name}(ID:{bot_id}) 尚未启动,请联系管理人 @{owner_username} 启动后再使用。"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|