AstrBot 3.4.39__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 (327) hide show
  1. astrbot-3.4.39/.dockerignore +23 -0
  2. astrbot-3.4.39/.github/ISSUE_TEMPLATE/PLUGIN_PUBLISH.yml +40 -0
  3. astrbot-3.4.39/.github/ISSUE_TEMPLATE/bug-report.yml +82 -0
  4. astrbot-3.4.39/.github/ISSUE_TEMPLATE/feature-request.yml +42 -0
  5. astrbot-3.4.39/.github/PULL_REQUEST_TEMPLATE.md +14 -0
  6. astrbot-3.4.39/.github/workflows/auto_release.yml +64 -0
  7. astrbot-3.4.39/.github/workflows/codeql.yml +93 -0
  8. astrbot-3.4.39/.github/workflows/coverage_test.yml +45 -0
  9. astrbot-3.4.39/.github/workflows/dashboard_ci.yml +31 -0
  10. astrbot-3.4.39/.github/workflows/docker-image.yml +43 -0
  11. astrbot-3.4.39/.github/workflows/stale.yml +27 -0
  12. astrbot-3.4.39/.gitignore +32 -0
  13. astrbot-3.4.39/.pre-commit-config.yaml +13 -0
  14. astrbot-3.4.39/.python-version +1 -0
  15. astrbot-3.4.39/CODE_OF_CONDUCT.md +128 -0
  16. astrbot-3.4.39/Dockerfile +35 -0
  17. astrbot-3.4.39/Dockerfile_with_node +35 -0
  18. astrbot-3.4.39/LICENSE +661 -0
  19. astrbot-3.4.39/PKG-INFO +244 -0
  20. astrbot-3.4.39/README.md +203 -0
  21. astrbot-3.4.39/README_en.md +182 -0
  22. astrbot-3.4.39/README_ja.md +170 -0
  23. astrbot-3.4.39/astrbot/__init__.py +3 -0
  24. astrbot-3.4.39/astrbot/api/__init__.py +7 -0
  25. astrbot-3.4.39/astrbot/api/all.py +53 -0
  26. astrbot-3.4.39/astrbot/api/event/__init__.py +18 -0
  27. astrbot-3.4.39/astrbot/api/event/filter/__init__.py +49 -0
  28. astrbot-3.4.39/astrbot/api/message_components.py +1 -0
  29. astrbot-3.4.39/astrbot/api/platform/__init__.py +23 -0
  30. astrbot-3.4.39/astrbot/api/provider/__init__.py +17 -0
  31. astrbot-3.4.39/astrbot/api/star/__init__.py +8 -0
  32. astrbot-3.4.39/astrbot/api/util/__init__.py +7 -0
  33. astrbot-3.4.39/astrbot/cli/__main__.py +238 -0
  34. astrbot-3.4.39/astrbot/core/__init__.py +33 -0
  35. astrbot-3.4.39/astrbot/core/config/__init__.py +9 -0
  36. astrbot-3.4.39/astrbot/core/config/astrbot_config.py +132 -0
  37. astrbot-3.4.39/astrbot/core/config/default.py +1343 -0
  38. astrbot-3.4.39/astrbot/core/conversation_mgr.py +199 -0
  39. astrbot-3.4.39/astrbot/core/core_lifecycle.py +231 -0
  40. astrbot-3.4.39/astrbot/core/db/__init__.py +161 -0
  41. astrbot-3.4.39/astrbot/core/db/plugin/sqlite_impl.py +112 -0
  42. astrbot-3.4.39/astrbot/core/db/po.py +89 -0
  43. astrbot-3.4.39/astrbot/core/db/sqlite.py +565 -0
  44. astrbot-3.4.39/astrbot/core/db/sqlite_init.sql +50 -0
  45. astrbot-3.4.39/astrbot/core/event_bus.py +57 -0
  46. astrbot-3.4.39/astrbot/core/initial_loader.py +48 -0
  47. astrbot-3.4.39/astrbot/core/log.py +248 -0
  48. astrbot-3.4.39/astrbot/core/message/components.py +607 -0
  49. astrbot-3.4.39/astrbot/core/message/message_event_result.py +222 -0
  50. astrbot-3.4.39/astrbot/core/pipeline/__init__.py +41 -0
  51. astrbot-3.4.39/astrbot/core/pipeline/content_safety_check/stage.py +37 -0
  52. astrbot-3.4.39/astrbot/core/pipeline/content_safety_check/strategies/__init__.py +8 -0
  53. astrbot-3.4.39/astrbot/core/pipeline/content_safety_check/strategies/baidu_aip.py +30 -0
  54. astrbot-3.4.39/astrbot/core/pipeline/content_safety_check/strategies/keywords.py +23 -0
  55. astrbot-3.4.39/astrbot/core/pipeline/content_safety_check/strategies/strategy.py +34 -0
  56. astrbot-3.4.39/astrbot/core/pipeline/context.py +11 -0
  57. astrbot-3.4.39/astrbot/core/pipeline/platform_compatibility/stage.py +56 -0
  58. astrbot-3.4.39/astrbot/core/pipeline/preprocess_stage/stage.py +73 -0
  59. astrbot-3.4.39/astrbot/core/pipeline/process_stage/method/llm_request.py +539 -0
  60. astrbot-3.4.39/astrbot/core/pipeline/process_stage/method/star_request.py +67 -0
  61. astrbot-3.4.39/astrbot/core/pipeline/process_stage/stage.py +68 -0
  62. astrbot-3.4.39/astrbot/core/pipeline/rate_limit_check/stage.py +101 -0
  63. astrbot-3.4.39/astrbot/core/pipeline/respond/stage.py +230 -0
  64. astrbot-3.4.39/astrbot/core/pipeline/result_decorate/stage.py +258 -0
  65. astrbot-3.4.39/astrbot/core/pipeline/scheduler.py +79 -0
  66. astrbot-3.4.39/astrbot/core/pipeline/stage.py +110 -0
  67. astrbot-3.4.39/astrbot/core/pipeline/waking_check/stage.py +165 -0
  68. astrbot-3.4.39/astrbot/core/pipeline/whitelist_check/stage.py +65 -0
  69. astrbot-3.4.39/astrbot/core/platform/__init__.py +14 -0
  70. astrbot-3.4.39/astrbot/core/platform/astr_message_event.py +407 -0
  71. astrbot-3.4.39/astrbot/core/platform/astrbot_message.py +69 -0
  72. astrbot-3.4.39/astrbot/core/platform/manager.py +154 -0
  73. astrbot-3.4.39/astrbot/core/platform/message_type.py +7 -0
  74. astrbot-3.4.39/astrbot/core/platform/platform.py +59 -0
  75. astrbot-3.4.39/astrbot/core/platform/platform_metadata.py +16 -0
  76. astrbot-3.4.39/astrbot/core/platform/register.py +48 -0
  77. astrbot-3.4.39/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_message_event.py +139 -0
  78. astrbot-3.4.39/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py +330 -0
  79. astrbot-3.4.39/astrbot/core/platform/sources/dingtalk/dingtalk_adapter.py +228 -0
  80. astrbot-3.4.39/astrbot/core/platform/sources/dingtalk/dingtalk_event.py +75 -0
  81. astrbot-3.4.39/astrbot/core/platform/sources/gewechat/client.py +754 -0
  82. astrbot-3.4.39/astrbot/core/platform/sources/gewechat/downloader.py +55 -0
  83. astrbot-3.4.39/astrbot/core/platform/sources/gewechat/gewechat_event.py +231 -0
  84. astrbot-3.4.39/astrbot/core/platform/sources/gewechat/gewechat_platform_adapter.py +103 -0
  85. astrbot-3.4.39/astrbot/core/platform/sources/gewechat/xml_data_parser.py +78 -0
  86. astrbot-3.4.39/astrbot/core/platform/sources/lark/lark_adapter.py +232 -0
  87. astrbot-3.4.39/astrbot/core/platform/sources/lark/lark_event.py +118 -0
  88. astrbot-3.4.39/astrbot/core/platform/sources/qqofficial/qqofficial_message_event.py +213 -0
  89. astrbot-3.4.39/astrbot/core/platform/sources/qqofficial/qqofficial_platform_adapter.py +212 -0
  90. astrbot-3.4.39/astrbot/core/platform/sources/qqofficial_webhook/qo_webhook_adapter.py +124 -0
  91. astrbot-3.4.39/astrbot/core/platform/sources/qqofficial_webhook/qo_webhook_event.py +15 -0
  92. astrbot-3.4.39/astrbot/core/platform/sources/qqofficial_webhook/qo_webhook_server.py +110 -0
  93. astrbot-3.4.39/astrbot/core/platform/sources/telegram/tg_adapter.py +353 -0
  94. astrbot-3.4.39/astrbot/core/platform/sources/telegram/tg_event.py +198 -0
  95. astrbot-3.4.39/astrbot/core/platform/sources/webchat/webchat_adapter.py +124 -0
  96. astrbot-3.4.39/astrbot/core/platform/sources/webchat/webchat_event.py +124 -0
  97. astrbot-3.4.39/astrbot/core/platform/sources/wecom/wecom_adapter.py +244 -0
  98. astrbot-3.4.39/astrbot/core/platform/sources/wecom/wecom_event.py +99 -0
  99. astrbot-3.4.39/astrbot/core/provider/__init__.py +5 -0
  100. astrbot-3.4.39/astrbot/core/provider/entites.py +19 -0
  101. astrbot-3.4.39/astrbot/core/provider/entities.py +281 -0
  102. astrbot-3.4.39/astrbot/core/provider/func_tool_manager.py +523 -0
  103. astrbot-3.4.39/astrbot/core/provider/manager.py +386 -0
  104. astrbot-3.4.39/astrbot/core/provider/provider.py +181 -0
  105. astrbot-3.4.39/astrbot/core/provider/register.py +51 -0
  106. astrbot-3.4.39/astrbot/core/provider/sources/anthropic_source.py +232 -0
  107. astrbot-3.4.39/astrbot/core/provider/sources/dashscope_source.py +203 -0
  108. astrbot-3.4.39/astrbot/core/provider/sources/dashscope_tts.py +39 -0
  109. astrbot-3.4.39/astrbot/core/provider/sources/dify_source.py +281 -0
  110. astrbot-3.4.39/astrbot/core/provider/sources/edge_tts_source.py +121 -0
  111. astrbot-3.4.39/astrbot/core/provider/sources/fishaudio_tts_api_source.py +105 -0
  112. astrbot-3.4.39/astrbot/core/provider/sources/gemini_source.py +581 -0
  113. astrbot-3.4.39/astrbot/core/provider/sources/gsvi_tts_source.py +52 -0
  114. astrbot-3.4.39/astrbot/core/provider/sources/llmtuner_source.py +132 -0
  115. astrbot-3.4.39/astrbot/core/provider/sources/openai_source.py +537 -0
  116. astrbot-3.4.39/astrbot/core/provider/sources/openai_tts_api_source.py +41 -0
  117. astrbot-3.4.39/astrbot/core/provider/sources/sensevoice_selfhosted_source.py +104 -0
  118. astrbot-3.4.39/astrbot/core/provider/sources/whisper_api_source.py +72 -0
  119. astrbot-3.4.39/astrbot/core/provider/sources/whisper_selfhosted_source.py +72 -0
  120. astrbot-3.4.39/astrbot/core/provider/sources/zhipu_source.py +83 -0
  121. astrbot-3.4.39/astrbot/core/rag/embedding/openai_source.py +20 -0
  122. astrbot-3.4.39/astrbot/core/rag/knowledge_db_mgr.py +94 -0
  123. astrbot-3.4.39/astrbot/core/rag/store/__init__.py +9 -0
  124. astrbot-3.4.39/astrbot/core/rag/store/chroma_db.py +42 -0
  125. astrbot-3.4.39/astrbot/core/star/README.md +5 -0
  126. astrbot-3.4.39/astrbot/core/star/__init__.py +32 -0
  127. astrbot-3.4.39/astrbot/core/star/config.py +85 -0
  128. astrbot-3.4.39/astrbot/core/star/context.py +303 -0
  129. astrbot-3.4.39/astrbot/core/star/filter/__init__.py +14 -0
  130. astrbot-3.4.39/astrbot/core/star/filter/command.py +143 -0
  131. astrbot-3.4.39/astrbot/core/star/filter/command_group.py +122 -0
  132. astrbot-3.4.39/astrbot/core/star/filter/custom_filter.py +61 -0
  133. astrbot-3.4.39/astrbot/core/star/filter/event_message_type.py +31 -0
  134. astrbot-3.4.39/astrbot/core/star/filter/permission.py +27 -0
  135. astrbot-3.4.39/astrbot/core/star/filter/platform_adapter_type.py +38 -0
  136. astrbot-3.4.39/astrbot/core/star/filter/regex.py +16 -0
  137. astrbot-3.4.39/astrbot/core/star/register/__init__.py +33 -0
  138. astrbot-3.4.39/astrbot/core/star/register/star.py +38 -0
  139. astrbot-3.4.39/astrbot/core/star/register/star_handler.py +390 -0
  140. astrbot-3.4.39/astrbot/core/star/star.py +75 -0
  141. astrbot-3.4.39/astrbot/core/star/star_handler.py +185 -0
  142. astrbot-3.4.39/astrbot/core/star/star_manager.py +789 -0
  143. astrbot-3.4.39/astrbot/core/star/star_tools.py +192 -0
  144. astrbot-3.4.39/astrbot/core/star/updator.py +84 -0
  145. astrbot-3.4.39/astrbot/core/updator.py +100 -0
  146. astrbot-3.4.39/astrbot/core/utils/command_parser.py +23 -0
  147. astrbot-3.4.39/astrbot/core/utils/dify_api_client.py +152 -0
  148. astrbot-3.4.39/astrbot/core/utils/io.py +228 -0
  149. astrbot-3.4.39/astrbot/core/utils/log_pipe.py +36 -0
  150. astrbot-3.4.39/astrbot/core/utils/metrics.py +74 -0
  151. astrbot-3.4.39/astrbot/core/utils/path_util.py +70 -0
  152. astrbot-3.4.39/astrbot/core/utils/pip_installer.py +40 -0
  153. astrbot-3.4.39/astrbot/core/utils/session_waiter.py +198 -0
  154. astrbot-3.4.39/astrbot/core/utils/shared_preferences.py +38 -0
  155. astrbot-3.4.39/astrbot/core/utils/t2i/__init__.py +13 -0
  156. astrbot-3.4.39/astrbot/core/utils/t2i/local_strategy.py +784 -0
  157. astrbot-3.4.39/astrbot/core/utils/t2i/network_strategy.py +77 -0
  158. astrbot-3.4.39/astrbot/core/utils/t2i/renderer.py +46 -0
  159. astrbot-3.4.39/astrbot/core/utils/t2i/template/base.html +247 -0
  160. astrbot-3.4.39/astrbot/core/utils/tencent_record_helper.py +52 -0
  161. astrbot-3.4.39/astrbot/core/zip_updator.py +209 -0
  162. astrbot-3.4.39/astrbot/dashboard/routes/__init__.py +24 -0
  163. astrbot-3.4.39/astrbot/dashboard/routes/auth.py +78 -0
  164. astrbot-3.4.39/astrbot/dashboard/routes/chat.py +258 -0
  165. astrbot-3.4.39/astrbot/dashboard/routes/config.py +368 -0
  166. astrbot-3.4.39/astrbot/dashboard/routes/conversation.py +215 -0
  167. astrbot-3.4.39/astrbot/dashboard/routes/log.py +44 -0
  168. astrbot-3.4.39/astrbot/dashboard/routes/plugin.py +455 -0
  169. astrbot-3.4.39/astrbot/dashboard/routes/route.py +37 -0
  170. astrbot-3.4.39/astrbot/dashboard/routes/stat.py +118 -0
  171. astrbot-3.4.39/astrbot/dashboard/routes/static_file.py +34 -0
  172. astrbot-3.4.39/astrbot/dashboard/routes/tools.py +290 -0
  173. astrbot-3.4.39/astrbot/dashboard/routes/update.py +147 -0
  174. astrbot-3.4.39/astrbot/dashboard/server.py +178 -0
  175. astrbot-3.4.39/changelogs/v3.4.0.md +19 -0
  176. astrbot-3.4.39/changelogs/v3.4.1.md +4 -0
  177. astrbot-3.4.39/changelogs/v3.4.10.md +12 -0
  178. astrbot-3.4.39/changelogs/v3.4.11.md +6 -0
  179. astrbot-3.4.39/changelogs/v3.4.12.md +6 -0
  180. astrbot-3.4.39/changelogs/v3.4.13.md +4 -0
  181. astrbot-3.4.39/changelogs/v3.4.14.md +8 -0
  182. astrbot-3.4.39/changelogs/v3.4.15.md +9 -0
  183. astrbot-3.4.39/changelogs/v3.4.16.md +6 -0
  184. astrbot-3.4.39/changelogs/v3.4.17.md +11 -0
  185. astrbot-3.4.39/changelogs/v3.4.18.md +12 -0
  186. astrbot-3.4.39/changelogs/v3.4.19.md +13 -0
  187. astrbot-3.4.39/changelogs/v3.4.20.md +15 -0
  188. astrbot-3.4.39/changelogs/v3.4.21.md +19 -0
  189. astrbot-3.4.39/changelogs/v3.4.22.md +12 -0
  190. astrbot-3.4.39/changelogs/v3.4.23.md +11 -0
  191. astrbot-3.4.39/changelogs/v3.4.24.md +11 -0
  192. astrbot-3.4.39/changelogs/v3.4.25.md +9 -0
  193. astrbot-3.4.39/changelogs/v3.4.26.md +12 -0
  194. astrbot-3.4.39/changelogs/v3.4.27.md +14 -0
  195. astrbot-3.4.39/changelogs/v3.4.28.md +12 -0
  196. astrbot-3.4.39/changelogs/v3.4.29.md +14 -0
  197. astrbot-3.4.39/changelogs/v3.4.3.md +14 -0
  198. astrbot-3.4.39/changelogs/v3.4.30.md +5 -0
  199. astrbot-3.4.39/changelogs/v3.4.31.md +18 -0
  200. astrbot-3.4.39/changelogs/v3.4.32.md +15 -0
  201. astrbot-3.4.39/changelogs/v3.4.33.md +13 -0
  202. astrbot-3.4.39/changelogs/v3.4.35.md +19 -0
  203. astrbot-3.4.39/changelogs/v3.4.36.md +15 -0
  204. astrbot-3.4.39/changelogs/v3.4.37.md +6 -0
  205. astrbot-3.4.39/changelogs/v3.4.38.md +57 -0
  206. astrbot-3.4.39/changelogs/v3.4.39.md +4 -0
  207. astrbot-3.4.39/changelogs/v3.4.4.md +6 -0
  208. astrbot-3.4.39/changelogs/v3.4.5.md +9 -0
  209. astrbot-3.4.39/changelogs/v3.4.6.md +9 -0
  210. astrbot-3.4.39/changelogs/v3.4.7.md +6 -0
  211. astrbot-3.4.39/changelogs/v3.4.8.md +5 -0
  212. astrbot-3.4.39/changelogs/v3.4.9.md +6 -0
  213. astrbot-3.4.39/changelogs/v3.5.0.md +59 -0
  214. astrbot-3.4.39/changelogs/v3.5.1.md +30 -0
  215. astrbot-3.4.39/changelogs/v3.5.2.md +31 -0
  216. astrbot-3.4.39/changelogs/v3.5.3.1.md +35 -0
  217. astrbot-3.4.39/changelogs/v3.5.3.2.md +41 -0
  218. astrbot-3.4.39/changelogs/v3.5.3.md +34 -0
  219. astrbot-3.4.39/compose.yml +21 -0
  220. astrbot-3.4.39/dashboard/.gitignore +2 -0
  221. astrbot-3.4.39/dashboard/LICENSE +21 -0
  222. astrbot-3.4.39/dashboard/README.md +3 -0
  223. astrbot-3.4.39/dashboard/env.d.ts +1 -0
  224. astrbot-3.4.39/dashboard/index.html +19 -0
  225. astrbot-3.4.39/dashboard/public/_redirects +1 -0
  226. astrbot-3.4.39/dashboard/public/favicon.svg +1 -0
  227. astrbot-3.4.39/dashboard/src/App.vue +7 -0
  228. astrbot-3.4.39/dashboard/src/assets/images/auth/social-google.svg +6 -0
  229. astrbot-3.4.39/dashboard/src/assets/images/favicon.svg +18 -0
  230. astrbot-3.4.39/dashboard/src/assets/images/icons/icon-card.svg +5 -0
  231. astrbot-3.4.39/dashboard/src/assets/images/logo-normal.svg +40 -0
  232. astrbot-3.4.39/dashboard/src/assets/images/logo-waifu.png +0 -0
  233. astrbot-3.4.39/dashboard/src/assets/images/logos/logo.svg +12 -0
  234. astrbot-3.4.39/dashboard/src/assets/images/logos/logolight.svg +12 -0
  235. astrbot-3.4.39/dashboard/src/assets/images/maintenance/img-error-bg.svg +34 -0
  236. astrbot-3.4.39/dashboard/src/assets/images/maintenance/img-error-blue.svg +43 -0
  237. astrbot-3.4.39/dashboard/src/assets/images/maintenance/img-error-purple.svg +42 -0
  238. astrbot-3.4.39/dashboard/src/assets/images/maintenance/img-error-text.svg +27 -0
  239. astrbot-3.4.39/dashboard/src/assets/images/profile/user-round.svg +15 -0
  240. astrbot-3.4.39/dashboard/src/components/ConfirmDialog.vue +44 -0
  241. astrbot-3.4.39/dashboard/src/components/shared/AstrBotConfig.vue +373 -0
  242. astrbot-3.4.39/dashboard/src/components/shared/ConsoleDisplayer.vue +182 -0
  243. astrbot-3.4.39/dashboard/src/components/shared/ExtensionCard.vue +210 -0
  244. astrbot-3.4.39/dashboard/src/components/shared/ItemCardGrid.vue +134 -0
  245. astrbot-3.4.39/dashboard/src/components/shared/ListConfigItem.vue +129 -0
  246. astrbot-3.4.39/dashboard/src/components/shared/ReadmeDialog.vue +302 -0
  247. astrbot-3.4.39/dashboard/src/components/shared/UiParentCard.vue +20 -0
  248. astrbot-3.4.39/dashboard/src/components/shared/WaitingForRestart.vue +73 -0
  249. astrbot-3.4.39/dashboard/src/config.ts +17 -0
  250. astrbot-3.4.39/dashboard/src/layouts/blank/BlankLayout.vue +8 -0
  251. astrbot-3.4.39/dashboard/src/layouts/full/FullLayout.vue +26 -0
  252. astrbot-3.4.39/dashboard/src/layouts/full/vertical-header/VerticalHeader.vue +419 -0
  253. astrbot-3.4.39/dashboard/src/layouts/full/vertical-sidebar/NavItem.vue +35 -0
  254. astrbot-3.4.39/dashboard/src/layouts/full/vertical-sidebar/VerticalSidebar.vue +248 -0
  255. astrbot-3.4.39/dashboard/src/layouts/full/vertical-sidebar/sidebarItem.ts +85 -0
  256. astrbot-3.4.39/dashboard/src/main.ts +36 -0
  257. astrbot-3.4.39/dashboard/src/plugins/confirmPlugin.ts +23 -0
  258. astrbot-3.4.39/dashboard/src/plugins/vuetify.ts +30 -0
  259. astrbot-3.4.39/dashboard/src/router/AuthRoutes.ts +16 -0
  260. astrbot-3.4.39/dashboard/src/router/MainRoutes.ts +82 -0
  261. astrbot-3.4.39/dashboard/src/router/index.ts +35 -0
  262. astrbot-3.4.39/dashboard/src/scss/_override.scss +36 -0
  263. astrbot-3.4.39/dashboard/src/scss/_variables.scss +124 -0
  264. astrbot-3.4.39/dashboard/src/scss/components/_VButtons.scss +23 -0
  265. astrbot-3.4.39/dashboard/src/scss/components/_VCard.scss +26 -0
  266. astrbot-3.4.39/dashboard/src/scss/components/_VField.scss +9 -0
  267. astrbot-3.4.39/dashboard/src/scss/components/_VInput.scss +17 -0
  268. astrbot-3.4.39/dashboard/src/scss/components/_VNavigationDrawer.scss +3 -0
  269. astrbot-3.4.39/dashboard/src/scss/components/_VShadow.scss +3 -0
  270. astrbot-3.4.39/dashboard/src/scss/components/_VTabs.scss +11 -0
  271. astrbot-3.4.39/dashboard/src/scss/components/_VTextField.scss +17 -0
  272. astrbot-3.4.39/dashboard/src/scss/layout/_container.scss +124 -0
  273. astrbot-3.4.39/dashboard/src/scss/layout/_sidebar.scss +54 -0
  274. astrbot-3.4.39/dashboard/src/scss/pages/_dashboards.scss +93 -0
  275. astrbot-3.4.39/dashboard/src/scss/style.scss +16 -0
  276. astrbot-3.4.39/dashboard/src/stores/auth.ts +43 -0
  277. astrbot-3.4.39/dashboard/src/stores/common.js +159 -0
  278. astrbot-3.4.39/dashboard/src/stores/customizer.ts +26 -0
  279. astrbot-3.4.39/dashboard/src/theme/LightTheme.ts +41 -0
  280. astrbot-3.4.39/dashboard/src/types/themeTypes/ThemeType.ts +35 -0
  281. astrbot-3.4.39/dashboard/src/types/vue3-print-nb.d.ts +1 -0
  282. astrbot-3.4.39/dashboard/src/types/vue_tabler_icon.d.ts +10 -0
  283. astrbot-3.4.39/dashboard/src/views/ATRIProject.vue +87 -0
  284. astrbot-3.4.39/dashboard/src/views/AboutPage.vue +84 -0
  285. astrbot-3.4.39/dashboard/src/views/ChatPage.vue +1116 -0
  286. astrbot-3.4.39/dashboard/src/views/ConfigPage.vue +257 -0
  287. astrbot-3.4.39/dashboard/src/views/ConsolePage.vue +111 -0
  288. astrbot-3.4.39/dashboard/src/views/ConversationPage.vue +1117 -0
  289. astrbot-3.4.39/dashboard/src/views/ExtensionMarketplace.vue +685 -0
  290. astrbot-3.4.39/dashboard/src/views/ExtensionPage.vue +794 -0
  291. astrbot-3.4.39/dashboard/src/views/PlatformPage.vue +305 -0
  292. astrbot-3.4.39/dashboard/src/views/ProviderPage.vue +329 -0
  293. astrbot-3.4.39/dashboard/src/views/Settings.vue +69 -0
  294. astrbot-3.4.39/dashboard/src/views/ToolUsePage.vue +1078 -0
  295. astrbot-3.4.39/dashboard/src/views/authentication/auth/LoginPage.vue +25 -0
  296. astrbot-3.4.39/dashboard/src/views/authentication/authForms/AuthLogin.vue +87 -0
  297. astrbot-3.4.39/dashboard/src/views/dashboards/default/DefaultDashboard.vue +239 -0
  298. astrbot-3.4.39/dashboard/src/views/dashboards/default/components/MemoryUsage.vue +140 -0
  299. astrbot-3.4.39/dashboard/src/views/dashboards/default/components/MessageStat.vue +370 -0
  300. astrbot-3.4.39/dashboard/src/views/dashboards/default/components/OnlinePlatform.vue +84 -0
  301. astrbot-3.4.39/dashboard/src/views/dashboards/default/components/OnlineTime.vue +190 -0
  302. astrbot-3.4.39/dashboard/src/views/dashboards/default/components/PlatformStat.vue +253 -0
  303. astrbot-3.4.39/dashboard/src/views/dashboards/default/components/RunningTime.vue +89 -0
  304. astrbot-3.4.39/dashboard/src/views/dashboards/default/components/TotalMessage.vue +97 -0
  305. astrbot-3.4.39/dashboard/tsconfig.json +18 -0
  306. astrbot-3.4.39/dashboard/tsconfig.vite-config.json +9 -0
  307. astrbot-3.4.39/dashboard/vite.config.ts +47 -0
  308. astrbot-3.4.39/main.py +83 -0
  309. astrbot-3.4.39/packages/astrbot/long_term_memory.py +142 -0
  310. astrbot-3.4.39/packages/astrbot/main.py +1328 -0
  311. astrbot-3.4.39/packages/python_interpreter/main.py +522 -0
  312. astrbot-3.4.39/packages/python_interpreter/requirements.txt +1 -0
  313. astrbot-3.4.39/packages/python_interpreter/shared/api.py +22 -0
  314. astrbot-3.4.39/packages/reminder/main.py +258 -0
  315. astrbot-3.4.39/packages/session_controller/main.py +115 -0
  316. astrbot-3.4.39/packages/web_searcher/engines/__init__.py +99 -0
  317. astrbot-3.4.39/packages/web_searcher/engines/bing.py +40 -0
  318. astrbot-3.4.39/packages/web_searcher/engines/google.py +30 -0
  319. astrbot-3.4.39/packages/web_searcher/engines/sogo.py +47 -0
  320. astrbot-3.4.39/packages/web_searcher/main.py +156 -0
  321. astrbot-3.4.39/pyproject.toml +70 -0
  322. astrbot-3.4.39/requirements.txt +33 -0
  323. astrbot-3.4.39/tests/test_dashboard.py +165 -0
  324. astrbot-3.4.39/tests/test_main.py +55 -0
  325. astrbot-3.4.39/tests/test_pipeline.py +285 -0
  326. astrbot-3.4.39/tests/test_plugin_manager.py +83 -0
  327. astrbot-3.4.39/uv.lock +2282 -0
