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
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:
1 parent
9097ee699d
commit
9058149576
3136 files changed
+18018
-18004
No files matched your search
@@ -17,7 +17,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/Tencent/WeKnora/internal/logger"
|
||||
"academy/internal/logger"
|
||||
"github.com/gorilla/websocket"
|
||||
cubesandbox "github.com/tencentcloud/CubeSandbox/sdk/go"
|
||||
)
|
||||
@@ -204,7 +204,7 @@ func (c *CubeRemoteClient) ListTemplates(ctx context.Context) ([]RemoteTemplate,
|
||||
// Cube only reports a name when the template carries an alias, so fall
|
||||
// back to the image before falling back to the opaque ID: recognising
|
||||
// our own template is what keeps EnsureStandardTemplate idempotent.
|
||||
standard, desktop := classifyWeKnoraTemplate(name, item.ImageInfo)
|
||||
standard, desktop := classifyAcademyTemplate(name, item.ImageInfo)
|
||||
if name == "" {
|
||||
switch {
|
||||
case desktop:
|
||||
@@ -263,7 +263,7 @@ func cubeTemplateIsSnapshot(templateID string, snapshotIDs map[string]struct{})
|
||||
return ok
|
||||
}
|
||||
|
||||
// EnsureStandardTemplate makes the cluster hold exactly one WeKnora template.
|
||||
// EnsureStandardTemplate makes the cluster hold exactly one Academy template.
|
||||
// A healthy or still-building one is returned as is; a failed one is rebuilt in
|
||||
// place. If CubeMaster refuses the redo, the failed card is returned as-is;
|
||||
// ReplaceStandardTemplate (the settings-page "delete and rebuild" action) is
|
||||
@@ -291,7 +291,7 @@ func (c *CubeRemoteClient) EnsureStandardTemplate(ctx context.Context) (*RemoteT
|
||||
return c.buildStandardTemplate(ctx)
|
||||
}
|
||||
|
||||
// ReplaceStandardTemplate applies the current spec to the cluster's WeKnora
|
||||
// ReplaceStandardTemplate applies the current spec to the cluster's Academy
|
||||
// template. Cube bakes DNS into the template, so a READY template only picks
|
||||
// up a settings change via rebuild (preferred: same ID) or a replacement.
|
||||
//
|
||||
@@ -331,7 +331,7 @@ func (c *CubeRemoteClient) ReplaceStandardTemplate(ctx context.Context) (*Remote
|
||||
return c.buildStandardTemplate(ctx)
|
||||
}
|
||||
|
||||
// EnsureDesktopTemplate returns the cluster's WeKnora desktop template,
|
||||
// EnsureDesktopTemplate returns the cluster's Academy desktop template,
|
||||
// rebuilding a failed one or building it when absent. A cluster may hold
|
||||
// both the CLI and desktop templates; the admin picks which ID a config boots.
|
||||
func (c *CubeRemoteClient) EnsureDesktopTemplate(ctx context.Context) (*RemoteTemplate, error) {
|
||||
@@ -414,7 +414,7 @@ func (c *CubeRemoteClient) DeleteSupersededDesktopTemplates(ctx context.Context,
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeleteSupersededStandardTemplates drops WeKnora templates other than keepID.
|
||||
// DeleteSupersededStandardTemplates drops Academy templates other than keepID.
|
||||
func (c *CubeRemoteClient) DeleteSupersededStandardTemplates(ctx context.Context, keepID string) error {
|
||||
keepID = strings.TrimSpace(keepID)
|
||||
if keepID == "" {
|
||||
@@ -607,7 +607,7 @@ func (c *CubeRemoteClient) desktopTemplateSpec() map[string]any {
|
||||
return cubeDesktopTemplateSpec(dns)
|
||||
}
|
||||
|
||||
// cubeStandardTemplateSpec is the single definition of how the WeKnora template
|
||||
// cubeStandardTemplateSpec is the single definition of how the Academy template
|
||||
// is built. Both the first build and every rebuild send it verbatim — the
|
||||
// rebuild endpoint takes a raw payload rather than BuildTemplateOptions, and
|
||||
// two hand-kept copies of the spec would eventually disagree.
|
||||
@@ -636,7 +636,7 @@ func cubeStandardTemplateSpec(dns []string) map[string]any {
|
||||
// standard template can never silently alter the desktop's exposed ports.
|
||||
//
|
||||
// 6080 is deliberately not in exposedPorts. Cube maps that list through eBPF
|
||||
// static NAT on the host NIC, which bypasses CubeProxy. WeKnora already
|
||||
// static NAT on the host NIC, which bypasses CubeProxy. Academy already
|
||||
// reaches websockify the same way it reaches envd: CubeProxy Host
|
||||
// "{port}-{id}.{domain}" plus the inbound token. Publishing 6080 on the host
|
||||
// would let anyone who can read /run/desktop/secret (the agent Execs as
|
||||
@@ -704,7 +704,7 @@ func (c *CubeRemoteClient) Create(
|
||||
network.AllowInternetAccess = &defaultOn
|
||||
}
|
||||
// Deliberately the opposite of Cube's own default. Cube leaves the
|
||||
// sandbox URL reachable by anyone who knows the ID; WeKnora closes it and
|
||||
// sandbox URL reachable by anyone who knows the ID; Academy closes it and
|
||||
// relies on the per-sandbox traffic token, which the SDK attaches to
|
||||
// data-plane requests for us. Do not change this to true.
|
||||
if network.AllowPublicTraffic == nil {
|
||||
@@ -1023,7 +1023,7 @@ func (c *CubeRemoteClient) ListDir(
|
||||
}
|
||||
|
||||
// normaliseFileType maps envd's proto enum strings ("FILE_TYPE_FILE",
|
||||
// "FILE_TYPE_DIRECTORY", …) onto the short lowercase names WeKnora already
|
||||
// "FILE_TYPE_DIRECTORY", …) onto the short lowercase names Academy already
|
||||
// stores.
|
||||
func normaliseFileType(t string) string {
|
||||
switch strings.ToUpper(t) {
|
||||
@@ -1294,7 +1294,7 @@ func buildShellLine(cmd string, args []string) string {
|
||||
// callers actually need to pipe data.
|
||||
func wrapWithStdin(line, stdin string) string {
|
||||
// Use a heredoc delimiter unlikely to appear in caller data.
|
||||
const delim = "WEKNORA_STDIN_EOF"
|
||||
const delim = "ACADEMY_STDIN_EOF"
|
||||
// Escape lines containing the delimiter defensively.
|
||||
safe := strings.ReplaceAll(stdin, delim, "")
|
||||
return "cat <<'" + delim + "' | " + line + "\n" + safe + "\n" + delim
|
||||
|
||||
Reference in new issue
Block a user