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

+7 -7
View File
@@ -1,8 +1,8 @@
// Package projectlink reads and writes the per-project link file
// .weknora/project.yaml that anchors a working directory to a profile+KB.
// .academy/project.yaml that anchors a working directory to a profile+KB.
//
// Discovery walks up from the start directory until either (a) a
// .weknora/project.yaml is found, (b) the filesystem root is reached, or
// .academy/project.yaml is found, (b) the filesystem root is reached, or
// (c) the walk exceeds a 64-level depth limit (cycle protection for
// pathological symlink setups). Pattern matches `cargo`, `npm`, and `git`
// - find-the-project's-root walks; mount-boundary crossing is allowed
@@ -16,22 +16,22 @@ import (
"path/filepath"
"time"
"github.com/Tencent/WeKnora/cli/internal/xdg"
"academy/cli/internal/xdg"
"gopkg.in/yaml.v3"
)
// Project is the on-disk schema of .weknora/project.yaml.
// Project is the on-disk schema of .academy/project.yaml.
type Project struct {
Profile string `yaml:"profile,omitempty"`
KBID string `yaml:"kb_id"`
CreatedAt time.Time `yaml:"created_at"`
}
// FileName is the project link file basename relative to .weknora/.
// FileName is the project link file basename relative to .academy/.
const FileName = "project.yaml"
// DirName is the project-link directory name.
const DirName = ".weknora"
const DirName = ".academy"
const maxWalkDepth = 64
@@ -79,7 +79,7 @@ func Load(path string) (*Project, error) {
}
// Save writes the project link to path atomically (0600 perms).
// Creates parent .weknora/ directory if missing.
// Creates parent .academy/ directory if missing.
func Save(path string, p *Project) error {
return xdg.WriteAtomicYAML(path, p)
}
+8 -8
View File
@@ -6,7 +6,7 @@ import (
"testing"
"time"
"github.com/Tencent/WeKnora/cli/internal/projectlink"
"academy/cli/internal/projectlink"
)
func TestDiscover_FoundInCwd(t *testing.T) {
@@ -19,7 +19,7 @@ func TestDiscover_FoundInCwd(t *testing.T) {
if !found {
t.Fatalf("expected found=true")
}
want := filepath.Join(dir, ".weknora", "project.yaml")
want := filepath.Join(dir, ".academy", "project.yaml")
if got != want {
t.Errorf("got %q, want %q", got, want)
}
@@ -57,7 +57,7 @@ func TestDiscover_NotFound(t *testing.T) {
func TestLoad_RoundTrip(t *testing.T) {
dir := t.TempDir()
path := filepath.Join(dir, ".weknora", "project.yaml")
path := filepath.Join(dir, ".academy", "project.yaml")
in := &projectlink.Project{Profile: "prod", KBID: "kb_abc", CreatedAt: time.Now().UTC().Round(time.Second)}
if err := projectlink.Save(path, in); err != nil {
t.Fatalf("Save: %v", err)
@@ -73,7 +73,7 @@ func TestLoad_RoundTrip(t *testing.T) {
func TestLoad_Corrupt(t *testing.T) {
dir := t.TempDir()
path := filepath.Join(dir, ".weknora", "project.yaml")
path := filepath.Join(dir, ".academy", "project.yaml")
if err := os.MkdirAll(filepath.Dir(path), 0o700); err != nil {
t.Fatal(err)
}
@@ -88,12 +88,12 @@ func TestLoad_Corrupt(t *testing.T) {
func TestSave_CreatesParent(t *testing.T) {
dir := t.TempDir()
path := filepath.Join(dir, ".weknora", "project.yaml")
path := filepath.Join(dir, ".academy", "project.yaml")
if err := projectlink.Save(path, &projectlink.Project{KBID: "kb_x"}); err != nil {
t.Fatalf("Save: %v", err)
}
if _, err := os.Stat(filepath.Join(dir, ".weknora")); err != nil {
t.Errorf("parent .weknora not created: %v", err)
if _, err := os.Stat(filepath.Join(dir, ".academy")); err != nil {
t.Errorf("parent .academy not created: %v", err)
}
if _, err := os.Stat(path); err != nil {
t.Errorf("file not created: %v", err)
@@ -102,7 +102,7 @@ func TestSave_CreatesParent(t *testing.T) {
func mkLink(t *testing.T, dir string) {
t.Helper()
d := filepath.Join(dir, ".weknora")
d := filepath.Join(dir, ".academy")
if err := os.MkdirAll(d, 0o700); err != nil {
t.Fatal(err)
}