@@ -0,0 +1,23 @@
1
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
2
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
3
+ # github acions
4
+ .github/
5
+ .*ignore
6
+ .git/
7
+ # User-specific stuff
8
+ .idea/
9
+ # Byte-compiled / optimized / DLL files
10
+ __pycache__/
11
+ # Environments
12
+ .env
13
+ .venv
14
+ env/
15
+ venv*/
16
+ ENV/
17
+ .conda/
18
+ README*.md
19
+ dashboard/
20
+ data/
21
+ changelogs/
22
+ tests/
23
+ .ruff_cache/
@@ -0,0 +1,40 @@
1
+ name: '🥳 发布插件'
2
+ title: "[Plugin] 插件名"
3
+ description: 提交插件到插件市场
4
+ labels: [ "plugin-publish" ]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ 欢迎发布插件到插件市场!请确保您的插件经过**完整的**测试。
10
+
11
+ - type: textarea
12
+ attributes:
13
+ label: 插件仓库
14
+ description: 插件的 GitHub 仓库链接
15
+ placeholder: >
16
+ 如 https://github.com/Soulter/astrbot-github-cards
17
+
18
+ - type: textarea
19
+ attributes:
20
+ label: 描述
21
+ value: |
22
+ 插件名:
23
+ 插件作者:
24
+ 插件简介:
25
+ 支持的消息平台:(必填,如 QQ、微信、飞书)
26
+ 标签:(可选)
27
+ 社交链接:(可选, 将会在插件市场作者名称上作为可点击的链接)
28
+ description: 必填。请以列表的字段按顺序将插件名、插件作者、插件简介放在这里。如果您不知道支持哪些消息平台,请填写测试过的消息平台。
29
+
30
+ - type: checkboxes
31
+ attributes:
32
+ label: Code of Conduct
33
+ options:
34
+ - label: >
35
+ 我已阅读并同意遵守该项目的 [行为准则](https://docs.github.com/zh/site-policy/github-terms/github-community-code-of-conduct)。
36
+ required: true
37
+
38
+ - type: markdown
39
+ attributes:
40
+ value: "❤️"
@@ -0,0 +1,82 @@
1
+ name: '🐛 报告 Bug'
2
+ title: '[Bug]'
3
+ description: 提交报告帮助我们改进。
4
+ labels: [ 'bug' ]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ 感谢您抽出时间报告问题!请准确解释您的问题。如果可能,请提供一个可复现的片段(这有助于更快地解决问题)。
10
+ - type: textarea
11
+ attributes:
12
+ label: 发生了什么
13
+ description: 描述你遇到的异常
14
+ placeholder: >
15
+ 一个清晰且具体的描述这个异常是什么。
16
+ validations:
17
+ required: true
18
+
19
+ - type: textarea
20
+ attributes:
21
+ label: 如何复现?
22
+ description: >
23
+ 复现该问题的步骤
24
+ placeholder: >
25
+ 如: 1. 打开 '...'
26
+ validations:
27
+ required: true
28
+
29
+ - type: textarea
30
+ attributes:
31
+ label: AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
32
+ description: >
33
+ 请提供您的 AstrBot 版本和部署方式。
34
+ placeholder: >
35
+ 如: 3.1.8 Docker, 3.1.7 Windows启动器
36
+ validations:
37
+ required: true
38
+
39
+ - type: dropdown
40
+ attributes:
41
+ label: 操作系统
42
+ description: |
43
+ 你在哪个操作系统上遇到了这个问题?
44
+ multiple: false
45
+ options:
46
+ - 'Windows'
47
+ - 'macOS'
48
+ - 'Linux'
49
+ - 'Other'
50
+ - 'Not sure'
51
+ validations:
52
+ required: true
53
+
54
+ - type: textarea
55
+ attributes:
56
+ label: 报错日志
57
+ description: >
58
+ 如报错日志、截图等。请提供完整的 Debug 级别的日志,不要介意它很长!
59
+ placeholder: >
60
+ 请提供完整的报错日志或截图。
61
+ validations:
62
+ required: true
63
+
64
+ - type: checkboxes
65
+ attributes:
66
+ label: 你愿意提交 PR 吗?
67
+ description: >
68
+ 这不是必需的,但我们很乐意在贡献过程中为您提供指导特别是如果你已经很好地理解了如何实现修复。
69
+ options:
70
+ - label: 是的,我愿意提交 PR!
71
+
72
+ - type: checkboxes
73
+ attributes:
74
+ label: Code of Conduct
75
+ options:
76
+ - label: >
77
+ 我已阅读并同意遵守该项目的 [行为准则](https://docs.github.com/zh/site-policy/github-terms/github-community-code-of-conduct)。
78
+ required: true
79
+
80
+ - type: markdown
81
+ attributes:
82
+ value: "感谢您填写我们的表单!"
@@ -0,0 +1,42 @@
1
+
2
+ name: '🎉 功能建议'
3
+ title: "[Feature]"
4
+ description: 提交建议帮助我们改进。
5
+ labels: [ "enhancement" ]
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: |
10
+ 感谢您抽出时间提出新功能建议,请准确解释您的想法。
11
+
12
+ - type: textarea
13
+ attributes:
14
+ label: 描述
15
+ description: 简短描述您的功能建议。
16
+
17
+ - type: textarea
18
+ attributes:
19
+ label: 使用场景
20
+ description: 你想要发生什么?
21
+ placeholder: >
22
+ 一个清晰且具体的描述这个功能的使用场景。
23
+
24
+ - type: checkboxes
25
+ attributes:
26
+ label: 你愿意提交PR吗?
27
+ description: >
28
+ 这不是必须的,但我们欢迎您的贡献。
29
+ options:
30
+ - label: 是的, 我愿意提交PR!
31
+
32
+ - type: checkboxes
33
+ attributes:
34
+ label: Code of Conduct
35
+ options:
36
+ - label: >
37
+ 我已阅读并同意遵守该项目的 [行为准则](https://docs.github.com/zh/site-policy/github-terms/github-community-code-of-conduct)。
38
+ required: true
39
+
40
+ - type: markdown
41
+ attributes:
42
+ value: "感谢您填写我们的表单!"
@@ -0,0 +1,14 @@
1
+ <!-- 如果有的话,指定这个 PR 要解决的 ISSUE -->
2
+ 修复了 #XYZ
3
+
4
+ ### Motivation
5
+
6
+ <!--解释为什么要改动-->
7
+
8
+ ### Modifications
9
+
10
+ <!--简单解释你的改动-->
11
+
12
+ ### Check
13
+ - [ ] 我的 Commit Message 符合良好的[规范](https://www.conventionalcommits.org/en/v1.0.0/#summary)
14
+ - [ ] 我新增/修复/优化的功能经过良好的测试
@@ -0,0 +1,64 @@
1
+ on:
2
+ push:
3
+ tags:
4
+ - 'v*'
5
+ workflow_dispatch:
6
+
7
+ name: Auto Release
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ contents: write
14
+ steps:
15
+ - name: Checkout repository
16
+ uses: actions/checkout@v4
17
+
18
+ - name: Dashboard Build
19
+ run: |
20
+ cd dashboard
21
+ npm install
22
+ npm run build
23
+ echo "COMMIT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
24
+ echo ${{ github.ref_name }} > dist/assets/version
25
+ zip -r dist.zip dist
26
+
27
+ - name: Fetch Changelog
28
+ run: |
29
+ echo "changelog=changelogs/${{github.ref_name}}.md" >> "$GITHUB_ENV"
30
+
31
+ - name: Create GitHub Release
32
+ uses: ncipollo/release-action@v1
33
+ with:
34
+ bodyFile: ${{ env.changelog }}
35
+ artifacts: "dashboard/dist.zip"
36
+
37
+ pypi:
38
+ # 构建并发布到 PyPI
39
+ runs-on: ubuntu-latest
40
+ needs: build
41
+ steps:
42
+ - name: Checkout repository
43
+ uses: actions/checkout@v4
44
+
45
+ - name: Set up Python
46
+ uses: actions/setup-python@v4
47
+ with:
48
+ python-version: '3.10'
49
+
50
+ - name: Install dependencies
51
+ run: |
52
+ python -m pip install --upgrade pip
53
+ pip install setuptools wheel twine
54
+
55
+ - name: Build package
56
+ run: |
57
+ python setup.py sdist bdist_wheel
58
+
59
+ - name: Publish to PyPI
60
+ env:
61
+ TWINE_USERNAME: __token__
62
+ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
63
+ run: |
64
+ twine upload dist/*
@@ -0,0 +1,93 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ "master" ]
17
+ pull_request:
18
+ branches: [ "master" ]
19
+ schedule:
20
+ - cron: '21 15 * * 5'
21
+
22
+ jobs:
23
+ analyze:
24
+ name: Analyze (${{ matrix.language }})
25
+ # Runner size impacts CodeQL analysis time. To learn more, please see:
26
+ # - https://gh.io/recommended-hardware-resources-for-running-codeql
27
+ # - https://gh.io/supported-runners-and-hardware-resources
28
+ # - https://gh.io/using-larger-runners (GitHub.com only)
29
+ # Consider using larger runners or machines with greater resources for possible analysis time improvements.
30
+ runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31
+ timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
32
+ permissions:
33
+ # required for all workflows
34
+ security-events: write
35
+
36
+ # required to fetch internal or private CodeQL packs
37
+ packages: read
38
+
39
+ # only required for workflows in private repositories
40
+ actions: read
41
+ contents: read
42
+
43
+ strategy:
44
+ fail-fast: false
45
+ matrix:
46
+ include:
47
+ - language: python
48
+ build-mode: none
49
+ # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
50
+ # Use `c-cpp` to analyze code written in C, C++ or both
51
+ # Use 'java-kotlin' to analyze code written in Java, Kotlin or both
52
+ # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
53
+ # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
54
+ # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
55
+ # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
56
+ # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
57
+ steps:
58
+ - name: Checkout repository
59
+ uses: actions/checkout@v4
60
+
61
+ # Initializes the CodeQL tools for scanning.
62
+ - name: Initialize CodeQL
63
+ uses: github/codeql-action/init@v3
64
+ with:
65
+ languages: ${{ matrix.language }}
66
+ build-mode: ${{ matrix.build-mode }}
67
+ # If you wish to specify custom queries, you can do so here or in a config file.
68
+ # By default, queries listed here will override any specified in a config file.
69
+ # Prefix the list here with "+" to use these queries and those in the config file.
70
+
71
+ # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
72
+ # queries: security-extended,security-and-quality
73
+
74
+ # If the analyze step fails for one of the languages you are analyzing with
75
+ # "We were unable to automatically build your code", modify the matrix above
76
+ # to set the build mode to "manual" for that language. Then modify this step
77
+ # to build your code.
78
+ # ℹ️ Command-line programs to run using the OS shell.
79
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
80
+ - if: matrix.build-mode == 'manual'
81
+ shell: bash
82
+ run: |
83
+ echo 'If you are using a "manual" build mode for one or more of the' \
84
+ 'languages you are analyzing, replace this with the commands to build' \
85
+ 'your code, for example:'
86
+ echo ' make bootstrap'
87
+ echo ' make release'
88
+ exit 1
89
+
90
+ - name: Perform CodeQL Analysis
91
+ uses: github/codeql-action/analyze@v3
92
+ with:
93
+ category: "/language:${{matrix.language}}"
@@ -0,0 +1,45 @@
1
+ name: Run tests and upload coverage
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ paths-ignore:
8
+ - 'README.md'
9
+ - 'changelogs/**'
10
+ - 'dashboard/**'
11
+ workflow_dispatch:
12
+
13
+ jobs:
14
+ test:
15
+ name: Run tests and collect coverage
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - name: Checkout
19
+ uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v4
25
+
26
+ - name: Install dependencies
27
+ run: |
28
+ python -m pip install --upgrade pip
29
+ pip install -r requirements.txt
30
+ pip install pytest pytest-cov pytest-asyncio
31
+
32
+ - name: Run tests
33
+ run: |
34
+ mkdir data
35
+ mkdir data/plugins
36
+ mkdir data/config
37
+ mkdir data/temp
38
+ export TESTING=true
39
+ export ZHIPU_API_KEY=${{ secrets.OPENAI_API_KEY }}
40
+ PYTHONPATH=./ pytest --cov=. tests/ -v -o log_cli=true -o log_level=DEBUG
41
+
42
+ - name: Upload results to Codecov
43
+ uses: codecov/codecov-action@v4
44
+ with:
45
+ token: ${{ secrets.CODECOV_TOKEN }}
@@ -0,0 +1,31 @@
1
+ name: AstrBot Dashboard CI
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - name: Checkout repository
10
+ uses: actions/checkout@v4
11
+
12
+ - name: npm install, build
13
+ run: |
14
+ cd dashboard
15
+ npm install
16
+ npm run build
17
+
18
+ - name: Inject Commit SHA
19
+ id: get_sha
20
+ run: |
21
+ echo "COMMIT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
22
+ mkdir -p dashboard/dist/assets
23
+ echo $COMMIT_SHA > dashboard/dist/assets/version
24
+
25
+ - name: Archive production artifacts
26
+ uses: actions/upload-artifact@v4
27
+ with:
28
+ name: dist-without-markdown
29
+ path: |
30
+ dashboard/dist
31
+ !dist/**/*.md
@@ -0,0 +1,43 @@
1
+ name: Docker Image CI/CD
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ publish-docker:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: 拉取源码
15
+ uses: actions/checkout@v3
16
+ with:
17
+ fetch-depth: 1
18
+
19
+ - name: 设置 QEMU
20
+ uses: docker/setup-qemu-action@v3
21
+
22
+ - name: 设置 Docker Buildx
23
+ uses: docker/setup-buildx-action@v3
24
+
25
+ - name: 登录到 DockerHub
26
+ uses: docker/login-action@v3
27
+ with:
28
+ username: ${{ secrets.DOCKER_HUB_USERNAME }}
29
+ password: ${{ secrets.DOCKER_HUB_PASSWORD }}
30
+
31
+ - name: 构建和推送 Docker hub
32
+ uses: docker/build-push-action@v6
33
+ with:
34
+ context: .
35
+ platforms: linux/amd64,linux/arm64
36
+ push: true
37
+ tags: |
38
+ ${{ secrets.DOCKER_HUB_USERNAME }}/astrbot:latest
39
+ ${{ secrets.DOCKER_HUB_USERNAME }}/astrbot:${{ github.ref_name }}
40
+
41
+ - name: Post build notifications
42
+ run: echo "Docker image has been built and pushed successfully"
43
+
@@ -0,0 +1,27 @@
1
+ # This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
2
+ #
3
+ # You can adjust the behavior by modifying this file.
4
+ # For more information, see:
5
+ # https://github.com/actions/stale
6
+ name: Mark stale issues and pull requests
7
+
8
+ on:
9
+ schedule:
10
+ - cron: '21 23 * * *'
11
+
12
+ jobs:
13
+ stale:
14
+
15
+ runs-on: ubuntu-latest
16
+ permissions:
17
+ issues: write
18
+ pull-requests: write
19
+
20
+ steps:
21
+ - uses: actions/stale@v5
22
+ with:
23
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
24
+ stale-issue-message: 'Stale issue message'
25
+ stale-pr-message: 'Stale pull request message'
26
+ stale-issue-label: 'no-issue-activity'
27
+ stale-pr-label: 'no-pr-activity'
@@ -0,0 +1,32 @@
1
+ __pycache__
2
+ botpy.log
3
+ .vscode
4
+ .venv*
5
+ .idea
6
+ data_v2.db
7
+ data_v3.db
8
+ configs/session
9
+ configs/config.yaml
10
+ **/.DS_Store
11
+ temp
12
+ cmd_config.json
13
+ data
14
+ cookies.json
15
+ logs/
16
+ addons/plugins
17
+ .coverage
18
+
19
+
20
+ tests/astrbot_plugin_openai
21
+ chroma
22
+ dashboard/node_modules/
23
+ dashboard/dist/
24
+ .DS_Store
25
+ package-lock.json
26
+ package.json
27
+ venv/*
28
+ packages/python_interpreter/workplace
29
+ .venv/*
30
+ .conda/
31
+ .idea
32
+ pytest.ini
@@ -0,0 +1,13 @@
1
+ default_install_hook_types: [pre-commit, prepare-commit-msg]
2
+ ci:
3
+ autofix_commit_msg: ":balloon: auto fixes by pre-commit hooks"
4
+ autofix_prs: true
5
+ autoupdate_branch: master
6
+ autoupdate_schedule: weekly
7
+ autoupdate_commit_msg: ":balloon: pre-commit autoupdate"
8
+ repos:
9
+ - repo: https://github.com/astral-sh/ruff-pre-commit
10
+ rev: v0.11.2
11
+ hooks:
12
+ - id: ruff
13
+ - id: ruff-format
@@ -0,0 +1 @@
1
+ 3.10
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ SoulterL@outlook.com.
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.