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

+14 -14
View File
@@ -8,9 +8,9 @@ import (
"testing"
"time"
"github.com/Tencent/WeKnora/internal/agent/skills"
"github.com/Tencent/WeKnora/internal/sandbox"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/agent/skills"
"academy/internal/sandbox"
"academy/internal/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -146,7 +146,7 @@ func TestInstallShellExecStillHonoursAnExplicitWorkDir(t *testing.T) {
// A run that somehow carries no valid skill directory must not invent one, and
// must not send commands to a path outside the allowed roots.
func TestInstallShellExecFallsBackToWorkspaceWithoutAValidSkillDir(t *testing.T) {
for _, dir := range []string{"", sandbox.SkillsImageRoot, "/etc", "/opt/weknora/tenant/skills/a/b"} {
for _, dir := range []string{"", sandbox.SkillsImageRoot, "/etc", "/opt/academy/tenant/skills/a/b"} {
inner := &fakeInstallShellExecutor{}
result, err := NewInstallShellExecTool(inner, dir).Execute(
@@ -330,7 +330,7 @@ func TestShellExecDoesNotCaptureWithoutAnExplicitSkillName(t *testing.T) {
tool := NewShellExecTool(&fakeShellExecutor{}, nil).WithEnvCapture(recorder.capture).WithSkillEnvironment(shellTestSkillEnvironment(t))
result, err := tool.Execute(shellExecTestContext(), json.RawMessage(
`{"command":"export USER_TOKEN=from-command; cd /opt/weknora/tenant/skills/pdf-tools && python x.py"}`,
`{"command":"export USER_TOKEN=from-command; cd /opt/academy/tenant/skills/pdf-tools && python x.py"}`,
))
require.NoError(t, err)
@@ -492,7 +492,7 @@ print(len(doc.paragraphs))
func TestSkillNameFromShellCommandExtractsImageSkill(t *testing.T) {
assert.Equal(t, "meeting-and-brief", skillNameFromShellCommand(
`/opt/weknora/tenant/skills/meeting-and-brief/.venv/bin/python -c "print(1)"`,
`/opt/academy/tenant/skills/meeting-and-brief/.venv/bin/python -c "print(1)"`,
))
assert.Empty(t, skillNameFromShellCommand(`python3 -c "print(1)"`))
}
@@ -505,8 +505,8 @@ func TestShellExecAllowsAnInstallThatMentionsTheSkillTree(t *testing.T) {
tool := NewShellExecTool(executor, nil)
result, err := tool.Execute(shellExecTestContext(), json.RawMessage(
`{"command":"/opt/weknora/tenant/skills/foo/.venv/bin/python -m pip install -r `+
`/opt/weknora/tenant/skills/foo/requirements.txt"}`,
`{"command":"/opt/academy/tenant/skills/foo/.venv/bin/python -m pip install -r `+
`/opt/academy/tenant/skills/foo/requirements.txt"}`,
))
require.NoError(t, err)
require.True(t, result.Success, result.Error)
@@ -518,7 +518,7 @@ func TestInstallShellExecStillPipsIntoTheSkillTree(t *testing.T) {
tool := NewInstallShellExecTool(inner, installShellSkillDir)
result, err := tool.Execute(shellExecTestContext(), json.RawMessage(
`{"command":"pip install python-docx","work_dir":"/opt/weknora/tenant/skills/律师助手"}`,
`{"command":"pip install python-docx","work_dir":"/opt/academy/tenant/skills/律师助手"}`,
))
require.NoError(t, err)
require.True(t, result.Success, result.Error)
@@ -528,11 +528,11 @@ func TestInstallShellExecStillPipsIntoTheSkillTree(t *testing.T) {
func TestShellExecHintsWhenVenvHasNoPip(t *testing.T) {
tool := NewShellExecTool(&fakeShellExecutor{result: &sandbox.ExecuteResult{
ExitCode: 1,
Stderr: "/opt/weknora/tenant/skills/律师助手/.venv/bin/python: No module named pip\n",
Stderr: "/opt/academy/tenant/skills/律师助手/.venv/bin/python: No module named pip\n",
}}, nil)
result, err := tool.Execute(shellExecTestContext(), json.RawMessage(
`{"command":"/opt/weknora/tenant/skills/律师助手/.venv/bin/python /opt/weknora/tenant/skills/律师助手/scripts/install_deps.py --word --yes"}`,
`{"command":"/opt/academy/tenant/skills/律师助手/.venv/bin/python /opt/academy/tenant/skills/律师助手/scripts/install_deps.py --word --yes"}`,
))
require.NoError(t, err)
require.True(t, result.Success)
@@ -573,8 +573,8 @@ func TestShellExecPackageRecoveryKeepsWorkspaceCWD(t *testing.T) {
require.True(t, result.Success, "%+v", result)
require.Equal(t, 1, executor.calls)
require.Equal(t, "/workspace", executor.workDir)
require.Equal(t, sandbox.SkillsImageRoot+"/pdf-tools", executor.env["WEKNORA_SKILL_DIR"])
require.Contains(t, executor.command, "${WEKNORA_SKILL_DIR:?}")
require.Equal(t, sandbox.SkillsImageRoot+"/pdf-tools", executor.env["ACADEMY_SKILL_DIR"])
require.Contains(t, executor.command, "${ACADEMY_SKILL_DIR:?}")
}
}
@@ -647,7 +647,7 @@ func TestShellExecDescriptionForbidsBackgrounding(t *testing.T) {
}
func TestHostInstallShellExecToolIsScopedToVersionDir(t *testing.T) {
dir := "/Users/dev/.weknora/skills/.versions/pdf-2"
dir := "/Users/dev/.academy/skills/.versions/pdf-2"
tool := NewHostInstallShellExecTool(&fakeInstallShellExecutor{}, dir)
require.Equal(t, []string{dir}, tool.allowedWorkDirRoots())
require.Equal(t, dir, tool.effectiveDefaultWorkDir())