ErisPulse 2.4.3.dev0__tar.gz → 2.4.4__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 (120) hide show
  1. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/.gitignore +1 -0
  2. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/PKG-INFO +33 -18
  3. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/README.md +31 -16
  4. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/pyproject.toml +2 -2
  5. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/commands/init.py +1 -13
  6. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/commands/run.py +53 -15
  7. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/commands/run.pyi +5 -3
  8. erispulse-2.4.4/src/ErisPulse/Core/Bases/__init__.py +17 -0
  9. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Bases/__init__.pyi +3 -2
  10. erispulse-2.4.4/src/ErisPulse/Core/Bases/storage.py +438 -0
  11. erispulse-2.4.4/src/ErisPulse/Core/Bases/storage.pyi +318 -0
  12. erispulse-2.4.4/src/ErisPulse/Core/__init__.py +49 -0
  13. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/__init__.pyi +1 -1
  14. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/adapter.py +8 -1
  15. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/adapter.pyi +7 -0
  16. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/config.py +13 -2
  17. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/config.pyi +7 -33
  18. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/logger.py +1 -1
  19. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/router.py +6 -1
  20. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/storage.py +445 -19
  21. erispulse-2.4.4/src/ErisPulse/Core/storage.pyi +404 -0
  22. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/finders/bases/finder.py +34 -0
  23. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/loaders/adapter.py +2 -2
  24. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/loaders/module.py +6 -2
  25. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/runtime/frame_config.py +17 -17
  26. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/sdk.py +92 -4
  27. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/sdk.pyi +6 -1
  28. erispulse-2.4.3.dev0/src/ErisPulse/Core/Bases/__init__.py +0 -14
  29. erispulse-2.4.3.dev0/src/ErisPulse/Core/__init__.py +0 -47
  30. erispulse-2.4.3.dev0/src/ErisPulse/Core/storage.pyi +0 -225
  31. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/LICENSE +0 -0
  32. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/__init__.py +0 -0
  33. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/__init__.pyi +0 -0
  34. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/base.py +0 -0
  35. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/base.pyi +0 -0
  36. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/cli.py +0 -0
  37. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/cli.pyi +0 -0
  38. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/commands/__init__.py +0 -0
  39. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/commands/__init__.pyi +0 -0
  40. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/commands/init.pyi +0 -0
  41. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/commands/install.py +0 -0
  42. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/commands/install.pyi +0 -0
  43. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/commands/list.py +0 -0
  44. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/commands/list.pyi +0 -0
  45. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/commands/list_remote.py +0 -0
  46. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/commands/list_remote.pyi +0 -0
  47. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/commands/self_update.py +0 -0
  48. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/commands/self_update.pyi +0 -0
  49. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/commands/uninstall.py +0 -0
  50. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/commands/uninstall.pyi +0 -0
  51. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/commands/upgrade.py +0 -0
  52. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/commands/upgrade.pyi +0 -0
  53. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/console.py +0 -0
  54. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/console.pyi +0 -0
  55. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/registry.py +0 -0
  56. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/registry.pyi +0 -0
  57. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/utils/__init__.py +0 -0
  58. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/utils/__init__.pyi +0 -0
  59. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/utils/package_manager.py +0 -0
  60. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/CLI/utils/package_manager.pyi +0 -0
  61. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Bases/adapter.py +0 -0
  62. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Bases/adapter.pyi +0 -0
  63. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Bases/manager.py +0 -0
  64. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Bases/manager.pyi +0 -0
  65. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Bases/module.py +0 -0
  66. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Bases/module.pyi +0 -0
  67. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/__init__.py +0 -0
  68. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/__init__.pyi +0 -0
  69. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/base.py +0 -0
  70. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/base.pyi +0 -0
  71. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/command.py +0 -0
  72. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/command.pyi +0 -0
  73. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/message.py +0 -0
  74. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/message.pyi +0 -0
  75. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/message_builder.py +0 -0
  76. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/message_builder.pyi +0 -0
  77. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/meta.py +0 -0
  78. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/meta.pyi +0 -0
  79. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/notice.py +0 -0
  80. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/notice.pyi +0 -0
  81. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/request.py +0 -0
  82. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/request.pyi +0 -0
  83. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/session_type.py +0 -0
  84. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/session_type.pyi +0 -0
  85. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/wrapper.py +0 -0
  86. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/Event/wrapper.pyi +0 -0
  87. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/lifecycle.py +0 -0
  88. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/lifecycle.pyi +0 -0
  89. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/logger.pyi +0 -0
  90. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/module.py +0 -0
  91. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/module.pyi +0 -0
  92. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/Core/router.pyi +0 -0
  93. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/__init__.py +0 -0
  94. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/__init__.pyi +0 -0
  95. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/__main__.py +0 -0
  96. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/__main__.pyi +0 -0
  97. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/finders/__init__.py +0 -0
  98. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/finders/__init__.pyi +0 -0
  99. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/finders/adapter.py +0 -0
  100. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/finders/adapter.pyi +0 -0
  101. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/finders/bases/__init__.py +0 -0
  102. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/finders/bases/__init__.pyi +0 -0
  103. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/finders/bases/finder.pyi +0 -0
  104. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/finders/module.py +0 -0
  105. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/finders/module.pyi +0 -0
  106. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/loaders/__init__.py +0 -0
  107. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/loaders/__init__.pyi +0 -0
  108. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/loaders/adapter.pyi +0 -0
  109. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/loaders/bases/__init__.py +0 -0
  110. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/loaders/bases/__init__.pyi +0 -0
  111. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/loaders/bases/loader.py +0 -0
  112. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/loaders/bases/loader.pyi +0 -0
  113. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/loaders/module.pyi +0 -0
  114. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/loaders/strategy.py +0 -0
  115. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/loaders/strategy.pyi +0 -0
  116. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/runtime/__init__.py +0 -0
  117. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/runtime/__init__.pyi +0 -0
  118. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/runtime/exceptions.py +0 -0
  119. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/runtime/exceptions.pyi +0 -0
  120. {erispulse-2.4.3.dev0 → erispulse-2.4.4}/src/ErisPulse/runtime/frame_config.pyi +0 -0
