AstrBot 4.1.7__tar.gz → 4.2.0__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 (537) hide show
  1. {astrbot-4.1.7 → astrbot-4.2.0}/PKG-INFO +1 -1
  2. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/config/default.py +33 -1
  3. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/conversation_mgr.py +12 -4
  4. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/db/__init__.py +5 -0
  5. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/db/sqlite.py +8 -0
  6. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/process_stage/method/llm_request.py +25 -8
  7. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/session_status_check/stage.py +12 -1
  8. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/waking_check/stage.py +10 -5
  9. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/astr_message_event.py +9 -5
  10. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/wecom/wecom_adapter.py +1 -0
  11. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/weixin_official_account/weixin_offacc_adapter.py +1 -0
  12. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/manager.py +2 -0
  13. astrbot-4.2.0/astrbot/core/provider/sources/coze_api_client.py +314 -0
  14. astrbot-4.2.0/astrbot/core/provider/sources/coze_source.py +635 -0
  15. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/filter/command.py +26 -13
  16. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/filter/command_group.py +15 -5
  17. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/session_llm_manager.py +0 -4
  18. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/dify_api_client.py +44 -57
  19. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/dashboard/routes/chat.py +70 -36
  20. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/dashboard/routes/session_management.py +235 -78
  21. astrbot-4.2.0/changelogs/v4.2.0.md +1 -0
  22. astrbot-4.2.0/dashboard/src/App.vue +28 -0
  23. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/chat/Chat.vue +42 -13
  24. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/chat/MessageList.vue +5 -6
  25. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/platform/AddNewPlatform.vue +4 -0
  26. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/provider/AddNewProvider.vue +1 -3
  27. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/session-management.json +11 -3
  28. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/session-management.json +11 -3
  29. astrbot-4.2.0/dashboard/src/stores/toast.js +31 -0
  30. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/utils/providerUtils.js +1 -0
  31. astrbot-4.2.0/dashboard/src/utils/toast.js +16 -0
  32. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/ConversationPage.vue +5 -5
  33. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/ProviderPage.vue +1 -0
  34. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/SessionManagementPage.vue +260 -121
  35. {astrbot-4.1.7 → astrbot-4.2.0}/packages/astrbot/main.py +21 -21
  36. {astrbot-4.1.7 → astrbot-4.2.0}/packages/web_searcher/main.py +0 -2
  37. {astrbot-4.1.7 → astrbot-4.2.0}/pyproject.toml +1 -1
  38. {astrbot-4.1.7 → astrbot-4.2.0}/tests/test_dashboard.py +79 -43
  39. astrbot-4.2.0/tests/test_main.py +88 -0
  40. astrbot-4.2.0/tests/test_plugin_manager.py +145 -0
  41. astrbot-4.1.7/dashboard/src/App.vue +0 -7
  42. astrbot-4.1.7/tests/test_main.py +0 -55
  43. astrbot-4.1.7/tests/test_pipeline.py +0 -285
  44. astrbot-4.1.7/tests/test_plugin_manager.py +0 -83
  45. {astrbot-4.1.7 → astrbot-4.2.0}/.dockerignore +0 -0
  46. {astrbot-4.1.7 → astrbot-4.2.0}/.github/FUNDING.yml +0 -0
  47. {astrbot-4.1.7 → astrbot-4.2.0}/.github/ISSUE_TEMPLATE/PLUGIN_PUBLISH.yml +0 -0
  48. {astrbot-4.1.7 → astrbot-4.2.0}/.github/ISSUE_TEMPLATE/bug-report.yml +0 -0
  49. {astrbot-4.1.7 → astrbot-4.2.0}/.github/ISSUE_TEMPLATE/feature-request.yml +0 -0
  50. {astrbot-4.1.7 → astrbot-4.2.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  51. {astrbot-4.1.7 → astrbot-4.2.0}/.github/auto_assign.yml +0 -0
  52. {astrbot-4.1.7 → astrbot-4.2.0}/.github/copilot-instructions.md +0 -0
  53. {astrbot-4.1.7 → astrbot-4.2.0}/.github/dependabot.yml +0 -0
  54. {astrbot-4.1.7 → astrbot-4.2.0}/.github/workflows/auto_release.yml +0 -0
  55. {astrbot-4.1.7 → astrbot-4.2.0}/.github/workflows/code-format.yml +0 -0
  56. {astrbot-4.1.7 → astrbot-4.2.0}/.github/workflows/codeql.yml +0 -0
  57. {astrbot-4.1.7 → astrbot-4.2.0}/.github/workflows/coverage_test.yml +0 -0
  58. {astrbot-4.1.7 → astrbot-4.2.0}/.github/workflows/dashboard_ci.yml +0 -0
  59. {astrbot-4.1.7 → astrbot-4.2.0}/.github/workflows/docker-image.yml +0 -0
  60. {astrbot-4.1.7 → astrbot-4.2.0}/.github/workflows/stale.yml +0 -0
  61. {astrbot-4.1.7 → astrbot-4.2.0}/.gitignore +0 -0
  62. {astrbot-4.1.7 → astrbot-4.2.0}/.pre-commit-config.yaml +0 -0
  63. {astrbot-4.1.7 → astrbot-4.2.0}/.python-version +0 -0
  64. {astrbot-4.1.7 → astrbot-4.2.0}/CODE_OF_CONDUCT.md +0 -0
  65. {astrbot-4.1.7 → astrbot-4.2.0}/Dockerfile +0 -0
  66. {astrbot-4.1.7 → astrbot-4.2.0}/Dockerfile_with_node +0 -0
  67. {astrbot-4.1.7 → astrbot-4.2.0}/LICENSE +0 -0
  68. {astrbot-4.1.7 → astrbot-4.2.0}/README.md +0 -0
  69. {astrbot-4.1.7 → astrbot-4.2.0}/README_en.md +0 -0
  70. {astrbot-4.1.7 → astrbot-4.2.0}/README_ja.md +0 -0
  71. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/__init__.py +0 -0
  72. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/api/__init__.py +0 -0
  73. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/api/all.py +0 -0
  74. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/api/event/__init__.py +0 -0
  75. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/api/event/filter/__init__.py +0 -0
  76. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/api/message_components.py +0 -0
  77. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/api/platform/__init__.py +0 -0
  78. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/api/provider/__init__.py +0 -0
  79. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/api/star/__init__.py +0 -0
  80. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/api/util/__init__.py +0 -0
  81. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/cli/__init__.py +0 -0
  82. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/cli/__main__.py +0 -0
  83. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/cli/commands/__init__.py +0 -0
  84. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/cli/commands/cmd_conf.py +0 -0
  85. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/cli/commands/cmd_init.py +0 -0
  86. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/cli/commands/cmd_plug.py +0 -0
  87. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/cli/commands/cmd_run.py +0 -0
  88. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/cli/utils/__init__.py +0 -0
  89. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/cli/utils/basic.py +0 -0
  90. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/cli/utils/plugin.py +0 -0
  91. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/cli/utils/version_comparator.py +0 -0
  92. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/__init__.py +0 -0
  93. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/agent/agent.py +0 -0
  94. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/agent/handoff.py +0 -0
  95. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/agent/hooks.py +0 -0
  96. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/agent/mcp_client.py +0 -0
  97. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/agent/response.py +0 -0
  98. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/agent/run_context.py +0 -0
  99. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/agent/runners/__init__.py +0 -0
  100. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/agent/runners/base.py +0 -0
  101. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/agent/runners/tool_loop_agent_runner.py +0 -0
  102. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/agent/tool.py +0 -0
  103. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/agent/tool_executor.py +0 -0
  104. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/astr_agent_context.py +0 -0
  105. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/astrbot_config_mgr.py +0 -0
  106. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/config/__init__.py +0 -0
  107. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/config/astrbot_config.py +0 -0
  108. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/core_lifecycle.py +0 -0
  109. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/db/migration/helper.py +0 -0
  110. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/db/migration/migra_3_to_4.py +0 -0
  111. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/db/migration/shared_preferences_v3.py +0 -0
  112. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/db/migration/sqlite_v3.py +0 -0
  113. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/db/po.py +0 -0
  114. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/db/vec_db/base.py +0 -0
  115. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/db/vec_db/faiss_impl/__init__.py +0 -0
  116. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/db/vec_db/faiss_impl/document_storage.py +0 -0
  117. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/db/vec_db/faiss_impl/embedding_storage.py +0 -0
  118. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/db/vec_db/faiss_impl/sqlite_init.sql +0 -0
  119. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/db/vec_db/faiss_impl/vec_db.py +0 -0
  120. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/event_bus.py +0 -0
  121. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/file_token_service.py +0 -0
  122. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/initial_loader.py +0 -0
  123. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/log.py +0 -0
  124. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/message/components.py +0 -0
  125. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/message/message_event_result.py +0 -0
  126. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/persona_mgr.py +0 -0
  127. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/__init__.py +0 -0
  128. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/content_safety_check/stage.py +0 -0
  129. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/content_safety_check/strategies/__init__.py +0 -0
  130. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/content_safety_check/strategies/baidu_aip.py +0 -0
  131. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/content_safety_check/strategies/keywords.py +0 -0
  132. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/content_safety_check/strategies/strategy.py +0 -0
  133. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/context.py +0 -0
  134. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/context_utils.py +0 -0
  135. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/preprocess_stage/stage.py +0 -0
  136. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/process_stage/method/star_request.py +0 -0
  137. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/process_stage/stage.py +0 -0
  138. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/rate_limit_check/stage.py +0 -0
  139. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/respond/stage.py +0 -0
  140. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/result_decorate/stage.py +0 -0
  141. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/scheduler.py +0 -0
  142. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/stage.py +0 -0
  143. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/pipeline/whitelist_check/stage.py +0 -0
  144. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/__init__.py +0 -0
  145. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/astrbot_message.py +0 -0
  146. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/manager.py +0 -0
  147. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/message_session.py +0 -0
  148. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/message_type.py +0 -0
  149. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/platform.py +0 -0
  150. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/platform_metadata.py +0 -0
  151. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/register.py +0 -0
  152. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_message_event.py +0 -0
  153. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py +0 -0
  154. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/dingtalk/dingtalk_adapter.py +0 -0
  155. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/dingtalk/dingtalk_event.py +0 -0
  156. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/discord/client.py +0 -0
  157. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/discord/components.py +0 -0
  158. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/discord/discord_platform_adapter.py +0 -0
  159. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/discord/discord_platform_event.py +0 -0
  160. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/lark/lark_adapter.py +0 -0
  161. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/lark/lark_event.py +0 -0
  162. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/misskey/misskey_adapter.py +0 -0
  163. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/misskey/misskey_api.py +0 -0
  164. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/misskey/misskey_event.py +0 -0
  165. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/misskey/misskey_utils.py +0 -0
  166. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/qqofficial/qqofficial_message_event.py +0 -0
  167. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/qqofficial/qqofficial_platform_adapter.py +0 -0
  168. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/qqofficial_webhook/qo_webhook_adapter.py +0 -0
  169. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/qqofficial_webhook/qo_webhook_event.py +0 -0
  170. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/qqofficial_webhook/qo_webhook_server.py +0 -0
  171. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/satori/satori_adapter.py +0 -0
  172. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/satori/satori_event.py +0 -0
  173. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/slack/client.py +0 -0
  174. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/slack/slack_adapter.py +0 -0
  175. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/slack/slack_event.py +0 -0
  176. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/telegram/tg_adapter.py +0 -0
  177. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/telegram/tg_event.py +0 -0
  178. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/webchat/webchat_adapter.py +0 -0
  179. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/webchat/webchat_event.py +0 -0
  180. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/webchat/webchat_queue_mgr.py +0 -0
  181. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/wechatpadpro/wechatpadpro_adapter.py +0 -0
  182. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/wechatpadpro/wechatpadpro_message_event.py +0 -0
  183. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/wechatpadpro/xml_data_parser.py +0 -0
  184. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/wecom/wecom_event.py +0 -0
  185. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/wecom/wecom_kf.py +0 -0
  186. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/wecom/wecom_kf_message.py +0 -0
  187. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform/sources/weixin_official_account/weixin_offacc_event.py +0 -0
  188. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/platform_message_history_mgr.py +0 -0
  189. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/__init__.py +0 -0
  190. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/entites.py +0 -0
  191. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/entities.py +0 -0
  192. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/func_tool_manager.py +0 -0
  193. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/provider.py +0 -0
  194. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/register.py +0 -0
  195. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/anthropic_source.py +0 -0
  196. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/azure_tts_source.py +0 -0
  197. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/dashscope_source.py +0 -0
  198. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/dashscope_tts.py +0 -0
  199. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/dify_source.py +0 -0
  200. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/edge_tts_source.py +0 -0
  201. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/fishaudio_tts_api_source.py +0 -0
  202. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/gemini_embedding_source.py +0 -0
  203. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/gemini_source.py +0 -0
  204. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/gemini_tts_source.py +0 -0
  205. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/gsv_selfhosted_source.py +0 -0
  206. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/gsvi_tts_source.py +0 -0
  207. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/minimax_tts_api_source.py +0 -0
  208. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/openai_embedding_source.py +0 -0
  209. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/openai_source.py +0 -0
  210. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/openai_tts_api_source.py +0 -0
  211. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/sensevoice_selfhosted_source.py +0 -0
  212. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/vllm_rerank_source.py +0 -0
  213. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/volcengine_tts.py +0 -0
  214. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/whisper_api_source.py +0 -0
  215. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/whisper_selfhosted_source.py +0 -0
  216. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/provider/sources/zhipu_source.py +0 -0
  217. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/README.md +0 -0
  218. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/__init__.py +0 -0
  219. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/config.py +0 -0
  220. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/context.py +0 -0
  221. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/filter/__init__.py +0 -0
  222. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/filter/custom_filter.py +0 -0
  223. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/filter/event_message_type.py +0 -0
  224. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/filter/permission.py +0 -0
  225. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/filter/platform_adapter_type.py +0 -0
  226. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/filter/regex.py +0 -0
  227. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/register/__init__.py +0 -0
  228. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/register/star.py +0 -0
  229. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/register/star_handler.py +0 -0
  230. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/session_plugin_manager.py +0 -0
  231. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/star.py +0 -0
  232. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/star_handler.py +0 -0
  233. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/star_manager.py +0 -0
  234. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/star_tools.py +0 -0
  235. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/star/updator.py +0 -0
  236. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/updator.py +0 -0
  237. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/astrbot_path.py +0 -0
  238. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/command_parser.py +0 -0
  239. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/io.py +0 -0
  240. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/log_pipe.py +0 -0
  241. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/metrics.py +0 -0
  242. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/path_util.py +0 -0
  243. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/pip_installer.py +0 -0
  244. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/session_lock.py +0 -0
  245. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/session_waiter.py +0 -0
  246. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/shared_preferences.py +0 -0
  247. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/t2i/__init__.py +0 -0
  248. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/t2i/local_strategy.py +0 -0
  249. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/t2i/network_strategy.py +0 -0
  250. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/t2i/renderer.py +0 -0
  251. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/t2i/template/astrbot_powershell.html +0 -0
  252. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/t2i/template/base.html +0 -0
  253. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/t2i/template_manager.py +0 -0
  254. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/tencent_record_helper.py +0 -0
  255. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/utils/version_comparator.py +0 -0
  256. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/core/zip_updator.py +0 -0
  257. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/dashboard/routes/__init__.py +0 -0
  258. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/dashboard/routes/auth.py +0 -0
  259. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/dashboard/routes/config.py +0 -0
  260. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/dashboard/routes/conversation.py +0 -0
  261. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/dashboard/routes/file.py +0 -0
  262. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/dashboard/routes/log.py +0 -0
  263. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/dashboard/routes/persona.py +0 -0
  264. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/dashboard/routes/plugin.py +0 -0
  265. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/dashboard/routes/route.py +0 -0
  266. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/dashboard/routes/stat.py +0 -0
  267. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/dashboard/routes/static_file.py +0 -0
  268. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/dashboard/routes/t2i.py +0 -0
  269. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/dashboard/routes/tools.py +0 -0
  270. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/dashboard/routes/update.py +0 -0
  271. {astrbot-4.1.7 → astrbot-4.2.0}/astrbot/dashboard/server.py +0 -0
  272. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.0.md +0 -0
  273. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.1.md +0 -0
  274. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.10.md +0 -0
  275. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.11.md +0 -0
  276. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.12.md +0 -0
  277. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.13.md +0 -0
  278. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.14.md +0 -0
  279. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.15.md +0 -0
  280. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.16.md +0 -0
  281. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.17.md +0 -0
  282. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.18.md +0 -0
  283. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.19.md +0 -0
  284. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.20.md +0 -0
  285. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.21.md +0 -0
  286. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.22.md +0 -0
  287. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.23.md +0 -0
  288. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.24.md +0 -0
  289. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.25.md +0 -0
  290. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.26.md +0 -0
  291. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.27.md +0 -0
  292. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.28.md +0 -0
  293. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.29.md +0 -0
  294. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.3.md +0 -0
  295. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.30.md +0 -0
  296. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.31.md +0 -0
  297. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.32.md +0 -0
  298. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.33.md +0 -0
  299. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.35.md +0 -0
  300. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.36.md +0 -0
  301. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.37.md +0 -0
  302. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.38.md +0 -0
  303. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.39.md +0 -0
  304. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.4.md +0 -0
  305. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.5.md +0 -0
  306. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.6.md +0 -0
  307. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.7.md +0 -0
  308. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.8.md +0 -0
  309. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.4.9.md +0 -0
  310. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.0.md +0 -0
  311. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.1.md +0 -0
  312. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.10.md +0 -0
  313. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.11.md +0 -0
  314. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.12.md +0 -0
  315. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.13.md +0 -0
  316. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.14.md +0 -0
  317. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.15.md +0 -0
  318. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.16.md +0 -0
  319. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.17.md +0 -0
  320. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.18.md +0 -0
  321. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.19.md +0 -0
  322. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.2.md +0 -0
  323. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.20.md +0 -0
  324. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.21.md +0 -0
  325. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.22.md +0 -0
  326. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.23.md +0 -0
  327. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.24.md +0 -0
  328. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.25.md +0 -0
  329. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.26.md +0 -0
  330. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.27.md +0 -0
  331. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.3.1.md +0 -0
  332. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.3.2.md +0 -0
  333. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.3.md +0 -0
  334. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.4.md +0 -0
  335. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.5.md +0 -0
  336. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.6.md +0 -0
  337. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.7.md +0 -0
  338. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.8.md +0 -0
  339. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v3.5.9.md +0 -0
  340. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v4.0.0-beta.3.md +0 -0
  341. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v4.0.0-beta.4.md +0 -0
  342. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v4.0.0-beta.5.md +0 -0
  343. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v4.0.0.md +0 -0
  344. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v4.1.0.md +0 -0
  345. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v4.1.1.md +0 -0
  346. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v4.1.2.md +0 -0
  347. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v4.1.3.md +0 -0
  348. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v4.1.4.md +0 -0
  349. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v4.1.5.md +0 -0
  350. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v4.1.6.md +0 -0
  351. {astrbot-4.1.7 → astrbot-4.2.0}/changelogs/v4.1.7.md +0 -0
  352. {astrbot-4.1.7 → astrbot-4.2.0}/compose.yml +0 -0
  353. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/.gitignore +0 -0
  354. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/LICENSE +0 -0
  355. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/README.md +0 -0
  356. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/env.d.ts +0 -0
  357. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/index.html +0 -0
  358. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/public/_redirects +0 -0
  359. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/public/favicon.svg +0 -0
  360. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/assets/images/astrbot_banner.png +0 -0
  361. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/assets/images/astrbot_logo_mini.webp +0 -0
  362. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/assets/images/platform_logos/dingtalk.svg +0 -0
  363. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/assets/images/platform_logos/discord.svg +0 -0
  364. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/assets/images/platform_logos/kook.png +0 -0
  365. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/assets/images/platform_logos/lark.png +0 -0
  366. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/assets/images/platform_logos/misskey.png +0 -0
  367. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/assets/images/platform_logos/qq.png +0 -0
  368. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/assets/images/platform_logos/satori.png +0 -0
  369. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/assets/images/platform_logos/slack.svg +0 -0
  370. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/assets/images/platform_logos/telegram.svg +0 -0
  371. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/assets/images/platform_logos/vocechat.png +0 -0
  372. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/assets/images/platform_logos/wechat.png +0 -0
  373. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/assets/images/platform_logos/wecom.png +0 -0
  374. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/ConfirmDialog.vue +0 -0
  375. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/chat/ProviderModelSelector.vue +0 -0
  376. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/AstrBotConfig.vue +0 -0
  377. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/AstrBotConfigV4.vue +0 -0
  378. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/ConsoleDisplayer.vue +0 -0
  379. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/ExtensionCard.vue +0 -0
  380. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/ItemCard.vue +0 -0
  381. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/ItemCardGrid.vue +0 -0
  382. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/KnowledgeBaseSelector.vue +0 -0
  383. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/LanguageSwitcher.vue +0 -0
  384. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/ListConfigItem.vue +0 -0
  385. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/Logo.vue +0 -0
  386. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/MigrationDialog.vue +0 -0
  387. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/ObjectEditor.vue +0 -0
  388. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/PersonaSelector.vue +0 -0
  389. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/PluginSetSelector.vue +0 -0
  390. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/ProviderSelector.vue +0 -0
  391. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/ProxySelector.vue +0 -0
  392. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/ReadmeDialog.vue +0 -0
  393. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/T2ITemplateEditor.vue +0 -0
  394. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/components/shared/WaitingForRestart.vue +0 -0
  395. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/config.ts +0 -0
  396. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/composables.ts +0 -0
  397. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/loader.ts +0 -0
  398. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/core/actions.json +0 -0
  399. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/core/common.json +0 -0
  400. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/core/header.json +0 -0
  401. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/core/navigation.json +0 -0
  402. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/core/status.json +0 -0
  403. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/about.json +0 -0
  404. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/alkaid/index.json +0 -0
  405. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/alkaid/knowledge-base.json +0 -0
  406. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/alkaid/memory.json +0 -0
  407. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/auth.json +0 -0
  408. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/chart.json +0 -0
  409. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/chat.json +0 -0
  410. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/config.json +0 -0
  411. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/console.json +0 -0
  412. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/conversation.json +0 -0
  413. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/dashboard.json +0 -0
  414. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/extension.json +0 -0
  415. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/migration.json +0 -0
  416. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/persona.json +0 -0
  417. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/platform.json +0 -0
  418. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/provider.json +0 -0
  419. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/settings.json +0 -0
  420. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/features/tool-use.json +0 -0
  421. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/messages/errors.json +0 -0
  422. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/messages/success.json +0 -0
  423. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/en-US/messages/validation.json +0 -0
  424. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/core/actions.json +0 -0
  425. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/core/common.json +0 -0
  426. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/core/header.json +0 -0
  427. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/core/navigation.json +0 -0
  428. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/core/status.json +0 -0
  429. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/about.json +0 -0
  430. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/alkaid/index.json +0 -0
  431. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/alkaid/knowledge-base.json +0 -0
  432. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/alkaid/memory.json +0 -0
  433. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/auth.json +0 -0
  434. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/chart.json +0 -0
  435. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/chat.json +0 -0
  436. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/config.json +0 -0
  437. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/console.json +0 -0
  438. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/conversation.json +0 -0
  439. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/dashboard.json +0 -0
  440. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/extension.json +0 -0
  441. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/migration.json +0 -0
  442. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/persona.json +0 -0
  443. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/platform.json +0 -0
  444. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/provider.json +0 -0
  445. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/settings.json +0 -0
  446. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/features/tool-use.json +0 -0
  447. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/messages/errors.json +0 -0
  448. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/messages/success.json +0 -0
  449. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/locales/zh-CN/messages/validation.json +0 -0
  450. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/tools/index.ts +0 -0
  451. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/translations.ts +0 -0
  452. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/types.ts +0 -0
  453. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/i18n/validator.ts +0 -0
  454. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/layouts/blank/BlankLayout.vue +0 -0
  455. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/layouts/full/FullLayout.vue +0 -0
  456. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/layouts/full/vertical-header/VerticalHeader.vue +0 -0
  457. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/layouts/full/vertical-sidebar/NavItem.vue +0 -0
  458. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/layouts/full/vertical-sidebar/VerticalSidebar.vue +0 -0
  459. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/layouts/full/vertical-sidebar/sidebarItem.ts +0 -0
  460. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/main.ts +0 -0
  461. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/plugins/confirmPlugin.ts +0 -0
  462. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/plugins/vuetify.ts +0 -0
  463. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/router/AuthRoutes.ts +0 -0
  464. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/router/ChatBoxRoutes.ts +0 -0
  465. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/router/MainRoutes.ts +0 -0
  466. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/router/index.ts +0 -0
  467. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/scss/_override.scss +0 -0
  468. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/scss/_variables.scss +0 -0
  469. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/scss/components/_VButtons.scss +0 -0
  470. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/scss/components/_VCard.scss +0 -0
  471. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/scss/components/_VField.scss +0 -0
  472. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/scss/components/_VInput.scss +0 -0
  473. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/scss/components/_VNavigationDrawer.scss +0 -0
  474. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/scss/components/_VScrollbar.scss +0 -0
  475. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/scss/components/_VShadow.scss +0 -0
  476. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/scss/components/_VTabs.scss +0 -0
  477. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/scss/components/_VTextField.scss +0 -0
  478. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/scss/layout/_container.scss +0 -0
  479. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/scss/layout/_sidebar.scss +0 -0
  480. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/scss/pages/_dashboards.scss +0 -0
  481. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/scss/style.scss +0 -0
  482. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/stores/auth.ts +0 -0
  483. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/stores/common.js +0 -0
  484. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/stores/customizer.ts +0 -0
  485. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/theme/DarkTheme.ts +0 -0
  486. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/theme/LightTheme.ts +0 -0
  487. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/types/themeTypes/ThemeType.ts +0 -0
  488. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/types/vue3-print-nb.d.ts +0 -0
  489. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/types/vue_tabler_icon.d.ts +0 -0
  490. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/utils/platformUtils.js +0 -0
  491. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/AboutPage.vue +0 -0
  492. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/AlkaidPage.vue +0 -0
  493. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/ChatBoxPage.vue +0 -0
  494. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/ChatPage.vue +0 -0
  495. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/ConfigPage.vue +0 -0
  496. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/ConsolePage.vue +0 -0
  497. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/ExtensionPage.vue +0 -0
  498. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/PersonaPage.vue +0 -0
  499. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/PlatformPage.vue +0 -0
  500. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/Settings.vue +0 -0
  501. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/ToolUsePage.vue +0 -0
  502. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/alkaid/KnowledgeBase.vue +0 -0
  503. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/alkaid/LongTermMemory.vue +0 -0
  504. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/alkaid/Other.vue +0 -0
  505. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/authentication/auth/LoginPage.vue +0 -0
  506. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/authentication/authForms/AuthLogin.vue +0 -0
  507. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/dashboards/default/DefaultDashboard.vue +0 -0
  508. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/dashboards/default/components/MemoryUsage.vue +0 -0
  509. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/dashboards/default/components/MessageStat.vue +0 -0
  510. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/dashboards/default/components/OnlinePlatform.vue +0 -0
  511. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/dashboards/default/components/OnlineTime.vue +0 -0
  512. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/dashboards/default/components/PlatformStat.vue +0 -0
  513. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/dashboards/default/components/RunningTime.vue +0 -0
  514. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/src/views/dashboards/default/components/TotalMessage.vue +0 -0
  515. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/tsconfig.json +0 -0
  516. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/tsconfig.vite-config.json +0 -0
  517. {astrbot-4.1.7 → astrbot-4.2.0}/dashboard/vite.config.ts +0 -0
  518. {astrbot-4.1.7 → astrbot-4.2.0}/main.py +0 -0
  519. {astrbot-4.1.7 → astrbot-4.2.0}/packages/astrbot/long_term_memory.py +0 -0
  520. {astrbot-4.1.7 → astrbot-4.2.0}/packages/astrbot/metadata.yaml +0 -0
  521. {astrbot-4.1.7 → astrbot-4.2.0}/packages/python_interpreter/main.py +0 -0
  522. {astrbot-4.1.7 → astrbot-4.2.0}/packages/python_interpreter/metadata.yaml +0 -0
  523. {astrbot-4.1.7 → astrbot-4.2.0}/packages/python_interpreter/requirements.txt +0 -0
  524. {astrbot-4.1.7 → astrbot-4.2.0}/packages/python_interpreter/shared/api.py +0 -0
  525. {astrbot-4.1.7 → astrbot-4.2.0}/packages/reminder/main.py +0 -0
  526. {astrbot-4.1.7 → astrbot-4.2.0}/packages/reminder/metadata.yaml +0 -0
  527. {astrbot-4.1.7 → astrbot-4.2.0}/packages/session_controller/main.py +0 -0
  528. {astrbot-4.1.7 → astrbot-4.2.0}/packages/session_controller/metadata.yaml +0 -0
  529. {astrbot-4.1.7 → astrbot-4.2.0}/packages/thinking_filter/main.py +0 -0
  530. {astrbot-4.1.7 → astrbot-4.2.0}/packages/thinking_filter/metadata.yaml +0 -0
  531. {astrbot-4.1.7 → astrbot-4.2.0}/packages/web_searcher/engines/__init__.py +0 -0
  532. {astrbot-4.1.7 → astrbot-4.2.0}/packages/web_searcher/engines/bing.py +0 -0
  533. {astrbot-4.1.7 → astrbot-4.2.0}/packages/web_searcher/engines/google.py +0 -0
  534. {astrbot-4.1.7 → astrbot-4.2.0}/packages/web_searcher/engines/sogo.py +0 -0
  535. {astrbot-4.1.7 → astrbot-4.2.0}/packages/web_searcher/metadata.yaml +0 -0
  536. {astrbot-4.1.7 → astrbot-4.2.0}/requirements.txt +0 -0
  537. {astrbot-4.1.7 → astrbot-4.2.0}/samples/stt_health_check.wav +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: AstrBot
3
- Version: 4.1.7
3
+ Version: 4.2.0
4
4
  Summary: 易上手的多平台 LLM 聊天机器人及开发框架
5
5
  License-File: LICENSE
6
6
  Requires-Python: >=3.10
@@ -6,7 +6,7 @@ import os
6
6
 
7
7
  from astrbot.core.utils.astrbot_path import get_astrbot_data_path
8
8
 
9
- VERSION = "4.1.7"
9
+ VERSION = "4.2.0"
10
10
  DB_PATH = os.path.join(get_astrbot_data_path(), "data_v4.db")
11
11
 
12
12
  # 默认配置
@@ -869,6 +869,18 @@ CONFIG_METADATA_2 = {
869
869
  "timeout": 60,
870
870
  "hint": "请确保你在 AstrBot 里设置的 APP 类型和 Dify 里面创建的应用的类型一致!",
871
871
  },
872
+ "Coze": {
873
+ "id": "coze",
874
+ "provider": "coze",
875
+ "provider_type": "chat_completion",
876
+ "type": "coze",
877
+ "enable": True,
878
+ "coze_api_key": "",
879
+ "bot_id": "",
880
+ "coze_api_base": "https://api.coze.cn",
881
+ "timeout": 60,
882
+ "auto_save_history": True,
883
+ },
872
884
  "阿里云百炼应用": {
873
885
  "id": "dashscope",
874
886
  "provider": "dashscope",
@@ -1735,6 +1747,26 @@ CONFIG_METADATA_2 = {
1735
1747
  "hint": "发送的消息文本内容对应的输入变量名。默认为 astrbot_text_query。",
1736
1748
  "obvious": True,
1737
1749
  },
1750
+ "coze_api_key": {
1751
+ "description": "Coze API Key",
1752
+ "type": "string",
1753
+ "hint": "Coze API 密钥,用于访问 Coze 服务。",
1754
+ },
1755
+ "bot_id": {
1756
+ "description": "Bot ID",
1757
+ "type": "string",
1758
+ "hint": "Coze 机器人的 ID,在 Coze 平台上创建机器人后获得。",
1759
+ },
1760
+ "coze_api_base": {
1761
+ "description": "API Base URL",
1762
+ "type": "string",
1763
+ "hint": "Coze API 的基础 URL 地址,默认为 https://api.coze.cn",
1764
+ },
1765
+ "auto_save_history": {
1766
+ "description": "由 Coze 管理对话记录",
1767
+ "type": "bool",
1768
+ "hint": "启用后,将由 Coze 进行对话历史记录管理, 此时 AstrBot 本地保存的上下文不会生效(仅供浏览), 对 AstrBot 的上下文进行的操作也不会生效。如果为禁用, 则使用 AstrBot 管理上下文。",
1769
+ },
1738
1770
  },
1739
1771
  },
