nonebot-plugin-lingchu-bot 0.9.0.dev1__tar.gz → 0.10.0.dev1__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.
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/PKG-INFO +41 -26
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/README.md +40 -25
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/pyproject.toml +6 -1
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/pyproject.toml.orig +4 -1
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/core/config.py +85 -2
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/core/handle_config_defaults/__init__.py +5 -1
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/core/handle_config_defaults/webui.py +24 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/core/webui_session.py +207 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/menu.py +9 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/__init__.py +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/webui.py +35 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/triggers.py +6 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/webui.py +35 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/services/webui/__init__.py +96 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/services/webui/info.py +157 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/services/webui/launcher.py +207 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/services/webui/orpc.py +516 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/services/webui/paths.py +206 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/services/webui/static.py +218 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/__spa-fallback.html +6 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/_app-cmZznf6O.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/button-CMIsqGkD.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/card-CJ74Plpc.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/client-UFx2FAPL.js +63 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/config-L3GCYPbF.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/debug-http-Bu98at1h.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/debug-ws-D0wP0Q32.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/dist-DpQbSh8J.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/entry.client-DiF8Z7f3.js +9 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/errorBoundaries-qX9nQ13h.js +16 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/home-ClIwFtsV.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/jsx-runtime-CaNbcSYF.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/login-Cp-UEzm-.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/manifest-f409b9af.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/overview-provider-BfscUw0m.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/page-tabs-CHQ_laPm.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/placeholder-card-DArFoHa_.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/react-dom-BIDDQx1h.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/root-BA_NRHIe.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/root-DyH_a8uI.css +2 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/tooltip-psW_zXkS.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/useTranslation-CMvnKPyf.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/assets/utils-B8z9gsWA.js +1 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/favicon.ico +0 -0
- nonebot_plugin_lingchu_bot-0.10.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/webui/dist/client/index.html +6 -0
- nonebot_plugin_lingchu_bot-0.9.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/services/webui/__init__.py +0 -81
- nonebot_plugin_lingchu_bot-0.9.0.dev1/src/plugins/nonebot_plugin_lingchu_bot/services/webui/info.py +0 -184
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/CLA.md +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/LICENSE-apache +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/LICENSE-cc-by-sa +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/LICENSE-cc0 +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/LICENSE-code +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/LICENSE-docs +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/LICENSE-mit +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/Repository-Policy.md +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/_lingchu_bot_contracts/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/_lingchu_bot_contracts/runtime_settings.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/core/async_utils.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/core/bot_state.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/core/handle_config_manager.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/core/handle_default_values.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/core/http_security.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/core/menu_config.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/core/mutable_settings.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/core/runtime_config.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/_dialect_compat.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/models/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/models/blocklist.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/models/identity.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/models/message.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/models/registry.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/models/scheduler.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/models/subject_policy.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/orm_crud/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/orm_crud/_base.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/orm_crud/_bulk.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/orm_crud/_single.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/persistence/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/persistence/atomic.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/persistence/checksum.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/persistence/journal.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/persistence/recovery.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/persistence/versioning.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/schema_guard.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/sqlite_pragmas.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/toml_store/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/toml_store/_helpers.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/toml_store/_sync.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/database/toml_store/exceptions.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/announcement.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/block.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/bot_state.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/common.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/handle_defaults.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/kick.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/lifecycle.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/member.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/menu.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/mute.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/profile.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/protect.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/protect_notice.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/remote.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/llbot/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/llbot/mute_list.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/napcat/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/napcat/announcement.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/napcat/profile.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/announcement.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/block.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/bot_state.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/common.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/handle_defaults.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/kick.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/lifecycle.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/member.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/mute.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/profile.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/protect.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/remote.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/hooks/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/hooks/adapters.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/hooks/handlers/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/hooks/handlers/api_audit.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/hooks/handlers/bot_connection.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/hooks/handlers/lifecycle.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/hooks/handlers/message_store.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/hooks/interfaces.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/i18n/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/i18n/babel.cfg +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/i18n/locales/en_US/LC_MESSAGES/messages.mo +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/i18n/locales/en_US/LC_MESSAGES/messages.po +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/i18n/locales/zh_CN/LC_MESSAGES/messages.mo +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/i18n/locales/zh_CN/LC_MESSAGES/messages.po +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/i18n/messages.pot +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/migrations/1a2b3c4d5e6f_permissions_schema.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/migrations/2b3c4d5e6f7a_event_policy_partitions.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/migrations/30f5a01259cd_initial_schema.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/migrations/c3d4e5f6a7b8_scheduler_jobs.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/migrations/cf2c06d51a17_blocklist_unique_constraint.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/migrations/d7e8f9a0b1c2_identity_integrity.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/migrations/f6a7b8c9d0e1_message_protocol_default.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/migrations/g7b8c9d0e1f2_protocol_id_not_null.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/permissions/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/permissions/admin.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/permissions/bootstrap.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/permissions/config.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/permissions/platforms.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/permissions/service.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/permissions/subject_policy.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/permissions/types.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/platforms/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/platforms/qq/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/platforms/qq/permissions.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/platforms/registry.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/repositories/__init__.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/repositories/blocklist.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/repositories/message_store.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/repositories/permissions.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/repositories/registry.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/repositories/scheduler_jobs.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/restart_worker.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/services/message_store.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/services/protocol_restart_feedback.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/services/restart_app.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/services/scheduler.py +0 -0
- {nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/src/plugins/nonebot_plugin_lingchu_bot/start/startup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nonebot-plugin-lingchu-bot
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.10.0.dev1
|
|
4
4
|
Summary: 由NoneBot2驱动,面向多平台的管理机器人
|
|
5
5
|
Keywords: nonebot2,nonebot,bot,cross-platform,group-management
|
|
6
6
|
Author: xinvxueyuan
|
|
@@ -72,29 +72,20 @@ Description-Content-Type: text/markdown
|
|
|
72
72
|
|
|
73
73
|
[![DeepWiki Q&A][deepwiki-shield]][deepwiki-link]
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
> **A qbot plugin** · Host repository: [xinvxueyuan/qbot](https://github.com/xinvxueyuan/qbot)
|
|
76
76
|
|
|
77
77
|
Lingchu Bot has published its first `0.0.1` formal release. The project is still early and may make breaking changes before `1.0.0`, but the current release is intended to be installable, documented, and reproducible through the release workflow.
|
|
78
78
|
|
|
79
79
|
Useful entry points:
|
|
80
80
|
|
|
81
81
|
- [Online documentation](https://lingchu.zone.id/)
|
|
82
|
-
- [User guide overview](apps/docs/src/content/docs/
|
|
83
|
-
- [Quick start](apps/docs/src/content/docs/
|
|
84
|
-
- [QQ command reference](apps/docs/src/content/docs/
|
|
85
|
-
- [Architecture guide](apps/docs/src/content/docs/
|
|
82
|
+
- [User guide overview](apps/docs/src/content/docs/explanation/overview.mdx)
|
|
83
|
+
- [Quick start](apps/docs/src/content/docs/tutorials/getting-started.mdx)
|
|
84
|
+
- [QQ command reference](apps/docs/src/content/docs/reference/commands.mdx)
|
|
85
|
+
- [Architecture guide](apps/docs/src/content/docs/explanation/architecture/introduction.mdx)
|
|
86
86
|
- [Contributing guide](CONTRIBUTING.md)
|
|
87
87
|
|
|
88
|
-
##
|
|
89
|
-
|
|
90
|
-
- `nonebot-plugin-lingchu-bot`: the Python package declared in `pyproject.toml`.
|
|
91
|
-
- `src/plugins/nonebot_plugin_lingchu_bot`: the core NoneBot plugin, including metadata, startup hooks, platform registry, command handlers, permissions, i18n, repositories, and storage helpers.
|
|
92
|
-
- `[tool.nonebot]` in `pyproject.toml`: local plugin loading configuration, installed adapter declarations, and dependency plugin declarations.
|
|
93
|
-
- `apps/docs`: the Astro / Starlight documentation site, with Chinese and English content.
|
|
94
|
-
- `Dockerfile` / `docker-compose.yml`: container runtime flow. The image generates `/tmp/bot.py` during build through `nb-cli`; the repository root does not ship a committed local `bot.py`.
|
|
95
|
-
- `scripts/setup.sh`: cross-platform initialization script for local development.
|
|
96
|
-
|
|
97
|
-
## Capabilities
|
|
88
|
+
## Features
|
|
98
89
|
|
|
99
90
|
| Capability | Description |
|
|
100
91
|
| --- | --- |
|
|
@@ -112,7 +103,7 @@ Useful entry points:
|
|
|
112
103
|
|
|
113
104
|
Future cross-platform and non-group-management features depend on later implementation and tests.
|
|
114
105
|
|
|
115
|
-
|
|
106
|
+
### Adapter support
|
|
116
107
|
|
|
117
108
|
The currently implemented platform profile is **QQ**, and the only active adapter is **OneBot V11**:
|
|
118
109
|
|
|
@@ -126,7 +117,7 @@ Only OneBot V11 is implemented. Configuring any other adapter ID (such as `~milk
|
|
|
126
117
|
|
|
127
118
|
OneBot V11 currently has `default` and `NapCat` implementation paths. Some features are implementation-gated: for example, group announcement and group avatar entries are shown only when the selected implementation supports them, and remote announcement requires `NapCat.Onebot >= 4.18.0`.
|
|
128
119
|
|
|
129
|
-
##
|
|
120
|
+
## Installation
|
|
130
121
|
|
|
131
122
|
### Requirements
|
|
132
123
|
|
|
@@ -174,6 +165,8 @@ To load Lingchu Bot from an existing NoneBot project, point `plugin_dirs` at the
|
|
|
174
165
|
plugin_dirs = ["path/to/lingchu-bot/src/plugins"]
|
|
175
166
|
```
|
|
176
167
|
|
|
168
|
+
The [qbot](https://github.com/xinvxueyuan/qbot) host consumes this repository as the `vendor/lingchu-bot` git submodule pinned to a specific commit, and loads it through `plugin_dirs = ["vendor/lingchu-bot/src/plugins"]`.
|
|
169
|
+
|
|
177
170
|
### Option C — Run in Docker
|
|
178
171
|
|
|
179
172
|
```bash
|
|
@@ -202,6 +195,7 @@ Online-editable command, menu-trigger, and platform-permission overrides are sto
|
|
|
202
195
|
| Lingchu Runtime | `LINGCHU_SUPERUSERS` | UID-to-platform account mapping for Lingchu superusers. |
|
|
203
196
|
| Lingchu Runtime | `LINGCHU_LOCALE` | Runtime locale; available catalogs are `zh_CN` and `en_US`. |
|
|
204
197
|
| Lingchu Runtime | `LINGCHU_SUPERUSER_KEY` | Superuser key string (`superuser_key`). |
|
|
198
|
+
| WebUI | `LINGCHU_WEBUI_PASSWORD` | Password for the read-only WebUI endpoints; empty disables authentication. |
|
|
205
199
|
| Localstore | `LOCALSTORE_USE_CWD` | Store localstore data / config / cache under the project directory when true. |
|
|
206
200
|
| Message Store | `LINGCHU_MESSAGE_STORE_ENABLED` | Enable message-store runtime hooks. |
|
|
207
201
|
| Message Store | `LINGCHU_MESSAGE_STORE_RETENTION_DAYS` | Retention window for message records; `0` disables day-based expiry. |
|
|
@@ -210,7 +204,7 @@ Online-editable command, menu-trigger, and platform-permission overrides are sto
|
|
|
210
204
|
| Message Store | `LINGCHU_MESSAGE_STORE_CLEANUP_ENABLED` | Enable expired message cleanup. |
|
|
211
205
|
| Recall | `LINGCHU_RECALL_MESSAGE_DEFAULT_COUNT` | Default count for the message recall command (`1`–`100`). |
|
|
212
206
|
| Protected Subjects | `LINGCHU_PROTECTED_SUBJECT_FEATURE_KEYS` | Side-effect command keys blocked when their target user is protected. |
|
|
213
|
-
| Database | `SQLALCHEMY_DATABASE_URL` | SQLAlchemy database URL; supports SQLite / PostgreSQL / MySQL / MariaDB
|
|
207
|
+
| Database | `SQLALCHEMY_DATABASE_URL` | SQLAlchemy database URL; supports SQLite / PostgreSQL / MySQL / MariaDB. Unset uses default SQLite. |
|
|
214
208
|
| Database | `ALEMBIC_STARTUP_CHECK` | Set to `true` in production to enforce schema migration checks on startup. |
|
|
215
209
|
|
|
216
210
|
Example `runtime-overrides.toml`:
|
|
@@ -231,7 +225,7 @@ Runtime settings are read from the localstore-owned `runtime-overrides.toml` fil
|
|
|
231
225
|
Deployment settings remain in NoneBot environment configuration; there is no
|
|
232
226
|
project-specific configuration CLI or generated schema step.
|
|
233
227
|
|
|
234
|
-
##
|
|
228
|
+
## Usage & Commands
|
|
235
229
|
|
|
236
230
|
Main menu:
|
|
237
231
|
|
|
@@ -267,12 +261,23 @@ silence / speak
|
|
|
267
261
|
boot / shutdown
|
|
268
262
|
```
|
|
269
263
|
|
|
270
|
-
Command trigger language is locale-exclusive. Chinese locales enable Chinese triggers; English locales enable short hyphenated English triggers. They are not enabled at the same time. Full command behavior, permission pre-checks, implementation filters, and remote management details are documented in [QQ Commands](apps/docs/src/content/docs/
|
|
264
|
+
Command trigger language is locale-exclusive. Chinese locales enable Chinese triggers; English locales enable short hyphenated English triggers. They are not enabled at the same time. Full command behavior, permission pre-checks, implementation filters, and remote management details are documented in [QQ Commands](apps/docs/src/content/docs/reference/commands.mdx).
|
|
271
265
|
|
|
272
|
-
## Development
|
|
266
|
+
## Development & Testing
|
|
273
267
|
|
|
274
268
|
CI checks Ruff, Markdown, Pyright, ty, pytest on multiple database backends, and docs site lint / test. Run the checks relevant to your change before committing.
|
|
275
269
|
|
|
270
|
+
### Repository layout
|
|
271
|
+
|
|
272
|
+
- `nonebot-plugin-lingchu-bot`: the Python package declared in `pyproject.toml`.
|
|
273
|
+
- `src/plugins/nonebot_plugin_lingchu_bot`: the core NoneBot plugin, including metadata, startup hooks, platform registry, command handlers, permissions, i18n, repositories, and storage helpers.
|
|
274
|
+
- `[tool.nonebot]` in `pyproject.toml`: local plugin loading configuration, installed adapter declarations, and dependency plugin declarations.
|
|
275
|
+
- `apps/docs`: the Astro / Starlight documentation site, with Chinese and English content.
|
|
276
|
+
- `Dockerfile` / `docker-compose.yml`: container runtime flow. The image generates `/tmp/bot.py` during build through `nb-cli`; the repository root does not ship a committed local `bot.py`.
|
|
277
|
+
- `scripts/setup.sh`: cross-platform initialization script for local development.
|
|
278
|
+
|
|
279
|
+
### Local checks
|
|
280
|
+
|
|
276
281
|
Ruff:
|
|
277
282
|
|
|
278
283
|
```bash
|
|
@@ -318,13 +323,15 @@ Markdown:
|
|
|
318
323
|
pnpm exec markdownlint-cli2 README.md README-zh.md
|
|
319
324
|
```
|
|
320
325
|
|
|
321
|
-
|
|
326
|
+
### Contributing
|
|
322
327
|
|
|
323
328
|
Issues, tests, documentation, and code improvements are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) before starting; it describes the current collaboration workflow, GitNexus impact analysis requirements, version validation system, and PR checklist.
|
|
324
329
|
|
|
325
330
|
When participating in discussions and reviews, please follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md). For security-related issues, please refer to [SECURITY.md](SECURITY.md).
|
|
326
331
|
|
|
327
|
-
## License
|
|
332
|
+
## License & Related repositories
|
|
333
|
+
|
|
334
|
+
### License
|
|
328
335
|
|
|
329
336
|
This project uses a **phased open-source license stack** (see
|
|
330
337
|
[Repository-Policy.md](Repository-Policy.md) for the transition rules
|
|
@@ -352,7 +359,15 @@ For media file handling, sanitization requirements, REUSE compliance,
|
|
|
352
359
|
and the official license texts, see [Repository-Policy.md](Repository-Policy.md)
|
|
353
360
|
and the [`LICENSE-*`](LICENSE-code) files in the repository root.
|
|
354
361
|
|
|
355
|
-
|
|
362
|
+
### Related repositories
|
|
363
|
+
|
|
364
|
+
Lingchu Bot is one plugin of the [qbot](https://github.com/xinvxueyuan/qbot) ecosystem; these repositories are the ones it actually interacts with:
|
|
365
|
+
|
|
366
|
+
- [xinvxueyuan/qbot](https://github.com/xinvxueyuan/qbot) — the NoneBot2 host that loads this repository as the `vendor/lingchu-bot` submodule.
|
|
367
|
+
- [xinvxueyuan/nonebot-plugin-info](https://github.com/xinvxueyuan/nonebot-plugin-info) — the menu plugin that renders each plugin's `__plugin_meta__.extra`; Lingchu publishes its menu type, order, and command list there.
|
|
368
|
+
- [xinvxueyuan/nonebot-plugin-llbot-alert](https://github.com/xinvxueyuan/nonebot-plugin-llbot-alert) — watches the LLBot / OneBot V11 connection Lingchu Bot runs on, and mails on heartbeat or disconnect failures.
|
|
369
|
+
|
|
370
|
+
### Acknowledgments
|
|
356
371
|
|
|
357
372
|
Lingchu Bot stands on a lot of good open-source shoulders. Thanks especially to these upstream projects and communities:
|
|
358
373
|
|
|
@@ -363,7 +378,7 @@ Lingchu Bot stands on a lot of good open-source shoulders. Thanks especially to
|
|
|
363
378
|
|
|
364
379
|
For complete dependency lists, please refer to [pyproject.toml](pyproject.toml), [package.json](package.json), [apps/docs/package.json](apps/docs/package.json), and [uv.lock](uv.lock).
|
|
365
380
|
|
|
366
|
-
|
|
381
|
+
### License compliance
|
|
367
382
|
|
|
368
383
|
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fxinvxueyuan%2Flingchu-bot?ref=badge_large)
|
|
369
384
|
|
|
@@ -20,29 +20,20 @@
|
|
|
20
20
|
|
|
21
21
|
[![DeepWiki Q&A][deepwiki-shield]][deepwiki-link]
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
> **A qbot plugin** · Host repository: [xinvxueyuan/qbot](https://github.com/xinvxueyuan/qbot)
|
|
24
24
|
|
|
25
25
|
Lingchu Bot has published its first `0.0.1` formal release. The project is still early and may make breaking changes before `1.0.0`, but the current release is intended to be installable, documented, and reproducible through the release workflow.
|
|
26
26
|
|
|
27
27
|
Useful entry points:
|
|
28
28
|
|
|
29
29
|
- [Online documentation](https://lingchu.zone.id/)
|
|
30
|
-
- [User guide overview](apps/docs/src/content/docs/
|
|
31
|
-
- [Quick start](apps/docs/src/content/docs/
|
|
32
|
-
- [QQ command reference](apps/docs/src/content/docs/
|
|
33
|
-
- [Architecture guide](apps/docs/src/content/docs/
|
|
30
|
+
- [User guide overview](apps/docs/src/content/docs/explanation/overview.mdx)
|
|
31
|
+
- [Quick start](apps/docs/src/content/docs/tutorials/getting-started.mdx)
|
|
32
|
+
- [QQ command reference](apps/docs/src/content/docs/reference/commands.mdx)
|
|
33
|
+
- [Architecture guide](apps/docs/src/content/docs/explanation/architecture/introduction.mdx)
|
|
34
34
|
- [Contributing guide](CONTRIBUTING.md)
|
|
35
35
|
|
|
36
|
-
##
|
|
37
|
-
|
|
38
|
-
- `nonebot-plugin-lingchu-bot`: the Python package declared in `pyproject.toml`.
|
|
39
|
-
- `src/plugins/nonebot_plugin_lingchu_bot`: the core NoneBot plugin, including metadata, startup hooks, platform registry, command handlers, permissions, i18n, repositories, and storage helpers.
|
|
40
|
-
- `[tool.nonebot]` in `pyproject.toml`: local plugin loading configuration, installed adapter declarations, and dependency plugin declarations.
|
|
41
|
-
- `apps/docs`: the Astro / Starlight documentation site, with Chinese and English content.
|
|
42
|
-
- `Dockerfile` / `docker-compose.yml`: container runtime flow. The image generates `/tmp/bot.py` during build through `nb-cli`; the repository root does not ship a committed local `bot.py`.
|
|
43
|
-
- `scripts/setup.sh`: cross-platform initialization script for local development.
|
|
44
|
-
|
|
45
|
-
## Capabilities
|
|
36
|
+
## Features
|
|
46
37
|
|
|
47
38
|
| Capability | Description |
|
|
48
39
|
| --- | --- |
|
|
@@ -60,7 +51,7 @@ Useful entry points:
|
|
|
60
51
|
|
|
61
52
|
Future cross-platform and non-group-management features depend on later implementation and tests.
|
|
62
53
|
|
|
63
|
-
|
|
54
|
+
### Adapter support
|
|
64
55
|
|
|
65
56
|
The currently implemented platform profile is **QQ**, and the only active adapter is **OneBot V11**:
|
|
66
57
|
|
|
@@ -74,7 +65,7 @@ Only OneBot V11 is implemented. Configuring any other adapter ID (such as `~milk
|
|
|
74
65
|
|
|
75
66
|
OneBot V11 currently has `default` and `NapCat` implementation paths. Some features are implementation-gated: for example, group announcement and group avatar entries are shown only when the selected implementation supports them, and remote announcement requires `NapCat.Onebot >= 4.18.0`.
|
|
76
67
|
|
|
77
|
-
##
|
|
68
|
+
## Installation
|
|
78
69
|
|
|
79
70
|
### Requirements
|
|
80
71
|
|
|
@@ -122,6 +113,8 @@ To load Lingchu Bot from an existing NoneBot project, point `plugin_dirs` at the
|
|
|
122
113
|
plugin_dirs = ["path/to/lingchu-bot/src/plugins"]
|
|
123
114
|
```
|
|
124
115
|
|
|
116
|
+
The [qbot](https://github.com/xinvxueyuan/qbot) host consumes this repository as the `vendor/lingchu-bot` git submodule pinned to a specific commit, and loads it through `plugin_dirs = ["vendor/lingchu-bot/src/plugins"]`.
|
|
117
|
+
|
|
125
118
|
### Option C — Run in Docker
|
|
126
119
|
|
|
127
120
|
```bash
|
|
@@ -150,6 +143,7 @@ Online-editable command, menu-trigger, and platform-permission overrides are sto
|
|
|
150
143
|
| Lingchu Runtime | `LINGCHU_SUPERUSERS` | UID-to-platform account mapping for Lingchu superusers. |
|
|
151
144
|
| Lingchu Runtime | `LINGCHU_LOCALE` | Runtime locale; available catalogs are `zh_CN` and `en_US`. |
|
|
152
145
|
| Lingchu Runtime | `LINGCHU_SUPERUSER_KEY` | Superuser key string (`superuser_key`). |
|
|
146
|
+
| WebUI | `LINGCHU_WEBUI_PASSWORD` | Password for the read-only WebUI endpoints; empty disables authentication. |
|
|
153
147
|
| Localstore | `LOCALSTORE_USE_CWD` | Store localstore data / config / cache under the project directory when true. |
|
|
154
148
|
| Message Store | `LINGCHU_MESSAGE_STORE_ENABLED` | Enable message-store runtime hooks. |
|
|
155
149
|
| Message Store | `LINGCHU_MESSAGE_STORE_RETENTION_DAYS` | Retention window for message records; `0` disables day-based expiry. |
|
|
@@ -158,7 +152,7 @@ Online-editable command, menu-trigger, and platform-permission overrides are sto
|
|
|
158
152
|
| Message Store | `LINGCHU_MESSAGE_STORE_CLEANUP_ENABLED` | Enable expired message cleanup. |
|
|
159
153
|
| Recall | `LINGCHU_RECALL_MESSAGE_DEFAULT_COUNT` | Default count for the message recall command (`1`–`100`). |
|
|
160
154
|
| Protected Subjects | `LINGCHU_PROTECTED_SUBJECT_FEATURE_KEYS` | Side-effect command keys blocked when their target user is protected. |
|
|
161
|
-
| Database | `SQLALCHEMY_DATABASE_URL` | SQLAlchemy database URL; supports SQLite / PostgreSQL / MySQL / MariaDB
|
|
155
|
+
| Database | `SQLALCHEMY_DATABASE_URL` | SQLAlchemy database URL; supports SQLite / PostgreSQL / MySQL / MariaDB. Unset uses default SQLite. |
|
|
162
156
|
| Database | `ALEMBIC_STARTUP_CHECK` | Set to `true` in production to enforce schema migration checks on startup. |
|
|
163
157
|
|
|
164
158
|
Example `runtime-overrides.toml`:
|
|
@@ -179,7 +173,7 @@ Runtime settings are read from the localstore-owned `runtime-overrides.toml` fil
|
|
|
179
173
|
Deployment settings remain in NoneBot environment configuration; there is no
|
|
180
174
|
project-specific configuration CLI or generated schema step.
|
|
181
175
|
|
|
182
|
-
##
|
|
176
|
+
## Usage & Commands
|
|
183
177
|
|
|
184
178
|
Main menu:
|
|
185
179
|
|
|
@@ -215,12 +209,23 @@ silence / speak
|
|
|
215
209
|
boot / shutdown
|
|
216
210
|
```
|
|
217
211
|
|
|
218
|
-
Command trigger language is locale-exclusive. Chinese locales enable Chinese triggers; English locales enable short hyphenated English triggers. They are not enabled at the same time. Full command behavior, permission pre-checks, implementation filters, and remote management details are documented in [QQ Commands](apps/docs/src/content/docs/
|
|
212
|
+
Command trigger language is locale-exclusive. Chinese locales enable Chinese triggers; English locales enable short hyphenated English triggers. They are not enabled at the same time. Full command behavior, permission pre-checks, implementation filters, and remote management details are documented in [QQ Commands](apps/docs/src/content/docs/reference/commands.mdx).
|
|
219
213
|
|
|
220
|
-
## Development
|
|
214
|
+
## Development & Testing
|
|
221
215
|
|
|
222
216
|
CI checks Ruff, Markdown, Pyright, ty, pytest on multiple database backends, and docs site lint / test. Run the checks relevant to your change before committing.
|
|
223
217
|
|
|
218
|
+
### Repository layout
|
|
219
|
+
|
|
220
|
+
- `nonebot-plugin-lingchu-bot`: the Python package declared in `pyproject.toml`.
|
|
221
|
+
- `src/plugins/nonebot_plugin_lingchu_bot`: the core NoneBot plugin, including metadata, startup hooks, platform registry, command handlers, permissions, i18n, repositories, and storage helpers.
|
|
222
|
+
- `[tool.nonebot]` in `pyproject.toml`: local plugin loading configuration, installed adapter declarations, and dependency plugin declarations.
|
|
223
|
+
- `apps/docs`: the Astro / Starlight documentation site, with Chinese and English content.
|
|
224
|
+
- `Dockerfile` / `docker-compose.yml`: container runtime flow. The image generates `/tmp/bot.py` during build through `nb-cli`; the repository root does not ship a committed local `bot.py`.
|
|
225
|
+
- `scripts/setup.sh`: cross-platform initialization script for local development.
|
|
226
|
+
|
|
227
|
+
### Local checks
|
|
228
|
+
|
|
224
229
|
Ruff:
|
|
225
230
|
|
|
226
231
|
```bash
|
|
@@ -266,13 +271,15 @@ Markdown:
|
|
|
266
271
|
pnpm exec markdownlint-cli2 README.md README-zh.md
|
|
267
272
|
```
|
|
268
273
|
|
|
269
|
-
|
|
274
|
+
### Contributing
|
|
270
275
|
|
|
271
276
|
Issues, tests, documentation, and code improvements are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) before starting; it describes the current collaboration workflow, GitNexus impact analysis requirements, version validation system, and PR checklist.
|
|
272
277
|
|
|
273
278
|
When participating in discussions and reviews, please follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md). For security-related issues, please refer to [SECURITY.md](SECURITY.md).
|
|
274
279
|
|
|
275
|
-
## License
|
|
280
|
+
## License & Related repositories
|
|
281
|
+
|
|
282
|
+
### License
|
|
276
283
|
|
|
277
284
|
This project uses a **phased open-source license stack** (see
|
|
278
285
|
[Repository-Policy.md](Repository-Policy.md) for the transition rules
|
|
@@ -300,7 +307,15 @@ For media file handling, sanitization requirements, REUSE compliance,
|
|
|
300
307
|
and the official license texts, see [Repository-Policy.md](Repository-Policy.md)
|
|
301
308
|
and the [`LICENSE-*`](LICENSE-code) files in the repository root.
|
|
302
309
|
|
|
303
|
-
|
|
310
|
+
### Related repositories
|
|
311
|
+
|
|
312
|
+
Lingchu Bot is one plugin of the [qbot](https://github.com/xinvxueyuan/qbot) ecosystem; these repositories are the ones it actually interacts with:
|
|
313
|
+
|
|
314
|
+
- [xinvxueyuan/qbot](https://github.com/xinvxueyuan/qbot) — the NoneBot2 host that loads this repository as the `vendor/lingchu-bot` submodule.
|
|
315
|
+
- [xinvxueyuan/nonebot-plugin-info](https://github.com/xinvxueyuan/nonebot-plugin-info) — the menu plugin that renders each plugin's `__plugin_meta__.extra`; Lingchu publishes its menu type, order, and command list there.
|
|
316
|
+
- [xinvxueyuan/nonebot-plugin-llbot-alert](https://github.com/xinvxueyuan/nonebot-plugin-llbot-alert) — watches the LLBot / OneBot V11 connection Lingchu Bot runs on, and mails on heartbeat or disconnect failures.
|
|
317
|
+
|
|
318
|
+
### Acknowledgments
|
|
304
319
|
|
|
305
320
|
Lingchu Bot stands on a lot of good open-source shoulders. Thanks especially to these upstream projects and communities:
|
|
306
321
|
|
|
@@ -311,7 +326,7 @@ Lingchu Bot stands on a lot of good open-source shoulders. Thanks especially to
|
|
|
311
326
|
|
|
312
327
|
For complete dependency lists, please refer to [pyproject.toml](pyproject.toml), [package.json](package.json), [apps/docs/package.json](apps/docs/package.json), and [uv.lock](uv.lock).
|
|
313
328
|
|
|
314
|
-
|
|
329
|
+
### License compliance
|
|
315
330
|
|
|
316
331
|
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fxinvxueyuan%2Flingchu-bot?ref=badge_large)
|
|
317
332
|
|
{nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/pyproject.toml
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "nonebot-plugin-lingchu-bot"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.10.0.dev1"
|
|
4
4
|
description = "由NoneBot2驱动,面向多平台的管理机器人"
|
|
5
5
|
keywords = [
|
|
6
6
|
"nonebot2",
|
|
@@ -276,6 +276,7 @@ allowed-confusables = [
|
|
|
276
276
|
"src/plugins/nonebot_plugin_lingchu_bot/core/subplugins/loader.py" = ["TC002"]
|
|
277
277
|
"src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/napcat/announcement.py" = ["ARG001"]
|
|
278
278
|
"src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/bot_state.py" = ["ARG001"]
|
|
279
|
+
"src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/webui.py" = ["ARG001"]
|
|
279
280
|
"src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/announcement.py" = ["ARG001"]
|
|
280
281
|
"src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/mute.py" = ["ARG001"]
|
|
281
282
|
"src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/profile.py" = ["ARG001"]
|
|
@@ -408,6 +409,10 @@ allowed-confusables = [
|
|
|
408
409
|
"E402",
|
|
409
410
|
"TC002",
|
|
410
411
|
]
|
|
412
|
+
"src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/webui.py" = [
|
|
413
|
+
"E402",
|
|
414
|
+
"TC002",
|
|
415
|
+
]
|
|
411
416
|
"src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/common.py" = [
|
|
412
417
|
"E402",
|
|
413
418
|
"TC002",
|
{nonebot_plugin_lingchu_bot-0.9.0.dev1 → nonebot_plugin_lingchu_bot-0.10.0.dev1}/pyproject.toml.orig
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "nonebot-plugin-lingchu-bot"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.10.0.dev1"
|
|
4
4
|
# dynamic = ["version"]
|
|
5
5
|
description = "由NoneBot2驱动,面向多平台的管理机器人"
|
|
6
6
|
keywords = ["nonebot2", "nonebot", "bot", "cross-platform", "group-management"]
|
|
@@ -303,6 +303,8 @@ allowed-confusables = [
|
|
|
303
303
|
# ARG001: NoneBot handler signatures require bot/event params even when unused
|
|
304
304
|
"src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/napcat/announcement.py" = ["ARG001"]
|
|
305
305
|
"src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/bot_state.py" = ["ARG001"]
|
|
306
|
+
# ARG001: WebUI 启动命令不依赖 bot/event 载荷,但 NoneBot 仍按签名注入。
|
|
307
|
+
"src/plugins/nonebot_plugin_lingchu_bot/handle/qq/adapters/onebot11/default/webui.py" = ["ARG001"]
|
|
306
308
|
# ARG001: session injected via Depends(async_scoped_session) for consistent DI shape
|
|
307
309
|
# even when the handler does not currently issue DB queries (keeps handler signatures
|
|
308
310
|
# uniform across the adapter and ready for future repository calls).
|
|
@@ -434,6 +436,7 @@ allowed-confusables = [
|
|
|
434
436
|
"src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/announcement.py" = ["E402"]
|
|
435
437
|
"src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/block.py" = ["E402", "TC002"]
|
|
436
438
|
"src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/bot_state.py" = ["E402", "TC002"]
|
|
439
|
+
"src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/webui.py" = ["E402", "TC002"]
|
|
437
440
|
"src/plugins/nonebot_plugin_lingchu_bot/handle/qq/commands/common.py" = [
|
|
438
441
|
"E402", # plugin imports must follow nonebot.require calls
|
|
439
442
|
"TC002", # NoneBot inspects Bot, Event, and ORM DI annotations at runtime
|
|
@@ -102,6 +102,55 @@ class UnexpectedInContainersTypeError(ConfigError):
|
|
|
102
102
|
)
|
|
103
103
|
|
|
104
104
|
|
|
105
|
+
def _coerce_positive_int(value: Any, *, fallback: int) -> int:
|
|
106
|
+
"""把配置值转成正整数,非法时回退默认值。
|
|
107
|
+
|
|
108
|
+
`.env` 里的值一律是字符串,NoneBot 也不会替我们做 `int` 转换,
|
|
109
|
+
因此显式收口,避免 `LINGCHU_WEBUI_SESSION_TTL=abc` 在运行期变成死配置。
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
value: 原始配置值(str / int / None)。
|
|
113
|
+
fallback: 非法或非正数时的回退值。
|
|
114
|
+
|
|
115
|
+
Returns:
|
|
116
|
+
int: 正整数或回退值。
|
|
117
|
+
|
|
118
|
+
"""
|
|
119
|
+
if isinstance(value, bool):
|
|
120
|
+
return fallback
|
|
121
|
+
if isinstance(value, int):
|
|
122
|
+
return value if value > 0 else fallback
|
|
123
|
+
if isinstance(value, str):
|
|
124
|
+
try:
|
|
125
|
+
parsed = int(value.strip())
|
|
126
|
+
except ValueError:
|
|
127
|
+
return fallback
|
|
128
|
+
return parsed if parsed > 0 else fallback
|
|
129
|
+
return fallback
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
def _coerce_bool(value: Any) -> bool:
|
|
133
|
+
"""把配置值转成布尔。
|
|
134
|
+
|
|
135
|
+
NoneBot 的 model_dump() 对未知键常保留字符串形态,因此统一接受
|
|
136
|
+
`true/1/yes/on` 这几种常见真值写法。
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
value: 原始配置值。
|
|
140
|
+
|
|
141
|
+
Returns:
|
|
142
|
+
bool: 解析结果;无法识别时视为 False。
|
|
143
|
+
|
|
144
|
+
"""
|
|
145
|
+
if isinstance(value, bool):
|
|
146
|
+
return value
|
|
147
|
+
if isinstance(value, int):
|
|
148
|
+
return value != 0
|
|
149
|
+
if isinstance(value, str):
|
|
150
|
+
return value.strip().lower() in {"1", "true", "yes", "on"}
|
|
151
|
+
return False
|
|
152
|
+
|
|
153
|
+
|
|
105
154
|
@dataclass(frozen=True, slots=True)
|
|
106
155
|
class Config(DeploymentSettings):
|
|
107
156
|
"""lingchu-bot核心配置类。
|
|
@@ -115,7 +164,10 @@ class Config(DeploymentSettings):
|
|
|
115
164
|
data_dir: 数据存储目录路径。
|
|
116
165
|
config_dir: 配置文件存储目录路径。
|
|
117
166
|
cache_dir: 缓存文件存储目录路径。
|
|
118
|
-
lingchu_webui_password: WebUI
|
|
167
|
+
lingchu_webui_password: WebUI 登录口令(默认空,空则拒绝一切登录)。
|
|
168
|
+
lingchu_webui_base_path: WebUI 挂载前缀,默认 `/lc/webui`,可自定义。
|
|
169
|
+
lingchu_webui_session_ttl: WebUI 会话有效期(秒),默认 43200(12 小时)。
|
|
170
|
+
lingchu_webui_automount: 是否随 NoneBot 启动自动挂载 WebUI,默认 False。
|
|
119
171
|
superuser_key: 运行时超级用户密钥。
|
|
120
172
|
message_store_enabled: 是否启用消息存储。
|
|
121
173
|
lingchu_superusers: 结构化超级用户平台账号绑定。
|
|
@@ -123,12 +175,15 @@ class Config(DeploymentSettings):
|
|
|
123
175
|
|
|
124
176
|
"""
|
|
125
177
|
|
|
126
|
-
core_version: str = "0.
|
|
178
|
+
core_version: str = "0.10.0.dev1"
|
|
127
179
|
data_dir: Path = field(default_factory=get_plugin_data_dir)
|
|
128
180
|
config_dir: Path = field(default_factory=get_plugin_config_dir)
|
|
129
181
|
cache_dir: Path = field(default_factory=get_plugin_cache_dir)
|
|
130
182
|
in_containers: bool = False
|
|
131
183
|
lingchu_webui_password: str = ""
|
|
184
|
+
lingchu_webui_base_path: str = "/lc/webui"
|
|
185
|
+
lingchu_webui_session_ttl: int = 43200
|
|
186
|
+
lingchu_webui_automount: bool = False
|
|
132
187
|
|
|
133
188
|
@classmethod
|
|
134
189
|
def from_nonebot(cls) -> Config:
|
|
@@ -177,6 +232,34 @@ class Config(DeploymentSettings):
|
|
|
177
232
|
),
|
|
178
233
|
)
|
|
179
234
|
),
|
|
235
|
+
lingchu_webui_base_path=str(
|
|
236
|
+
values.get(
|
|
237
|
+
"LINGCHU_WEBUI_BASE_PATH",
|
|
238
|
+
values.get(
|
|
239
|
+
"lingchu_webui_base_path",
|
|
240
|
+
os.environ.get("LINGCHU_WEBUI_BASE_PATH", "/lc/webui"),
|
|
241
|
+
),
|
|
242
|
+
)
|
|
243
|
+
),
|
|
244
|
+
lingchu_webui_session_ttl=_coerce_positive_int(
|
|
245
|
+
values.get(
|
|
246
|
+
"LINGCHU_WEBUI_SESSION_TTL",
|
|
247
|
+
values.get(
|
|
248
|
+
"lingchu_webui_session_ttl",
|
|
249
|
+
os.environ.get("LINGCHU_WEBUI_SESSION_TTL", "43200"),
|
|
250
|
+
),
|
|
251
|
+
),
|
|
252
|
+
fallback=43200,
|
|
253
|
+
),
|
|
254
|
+
lingchu_webui_automount=_coerce_bool(
|
|
255
|
+
values.get(
|
|
256
|
+
"LINGCHU_WEBUI_AUTOMOUNT",
|
|
257
|
+
values.get(
|
|
258
|
+
"lingchu_webui_automount",
|
|
259
|
+
os.environ.get("LINGCHU_WEBUI_AUTOMOUNT", "false"),
|
|
260
|
+
),
|
|
261
|
+
)
|
|
262
|
+
),
|
|
180
263
|
)
|
|
181
264
|
|
|
182
265
|
# --- 平台检测 Properties ---
|
|
@@ -65,4 +65,8 @@ def register_handle_defaults(command_key: str, factory: HandleDefaultsFactory) -
|
|
|
65
65
|
HANDLE_DEFAULTS_REGISTRY[command_key] = factory
|
|
66
66
|
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
# 各命令的默认值模块在导入时通过 register_handle_defaults() 自行注册;
|
|
69
|
+
# 必须放在文件末尾,此时 register_handle_defaults 已定义、注册表已就绪。
|
|
70
|
+
from . import webui as webui
|
|
71
|
+
|
|
72
|
+
__all__ = ["HANDLE_DEFAULTS_REGISTRY", "register_handle_defaults", "webui"]
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""「启动WebUI」handle 的默认配置。
|
|
2
|
+
|
|
3
|
+
WebUI 由 NoneBot 同进程托管且挂载幂等,没有可调默认字段;这里注册一份空
|
|
4
|
+
`defaults`,让 `HandleConfigManager` 能读写 `webui_start.toml`。
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
from . import register_handle_defaults
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _webui_start_defaults() -> dict[str, Any]:
|
|
15
|
+
"""返回「启动WebUI」的默认配置。
|
|
16
|
+
|
|
17
|
+
Returns:
|
|
18
|
+
dict[str, Any]: 启用状态、空默认值表与空策略表。
|
|
19
|
+
|
|
20
|
+
"""
|
|
21
|
+
return {"enabled": True, "defaults": {}, "policies": {}}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
register_handle_defaults("webui_start", _webui_start_defaults)
|