@@ -5,6 +5,7 @@ venvs
5
5
  config.toml
6
6
  uv.lock
7
7
  snapshots/
8
+ logs/
8
9
  config.db*
9
10
  .website
10
11
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ErisPulse
3
- Version: 2.4.3.dev0
3
+ Version: 2.4.4
4
4
  Summary: ErisPulse 是一个模块化、可扩展的异步 Python SDK 框架,主要用于构建高效、可维护的机器人应用程序。
5
5
  Author-email: ErisDev <erisdev@88.com>
6
6
  Maintainer-email: "艾莉丝·格雷拉特(WSu2059)" <wsu2059@qq.com>
@@ -48,7 +48,7 @@ Requires-Dist: packaging>=25.0
48
48
  Requires-Dist: pip>=23.0
49
49
  Requires-Dist: rich>=13.0.0
50
50
  Requires-Dist: toml>=0.10.2
51
- Requires-Dist: uvicorn>=0.30.0
51
+ Requires-Dist: uvicorn[standard]>=0.30.0
52
52
  Requires-Dist: watchdog>=4.0.0
53
53
  Provides-Extra: dev
54
54
  Requires-Dist: httpx>=0.24.0; extra == 'dev'
@@ -88,11 +88,10 @@ Description-Content-Type: text/markdown
88
88
  **事件驱动的多平台机器人开发框架**
89
89
 
