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

+6 -6
View File
@@ -1,6 +1,6 @@
// Package mcp wires the curated weknora tool set to an
// Package mcp wires the curated academy tool set to an
// modelcontextprotocol/go-sdk server. RunStdio is the entry point invoked
// by `weknora mcp serve`.
// by `academy mcp serve`.
//
// Design notes:
//
@@ -24,13 +24,13 @@ import (
mcpsdk "github.com/modelcontextprotocol/go-sdk/mcp"
"github.com/Tencent/WeKnora/cli/internal/build"
sdk "github.com/Tencent/WeKnora/client"
"academy/cli/internal/build"
sdk "academy/client"
)
// ServiceClient bundles the SDK methods the tool registry needs. *sdk.Client
// satisfies it; tests substitute a fake to exercise the tool handlers
// in-process without standing up a real WeKnora server.
// in-process without standing up a real Academy server.
//
// Embedding the full SDK Client would couple every tool test to every SDK
// method; declaring the narrow surface here keeps the seam tight.
@@ -52,7 +52,7 @@ func RunStdio(ctx context.Context, svc ServiceClient) error {
v, _, _ := build.Info()
server := mcpsdk.NewServer(
&mcpsdk.Implementation{
Name: "weknora",
Name: "academy",
Version: v,
},
nil,
+4 -4
View File
@@ -12,7 +12,7 @@ import (
)
// TestSkillReferencedMCPToolsExist is part of the K6 drift guard: the MCP tool
// names the bundled `weknora-shared` skill advertises (in its "CLI vs MCP"
// names the bundled `academy-shared` skill advertises (in its "CLI vs MCP"
// section) must all be registered by registerTools. Guards against a skill
// naming a renamed/removed tool (e.g. the agent_invoke→session_ask rename).
func TestSkillReferencedMCPToolsExist(t *testing.T) {
@@ -20,7 +20,7 @@ func TestSkillReferencedMCPToolsExist(t *testing.T) {
if !ok {
t.Fatal("runtime.Caller failed")
}
skillPath := filepath.Join(filepath.Dir(file), "..", "..", "skills", "weknora-shared", "SKILL.md")
skillPath := filepath.Join(filepath.Dir(file), "..", "..", "skills", "academy-shared", "SKILL.md")
raw, err := os.ReadFile(skillPath)
if err != nil {
t.Fatalf("read skill: %v", err)
@@ -30,7 +30,7 @@ func TestSkillReferencedMCPToolsExist(t *testing.T) {
// Slice the "CLI vs MCP" section (heading → next "## " heading).
start := strings.Index(body, "CLI vs MCP")
if start < 0 {
t.Fatal("weknora-shared SKILL.md has no 'CLI vs MCP' section to validate")
t.Fatal("academy-shared SKILL.md has no 'CLI vs MCP' section to validate")
}
section := body[start:]
if end := strings.Index(section, "\n## "); end >= 0 {
@@ -65,7 +65,7 @@ func TestSkillReferencedMCPToolsExist(t *testing.T) {
for name := range referenced {
if !registered[name] {
t.Errorf("weknora-shared skill references MCP tool %q which is NOT registered (renamed/removed?)", name)
t.Errorf("academy-shared skill references MCP tool %q which is NOT registered (renamed/removed?)", name)
}
}
}
+6 -6
View File
@@ -11,9 +11,9 @@ import (
mcpsdk "github.com/modelcontextprotocol/go-sdk/mcp"
"github.com/Tencent/WeKnora/cli/internal/cmdutil"
"github.com/Tencent/WeKnora/cli/internal/sse"
sdk "github.com/Tencent/WeKnora/client"
"academy/cli/internal/cmdutil"
"academy/cli/internal/sse"
sdk "academy/client"
)
// toolErrorResult builds an error CallToolResult with IsError=true, a
@@ -158,7 +158,7 @@ type kbListOutput struct {
func addKBList(server *mcpsdk.Server, svc knowledgeBaseService) {
mcpsdk.AddTool(server, &mcpsdk.Tool{
Name: "kb_list",
Description: "List all knowledge bases visible to the active WeKnora tenant. No arguments. Returns items[]: each item carries id, name, description, knowledge_count, is_pinned, updated_at - useful for selecting a kb_id to pass to other tools.",
Description: "List all knowledge bases visible to the active Academy tenant. No arguments. Returns items[]: each item carries id, name, description, knowledge_count, is_pinned, updated_at - useful for selecting a kb_id to pass to other tools.",
Annotations: &mcpsdk.ToolAnnotations{
Title: "List Knowledge Bases",
DestructiveHint: bptr(false),
@@ -480,7 +480,7 @@ func addChat(server *mcpsdk.Server, svc chatService) {
}
sessionID := in.SessionID
if sessionID == "" {
sess, err := svc.CreateSession(ctx, &sdk.CreateSessionRequest{Title: "weknora mcp chat"})
sess, err := svc.CreateSession(ctx, &sdk.CreateSessionRequest{Title: "academy mcp chat"})
if err != nil {
return toolErrorResult(cmdutil.WrapHTTP(err, "create chat session")), nil, nil
}
@@ -598,7 +598,7 @@ func addSessionAsk(server *mcpsdk.Server, svc sessionAskService) {
// agnostic at creation (verified against server source).
sessionID := in.SessionID
if sessionID == "" {
sess, err := svc.CreateSession(ctx, &sdk.CreateSessionRequest{Title: "weknora mcp session_ask"})
sess, err := svc.CreateSession(ctx, &sdk.CreateSessionRequest{Title: "academy mcp session_ask"})
if err != nil {
return toolErrorResult(cmdutil.WrapHTTP(err, "create chat session")), nil, nil
}
+5 -5
View File
@@ -7,9 +7,9 @@ import (
mcpsdk "github.com/modelcontextprotocol/go-sdk/mcp"
"github.com/Tencent/WeKnora/cli/internal/cmdutil"
"github.com/Tencent/WeKnora/cli/internal/output"
sdk "github.com/Tencent/WeKnora/client"
"academy/cli/internal/cmdutil"
"academy/cli/internal/output"
sdk "academy/client"
)
// TestToolErrorResult_TypedError_PopulatesStructuredContent verifies the
@@ -30,8 +30,8 @@ func TestToolErrorResult_TypedError_PopulatesStructuredContent(t *testing.T) {
if sc.Type != "auth.unauthenticated" {
t.Errorf("type: got %v want auth.unauthenticated", sc.Type)
}
// retry_argv should fall back to ["weknora","auth","login"] via cmdutil default
if !reflect.DeepEqual(sc.RetryArgv, []string{"weknora", "auth", "login"}) {
// retry_argv should fall back to ["academy","auth","login"] via cmdutil default
if !reflect.DeepEqual(sc.RetryArgv, []string{"academy", "auth", "login"}) {
t.Errorf("retry_argv: got %v", sc.RetryArgv)
}
}
+2 -2
View File
@@ -13,7 +13,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
sdk "github.com/Tencent/WeKnora/client"
sdk "academy/client"
)
// fakeSvc implements every narrow service interface ServiceClient embeds.
@@ -142,7 +142,7 @@ func (f *fakeSvc) ListKnowledgeChunks(_ context.Context, docID string, page, pag
func newTestServer(t *testing.T, svc ServiceClient) (*mcpsdk.ClientSession, context.CancelFunc) {
t.Helper()
ctx, cancel := context.WithCancel(context.Background())
server := mcpsdk.NewServer(&mcpsdk.Implementation{Name: "weknora-test", Version: "v0.0.0-test"}, nil)
server := mcpsdk.NewServer(&mcpsdk.Implementation{Name: "academy-test", Version: "v0.0.0-test"}, nil)
registerTools(server, svc)
st, ct := mcpsdk.NewInMemoryTransports()