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

@@ -16,18 +16,18 @@ import (
"github.com/google/uuid"
"gorm.io/gorm"
"github.com/Tencent/WeKnora/internal/agent/skills"
"github.com/Tencent/WeKnora/internal/agent/tools"
"github.com/Tencent/WeKnora/internal/application/service/sandboxalloc"
apperrors "github.com/Tencent/WeKnora/internal/errors"
"github.com/Tencent/WeKnora/internal/event"
"github.com/Tencent/WeKnora/internal/logger"
"github.com/Tencent/WeKnora/internal/models/chat"
"github.com/Tencent/WeKnora/internal/sandbox"
"github.com/Tencent/WeKnora/internal/sandbox/allocation"
"github.com/Tencent/WeKnora/internal/tracing/langfuse"
"github.com/Tencent/WeKnora/internal/types"
"github.com/Tencent/WeKnora/internal/types/interfaces"
"academy/internal/agent/skills"
"academy/internal/agent/tools"
"academy/internal/application/service/sandboxalloc"
apperrors "academy/internal/errors"
"academy/internal/event"
"academy/internal/logger"
"academy/internal/models/chat"
"academy/internal/sandbox"
"academy/internal/sandbox/allocation"
"academy/internal/tracing/langfuse"
"academy/internal/types"
"academy/internal/types/interfaces"
)
const (
@@ -46,7 +46,7 @@ const (
// skillSeedArchivePath is the single remote write used to land a skill's
// files. Writing each file with MakeDir+WriteFile is two round trips per
// entry, which is why a 50-file skill crawled through "seeding 12/56".
skillSeedArchivePath = sandbox.SkillsImageRoot + "/.weknora-seed.tar"
skillSeedArchivePath = sandbox.SkillsImageRoot + "/.academy-seed.tar"
// skillInstallVerifyRounds bounds the installer conversation.
//
@@ -1306,7 +1306,7 @@ func describeExecFailure(res *sandbox.ExecuteResult) string {
// installExecutor resolves the one executor every command of an install runs
// through. It goes through the capability accessor rather than a bare type
// assertion so a manager that cannot run install-mode shell reports no
// capability instead of attempting the install on the WeKnora host.
// capability instead of attempting the install on the Academy host.
func installExecutor(mgr sandbox.Manager) (sandbox.SessionInstallShellExecutor, error) {
executor := sessionSandboxInstallShellExecutor(mgr)
if executor == nil {
@@ -1841,7 +1841,7 @@ func currentSnapshotID(cfgEntity *types.TenantSandboxConfigEntity) string {
}
func skillSnapshotNamePrefix(tenantID uint64, configID string) string {
return fmt.Sprintf("weknora-sk-t%d-%s", tenantID, compactConfigID(configID))
return fmt.Sprintf("academy-sk-t%d-%s", tenantID, compactConfigID(configID))
}
// nextSnapshotGeneration is one past both the live pointer and every ledger
@@ -1888,9 +1888,9 @@ func compactConfigID(id string) string {
return strings.ToLower(strings.ReplaceAll(strings.TrimSpace(id), "-", ""))
}
// weknoraSkillSnapshotName pulls the weknora-sk-… token out of a provider
// academySkillSnapshotName pulls the academy-sk-… token out of a provider
// listing. Cube and E2B echo it in Names; Docker embeds it in the image tag.
func weknoraSkillSnapshotName(raw string) string {
func academySkillSnapshotName(raw string) string {
s := strings.TrimSpace(raw)
s = strings.TrimPrefix(s, "docker.io/")
if i := strings.LastIndex(s, "/"); i >= 0 {
@@ -1899,14 +1899,14 @@ func weknoraSkillSnapshotName(raw string) string {
if cut := strings.IndexByte(s, ':'); cut >= 0 {
s = s[:cut]
}
if strings.HasPrefix(s, "weknora-sk-") {
if strings.HasPrefix(s, "academy-sk-") {
return s
}
return ""
}
// snapshotsNotFromOtherConfig drops provider listings that already name a
// different WeKnora config. Cube, E2B and Docker all ListSnapshots across the
// different Academy config. Cube, E2B and Docker all ListSnapshots across the
// whole account/daemon, so without this a reconcile of one config would treat
// every other config's image as an extra, and an abandoned-build match could
// bind to the wrong snapshot.
@@ -1933,17 +1933,17 @@ func snapshotBelongsToOtherConfig(snap sandbox.RemoteSnapshotRef, prefix string)
needle := prefix + "-g"
sawForeign := false
for _, candidate := range append([]string{snap.ID}, snap.Names...) {
name := weknoraSkillSnapshotName(candidate)
name := academySkillSnapshotName(candidate)
if name == "" {
continue
}
if strings.HasPrefix(name, needle) {
return false
}
// New-format names are weknora-sk-t<tenant>-<config>-gN. Legacy
// weknora-sk-<short>-gN names are left alone so a row written before
// New-format names are academy-sk-t<tenant>-<config>-gN. Legacy
// academy-sk-<short>-gN names are left alone so a row written before
// the prefix existed can still be matched.
rest := strings.TrimPrefix(name, "weknora-sk-")
rest := strings.TrimPrefix(name, "academy-sk-")
if len(rest) > 1 && rest[0] == 't' && rest[1] >= '0' && rest[1] <= '9' {
sawForeign = true
}
@@ -1958,7 +1958,7 @@ func buildInstallPrompt(skillDir string, bundle *SkillBundle, tools map[string]s
skillMD = string(bundle.Files["SKILL.md"])
requirementsPath = sandbox.SkillRequirementsPath(bundle.Name)
}
return fmt.Sprintf(`Install this WeKnora skill into the sandbox image.
return fmt.Sprintf(`Install this Academy skill into the sandbox image.
Skill directory: %s
%s
@@ -1987,9 +1987,9 @@ Hard requirements:
a value you invent would be stored as this workspace's real credential. If one environment
variable is required, set required to true; if it is optional, set required to false. If the
skill needs no environment variables, write {"env":[]}.
Do not declare WEKNORA_SKILL_DIR, WEKNORA_SKILL_OUTPUT_DIR, WEKNORA_SKILL_HISTORY_ROOT or
WEKNORA_SESSION_INPUT_DIR: the sandbox injects those. Other WEKNORA_* names the skill reads
(WEKNORA_API_KEY, WEKNORA_BASE_URL, WEKNORA_HOST, WEKNORA_TOKEN, WEKNORA_KB_ID) MUST be declared.
Do not declare ACADEMY_SKILL_DIR, ACADEMY_SKILL_OUTPUT_DIR, ACADEMY_SKILL_HISTORY_ROOT or
ACADEMY_SESSION_INPUT_DIR: the sandbox injects those. Other ACADEMY_* names the skill reads
(ACADEMY_API_KEY, ACADEMY_BASE_URL, ACADEMY_HOST, ACADEMY_TOKEN, ACADEMY_KB_ID) MUST be declared.
On-demand / optional extras MUST be installed now. Every chat session starts
from the image this install produces, and whatever a session installs dies with