90
90
  [![PyPI](https://img.shields.io/pypi/v/ErisPulse?style=flat-square)](https://pypi.org/project/ErisPulse/)
91
- [![Python Versions](https://img.shields.io/pypi/pyversions/ErisPulse?style=flat-square)](https://pypi.org/project/ErisPulse/)
92
- [![Docker Pulls](https://img.shields.io/docker/pulls/erispulse/erispulse?style=flat-square&logo=docker&label=pulls)](https://hub.docker.com/r/erispulse/erispulse)
93
- [![Docker Pulls](https://img.shields.io/docker/pulls/wsu2059/erispulse?style=flat-square&logo=docker&label=pulls)](https://hub.docker.com/r/erispulse/erispulse)
94
- [![Docker Version](https://img.shields.io/docker/v/erispulse/erispulse?style=flat-square&logo=docker&label=docker)](https://hub.docker.com/r/erispulse/erispulse)
91
+ [![Docker](https://img.shields.io/badge/Docker-2496ED?style=flat-square&logo=docker&logoColor=white)](https://hub.docker.com/r/erispulse/erispulse)
92
+ [![Python](https://img.shields.io/badge/Python-3.10+-3776AB?style=flat-square&logo=python&logoColor=white)](https://pypi.org/project/ErisPulse/)
95
93
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
94
+ [![Socket Badge](https://socket.dev/api/badge/pypi/package/ErisPulse/latest)](https://socket.dev/pypi/package/ErisPulse)
96
95
 
97
96
  </td>
98
97
  </tr>
@@ -118,16 +117,16 @@ ErisPulse 是一个基于 Python 的事件驱动型多平台机器人开发框
118
117
 
119
118
  | 适配器 | 说明 |
120
119
  |--------|------|
121
- | <img src=".github/assets/adapter_logo/kook.svg" width="20" /> [Kook](https://github.com/shanfishapp/ErisPulse-KookAdapter) | Kook(开黑啦)即时通讯平台 |
122
- | <img src=".github/assets/adapter_logo/matrix.svg" width="20" /> [Matrix](https://github.com/ErisPulse/ErisPulse-MatrixAdapter) | Matrix 去中心化通讯协议 |
123
- | <img src=".github/assets/adapter_logo/onebot.png" width="20" /> [OneBot11](https://github.com/ErisPulse/ErisPulse-OneBot11Adapter) | OneBot v11 通用机器人协议 |
124
- | <img src=".github/assets/adapter_logo/onebot.png" width="20" /> [OneBot12](https://github.com/ErisPulse/ErisPulse-OneBot12Adapter) | OneBot v12 标准协议 |
125
- | <img src=".github/assets/adapter_logo/qqbot.svg" width="20" /> [QQ](https://github.com/ErisPulse/ErisPulse-QQBotAdapter) | QQ 官方机器人平台 |
126
- | <img src=".github/assets/adapter_logo/sandbox.png" width="20" /> [沙箱](https://github.com/ErisPulse/ErisPulse-SandboxAdapter) | 网页端调试,无需接入真实平台 |
127
- | <img src=".github/assets/adapter_logo/telegram.svg" width="20" /> [Telegram](https://github.com/ErisPulse/ErisPulse-TelegramAdapter) | 全球性即时通讯平台 |
128
- | <img src=".github/assets/adapter_logo/email.svg" width="20" /> [邮件](https://github.com/ErisPulse/ErisPulse-EmailAdapter) | 邮件协议收发适配器 |
129
- | <img src=".github/assets/adapter_logo/yunhu.png" width="20" /> [云湖](https://github.com/ErisPulse/ErisPulse-YunhuAdapter) | 企业级即时通讯平台(机器人接入) |
130
- | <img src=".github/assets/adapter_logo/yunhu.png" width="20" /> [云湖用户](https://github.com/wsu2059q/ErisPulse-YunhuUserAdapter) | 基于云湖用户协议的接入适配器 |
120
+ | [Kook](https://github.com/shanfishapp/ErisPulse-KookAdapter) | Kook(开黑啦)即时通讯平台 |
121
+ | [Matrix](https://github.com/ErisPulse/ErisPulse-MatrixAdapter) | Matrix 去中心化通讯协议 |
122
+ | [OneBot11](https://github.com/ErisPulse/ErisPulse-OneBot11Adapter) | OneBot v11 通用机器人协议 |
123
+ | [OneBot12](https://github.com/ErisPulse/ErisPulse-OneBot12Adapter) | OneBot v12 标准协议 |
124
+ | [QQ](https://github.com/ErisPulse/ErisPulse-QQBotAdapter) | QQ 官方机器人平台 |
125
+ | [沙箱](https://github.com/ErisPulse/ErisPulse-SandboxAdapter) | 网页端调试,无需接入真实平台 |
126
+ | [Telegram](https://github.com/ErisPulse/ErisPulse-TelegramAdapter) | 全球性即时通讯平台 |
127
+ | [邮件](https://github.com/ErisPulse/ErisPulse-EmailAdapter) | 邮件协议收发适配器 |
128
+ | [云湖](https://github.com/ErisPulse/ErisPulse-YunhuAdapter) | 企业级即时通讯平台(机器人接入) |
129
+ | [云湖用户](https://github.com/wsu2059q/ErisPulse-YunhuUserAdapter) | 基于云湖用户协议的接入适配器 |
131
130
 
132
131
  查看 [适配器详情介绍](docs/zh-CN/platform-guide/README.md)
133
132
 
@@ -139,6 +138,22 @@ ErisPulse 是一个基于 Python 的事件驱动型多平台机器人开发框
139
138
  docker pull erispulse/erispulse:latest
140
139
  ```
141
140
 
141
+ <details>
142
+ <summary>Docker Hub不可用?</summary>
143
+
144
+ 如果 Docker Hub 无法访问,可以使用 GitHub Container Registry:
145
+
146
+ ```bash
147
+ docker pull ghcr.io/erispulse/erispulse:latest
148
+ ```
149
+
150
+ 使用 ghcr.io 镜像时,需要修改 `docker-compose.yml` 中的 image:
151
+ ```yaml
152
+ image: ghcr.io/erispulse/erispulse:latest
153
+ ```
154
+
155
+ </details>
156
+
142
157
  <details>
143
158
  <summary>快速启动</summary>
144
159
 
@@ -152,9 +167,9 @@ ERISPULSE_DASHBOARD_TOKEN=your-token docker compose up -d
152
167
 
153
168
  > 镜像内置 ErisPulse 框架和 Dashboard 管理面板,支持 `linux/amd64` 和 `linux/arm64` 架构。
154
169
 
155
- </details>
170
+ 启动后访问 `http://<host>:<port>/Dashboard`,使用设置的令牌作为密码登录 Dashboard 管理面板。
156
171
 
157
- 启动后访问 `http://localhost:8000/Dashboard`,使用设置的令牌作为密码登录 Dashboard 管理面板。
172
+ </details>
158
173
 
159
174
  ### 使用 pip 安装
160
175
 
@@ -16,11 +16,10 @@
16
16
  **事件驱动的多平台机器人开发框架**
17
17
 
18
18
  [![PyPI](https://img.shields.io/pypi/v/ErisPulse?style=flat-square)](https://pypi.org/project/ErisPulse/)
19
- [![Python Versions](https://img.shields.io/pypi/pyversions/ErisPulse?style=flat-square)](https://pypi.org/project/ErisPulse/)
20
- [![Docker Pulls](https://img.shields.io/docker/pulls/erispulse/erispulse?style=flat-square&logo=docker&label=pulls)](https://hub.docker.com/r/erispulse/erispulse)
21
- [![Docker Pulls](https://img.shields.io/docker/pulls/wsu2059/erispulse?style=flat-square&logo=docker&label=pulls)](https://hub.docker.com/r/erispulse/erispulse)
22
- [![Docker Version](https://img.shields.io/docker/v/erispulse/erispulse?style=flat-square&logo=docker&label=docker)](https://hub.docker.com/r/erispulse/erispulse)
19
+ [![Docker](https://img.shields.io/badge/Docker-2496ED?style=flat-square&logo=docker&logoColor=white)](https://hub.docker.com/r/erispulse/erispulse)
20
+ [![Python](https://img.shields.io/badge/Python-3.10+-3776AB?style=flat-square&logo=python&logoColor=white)](https://pypi.org/project/ErisPulse/)
23
21
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
22
+ [![Socket Badge](https://socket.dev/api/badge/pypi/package/ErisPulse/latest)](https://socket.dev/pypi/package/ErisPulse)
24
23
 
25
24
  </td>
26
25
  </tr>
@@ -46,16 +45,16 @@ ErisPulse 是一个基于 Python 的事件驱动型多平台机器人开发框
46
45
 
47
46
  | 适配器 | 说明 |
48
47
  |--------|------|
49
- | <img src=".github/assets/adapter_logo/kook.svg" width="20" /> [Kook](https://github.com/shanfishapp/ErisPulse-KookAdapter) | Kook(开黑啦)即时通讯平台 |
50
- | <img src=".github/assets/adapter_logo/matrix.svg" width="20" /> [Matrix](https://github.com/ErisPulse/ErisPulse-MatrixAdapter) | Matrix 去中心化通讯协议 |
51
- | <img src=".github/assets/adapter_logo/onebot.png" width="20" /> [OneBot11](https://github.com/ErisPulse/ErisPulse-OneBot11Adapter) | OneBot v11 通用机器人协议 |
52
- | <img src=".github/assets/adapter_logo/onebot.png" width="20" /> [OneBot12](https://github.com/ErisPulse/ErisPulse-OneBot12Adapter) | OneBot v12 标准协议 |
53
- | <img src=".github/assets/adapter_logo/qqbot.svg" width="20" /> [QQ](https://github.com/ErisPulse/ErisPulse-QQBotAdapter) | QQ 官方机器人平台 |
54
- | <img src=".github/assets/adapter_logo/sandbox.png" width="20" /> [沙箱](https://github.com/ErisPulse/ErisPulse-SandboxAdapter) | 网页端调试,无需接入真实平台 |
55
- | <img src=".github/assets/adapter_logo/telegram.svg" width="20" /> [Telegram](https://github.com/ErisPulse/ErisPulse-TelegramAdapter) | 全球性即时通讯平台 |
56
- | <img src=".github/assets/adapter_logo/email.svg" width="20" /> [邮件](https://github.com/ErisPulse/ErisPulse-EmailAdapter) | 邮件协议收发适配器 |
57
- | <img src=".github/assets/adapter_logo/yunhu.png" width="20" /> [云湖](https://github.com/ErisPulse/ErisPulse-YunhuAdapter) | 企业级即时通讯平台(机器人接入) |
58
- | <img src=".github/assets/adapter_logo/yunhu.png" width="20" /> [云湖用户](https://github.com/wsu2059q/ErisPulse-YunhuUserAdapter) | 基于云湖用户协议的接入适配器 |
48
+ | [Kook](https://github.com/shanfishapp/ErisPulse-KookAdapter) | Kook(开黑啦)即时通讯平台 |
49
+ | [Matrix](https://github.com/ErisPulse/ErisPulse-MatrixAdapter) | Matrix 去中心化通讯协议 |
50
+ | [OneBot11](https://github.com/ErisPulse/ErisPulse-OneBot11Adapter) | OneBot v11 通用机器人协议 |
51
+ | [OneBot12](https://github.com/ErisPulse/ErisPulse-OneBot12Adapter) | OneBot v12 标准协议 |
52
+ | [QQ](https://github.com/ErisPulse/ErisPulse-QQBotAdapter) | QQ 官方机器人平台 |
53
+ | [沙箱](https://github.com/ErisPulse/ErisPulse-SandboxAdapter) | 网页端调试,无需接入真实平台 |
54
+ | [Telegram](https://github.com/ErisPulse/ErisPulse-TelegramAdapter) | 全球性即时通讯平台 |
55
+ | [邮件](https://github.com/ErisPulse/ErisPulse-EmailAdapter) | 邮件协议收发适配器 |
56
+ | [云湖](https://github.com/ErisPulse/ErisPulse-YunhuAdapter) | 企业级即时通讯平台(机器人接入) |
57
+ | [云湖用户](https://github.com/wsu2059q/ErisPulse-YunhuUserAdapter) | 基于云湖用户协议的接入适配器 |
59
58
 
60
59
  查看 [适配器详情介绍](docs/zh-CN/platform-guide/README.md)
61
60
 
@@ -67,6 +66,22 @@ ErisPulse 是一个基于 Python 的事件驱动型多平台机器人开发框
67
66
  docker pull erispulse/erispulse:latest
68
67
  ```
69
68
 
69
+ <details>
70
+ <summary>Docker Hub不可用?</summary>
71
+
72
+ 如果 Docker Hub 无法访问,可以使用 GitHub Container Registry:
73
+
74
+ ```bash
75
+ docker pull ghcr.io/erispulse/erispulse:latest
76
+ ```
77
+
78
+ 使用 ghcr.io 镜像时,需要修改 `docker-compose.yml` 中的 image:
79
+ ```yaml
80
+ image: ghcr.io/erispulse/erispulse:latest
81
+ ```
82
+
83
+ </details>
84
+
70
85
  <details>
71
86
  <summary>快速启动</summary>
72
87
 
@@ -80,9 +95,9 @@ ERISPULSE_DASHBOARD_TOKEN=your-token docker compose up -d
80
95
 
81
96
  > 镜像内置 ErisPulse 框架和 Dashboard 管理面板,支持 `linux/amd64` 和 `linux/arm64` 架构。
82
97
 
83
- </details>
98
+ 启动后访问 `http://<host>:<port>/Dashboard`,使用设置的令牌作为密码登录 Dashboard 管理面板。
84
99
 
85
- 启动后访问 `http://localhost:8000/Dashboard`,使用设置的令牌作为密码登录 Dashboard 管理面板。
100
+ </details>
86
101
 
87
102
  ### 使用 pip 安装
88
103
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "ErisPulse"
7
- version = "2.4.3-dev.0"
7
+ version = "2.4.4"
8
8
  description = "ErisPulse 是一个模块化、可扩展的异步 Python SDK 框架,主要用于构建高效、可维护的机器人应用程序。"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -55,7 +55,7 @@ dependencies = [
55
55
  "watchdog>=4.0.0",
56
56
  "toml>=0.10.2",
57
57
  "fastapi>=0.116.1",
58
- "uvicorn>=0.30.0",
58
+ "uvicorn[standard]>=0.30.0",
59
59
  "packaging>=25.0",
60
60
  ]
61
61
 
@@ -16,7 +16,6 @@ from ..console import console
16
16
  from ..utils import PackageManager
17
17
  from ..base import Command
18
18
 
19
-
20
19
  class InitCommand(Command):
21
20
  name = "init"
22
21
  description = "初始化 ErisPulse 项目"
@@ -119,18 +118,7 @@ class InitCommand(Command):
119
118
  f.write("import asyncio\n")
120
119
  f.write("from ErisPulse import sdk\n\n")
121
120
  f.write("async def main():\n")
122
- f.write(' """主程序入口"""\n')
123
- f.write(" # 初始化 SDK\n")
124
- f.write(" await sdk.init()\n\n")
125
- f.write(" # 启动适配器\n")
126
- f.write(" await sdk.adapter.startup()\n\n")
127
- f.write(' print("ErisPulse 已启动,按 Ctrl+C 退出")\n')
128
- f.write(" try:\n")
129
- f.write(" while True:\n")
130
- f.write(" await asyncio.sleep(1)\n")
131
- f.write(" except KeyboardInterrupt:\n")
132
- f.write(" print(\"\\n正在关闭...\")\n")
133
- f.write(" await sdk.adapter.shutdown()\n\n")
121
+ f.write(" await sdk.run(keep_running=True)\n\n")
134
122
  f.write("if __name__ == \"__main__\":\n")
135
123
  f.write(" asyncio.run(main())\n")
136
124
 
@@ -5,8 +5,11 @@ Run 命令实现
5
5
  """
6
6
 
7
7
  import os
8
+ import sys
8
9
  import time
9
10
  import asyncio
11
+ import subprocess
12
+ import runpy
10
13
  from argparse import ArgumentParser
11
14
  from watchdog.observers import Observer
12
15
  from rich.panel import Panel
@@ -114,27 +117,62 @@ class RunCommand(Command):
114
117
  self._observer.join()
115
118
 
116
119
  def _run_script(self, script_path: str, reload_mode: bool):
117
- """
118
- 运行指定脚本文件
119
- """
120
- async def _run():
121
- from ... import sdk
120
+ script_path_abs = os.path.abspath(script_path)
122
121
 
123
- if reload_mode:
124
- loop = asyncio.get_running_loop()
125
- watch_dir = os.path.dirname(os.path.abspath(script_path))
126
- self._setup_watchdog(watch_dir, loop)
122
+ if reload_mode:
123
+ self._run_script_with_reload(script_path_abs)
124
+ else:
125
+ try:
126
+ runpy.run_path(script_path_abs, run_name="__main__")
127
+ except SystemExit:
128
+ pass
129
+ except KeyboardInterrupt:
130
+ pass
131
+
132
+ def _run_script_with_reload(self, script_path_abs: str):
133
+ watch_dir = os.path.dirname(script_path_abs)
134
+
135
+ process = subprocess.Popen([sys.executable, script_path_abs])
136
+
137
+ reload_state = {
138
+ "process": process,
139
+ "last_reload": 0.0,
140
+ }
141
+
142
+ class _ScriptReloadHandler(FileSystemEventHandler):
143
+ def on_modified(self, event):
144
+ now = time.time()
145
+ if now - reload_state["last_reload"] < 1.0:
146
+ return
147
+ if event.src_path.endswith(".py"):
148
+ reload_state["last_reload"] = now
149
+ console.print(f"检测到文件变更 ({os.path.basename(event.src_path)}),正在重启...")
150
+ reload_state["process"].terminate()
151
+ reload_state["process"].wait()
152
+ reload_state["process"] = subprocess.Popen([sys.executable, script_path_abs])
153
+
154
+ observer = Observer()
155
+ observer.schedule(_ScriptReloadHandler(), watch_dir, recursive=True)
156
+ observer.start()
127
157
 
128
- await sdk.run(keep_running=True)
158
+ console.print(Panel(
159
+ f"[bold]开发重载模式[/]\n监控目录: [path]{watch_dir}[/]",
160
+ title="热重载已启动",
161
+ border_style="info"
162
+ ))
129
163
 
130
164
  try:
131
- asyncio.run(_run())
165
+ while True:
166
+ proc = reload_state["process"]
167
+ proc.wait()
168
+ time.sleep(0.3)
169
+ if reload_state["process"] is proc:
170
+ break
132
171
  except KeyboardInterrupt:
133
- pass
172
+ reload_state["process"].terminate()
134
173
  finally:
135
- if reload_mode and hasattr(self, '_observer'):
136
- self._observer.stop()
137
- self._observer.join()
174
+ observer.stop()
175
+ observer.join()
138
176
 
139
177
  def _setup_watchdog(self, watch_dir: str, loop: asyncio.AbstractEventLoop):
140
178
  if not os.path.exists(watch_dir):
@@ -11,8 +11,11 @@ Run 命令实现
11
11
  """
12
12
 
13
13
  import os
14
+ import sys
14
15
  import time
15
16
  import asyncio
17
+ import subprocess
18
+ import runpy
16
19
  from argparse import ArgumentParser
17
20
  from watchdog.observers import Observer
18
21
  from rich.panel import Panel
@@ -55,9 +58,8 @@ class RunCommand(Command):
55
58
  """
56
59
  ...
57
60
  def _run_script(self: object, script_path: str, reload_mode: bool) -> ...:
58
- """
59
- 运行指定脚本文件
60
- """
61
+ ...
62
+ def _run_script_with_reload(self: object, script_path_abs: str) -> ...:
61
63
  ...
62
64
  def _setup_watchdog(self: object, watch_dir: str, loop: asyncio.AbstractEventLoop) -> ...:
63
65
  ...
@@ -0,0 +1,17 @@
1
+ """
2
+ ErisPulse 基础模块
3
+
4
+ 提供平台适配器、模块和存储后端的基类
5
+ """
6
+
7
+ from .adapter import SendDSL, BaseAdapter
8
+ from .module import BaseModule
9
+ from .storage import BaseStorage, BaseQueryBuilder
10
+
11
+ __all__ = [
12
+ "BaseAdapter",
13
+ "SendDSL",
14
+ "BaseModule",
15
+ "BaseStorage",
16
+ "BaseQueryBuilder",
17
+ ]
@@ -6,9 +6,10 @@
6
6
 
7
7
  """
8
8
  ErisPulse 基础模块
9
-
10
- 提供平台适配器以及模块的基类
9
+
10
+ 提供平台适配器、模块和存储后端的基类
11
11
  """
12
12
 
13
13
  from .adapter import SendDSL, BaseAdapter
14
14
  from .module import BaseModule
15
+ from .storage import BaseStorage, BaseQueryBuilder