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

+3 -3
View File
@@ -12,9 +12,9 @@ import (
"time"
"unicode"
"github.com/Tencent/WeKnora/internal/logger"
"github.com/Tencent/WeKnora/internal/types"
"github.com/Tencent/WeKnora/internal/types/interfaces"
"academy/internal/logger"
"academy/internal/types"
"academy/internal/types/interfaces"
)
const (
+3 -3
View File
@@ -9,9 +9,9 @@ import (
"strconv"
"time"
"github.com/Tencent/WeKnora/internal/logger"
"github.com/Tencent/WeKnora/internal/types"
"github.com/Tencent/WeKnora/internal/types/interfaces"
"academy/internal/logger"
"academy/internal/types"
"academy/internal/types/interfaces"
)
const (
+3 -3
View File
@@ -11,9 +11,9 @@ import (
"strings"
"time"
"github.com/Tencent/WeKnora/internal/logger"
"github.com/Tencent/WeKnora/internal/types"
"github.com/Tencent/WeKnora/internal/types/interfaces"
"academy/internal/logger"
"academy/internal/types"
"academy/internal/types/interfaces"
)
const (
@@ -9,7 +9,7 @@ import (
"testing"
"time"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
)
func TestBochaProviderSearch(t *testing.T) {
@@ -24,7 +24,7 @@ func TestBochaProviderSearch(t *testing.T) {
if err := json.NewDecoder(r.Body).Decode(&request); err != nil {
t.Fatal(err)
}
if request.Query != "WeKnora" || request.Freshness != "oneWeek" || !request.Summary || request.Count != 2 {
if request.Query != "Academy" || request.Freshness != "oneWeek" || !request.Summary || request.Count != 2 {
t.Fatalf("unexpected request: %+v", request)
}
w.Header().Set("Content-Type", "application/json")
@@ -37,7 +37,7 @@ func TestBochaProviderSearch(t *testing.T) {
defer server.Close()
bocha := &BochaProvider{client: server.Client(), baseURL: server.URL, apiKey: "sk-test", freshness: "oneWeek", summary: true}
results, err := bocha.Search(context.Background(), " WeKnora ", 2, true)
results, err := bocha.Search(context.Background(), " Academy ", 2, true)
if err != nil {
t.Fatal(err)
}
+2 -2
View File
@@ -11,8 +11,8 @@ import (
"strings"
"time"
"github.com/Tencent/WeKnora/internal/types"
"github.com/Tencent/WeKnora/internal/types/interfaces"
"academy/internal/types"
"academy/internal/types/interfaces"
)
const braveSearchURL = "https://api.search.brave.com/res/v1/web/search"
@@ -7,7 +7,7 @@ import (
"strings"
"testing"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
"github.com/stretchr/testify/require"
)
@@ -10,10 +10,10 @@ import (
"time"
"github.com/PuerkitoBio/goquery"
"github.com/Tencent/WeKnora/internal/logger"
"github.com/Tencent/WeKnora/internal/types"
"github.com/Tencent/WeKnora/internal/types/interfaces"
secutils "github.com/Tencent/WeKnora/internal/utils"
"academy/internal/logger"
"academy/internal/types"
"academy/internal/types/interfaces"
secutils "academy/internal/utils"
)
// DuckDuckGoProvider implements web search using DuckDuckGo (HTML first, API fallback)
@@ -148,7 +148,7 @@ func (p *DuckDuckGoProvider) searchAPI(
if err != nil {
return nil, fmt.Errorf("failed to create request: %w", err)
}
req.Header.Set("User-Agent", "WeKnora/1.0")
req.Header.Set("User-Agent", "Academy/1.0")
resp, err := p.client.Do(req)
if err != nil {
+3 -3
View File
@@ -12,9 +12,9 @@ import (
"time"
"unicode/utf8"
"github.com/Tencent/WeKnora/internal/logger"
"github.com/Tencent/WeKnora/internal/types"
"github.com/Tencent/WeKnora/internal/types/interfaces"
"academy/internal/logger"
"academy/internal/types"
"academy/internal/types/interfaces"
)
const (
@@ -8,7 +8,7 @@ import (
"testing"
"time"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
)
func TestExaProviderSearchMapping(t *testing.T) {
+3 -3
View File
@@ -8,9 +8,9 @@ import (
"google.golang.org/api/customsearch/v1"
"google.golang.org/api/option"
"github.com/Tencent/WeKnora/internal/logger"
"github.com/Tencent/WeKnora/internal/types"
"github.com/Tencent/WeKnora/internal/types/interfaces"
"academy/internal/logger"
"academy/internal/types"
"academy/internal/types/interfaces"
)
// GoogleProvider implements web search using Google Custom Search Engine API
@@ -8,9 +8,9 @@ import (
"net/http"
"time"
"github.com/Tencent/WeKnora/internal/logger"
"github.com/Tencent/WeKnora/internal/types"
"github.com/Tencent/WeKnora/internal/types/interfaces"
"academy/internal/logger"
"academy/internal/types"
"academy/internal/types/interfaces"
)
const (
@@ -18,7 +18,7 @@ const (
// Not configurable by tenants — prevents SSRF.
defaultKeenableBaseURL = "https://api.keenable.ai"
// keenableTitle is the attribution tag Keenable segments integration traffic by.
keenableTitle = "WeKnora"
keenableTitle = "Academy"
// defaultKeenableResults matches the fallback other providers use when the
// caller does not specify a positive maxResults.
defaultKeenableResults = 5
@@ -8,7 +8,7 @@ import (
"testing"
"time"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
)
func TestKeenableProvider_Search_Keyless(t *testing.T) {
@@ -20,8 +20,8 @@ func TestKeenableProvider_Search_Keyless(t *testing.T) {
if got := r.Header.Get("X-API-Key"); got != "" {
t.Errorf("X-API-Key = %q, want empty for keyless", got)
}
if got := r.Header.Get("X-Keenable-Title"); got != "WeKnora" {
t.Errorf("X-Keenable-Title = %q, want WeKnora", got)
if got := r.Header.Get("X-Keenable-Title"); got != "Academy" {
t.Errorf("X-Keenable-Title = %q, want Academy", got)
}
var body map[string]any
_ = json.NewDecoder(r.Body).Decode(&body)
+3 -3
View File
@@ -10,9 +10,9 @@ import (
"strings"
"time"
"github.com/Tencent/WeKnora/internal/logger"
"github.com/Tencent/WeKnora/internal/types"
"github.com/Tencent/WeKnora/internal/types/interfaces"
"academy/internal/logger"
"academy/internal/types"
"academy/internal/types/interfaces"
)
const (
@@ -9,7 +9,7 @@ import (
"testing"
"time"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
)
func TestMetasoProviderSearch(t *testing.T) {
@@ -24,14 +24,14 @@ func TestMetasoProviderSearch(t *testing.T) {
if err := json.NewDecoder(r.Body).Decode(&request); err != nil {
t.Fatal(err)
}
if request.Query != "WeKnora" || request.Scope != "scholar" || request.Size != 2 {
if request.Query != "Academy" || request.Scope != "scholar" || request.Size != 2 {
t.Fatalf("unexpected request: %+v", request)
}
if !request.IncludeSummary || request.IncludeRawContent || !request.ConciseSnippet {
t.Fatalf("unexpected content options: %+v", request)
}
w.Header().Set("Content-Type", "application/json")
_, _ = w.Write([]byte(`{"credits":3,"searchParameters":{"q":"WeKnora","scope":"scholar"},
_, _ = w.Write([]byte(`{"credits":3,"searchParameters":{"q":"Academy","scope":"scholar"},
"total":3,"scholars":[
{"title":"First","link":"https://example.com/1","score":"high","position":1,
"summary":"Summary","snippet":"Snippet","date":"2026-08-09","authors":["Author"]},
@@ -42,7 +42,7 @@ func TestMetasoProviderSearch(t *testing.T) {
defer server.Close()
metaso := &MetasoProvider{client: server.Client(), baseURL: server.URL, apiKey: "mk-test", scope: "scholar"}
results, err := metaso.Search(context.Background(), " WeKnora ", 2, true)
results, err := metaso.Search(context.Background(), " Academy ", 2, true)
if err != nil {
t.Fatal(err)
}
+3 -3
View File
@@ -8,9 +8,9 @@ import (
"net/http"
"time"
"github.com/Tencent/WeKnora/internal/logger"
"github.com/Tencent/WeKnora/internal/types"
"github.com/Tencent/WeKnora/internal/types/interfaces"
"academy/internal/logger"
"academy/internal/types"
"academy/internal/types/interfaces"
)
const (
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"strings"
"time"
"github.com/Tencent/WeKnora/internal/utils"
"academy/internal/utils"
)
// ValidateProxyURL delegates to utils.ValidateURLForSSRF (only http/https pass that check).
@@ -4,8 +4,8 @@ import (
"fmt"
"sync"
"github.com/Tencent/WeKnora/internal/types"
"github.com/Tencent/WeKnora/internal/types/interfaces"
"academy/internal/types"
"academy/internal/types/interfaces"
)
// ProviderFactory creates a new web search provider instance from parameters.
@@ -9,10 +9,10 @@ import (
"strings"
"time"
"github.com/Tencent/WeKnora/internal/logger"
"github.com/Tencent/WeKnora/internal/types"
"github.com/Tencent/WeKnora/internal/types/interfaces"
"github.com/Tencent/WeKnora/internal/utils"
"academy/internal/logger"
"academy/internal/types"
"academy/internal/types/interfaces"
"academy/internal/utils"
)
// defaultSearxngTimeout is sized slightly above the SearXNG image's default
@@ -118,7 +118,7 @@ func (p *SearxngProvider) Search(
return nil, fmt.Errorf("failed to create request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", "WeKnora/1.0")
req.Header.Set("User-Agent", "Academy/1.0")
resp, err := p.client.Do(req)
if err != nil {
@@ -10,8 +10,8 @@ import (
"testing"
"time"
"github.com/Tencent/WeKnora/internal/types"
"github.com/Tencent/WeKnora/internal/utils"
"academy/internal/types"
"academy/internal/utils"
)
func TestValidateSearxngBaseURL(t *testing.T) {
+3 -3
View File
@@ -11,8 +11,8 @@ import (
"strings"
"time"
"github.com/Tencent/WeKnora/internal/types"
"github.com/Tencent/WeKnora/internal/types/interfaces"
"academy/internal/types"
"academy/internal/types/interfaces"
)
const serplySearchURL = "https://api.serply.io/v1/search"
@@ -85,7 +85,7 @@ func (p *SerplyProvider) SearchWithFilters(
return nil, err
}
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", "WeKnora/1.0")
req.Header.Set("User-Agent", "Academy/1.0")
req.Header.Set("X-Api-Key", p.apiKey)
resp, err := p.client.Do(req)
if err != nil {
@@ -8,7 +8,7 @@ import (
"strings"
"testing"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
"github.com/stretchr/testify/require"
)
@@ -22,7 +22,7 @@ func TestSerplySearchMapsOptionsAndTrimsResults(t *testing.T) {
require.Equal(t, serplySearchURL, r.URL.Scheme+"://"+r.URL.Host+r.URL.Path)
require.Equal(t, http.MethodGet, r.Method)
require.Equal(t, "test-key", r.Header.Get("X-Api-Key"))
require.Equal(t, "WeKnora/1.0", r.Header.Get("User-Agent"))
require.Equal(t, "Academy/1.0", r.Header.Get("User-Agent"))
require.Equal(t, "rust & go", r.URL.Query().Get("q"))
require.Equal(t, "2", r.URL.Query().Get("num"))
require.Equal(t, "de", r.URL.Query().Get("gl"))
+3 -3
View File
@@ -8,9 +8,9 @@ import (
"net/http"
"time"
"github.com/Tencent/WeKnora/internal/logger"
"github.com/Tencent/WeKnora/internal/types"
"github.com/Tencent/WeKnora/internal/types/interfaces"
"academy/internal/logger"
"academy/internal/types"
"academy/internal/types/interfaces"
)
const (
@@ -4,7 +4,7 @@ import (
"fmt"
"strings"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
)
// emptyResultDiagnostics is implemented by providers that can explain an empty
@@ -4,7 +4,7 @@ import (
"strings"
"testing"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
)
func TestEmptyTestResultsError_SearxngWithUnresponsiveEngines(t *testing.T) {
+3 -3
View File
@@ -11,9 +11,9 @@ import (
"time"
"unicode/utf8"
"github.com/Tencent/WeKnora/internal/logger"
"github.com/Tencent/WeKnora/internal/types"
"github.com/Tencent/WeKnora/internal/types/interfaces"
"academy/internal/logger"
"academy/internal/types"
"academy/internal/types/interfaces"
)
const (
@@ -10,7 +10,7 @@ import (
"time"
"unicode/utf8"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
)
func TestValidateZhipuParameters(t *testing.T) {