1740
1772
  "provider_settings": {
@@ -87,17 +87,25 @@ class ConversationManager:
87
87
  unified_msg_origin (str): 统一的消息来源字符串。格式为 platform_name:message_type:session_id
88
88
  conversation_id (str): 对话 ID, 是 uuid 格式的字符串
89
89
  """
90
- f = False
91
90
  if not conversation_id:
92
91
  conversation_id = self.session_conversations.get(unified_msg_origin)
93
- if conversation_id:
94
- f = True
95
92
  if conversation_id:
96
93
  await self.db.delete_conversation(cid=conversation_id)
97
- if f:
94
+ curr_cid = await self.get_curr_conversation_id(unified_msg_origin)
95
+ if curr_cid == conversation_id:
98
96
  self.session_conversations.pop(unified_msg_origin, None)
99
97
  await sp.session_remove(unified_msg_origin, "sel_conv_id")
100
98
 
99
+ async def delete_conversations_by_user_id(self, unified_msg_origin: str):
100
+ """删除会话的所有对话
101
+
102
+ Args:
103
+ unified_msg_origin (str): 统一的消息来源字符串。格式为 platform_name:message_type:session_id
104
+ """
105
+ await self.db.delete_conversations_by_user_id(user_id=unified_msg_origin)
106
+ self.session_conversations.pop(unified_msg_origin, None)
107
+ await sp.session_remove(unified_msg_origin, "sel_conv_id")
108
+
101
109
  async def get_curr_conversation_id(self, unified_msg_origin: str) -> str | None:
102
110
  """获取会话当前的对话 ID
103
111
 
@@ -154,6 +154,11 @@ class BaseDatabase(abc.ABC):
154
154
  """Delete a conversation by its ID."""
155
155
  ...
156
156
 
157
+ @abc.abstractmethod
158
+ async def delete_conversations_by_user_id(self, user_id: str) -> None:
159
+ """Delete all conversations for a specific user."""
160
+ ...
161
+
157
162
  @abc.abstractmethod
158
163
  async def insert_platform_message_history(
159
164
  self,
@@ -249,6 +249,14 @@ class SQLiteDatabase(BaseDatabase):
249
249
  delete(ConversationV2).where(ConversationV2.conversation_id == cid)
250
250
  )
251
251
 
252
+ async def delete_conversations_by_user_id(self, user_id: str) -> None:
253
+ async with self.get_db() as session:
254
+ session: AsyncSession
255
+ async with session.begin():
256
+ await session.execute(
257
+ delete(ConversationV2).where(ConversationV2.user_id == user_id)
258
+ )
259
+
252
260
  async def insert_platform_message_history(
253
261
  self,
254
262
  platform_id,
@@ -291,13 +291,6 @@ async def run_agent(
291
291
  else:
292
292
  astr_event.set_result(MessageEventResult().message(err_msg))
293
293
  return
294
- asyncio.create_task(
295
- Metric.upload(
296
- llm_tick=1,
297
- model_name=agent_runner.provider.get_model(),
298
- provider_type=agent_runner.provider.meta().type,
299
- )
300
- )
301
294
 
302
295
 
303
296
  class LLMRequestSubStage(Stage):
@@ -524,6 +517,14 @@ class LLMRequestSubStage(Stage):
524
517
  if event.get_platform_name() == "webchat":
525
518
  asyncio.create_task(self._handle_webchat(event, req, provider))
526
519
 
520
+ asyncio.create_task(
521
+ Metric.upload(
522
+ llm_tick=1,
523
+ model_name=agent_runner.provider.get_model(),
524
+ provider_type=agent_runner.provider.meta().type,
525
+ )
526
+ )
527
+
527
528
  async def _handle_webchat(
528
529
  self, event: AstrMessageEvent, req: ProviderRequest, prov: Provider
529
530
  ):
@@ -536,7 +537,23 @@ class LLMRequestSubStage(Stage):
536
537
  latest_pair = messages[-2:]
537
538
  if not latest_pair:
538
539
  return
539
- cleaned_text = "User: " + latest_pair[0].get("content", "").strip()
540
+ content = latest_pair[0].get("content", "")
541
+ if isinstance(content, list):
542
+ # 多模态
543
+ text_parts = []
544
+ for item in content:
545
+ if isinstance(item, dict):
546
+ if item.get("type") == "text":
547
+ text_parts.append(item.get("text", ""))
548
+ elif item.get("type") == "image":
549
+ text_parts.append("[图片]")
550
+ elif isinstance(item, str):
551
+ text_parts.append(item)
552
+ cleaned_text = "User: " + " ".join(text_parts).strip()
553
+ elif isinstance(content, str):
554
+ cleaned_text = "User: " + content.strip()
555
+ else:
556
+ return
540
557
  logger.debug(f"WebChat 对话标题生成请求,清理后的文本: {cleaned_text}")
541
558
  llm_resp = await prov.text_chat(
542
559
  system_prompt="You are expert in summarizing user's query.",
@@ -11,7 +11,8 @@ class SessionStatusCheckStage(Stage):
11
11
  """检查会话是否整体启用"""
12
12
 
13
13
  async def initialize(self, ctx: PipelineContext) -> None:
14
- pass
14
+ self.ctx = ctx
15
+ self.conv_mgr = ctx.plugin_manager.context.conversation_manager
15
16
 
16
17
  async def process(
17
18
  self, event: AstrMessageEvent
@@ -19,4 +20,14 @@ class SessionStatusCheckStage(Stage):
19
20
  # 检查会话是否整体启用
20
21
  if not SessionServiceManager.is_session_enabled(event.unified_msg_origin):
21
22
  logger.debug(f"会话 {event.unified_msg_origin} 已被关闭,已终止事件传播。")
23
+
24
+ # workaround for #2309
25
+ conv_id = await self.conv_mgr.get_curr_conversation_id(
26
+ event.unified_msg_origin
27
+ )
28
+ if not conv_id:
29
+ await self.conv_mgr.new_conversation(
30
+ event.unified_msg_origin, platform_id=event.get_platform_id()
31
+ )
32
+
22
33
  event.stop_event()
@@ -5,6 +5,7 @@ from astrbot.core.message.components import At, AtAll, Reply
5
5
  from astrbot.core.message.message_event_result import MessageChain, MessageEventResult
6
6
  from astrbot.core.platform.astr_message_event import AstrMessageEvent
7
7
  from astrbot.core.star.filter.permission import PermissionTypeFilter
8
+ from astrbot.core.star.filter.command_group import CommandGroupFilter
8
9
  from astrbot.core.star.session_plugin_manager import SessionPluginManager
9
10
  from astrbot.core.star.star import star_map
10
11
  from astrbot.core.star.star_handler import EventType, star_handlers_registry
@@ -170,11 +171,15 @@ class WakingCheckStage(Stage):
170
171
  is_wake = True
171
172
  event.is_wake = True
172
173
 
173
- activated_handlers.append(handler)
174
- if "parsed_params" in event.get_extra():
175
- handlers_parsed_params[handler.handler_full_name] = event.get_extra(
176
- "parsed_params"
177
- )
174
+ is_group_cmd_handler = any(
175
+ isinstance(f, CommandGroupFilter) for f in handler.event_filters
176
+ )
177
+ if not is_group_cmd_handler:
178
+ activated_handlers.append(handler)
179
+ if "parsed_params" in event.get_extra(default={}):
180
+ handlers_parsed_params[handler.handler_full_name] = (
181
+ event.get_extra("parsed_params")
182
+ )
178
183
 
179
184
  event._extras.pop("parsed_params", None)
180
185
 
@@ -4,7 +4,7 @@ import re
4
4
  import hashlib
5
5
  import uuid
6
6
 
7
- from typing import List, Union, Optional, AsyncGenerator
7
+ from typing import List, Union, Optional, AsyncGenerator, TypeVar, Any
8
8
 
9
9
  from astrbot import logger
10
10
  from astrbot.core.db.po import Conversation
@@ -26,6 +26,8 @@ from .astrbot_message import AstrBotMessage, Group
26
26
  from .platform_metadata import PlatformMetadata
27
27
  from .message_session import MessageSession, MessageSesion # noqa
28
28
 
29
+ _VT = TypeVar("_VT")
30
+
29
31
 
30
32
  class AstrMessageEvent(abc.ABC):
31
33
  def __init__(
@@ -49,7 +51,7 @@ class AstrMessageEvent(abc.ABC):
49
51
  """是否唤醒(是否通过 WakingStage)"""
50
52
  self.is_at_or_wake_command = False
51
53
  """是否是 At 机器人或者带有唤醒词或者是私聊(插件注册的事件监听器会让 is_wake 设为 True, 但是不会让这个属性置为 True)"""
52
- self._extras = {}
54
+ self._extras: dict[str, Any] = {}
53
55
  self.session = MessageSesion(
54
56
  platform_name=platform_meta.id,
55
57
  message_type=message_obj.type,
@@ -57,7 +59,7 @@ class AstrMessageEvent(abc.ABC):
57
59
  )
58
60
  self.unified_msg_origin = str(self.session)
59
61
  """统一的消息来源字符串。格式为 platform_name:message_type:session_id"""
60
- self._result: MessageEventResult = None
62
+ self._result: MessageEventResult | None = None
61
63
  """消息事件的结果"""
62
64
 
63
65
  self._has_send_oper = False
@@ -173,13 +175,15 @@ class AstrMessageEvent(abc.ABC):
173
175
  """
174
176
  self._extras[key] = value
175
177
 
176
- def get_extra(self, key=None):
178
+ def get_extra(
179
+ self, key: str | None = None, default: _VT = None
180
+ ) -> dict[str, Any] | _VT:
177
181
  """
178
182
  获取额外的信息。
179
183
  """
180
184
  if key is None:
181
185
  return self._extras
182
- return self._extras.get(key, None)
186
+ return self._extras.get(key, default)
183
187
 
184
188
  def clear_extra(self):
185
189
  """
@@ -185,6 +185,7 @@ class WecomPlatformAdapter(Platform):
185
185
  return PlatformMetadata(
186
186
  "wecom",
187
187
  "wecom 适配器",
188
+ id=self.config.get("id", "wecom"),
188
189
  )
189
190
 
190
191
  @override
@@ -184,6 +184,7 @@ class WeixinOfficialAccountPlatformAdapter(Platform):
184
184
  return PlatformMetadata(
185
185
  "weixin_official_account",
186
186
  "微信公众平台 适配器",
187
+ id=self.config.get("id", "weixin_official_account"),
187
188
  )
188
189
 
189
190
  @override
@@ -234,6 +234,8 @@ class ProviderManager:
234
234
  )
235
235
  case "dify":
236
236
  from .sources.dify_source import ProviderDify as ProviderDify
237
+ case "coze":
238
+ from .sources.coze_source import ProviderCoze as ProviderCoze
237
239
  case "dashscope":
238
240
  from .sources.dashscope_source import (
239
241
  ProviderDashscope as ProviderDashscope,
@@ -0,0 +1,314 @@
1
+ import json
2
+ import asyncio
3
+ import aiohttp
4
+ import io
5
+ from typing import Dict, List, Any, AsyncGenerator
6
+ from astrbot.core import logger
7
+
8
+
9
+ class CozeAPIClient:
10
+ def __init__(self, api_key: str, api_base: str = "https://api.coze.cn"):
11
+ self.api_key = api_key
12
+ self.api_base = api_base
13
+ self.session = None
14
+
15
+ async def _ensure_session(self):
16
+ """确保HTTP session存在"""
17
+ if self.session is None:
18
+ connector = aiohttp.TCPConnector(
19
+ ssl=False if self.api_base.startswith("http://") else True,
20
+ limit=100,
21
+ limit_per_host=30,
22
+ keepalive_timeout=30,
23
+ enable_cleanup_closed=True,
24
+ )
25
+ timeout = aiohttp.ClientTimeout(
26
+ total=120, # 默认超时时间
27
+ connect=30,
28
+ sock_read=120,
29
+ )
30
+ headers = {
31
+ "Authorization": f"Bearer {self.api_key}",
32
+ "Accept": "text/event-stream",
33
+ }
34
+ self.session = aiohttp.ClientSession(
35
+ headers=headers, timeout=timeout, connector=connector
36
+ )
37
+ return self.session
38
+
39
+ async def upload_file(
40
+ self,
41
+ file_data: bytes,
42
+ ) -> str:
43
+ """上传文件到 Coze 并返回 file_id
44
+
45
+ Args:
46
+ file_data (bytes): 文件的二进制数据
47
+ Returns:
48
+ str: 上传成功后返回的 file_id
49
+ """
50
+ session = await self._ensure_session()
51
+ url = f"{self.api_base}/v1/files/upload"
52
+
53
+ try:
54
+ file_io = io.BytesIO(file_data)
55
+ async with session.post(
56
+ url,
57
+ data={
58
+ "file": file_io,
59
+ },
60
+ timeout=aiohttp.ClientTimeout(total=60),
61
+ ) as response:
62
+ if response.status == 401:
63
+ raise Exception("Coze API 认证失败,请检查 API Key 是否正确")
64
+
65
+ response_text = await response.text()
66
+ logger.debug(
67
+ f"文件上传响应状态: {response.status}, 内容: {response_text}"
68
+ )
69
+
70
+ if response.status != 200:
71
+ raise Exception(
72
+ f"文件上传失败,状态码: {response.status}, 响应: {response_text}"
73
+ )
74
+
75
+ try:
76
+ result = await response.json()
77
+ except json.JSONDecodeError:
78
+ raise Exception(f"文件上传响应解析失败: {response_text}")
79
+
80
+ if result.get("code") != 0:
81
+ raise Exception(f"文件上传失败: {result.get('msg', '未知错误')}")
82
+
83
+ file_id = result["data"]["id"]
84
+ logger.debug(f"[Coze] 图片上传成功,file_id: {file_id}")
85
+ return file_id
86
+
87
+ except asyncio.TimeoutError:
88
+ logger.error("文件上传超时")
89
+ raise Exception("文件上传超时")
90
+ except Exception as e:
91
+ logger.error(f"文件上传失败: {str(e)}")
92
+ raise Exception(f"文件上传失败: {str(e)}")
93
+
94
+ async def download_image(self, image_url: str) -> bytes:
95
+ """下载图片并返回字节数据
96
+
97
+ Args:
98
+ image_url (str): 图片的URL
99
+ Returns:
100
+ bytes: 图片的二进制数据
101
+ """
102
+ session = await self._ensure_session()
103
+
104
+ try:
105
+ async with session.get(image_url) as response:
106
+ if response.status != 200:
107
+ raise Exception(f"下载图片失败,状态码: {response.status}")
108
+
109
+ image_data = await response.read()
110
+ return image_data
111
+
112
+ except Exception as e:
113
+ logger.error(f"下载图片失败 {image_url}: {str(e)}")
114
+ raise Exception(f"下载图片失败: {str(e)}")
115
+
116
+ async def chat_messages(
117
+ self,
118
+ bot_id: str,
119
+ user_id: str,
120
+ additional_messages: List[Dict] | None = None,
121
+ conversation_id: str | None = None,
122
+ auto_save_history: bool = True,
123
+ stream: bool = True,
124
+ timeout: float = 120,
125
+ ) -> AsyncGenerator[Dict[str, Any], None]:
126
+ """发送聊天消息并返回流式响应
127
+
128
+ Args:
129
+ bot_id: Bot ID
130
+ user_id: 用户ID
131
+ additional_messages: 额外消息列表
132
+ conversation_id: 会话ID
133
+ auto_save_history: 是否自动保存历史
134
+ stream: 是否流式响应
135
+ timeout: 超时时间
136
+ """
137
+ session = await self._ensure_session()
138
+ url = f"{self.api_base}/v3/chat"
139
+
140
+ payload = {
141
+ "bot_id": bot_id,
142
+ "user_id": user_id,
143
+ "stream": stream,
144
+ "auto_save_history": auto_save_history,
145
+ }
146
+
147
+ if additional_messages:
148
+ payload["additional_messages"] = additional_messages
149
+
150
+ params = {}
151
+ if conversation_id:
152
+ params["conversation_id"] = conversation_id
153
+
154
+ logger.debug(f"Coze chat_messages payload: {payload}, params: {params}")
155
+
156
+ try:
157
+ async with session.post(
158
+ url,
159
+ json=payload,
160
+ params=params,
161
+ timeout=aiohttp.ClientTimeout(total=timeout),
162
+ ) as response:
163
+ if response.status == 401:
164
+ raise Exception("Coze API 认证失败,请检查 API Key 是否正确")
165
+
166
+ if response.status != 200:
167
+ raise Exception(f"Coze API 流式请求失败,状态码: {response.status}")
168
+
169
+ # SSE
170
+ buffer = ""
171
+ event_type = None
172
+ event_data = None
173
+
174
+ async for chunk in response.content:
175
+ if chunk:
176
+ buffer += chunk.decode("utf-8", errors="ignore")
177
+ lines = buffer.split("\n")
178
+ buffer = lines[-1]
179
+
180
+ for line in lines[:-1]:
181
+ line = line.strip()
182
+
183
+ if not line:
184
+ if event_type and event_data:
185
+ yield {"event": event_type, "data": event_data}
186
+ event_type = None
187
+ event_data = None
188
+ elif line.startswith("event:"):
189
+ event_type = line[6:].strip()
190
+ elif line.startswith("data:"):
191
+ data_str = line[5:].strip()
192
+ if data_str and data_str != "[DONE]":
193
+ try:
194
+ event_data = json.loads(data_str)
195
+ except json.JSONDecodeError:
196
+ event_data = {"content": data_str}
197
+
198
+ except asyncio.TimeoutError:
199
+ raise Exception(f"Coze API 流式请求超时 ({timeout}秒)")
200
+ except Exception as e:
201
+ raise Exception(f"Coze API 流式请求失败: {str(e)}")
202
+
203
+ async def clear_context(self, conversation_id: str):
204
+ """清空会话上下文
205
+
206
+ Args:
207
+ conversation_id: 会话ID
208
+ Returns:
209
+ dict: API响应结果
210
+ """
211
+ session = await self._ensure_session()
212
+ url = f"{self.api_base}/v3/conversation/message/clear_context"
213
+ payload = {"conversation_id": conversation_id}
214
+
215
+ try:
216
+ async with session.post(url, json=payload) as response:
217
+ response_text = await response.text()
218
+
219
+ if response.status == 401:
220
+ raise Exception("Coze API 认证失败,请检查 API Key 是否正确")
221
+
222
+ if response.status != 200:
223
+ raise Exception(f"Coze API 请求失败,状态码: {response.status}")
224
+
225
+ try:
226
+ return json.loads(response_text)
227
+ except json.JSONDecodeError:
228
+ raise Exception("Coze API 返回非JSON格式")
229
+
230
+ except asyncio.TimeoutError:
231
+ raise Exception("Coze API 请求超时")
232
+ except aiohttp.ClientError as e:
233
+ raise Exception(f"Coze API 请求失败: {str(e)}")
234
+
235
+ async def get_message_list(
236
+ self,
237
+ conversation_id: str,
238
+ order: str = "desc",
239
+ limit: int = 10,
240
+ offset: int = 0,
241
+ ):
242
+ """获取消息列表
243
+
244
+ Args:
245
+ conversation_id: 会话ID
246
+ order: 排序方式 (asc/desc)
247
+ limit: 限制数量
248
+ offset: 偏移量
249
+ Returns:
250
+ dict: API响应结果
251
+ """
252
+ session = await self._ensure_session()
253
+ url = f"{self.api_base}/v3/conversation/message/list"
254
+ params = {
255
+ "conversation_id": conversation_id,
256
+ "order": order,
257
+ "limit": limit,
258
+ "offset": offset,
259
+ }
260
+
261
+ try:
262
+ async with session.get(url, params=params) as response:
263
+ response.raise_for_status()
264
+ return await response.json()
265
+
266
+ except Exception as e:
267
+ logger.error(f"获取Coze消息列表失败: {str(e)}")
268
+ raise Exception(f"获取Coze消息列表失败: {str(e)}")
269
+
270
+ async def close(self):
271
+ """关闭会话"""
272
+ if self.session:
273
+ await self.session.close()
274
+ self.session = None
275
+
276
+
277
+ if __name__ == "__main__":
278
+ import os
279
+ import asyncio
280
+
281
+ async def test_coze_api_client():
282
+ api_key = os.getenv("COZE_API_KEY", "")
283
+ bot_id = os.getenv("COZE_BOT_ID", "")
284
+ client = CozeAPIClient(api_key=api_key)
285
+
286
+ try:
287
+ with open("README.md", "rb") as f:
288
+ file_data = f.read()
289
+ file_id = await client.upload_file(file_data)
290
+ print(f"Uploaded file_id: {file_id}")
291
+ async for event in client.chat_messages(
292
+ bot_id=bot_id,
293
+ user_id="test_user",
294
+ additional_messages=[
295
+ {
296
+ "role": "user",
297
+ "content": json.dumps(
298
+ [
299
+ {"type": "text", "text": "这是什么"},
300
+ {"type": "file", "file_id": file_id},
301
+ ],
302
+ ensure_ascii=False,
303
+ ),
304
+ "content_type": "object_string",
305
+ },
306
+ ],
307
+ stream=True,
308
+ ):
309
+ print(f"Event: {event}")
310
+
311
+ finally:
312
+ await client.close()
313
+
314
+ asyncio.run(test_coze_api_client())