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
@@ -19,7 +19,7 @@ import (
|
||||
"github.com/gorilla/websocket"
|
||||
e2b "github.com/matiasinsaurralde/go-e2b"
|
||||
|
||||
"github.com/Tencent/WeKnora/internal/logger"
|
||||
"academy/internal/logger"
|
||||
)
|
||||
|
||||
// E2BRemoteClient implements RemoteSandboxClient on top of the go-e2b client.
|
||||
@@ -214,7 +214,7 @@ func (h *e2bRemoteHandle) Metadata() map[string]string {
|
||||
|
||||
// TrafficAccessToken implements RemoteInboundTokenCarrier. E2B issues it only
|
||||
// in the create response; go-e2b keeps the field but never sends the header,
|
||||
// so both persisting it and attaching it are WeKnora's job.
|
||||
// so both persisting it and attaching it are Academy's job.
|
||||
func (h *e2bRemoteHandle) TrafficAccessToken() string {
|
||||
if h == nil || h.sandbox == nil {
|
||||
return ""
|
||||
@@ -237,7 +237,7 @@ func (c *E2BRemoteClient) Capabilities() RemoteSandboxCapabilities {
|
||||
// E2B stores snapshots as templates, so a snapshot ID can be handed
|
||||
// straight back as CreateOptions.TemplateID.
|
||||
SupportsSnapshots: true,
|
||||
// E2B has no named-volume mount API that WeKnora can use; advertising
|
||||
// E2B has no named-volume mount API that Academy can use; advertising
|
||||
// it would let a workspace configure a mount that never appears.
|
||||
SupportsVolumes: false,
|
||||
// envd exposes an interactive PTY service that go-e2b wraps.
|
||||
@@ -276,9 +276,9 @@ func (c *E2BRemoteClient) ListTemplates(ctx context.Context) ([]RemoteTemplate,
|
||||
} else if len(item.Aliases) > 0 && strings.TrimSpace(item.Aliases[0]) != "" {
|
||||
name = strings.TrimSpace(item.Aliases[0])
|
||||
}
|
||||
standard, desktop := classifyWeKnoraTemplate(name, "")
|
||||
standard, desktop := classifyAcademyTemplate(name, "")
|
||||
for _, candidate := range append(append([]string(nil), item.Aliases...), item.Names...) {
|
||||
s, d := classifyWeKnoraTemplate(candidate, "")
|
||||
s, d := classifyAcademyTemplate(candidate, "")
|
||||
if d {
|
||||
standard, desktop = false, true
|
||||
break
|
||||
@@ -419,7 +419,7 @@ func isE2BTemplateBuildPending(status string) bool {
|
||||
}
|
||||
}
|
||||
|
||||
// EnsureStandardTemplate returns the cluster's WeKnora template, building it
|
||||
// EnsureStandardTemplate returns the cluster's Academy template, building it
|
||||
// when absent. A failed or untagged template is not returned as is: it can
|
||||
// never spawn a sandbox, so it falls through to the build below. E2B resolves
|
||||
// the build by name, so that is a rebuild of the same template rather than a
|
||||
@@ -437,7 +437,7 @@ func (c *E2BRemoteClient) EnsureStandardTemplate(ctx context.Context) (*RemoteTe
|
||||
return c.buildStandardTemplate(ctx)
|
||||
}
|
||||
|
||||
// ReplaceStandardTemplate starts a new WeKnora-template build from the current
|
||||
// ReplaceStandardTemplate starts a new Academy-template build from the current
|
||||
// spec. E2B resolves builds by name, so this is often a rebuild of the same
|
||||
// ID. The previous template stays listed until the caller has persisted a
|
||||
// spawnable replacement and called DeleteSupersededStandardTemplates: deleting
|
||||
@@ -447,7 +447,7 @@ func (c *E2BRemoteClient) ReplaceStandardTemplate(ctx context.Context) (*RemoteT
|
||||
return c.buildStandardTemplate(ctx)
|
||||
}
|
||||
|
||||
// EnsureDesktopTemplate returns the cluster's WeKnora desktop template,
|
||||
// EnsureDesktopTemplate returns the cluster's Academy desktop template,
|
||||
// building it when absent. It is a sibling of EnsureStandardTemplate: a
|
||||
// cluster may hold both, and the admin picks which ID a config boots.
|
||||
func (c *E2BRemoteClient) EnsureDesktopTemplate(ctx context.Context) (*RemoteTemplate, error) {
|
||||
@@ -494,7 +494,7 @@ func (c *E2BRemoteClient) DeleteSupersededDesktopTemplates(ctx context.Context,
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeleteSupersededStandardTemplates drops WeKnora templates other than keepID.
|
||||
// DeleteSupersededStandardTemplates drops Academy templates other than keepID.
|
||||
func (c *E2BRemoteClient) DeleteSupersededStandardTemplates(ctx context.Context, keepID string) error {
|
||||
keepID = strings.TrimSpace(keepID)
|
||||
if keepID == "" {
|
||||
@@ -521,11 +521,11 @@ func (c *E2BRemoteClient) DeleteSupersededStandardTemplates(ctx context.Context,
|
||||
|
||||
// e2bPtyPromptOverrideCmd re-sources the image prompt after E2B's
|
||||
// template provisioner appends `PS1='\w $ '` to bashrc. Harmless if the
|
||||
// image already sources /etc/weknora/pty-prompt.sh (PROMPT_COMMAND wins
|
||||
// image already sources /etc/academy/pty-prompt.sh (PROMPT_COMMAND wins
|
||||
// either way); required when rebuilding from an older image that does not.
|
||||
const e2bPtyPromptOverrideCmd = `. /etc/weknora/pty-prompt.sh 2>/dev/null; ` +
|
||||
`for f in /root/.bashrc /home/user/.bashrc /etc/profile.d/zz-weknora-prompt.sh; do ` +
|
||||
`grep -q /etc/weknora/pty-prompt.sh "$f" 2>/dev/null || echo '. /etc/weknora/pty-prompt.sh' >> "$f"; ` +
|
||||
const e2bPtyPromptOverrideCmd = `. /etc/academy/pty-prompt.sh 2>/dev/null; ` +
|
||||
`for f in /root/.bashrc /home/user/.bashrc /etc/profile.d/zz-academy-prompt.sh; do ` +
|
||||
`grep -q /etc/academy/pty-prompt.sh "$f" 2>/dev/null || echo '. /etc/academy/pty-prompt.sh' >> "$f"; ` +
|
||||
`done`
|
||||
|
||||
func (c *E2BRemoteClient) buildStandardTemplate(ctx context.Context) (*RemoteTemplate, error) {
|
||||
|
||||
Reference in new issue
Block a user