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
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:
1 parent
9097ee699d
commit
9058149576
3136 files changed
+18018
-18004
No files matched your search
+15
-15
@@ -1,12 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
WeKnora MCP Server 主入口点
|
||||
Academy MCP Server 主入口点
|
||||
|
||||
这个文件提供了一个统一的入口点来启动 WeKnora MCP 服务器。
|
||||
这个文件提供了一个统一的入口点来启动 Academy MCP 服务器。
|
||||
可以通过多种方式运行:
|
||||
1. python main.py
|
||||
2. python -m weknora_mcp_server
|
||||
3. weknora-mcp-server (安装后)
|
||||
2. python -m academy_mcp_server
|
||||
3. academy-mcp-server (安装后)
|
||||
|
||||
注意:在 stdio 传输下,stdout 是 JSON-RPC 通道,所有诊断/提示信息必须写入
|
||||
stderr,否则会破坏 MCP 协议流导致客户端判定"启动失败"。本文件所有 print
|
||||
@@ -43,18 +43,18 @@ def check_dependencies():
|
||||
|
||||
def check_environment_variables():
|
||||
"""检查环境变量配置"""
|
||||
base_url = os.getenv("WEKNORA_BASE_URL")
|
||||
api_key = os.getenv("WEKNORA_API_KEY")
|
||||
base_url = os.getenv("ACADEMY_BASE_URL")
|
||||
api_key = os.getenv("ACADEMY_API_KEY")
|
||||
|
||||
print("=== WeKnora MCP Server 环境检查 ===", file=sys.stderr)
|
||||
print("=== Academy MCP Server 环境检查 ===", file=sys.stderr)
|
||||
print(f"Base URL: {base_url or 'http://localhost:8080/api/v1 (默认)'}", file=sys.stderr)
|
||||
print(f"API Key: {'已设置' if api_key else '未设置 (警告)'}", file=sys.stderr)
|
||||
|
||||
if not base_url:
|
||||
print("提示: 可以设置 WEKNORA_BASE_URL 环境变量", file=sys.stderr)
|
||||
print("提示: 可以设置 ACADEMY_BASE_URL 环境变量", file=sys.stderr)
|
||||
|
||||
if not api_key:
|
||||
print("警告: 建议设置 WEKNORA_API_KEY 环境变量", file=sys.stderr)
|
||||
print("警告: 建议设置 ACADEMY_API_KEY 环境变量", file=sys.stderr)
|
||||
|
||||
print("=" * 40, file=sys.stderr)
|
||||
return True
|
||||
@@ -63,7 +63,7 @@ def check_environment_variables():
|
||||
def parse_arguments():
|
||||
"""解析命令行参数"""
|
||||
parser = argparse.ArgumentParser(
|
||||
description="WeKnora MCP Server - Model Context Protocol server for WeKnora API",
|
||||
description="Academy MCP Server - Model Context Protocol server for Academy API",
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
epilog="""
|
||||
示例:
|
||||
@@ -72,8 +72,8 @@ def parse_arguments():
|
||||
python main.py --verbose # 启用详细日志
|
||||
|
||||
环境变量:
|
||||
WEKNORA_BASE_URL WeKnora API 基础 URL (默认: http://localhost:8080/api/v1)
|
||||
WEKNORA_API_KEY WeKnora API 密钥
|
||||
ACADEMY_BASE_URL Academy API 基础 URL (默认: http://localhost:8080/api/v1)
|
||||
ACADEMY_API_KEY Academy API 密钥
|
||||
MCP_SERVER_AUTH_TOKEN SSE/HTTP 传输必填,客户端通过 Authorization: Bearer 传递
|
||||
""",
|
||||
)
|
||||
@@ -85,7 +85,7 @@ def parse_arguments():
|
||||
parser.add_argument("--verbose", "-v", action="store_true", help="启用详细日志输出")
|
||||
|
||||
parser.add_argument(
|
||||
"--version", action="version", version="WeKnora MCP Server 1.1.1"
|
||||
"--version", action="version", version="Academy MCP Server 1.1.1"
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
@@ -136,9 +136,9 @@ async def main():
|
||||
print("已启用详细日志模式", file=sys.stderr)
|
||||
|
||||
try:
|
||||
print(f"正在启动 WeKnora MCP Server (transport={args.transport})...", file=sys.stderr)
|
||||
print(f"正在启动 Academy MCP Server (transport={args.transport})...", file=sys.stderr)
|
||||
|
||||
from weknora_mcp_server import run_stdio, run_sse, run_http
|
||||
from academy_mcp_server import run_stdio, run_sse, run_http
|
||||
|
||||
# Select transport mode based on CLI argument or MCP_TRANSPORT env var
|
||||
# - stdio: Default, used by VS Code Copilot for local integration
|
||||
|
||||
Reference in new issue
Block a user