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.
- {astrbotmcp-0.4.0/astrbotmcp.egg-info → astrbotmcp-0.4.1}/PKG-INFO +16 -18
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/README.md +15 -17
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/message/webchat.py +1 -2
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1/astrbotmcp.egg-info}/PKG-INFO +16 -18
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/pyproject.toml +1 -1
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/tests/test_smoke.py +11 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/LICENSE.txt +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/__init__.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/astrbot_client.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/config.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/server.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/__init__.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/config_search_tool.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/config_tools.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/control_tools.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/helpers.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/log_tools.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/mcp_panel_tools.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/message/__init__.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/message/cache.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/message/direct.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/message/quote.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/message/utils.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/platform_tools.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/plugin_admin_tools.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/plugin_market_tools.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/session_tools.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools/types.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbot_mcp/tools.py +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbotmcp.egg-info/SOURCES.txt +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbotmcp.egg-info/dependency_links.txt +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbotmcp.egg-info/entry_points.txt +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbotmcp.egg-info/requires.txt +0 -0
- {astrbotmcp-0.4.0 → astrbotmcp-0.4.1}/astrbotmcp.egg-info/top_level.txt +0 -0
- {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.
|
|
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
|
-
|
|
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
|
-
"
|
|
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`
|
|
110
|
-
| `ASTRBOT_TIMEOUT`
|
|
111
|
-
| `ASTRBOT_USERNAME`
|
|
112
|
-
| `ASTRBOT_PASSWORD`
|
|
113
|
-
| `ASTRBOT_LOG_LEVEL`
|
|
114
|
-
| `ASTRBOTMCP_DISABLE_PROXY` | 是否禁用代理(防止本地请求被代理拦截)
|
|
115
|
-
| `ASTRBOTMCP_PLUGIN_PROXY`
|
|
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
|
-
|
|
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
|
-
"
|
|
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`
|
|
96
|
-
| `ASTRBOT_TIMEOUT`
|
|
97
|
-
| `ASTRBOT_USERNAME`
|
|
98
|
-
| `ASTRBOT_PASSWORD`
|
|
99
|
-
| `ASTRBOT_LOG_LEVEL`
|
|
100
|
-
| `ASTRBOTMCP_DISABLE_PROXY` | 是否禁用代理(防止本地请求被代理拦截)
|
|
101
|
-
| `ASTRBOTMCP_PLUGIN_PROXY`
|
|
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[
|
|
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.
|
|
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
|
-
|
|
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
|
-
"
|
|
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`
|
|
110
|
-
| `ASTRBOT_TIMEOUT`
|
|
111
|
-
| `ASTRBOT_USERNAME`
|
|
112
|
-
| `ASTRBOT_PASSWORD`
|
|
113
|
-
| `ASTRBOT_LOG_LEVEL`
|
|
114
|
-
| `ASTRBOTMCP_DISABLE_PROXY` | 是否禁用代理(防止本地请求被代理拦截)
|
|
115
|
-
| `ASTRBOTMCP_PLUGIN_PROXY`
|
|
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
|
-
|
|
@@ -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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|