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
@@ -5,11 +5,11 @@ import (
"github.com/spf13/cobra"
"github.com/Tencent/WeKnora/cli/internal/cmdutil"
"github.com/Tencent/WeKnora/cli/internal/config"
"github.com/Tencent/WeKnora/cli/internal/iostreams"
"github.com/Tencent/WeKnora/cli/internal/prompt"
"github.com/Tencent/WeKnora/cli/internal/secrets"
"academy/cli/internal/cmdutil"
"academy/cli/internal/config"
"academy/cli/internal/iostreams"
"academy/cli/internal/prompt"
"academy/cli/internal/secrets"
)
type RemoveOptions struct {
@@ -30,7 +30,7 @@ type removeResult struct {
WasCurrent bool `json:"was_current"`
}
// NewCmdRemove builds `weknora profile remove`. Drops the entry from
// NewCmdRemove builds `academy profile remove`. Drops the entry from
// config.yaml and best-effort clears keyring references. Removing a
// non-current profile is low-friction (no prompt). Removing the *current*
// profile triggers the destructive-write confirmation protocol (exit 10),
@@ -41,15 +41,15 @@ func NewCmdRemove(f *cmdutil.Factory) *cobra.Command {
Use: "remove <name>",
Short: "Remove a profile (drops entry, clears keyring refs)",
Long: `Deletes the named profile from config.yaml and best-effort clears any
keyring references it owned (matches ` + "`weknora auth logout`" + `).
keyring references it owned (matches ` + "`academy auth logout`" + `).
Removing the current profile also clears CurrentProfile - subsequent commands
will error until you select another with ` + "`weknora profile use <name>`" + ` or pick
will error until you select another with ` + "`academy profile use <name>`" + ` or pick
one up via the global ` + "`--profile`" + ` flag. Because that change is observable in
every later command, removing the current profile requires explicit -y/--yes
in scripted / --format json invocations (exit code 10; see cli/README.md).`,
Example: ` weknora profile remove staging # remove non-current → no prompt
weknora profile remove production -y # remove current → confirm`,
Example: ` academy profile remove staging # remove non-current → no prompt
academy profile remove production -y # remove current → confirm`,
Args: cobra.ExactArgs(1),
RunE: func(c *cobra.Command, args []string) error {
fopts, err := cmdutil.CheckFormatFlag(c)
@@ -92,8 +92,8 @@ in scripted / --format json invocations (exit code 10; see cli/README.md).`,
RequiredFlags: []string{"<name> (positional)"},
Output: "envelope.data is {name, removed:true, was_current}",
Examples: []string{
"weknora profile remove staging",
"weknora profile remove production -y",
"academy profile remove staging",
"academy profile remove production -y",
},
Warnings: []string{
"Requires explicit user approval (exit 10 / input.confirmation_required); never auto-add -y.",
@@ -118,7 +118,7 @@ func runRemove(opts *RemoveOptions, fopts *cmdutil.FormatOptions, name string, s
// Confirmation only fires for removing the current profile - non-current
// remove uses the same low-friction policy as `auth logout`.
if wasCurrent {
if err := cmdutil.ConfirmDestructive(p, opts.Yes, jsonOut, "remove", "current profile", name, "profile.remove", []string{"weknora", "profile", "remove", name, "-y"}); err != nil {
if err := cmdutil.ConfirmDestructive(p, opts.Yes, jsonOut, "remove", "current profile", name, "profile.remove", []string{"academy", "profile", "remove", name, "-y"}); err != nil {
return err
}
}
@@ -139,7 +139,7 @@ func runRemove(opts *RemoveOptions, fopts *cmdutil.FormatOptions, name string, s
return fopts.Emit(iostreams.IO.Out, result, nil)
}
if wasCurrent {
fmt.Fprintf(iostreams.IO.Out, "✓ Removed profile %s (current profile cleared - run `weknora profile use <name>` to pick another)\n", name)
fmt.Fprintf(iostreams.IO.Out, "✓ Removed profile %s (current profile cleared - run `academy profile use <name>` to pick another)\n", name)
} else {
fmt.Fprintf(iostreams.IO.Out, "✓ Removed profile %s\n", name)
}