astrbotmcp 0.4.0__tar.gz → 0.4.1__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 (35) hide show
  1. {astrbotmcp-0.4.0/astrbotmcp.egg-info → astrbotmcp-0.4.1}/PKG-INFO +16 -18
  2. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/README.md +15 -17
  3. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/message/webchat.py +1 -2
  4. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1/astrbotmcp.egg-info}/PKG-INFO +16 -18
  5. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/pyproject.toml +1 -1
  6. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/tests/test_smoke.py +11 -0
  7. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/LICENSE.txt +0 -0
  8. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/__init__.py +0 -0
  9. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/astrbot_client.py +0 -0
  10. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/config.py +0 -0
  11. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/server.py +0 -0
  12. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/__init__.py +0 -0
  13. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/config_search_tool.py +0 -0
  14. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/config_tools.py +0 -0
  15. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/control_tools.py +0 -0
  16. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/helpers.py +0 -0
  17. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/log_tools.py +0 -0
  18. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/mcp_panel_tools.py +0 -0
  19. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/message/__init__.py +0 -0
  20. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/message/cache.py +0 -0
  21. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/message/direct.py +0 -0
  22. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/message/quote.py +0 -0
  23. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/message/utils.py +0 -0
  24. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/platform_tools.py +0 -0
  25. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/plugin_admin_tools.py +0 -0
  26. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/plugin_market_tools.py +0 -0
  27. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/session_tools.py +0 -0
  28. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/types.py +0 -0
  29. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools.py +0 -0
  30. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbotmcp.egg-info/SOURCES.txt +0 -0
  31. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbotmcp.egg-info/dependency_links.txt +0 -0
  32. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbotmcp.egg-info/entry_points.txt +0 -0
  33. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbotmcp.egg-info/requires.txt +0 -0
  34. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbotmcp.egg-info/top_level.txt +0 -0
  35. {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: astrbotmcp
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Add your description here
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -18,7 +18,6 @@ Dynamic: license-file
18
18
 
19
19
  > **AstrBot 无法通过 MCP 控制自身。本项目填补了这一空白,为Astrbot开发者提供AI AGENT时代调试插件的自动化工具**
20
20
 
21
-
22
21
  ⚠️ **本项目提供的是运维级控制能力,使用时请注意:**
23
22
 
24
23
  1. **重启风险** - `restart_astrbot` 会中断所有正在进行的对话
@@ -32,9 +31,6 @@ Dynamic: license-file
32
31
 
33
32
  #### 安装
34
33
 
35
- <details>
36
- <summary>通过 PyPI 或 uv 安装</summary>
37
-
38
34
  ```bash
39
35
  # 通过 PyPI 安装(推荐)
40
36
  pip install astrbotmcp
@@ -43,7 +39,8 @@ pip install astrbotmcp
43
39
  uv add astrbotmcp
44
40
  ```
45
41
 
46
- 安装完成后,您可以通过以下方式在 MCP 客户端中配置:
42
+ <details>
43
+ <summary>通过 PyPI 或 uv 安装</summary>
47
44
 
48
45
  ```json
49
46
  {
@@ -66,6 +63,8 @@ uv add astrbotmcp
66
63
  }
67
64
  ```
68
65
 
66
+ 安装完成后,您可以通过以下方式在 MCP 客户端中配置:
67
+
69
68
  </details>
70
69
 
71
70
  <details>
@@ -86,7 +85,8 @@ npm install -g astrbotmcp
86
85
  "astrbot-mcp": {
87
86
  "command": "npx",
88
87
  "args": [
89
- "astrbotmcp"
88
+ "-y",
89
+ "@xunxiing/astrbot-mcp@latest"
90
90
  ],
91
91
  "env": {
92
92
  "ASTRBOT_BASE_URL": "http://127.0.0.1:6185",
@@ -101,18 +101,17 @@ npm install -g astrbotmcp
101
101
 
102
102
  </details>
103
103
 
104
-
105
104
  #### 环境变量说明
106
105
 
107
- | 变量 | 说明 | 默认值 |
108
- |------|------|--------|
109
- | `ASTRBOT_BASE_URL` | AstrBot Dashboard 地址 | `http://127.0.0.1:6185` |
110
- | `ASTRBOT_TIMEOUT` | HTTP 请求超时时间 | `30` |
111
- | `ASTRBOT_USERNAME` | Dashboard 用户名 | - |
112
- | `ASTRBOT_PASSWORD` | Dashboard 密码 | - |
113
- | `ASTRBOT_LOG_LEVEL` | 日志级别 | `INFO` |
114
- | `ASTRBOTMCP_DISABLE_PROXY` | 是否禁用代理(防止本地请求被代理拦截) | `true` |
115
- | `ASTRBOTMCP_PLUGIN_PROXY` | 插件 URL 安装默认代理前缀(`install_astrbot_plugin`) | `https://gh-proxy.com` |
106
+ | 变量 | 说明 | 默认值 |
107
+ | ---------------------------- | -------------------------------------------------------| ------------------------- |
108
+ | `ASTRBOT_BASE_URL` | AstrBot Dashboard 地址 | `http://127.0.0.1:6185` |
109
+ | `ASTRBOT_TIMEOUT` | HTTP 请求超时时间 | `30` |
110
+ | `ASTRBOT_USERNAME` | Dashboard 用户名 | - |
111
+ | `ASTRBOT_PASSWORD` | Dashboard 密码 | - |
112
+ | `ASTRBOT_LOG_LEVEL` | 日志级别 | `INFO` |
113
+ | `ASTRBOTMCP_DISABLE_PROXY` | 是否禁用代理(防止本地请求被代理拦截) | `true` |
114
+ | `ASTRBOTMCP_PLUGIN_PROXY` | 插件 URL 安装默认代理前缀(`install_astrbot_plugin`) | `https://gh-proxy.com` |
116
115
 
117
116
  #### 代理配置说明
118
117
 
@@ -249,4 +248,3 @@ uv run --project . astrbot-mcp
249
248
  ### 许可证
250
249
 
251
250
  MIT License - 详见 [LICENSE](LICENSE.txt) 文件。
252
-
@@ -4,7 +4,6 @@
4
4
 
5
5
  > **AstrBot 无法通过 MCP 控制自身。本项目填补了这一空白,为Astrbot开发者提供AI AGENT时代调试插件的自动化工具**
6
6
 
7
-
8
7
  ⚠️ **本项目提供的是运维级控制能力,使用时请注意:**
9
8
 
10
9
  1. **重启风险** - `restart_astrbot` 会中断所有正在进行的对话
@@ -18,9 +17,6 @@
18
17
 
19
18
  #### 安装
20
19
 
21
- <details>
22
- <summary>通过 PyPI 或 uv 安装</summary>
23
-
24
20
  ```bash
25
21
  # 通过 PyPI 安装(推荐)
26
22
  pip install astrbotmcp
@@ -29,7 +25,8 @@ pip install astrbotmcp
29
25
  uv add astrbotmcp
30
26
  ```
31
27
 
32
- 安装完成后,您可以通过以下方式在 MCP 客户端中配置:
28
+ <details>
29
+ <summary>通过 PyPI 或 uv 安装</summary>
33
30
 
34
31
  ```json
35
32
  {
@@ -52,6 +49,8 @@ uv add astrbotmcp
52
49
  }
53
50
  ```
54
51
 
52
+ 安装完成后,您可以通过以下方式在 MCP 客户端中配置:
53
+
55
54
  </details>
56
55
 
57
56
  <details>
@@ -72,7 +71,8 @@ npm install -g astrbotmcp
72
71
  "astrbot-mcp": {
73
72
  "command": "npx",
74
73
  "args": [
75
- "astrbotmcp"
74
+ "-y",
75
+ "@xunxiing/astrbot-mcp@latest"
76
76
  ],
77
77
  "env": {
78
78
  "ASTRBOT_BASE_URL": "http://127.0.0.1:6185",
@@ -87,18 +87,17 @@ npm install -g astrbotmcp
87
87
 
88
88
  </details>
89
89
 
90
-
91
90
  #### 环境变量说明
92
91
 
93
- | 变量 | 说明 | 默认值 |
94
- |------|------|--------|
95
- | `ASTRBOT_BASE_URL` | AstrBot Dashboard 地址 | `http://127.0.0.1:6185` |
96
- | `ASTRBOT_TIMEOUT` | HTTP 请求超时时间 | `30` |
97
- | `ASTRBOT_USERNAME` | Dashboard 用户名 | - |
98
- | `ASTRBOT_PASSWORD` | Dashboard 密码 | - |
99
- | `ASTRBOT_LOG_LEVEL` | 日志级别 | `INFO` |
100
- | `ASTRBOTMCP_DISABLE_PROXY` | 是否禁用代理(防止本地请求被代理拦截) | `true` |
101
- | `ASTRBOTMCP_PLUGIN_PROXY` | 插件 URL 安装默认代理前缀(`install_astrbot_plugin`) | `https://gh-proxy.com` |
92
+ | 变量 | 说明 | 默认值 |
93
+ | ---------------------------- | -------------------------------------------------------| ------------------------- |
94
+ | `ASTRBOT_BASE_URL` | AstrBot Dashboard 地址 | `http://127.0.0.1:6185` |
95
+ | `ASTRBOT_TIMEOUT` | HTTP 请求超时时间 | `30` |
96
+ | `ASTRBOT_USERNAME` | Dashboard 用户名 | - |
97
+ | `ASTRBOT_PASSWORD` | Dashboard 密码 | - |
98
+ | `ASTRBOT_LOG_LEVEL` | 日志级别 | `INFO` |
99
+ | `ASTRBOTMCP_DISABLE_PROXY` | 是否禁用代理(防止本地请求被代理拦截) | `true` |
100
+ | `ASTRBOTMCP_PLUGIN_PROXY` | 插件 URL 安装默认代理前缀(`install_astrbot_plugin`) | `https://gh-proxy.com` |
102
101
 
103
102
  #### 代理配置说明
104
103
 
@@ -235,4 +234,3 @@ uv run --project . astrbot-mcp
235
234
  ### 许可证
236
235
 
237
236
  MIT License - 详见 [LICENSE](LICENSE.txt) 文件。
238
-
@@ -7,7 +7,6 @@ from typing import Any, Dict, List, Optional
7
7
 
8
8
  from ...astrbot_client import AstrBotClient
9
9
  from ..helpers import _httpx_error_detail, _resolve_local_file_path
10
- from ..types import MessagePart
11
10
  from .cache import (
12
11
  _LAST_SAVED_MESSAGE_ID_BY_SESSION,
13
12
  _LAST_SAVED_MESSAGE_ID_LOCK,
@@ -88,7 +87,7 @@ def _normalize_media_sources(
88
87
 
89
88
 
90
89
  async def send_platform_message(
91
- message_chain: Optional[List[MessagePart]] = None,
90
+ message_chain: Optional[List[Dict[str, Any]]] = None,
92
91
  message: Optional[str] = None,
93
92
  images: Optional[List[str] | str] = None,
94
93
  files: Optional[List[str] | str] = None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: astrbotmcp
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Add your description here
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -18,7 +18,6 @@ Dynamic: license-file
18
18
 
19
19
  > **AstrBot 无法通过 MCP 控制自身。本项目填补了这一空白,为Astrbot开发者提供AI AGENT时代调试插件的自动化工具**
20
20
 
21
-
22
21
  ⚠️ **本项目提供的是运维级控制能力,使用时请注意:**
23
22
 
24
23
  1. **重启风险** - `restart_astrbot` 会中断所有正在进行的对话
@@ -32,9 +31,6 @@ Dynamic: license-file
32
31
 
33
32
  #### 安装
34
33
 
35
- <details>
36
- <summary>通过 PyPI 或 uv 安装</summary>
37
-
38
34
  ```bash
39
35
  # 通过 PyPI 安装(推荐)
40
36
  pip install astrbotmcp
@@ -43,7 +39,8 @@ pip install astrbotmcp
43
39
  uv add astrbotmcp
44
40
  ```
45
41
 
46
- 安装完成后,您可以通过以下方式在 MCP 客户端中配置:
42
+ <details>
43
+ <summary>通过 PyPI 或 uv 安装</summary>
47
44
 
48
45
  ```json
49
46
  {
@@ -66,6 +63,8 @@ uv add astrbotmcp
66
63
  }
67
64
  ```
68
65
 
66
+ 安装完成后,您可以通过以下方式在 MCP 客户端中配置:
67
+
69
68
  </details>
70
69
 
71
70
  <details>
@@ -86,7 +85,8 @@ npm install -g astrbotmcp
86
85
  "astrbot-mcp": {
87
86
  "command": "npx",
88
87
  "args": [
89
- "astrbotmcp"
88
+ "-y",
89
+ "@xunxiing/astrbot-mcp@latest"
90
90
  ],
91
91
  "env": {
92
92
  "ASTRBOT_BASE_URL": "http://127.0.0.1:6185",
@@ -101,18 +101,17 @@ npm install -g astrbotmcp
101
101
 
102
102
  </details>
103
103
 
104
-
105
104
  #### 环境变量说明
106
105
 
107
- | 变量 | 说明 | 默认值 |
108
- |------|------|--------|
109
- | `ASTRBOT_BASE_URL` | AstrBot Dashboard 地址 | `http://127.0.0.1:6185` |
110
- | `ASTRBOT_TIMEOUT` | HTTP 请求超时时间 | `30` |
111
- | `ASTRBOT_USERNAME` | Dashboard 用户名 | - |
112
- | `ASTRBOT_PASSWORD` | Dashboard 密码 | - |
113
- | `ASTRBOT_LOG_LEVEL` | 日志级别 | `INFO` |
114
- | `ASTRBOTMCP_DISABLE_PROXY` | 是否禁用代理(防止本地请求被代理拦截) | `true` |
115
- | `ASTRBOTMCP_PLUGIN_PROXY` | 插件 URL 安装默认代理前缀(`install_astrbot_plugin`) | `https://gh-proxy.com` |
106
+ | 变量 | 说明 | 默认值 |
107
+ | ---------------------------- | -------------------------------------------------------| ------------------------- |
108
+ | `ASTRBOT_BASE_URL` | AstrBot Dashboard 地址 | `http://127.0.0.1:6185` |
109
+ | `ASTRBOT_TIMEOUT` | HTTP 请求超时时间 | `30` |
110
+ | `ASTRBOT_USERNAME` | Dashboard 用户名 | - |
111
+ | `ASTRBOT_PASSWORD` | Dashboard 密码 | - |
112
+ | `ASTRBOT_LOG_LEVEL` | 日志级别 | `INFO` |
113
+ | `ASTRBOTMCP_DISABLE_PROXY` | 是否禁用代理(防止本地请求被代理拦截) | `true` |
114
+ | `ASTRBOTMCP_PLUGIN_PROXY` | 插件 URL 安装默认代理前缀(`install_astrbot_plugin`) | `https://gh-proxy.com` |
116
115
 
117
116
  #### 代理配置说明
118
117
 
@@ -249,4 +248,3 @@ uv run --project . astrbot-mcp
249
248
  ### 许可证
250
249
 
251
250
  MIT License - 详见 [LICENSE](LICENSE.txt) 文件。
252
-
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "astrbotmcp"
3
- version = "0.4.0"
3
+ version = "0.4.1"
4
4
  description = "Add your description here"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -2,6 +2,7 @@ import subprocess
2
2
  import sys
3
3
  import asyncio
4
4
  import inspect
5
+ import json
5
6
  import pytest
6
7
 
7
8
 
@@ -50,6 +51,16 @@ def test_send_platform_message_signature_is_webchat_only() -> None:
50
51
  assert "/抽老婆帮助" in doc
51
52
 
52
53
 
54
+ def test_all_tool_schemas_are_ref_free_for_provider_compat() -> None:
55
+ import astrbot_mcp.server as server_mod
56
+
57
+ tools = asyncio.run(server_mod.server.get_tools())
58
+ for name, tool in tools.items():
59
+ schema_text = json.dumps(tool.parameters, ensure_ascii=False)
60
+ assert "$defs" not in schema_text, f"{name} schema contains $defs"
61
+ assert "$ref" not in schema_text, f"{name} schema contains $ref"
62
+
63
+
53
64
  def test_normalize_media_sources_supports_json_string() -> None:
54
65
  from astrbot_mcp.tools.message import webchat as webchat_mod
55
66
 
File without changes
File without changes