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
@@ -1,15 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
WeKnora 本地 MCP Demo Server
|
||||
Academy 本地 MCP Demo Server
|
||||
|
||||
最小可运行的外部 MCP 服务,用于在 WeKnora「设置 → MCP 服务」里测试客户端接入。
|
||||
最小可运行的外部 MCP 服务,用于在 Academy「设置 → MCP 服务」里测试客户端接入。
|
||||
默认以 Streamable HTTP 监听 http://127.0.0.1:8010/mcp
|
||||
|
||||
启动:
|
||||
export MCP_SERVER_AUTH_TOKEN=weknora-demo-token
|
||||
export MCP_SERVER_AUTH_TOKEN=academy-demo-token
|
||||
python server.py
|
||||
|
||||
WeKnora 配置:
|
||||
Academy 配置:
|
||||
传输:HTTP Streamable
|
||||
URL:http://127.0.0.1:8010/mcp
|
||||
认证:Bearer,令牌与 MCP_SERVER_AUTH_TOKEN 一致
|
||||
@@ -31,7 +31,7 @@ from mcp.server import MCPServer
|
||||
logging.basicConfig(level=logging.INFO, format="%(levelname)s %(message)s")
|
||||
logger = logging.getLogger("mcp-demo")
|
||||
|
||||
mcp = MCPServer("weknora-mcp-demo", version="0.1.0")
|
||||
mcp = MCPServer("academy-mcp-demo", version="0.1.0")
|
||||
|
||||
# 与 website-docs/sample-data/ 配套的演示语料,方便 Agent 调用后对照知识库答案。
|
||||
DEMO_POLICIES: dict[str, str] = {
|
||||
@@ -63,7 +63,7 @@ def require_network_transport_auth(transport: str) -> str:
|
||||
if transport in ("sse", "http") and not token:
|
||||
logger.error(
|
||||
"MCP_SERVER_AUTH_TOKEN is required for %s transport. "
|
||||
"Example: export MCP_SERVER_AUTH_TOKEN=weknora-demo-token",
|
||||
"Example: export MCP_SERVER_AUTH_TOKEN=academy-demo-token",
|
||||
transport,
|
||||
)
|
||||
sys.exit(1)
|
||||
@@ -189,7 +189,7 @@ def list_team_contacts(department: str = "") -> dict[str, Any]:
|
||||
def send_demo_alert(channel: str, message: str) -> dict[str, Any]:
|
||||
"""模拟向外部渠道发送通知(演示用,不会真正外发)。
|
||||
|
||||
适合在 WeKnora 里测试 MCP 工具人工审批:建议把此工具标记为需要审批。
|
||||
适合在 Academy 里测试 MCP 工具人工审批:建议把此工具标记为需要审批。
|
||||
"""
|
||||
return {
|
||||
"ok": True,
|
||||
@@ -235,7 +235,7 @@ async def run_sse(host: str, port: int) -> None:
|
||||
|
||||
|
||||
def parse_args() -> argparse.Namespace:
|
||||
parser = argparse.ArgumentParser(description="WeKnora local MCP demo server")
|
||||
parser = argparse.ArgumentParser(description="Academy local MCP demo server")
|
||||
parser.add_argument(
|
||||
"--transport",
|
||||
choices=["http", "sse"],
|
||||
|
||||
Reference in new issue
Block a user