refactor: 项目更名 WeKnora → Academy
Build & Publish (dsh-academy) / End-to-end inside dsh (latest, advisory) (push) Skipped
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Frontend / Docker multi-stage image (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-academy) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-academy) / Publish to npm (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Helm / chart (push) Canceled after 0s

- 全量替换代码/配置/文档中的项目名(保留上游 GitHub 链接、weixin 文档域名、Docker Hub 镜像名)
- 重命名 32 个含项目名的文件/目录;Go module 路径改为 academy(含 client/cli 子模块)
- docreader proto 描述符采用等长替换,保持序列化字节布局有效
- Dockerfile.app 构建网络修复: browserskill 离线产物通道、PyPI/apt 国内镜像
- 运行验证: go build ✓ docker compose up ✓ 健康检查 ✓
This commit is contained in:
runny committed 2026-11-13 20:52:51 +08:00
1 parent 9097ee699d
commit 9058149576
3136 files changed
+18018 -18004

No files matched your search

+31 -31
View File
@@ -1,4 +1,4 @@
# WeKnora MCP Server 安装和使用指南
# Academy MCP Server 安装和使用指南
## 快速开始
@@ -10,16 +10,16 @@ pip install -r requirements.txt
### 2. 设置环境变量
```bash
# Linux/macOS
export WEKNORA_BASE_URL="http://localhost:8080/api/v1"
export WEKNORA_API_KEY="your_api_key_here"
export ACADEMY_BASE_URL="http://localhost:8080/api/v1"
export ACADEMY_API_KEY="your_api_key_here"
# Windows PowerShell
$env:WEKNORA_BASE_URL="http://localhost:8080/api/v1"
$env:WEKNORA_API_KEY="your_api_key_here"
$env:ACADEMY_BASE_URL="http://localhost:8080/api/v1"
$env:ACADEMY_API_KEY="your_api_key_here"
# Windows CMD
set WEKNORA_BASE_URL=http://localhost:8080/api/v1
set WEKNORA_API_KEY=your_api_key_here
set ACADEMY_BASE_URL=http://localhost:8080/api/v1
set ACADEMY_API_KEY=your_api_key_here
```
### 3. 运行服务器
@@ -38,12 +38,12 @@ python run_server.py
#### 方式 3: 直接运行服务器模块
```bash
python weknora_mcp_server.py
python academy_mcp_server.py
```
#### 方式 4: 作为 Python 模块运行
```bash
python -m weknora_mcp_server
python -m academy_mcp_server
```
## 作为 Python 包安装
@@ -55,9 +55,9 @@ pip install -e .
安装后可以使用命令行工具:
```bash
weknora-mcp-server
academy-mcp-server
# 或
weknora-server
academy-server
```
### 生产模式安装
@@ -94,7 +94,7 @@ python main.py --check-only
```
这将显示:
- WeKnora API 基础 URL 配置
- Academy API 基础 URL 配置
- API 密钥设置状态
- 依赖包安装状态
@@ -107,14 +107,14 @@ python main.py --check-only
- 没有文件名冲突
### 2. 连接错误
如果无法连接到 WeKnora API:
- 检查 `WEKNORA_BASE_URL` 是否正确
- 确认 WeKnora 服务正在运行
如果无法连接到 Academy API:
- 检查 `ACADEMY_BASE_URL` 是否正确
- 确认 Academy 服务正在运行
- 验证网络连接
### 3. 认证错误
如果遇到认证问题:
- 检查 `WEKNORA_API_KEY` 是否设置
- 检查 `ACADEMY_API_KEY` 是否设置
- 确认 API 密钥有效
- 验证权限设置
@@ -122,14 +122,14 @@ python main.py --check-only
### 项目结构
```
WeKnora/mcp-server/
Academy/mcp-server/
├── __init__.py # 包初始化文件
├── main.py # 主入口点
├── run_server.py # 原始启动脚本
├── weknora_mcp_server.py # MCP 服务器实现
├── academy_mcp_server.py # MCP 服务器实现
├── requirements.txt # 依赖列表
├── setup.py # 安装脚本
├── pyproject.toml # 项目元数据(PyPI: tencent-weknora-mcp)
├── pyproject.toml # 项目元数据(PyPI: tencent-academy-mcp)
├── MANIFEST.in # 包含文件清单
├── LICENSE # 许可证
├── README.md # 项目说明
@@ -137,7 +137,7 @@ WeKnora/mcp-server/
```
### 添加新功能
1. 在 `WeKnoraClient` 类中添加新的 API 方法
1. 在 `AcademyClient` 类中添加新的 API 方法
2. 用 `@mcp.tool()` 装饰器注册一个新工具函数:参数用类型标注(schema 自动生成),描述写在 docstring 里,函数体调用上面新增的客户端方法
3. 更新文档和测试
@@ -167,26 +167,26 @@ RUN pip install -r requirements.txt
COPY . .
RUN pip install -e .
ENV WEKNORA_BASE_URL=http://localhost:8080/api/v1
ENV ACADEMY_BASE_URL=http://localhost:8080/api/v1
EXPOSE 8000
CMD ["weknora-mcp-server"]
CMD ["academy-mcp-server"]
```
### 系统服务
创建 systemd 服务文件 `/etc/systemd/system/weknora-mcp.service`:
创建 systemd 服务文件 `/etc/systemd/system/academy-mcp.service`:
```ini
[Unit]
Description=WeKnora MCP Server
Description=Academy MCP Server
After=network.target
[Service]
Type=simple
User=weknora
WorkingDirectory=/opt/weknora-mcp
Environment=WEKNORA_BASE_URL=http://localhost:8080/api/v1
Environment=WEKNORA_API_KEY=your_api_key
ExecStart=/usr/local/bin/weknora-mcp-server
User=academy
WorkingDirectory=/opt/academy-mcp
Environment=ACADEMY_BASE_URL=http://localhost:8080/api/v1
Environment=ACADEMY_API_KEY=your_api_key
ExecStart=/usr/local/bin/academy-mcp-server
Restart=always
[Install]
@@ -195,8 +195,8 @@ WantedBy=multi-user.target
启用服务:
```bash
sudo systemctl enable weknora-mcp
sudo systemctl start weknora-mcp
sudo systemctl enable academy-mcp
sudo systemctl start academy-mcp
```
## 支持