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

+1 -1
View File
@@ -13,7 +13,7 @@ import (
// model which secret paths exist is itself a small leak.
var ErrPathDenied = errors.New("localsandbox: path is outside the permitted workspace")
// PathGuard validates filesystem access performed by WeKnora itself, which
// PathGuard validates filesystem access performed by Academy itself, which
// runs with the user's full privileges and therefore cannot be constrained by
// the OS sandbox. It derives from the same Policy the backend compiles, so
// both paths enforce the same rules.
+2 -2
View File
@@ -135,7 +135,7 @@ func NewPolicyBuilder(homeDir, appDataDir string) *PolicyBuilder {
return &PolicyBuilder{
homeDir: filepath.Clean(homeDir),
appDataDir: filepath.Clean(appDataDir),
jobsRoot: filepath.Join(filepath.Clean(homeDir), ".weknora", "jobs"),
jobsRoot: filepath.Join(filepath.Clean(homeDir), ".academy", "jobs"),
}
}
@@ -295,7 +295,7 @@ func (b *PolicyBuilder) rejectBroadWorkspace(root string) error {
return fmt.Errorf("%w: %q", ErrWorkspaceTooBroad, root)
}
}
// Background jobs live under ~/.weknora/jobs. A workspace that covers that
// Background jobs live under ~/.academy/jobs. A workspace that covers that
// directory, or sits inside it, can read or replace another session's output.
if b.jobsRoot != "" && (PathUnder(b.jobsRoot, root) || PathUnder(root, b.jobsRoot)) {
return fmt.Errorf("%w: %q overlaps the background jobs directory", ErrWorkspaceTooBroad, root)
@@ -10,7 +10,7 @@ import (
func builderFixture(t *testing.T) (*PolicyBuilder, Workspace) {
t.Helper()
home := filepath.Join(t.TempDir(), "home")
appData := filepath.Join(home, "App Support", "WeKnora Lite")
appData := filepath.Join(home, "App Support", "Academy Lite")
ws := Workspace{
Kind: WorkspaceProject,
Root: filepath.Join(home, "My Project"),
@@ -345,7 +345,7 @@ func TestRelaxRefusesToGrantAppData(t *testing.T) {
func skillsBuilder(t *testing.T) (*PolicyBuilder, string) {
t.Helper()
b, _ := builderFixture(t)
root := filepath.Join(b.homeDir, ".weknora", "skills")
root := filepath.Join(b.homeDir, ".academy", "skills")
return b.WithSkillsRoot(root), root
}
@@ -390,14 +390,14 @@ func TestBuildInstallRejectsDirOutsideSkillsRoot(t *testing.T) {
func TestBuildInstallRequiresASkillsRoot(t *testing.T) {
b, _ := builderFixture(t)
_, err := b.BuildInstall(filepath.Join(b.homeDir, ".weknora", "skills", ".versions", "pdf-1"))
_, err := b.BuildInstall(filepath.Join(b.homeDir, ".academy", "skills", ".versions", "pdf-1"))
require.ErrorIs(t, err, ErrInstallDirOutsideSkillsRoot)
}
func TestJobsDirectoryCannotBecomeAWorkspace(t *testing.T) {
home := "/Users/local-test"
jobs := filepath.Join(home, ".weknora", "jobs")
b := NewPolicyBuilder(home, filepath.Join(home, "Library", "Application Support", "WeKnora Lite"))
jobs := filepath.Join(home, ".academy", "jobs")
b := NewPolicyBuilder(home, filepath.Join(home, "Library", "Application Support", "Academy Lite"))
for _, root := range []string{filepath.Dir(jobs), jobs, filepath.Join(jobs, "sj_0123")} {
_, err := b.Build(ModeAuto, Workspace{Root: root})
require.Error(t, err, root)
+2 -2
View File
@@ -11,7 +11,7 @@ import (
"strings"
"time"
"github.com/Tencent/WeKnora/internal/logger"
"academy/internal/logger"
)
// WorkspaceKind distinguishes a user-picked project from an auto-allocated session dir.
@@ -56,7 +56,7 @@ var ErrProjectDirRevoked = errors.New("localsandbox: session project directory i
// DirLayout names the roots the resolver allocates under.
type DirLayout struct {
// SessionRoot is where session workspaces are created, by default
// ~/Documents/WeKnoraLite. It is user-visible on purpose.
// ~/Documents/AcademyLite. It is user-visible on purpose.
SessionRoot string
}
+4 -4
View File
@@ -32,7 +32,7 @@ func workspaceFixture(t *testing.T, projectDir string) WorkspaceResolver {
t.Helper()
base := t.TempDir()
return NewWorkspaceResolver(DirLayout{
SessionRoot: filepath.Join(base, "Documents", "WeKnora"),
SessionRoot: filepath.Join(base, "Documents", "Academy"),
}, fakeProjects{dir: projectDir})
}
@@ -96,7 +96,7 @@ func TestResolveSessionWorkspaceCreatesDatedDirectory(t *testing.T) {
func TestResolveSessionWorkspaceHasNoSpacesInCreatedNames(t *testing.T) {
base := t.TempDir()
r := NewWorkspaceResolver(DirLayout{
SessionRoot: filepath.Join(base, "Documents", "WeKnora"),
SessionRoot: filepath.Join(base, "Documents", "Academy"),
}, fakeProjects{})
ws, err := r.Resolve(context.Background(), "session-abcdef123456")
@@ -122,7 +122,7 @@ func TestResolveRejectsEmptySessionID(t *testing.T) {
func TestResolveFailsClosedWhenBoundProjectIsRevoked(t *testing.T) {
base := t.TempDir()
sessionRoot := filepath.Join(base, "Documents", "WeKnora")
sessionRoot := filepath.Join(base, "Documents", "Academy")
r := NewWorkspaceResolver(DirLayout{SessionRoot: sessionRoot}, revokedProjects{})
_, err := r.Resolve(context.Background(), "sess-revoked")
@@ -138,7 +138,7 @@ func TestResolveFailsClosedWhenBoundProjectIsRevoked(t *testing.T) {
func TestResolveSessionWorkspaceKeepsPathAfterMidnight(t *testing.T) {
base := t.TempDir()
r := NewWorkspaceResolver(DirLayout{
SessionRoot: filepath.Join(base, "Documents", "WeKnora"),
SessionRoot: filepath.Join(base, "Documents", "Academy"),
}, fakeProjects{}).(*workspaceResolver)
day1 := time.Date(2026, 9, 20, 23, 0, 0, 0, time.UTC)