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
@@ -1,4 +1,4 @@
|
||||
// Package ima implements the WeKnora data source connector for Tencent IMA
|
||||
// Package ima implements the Academy data source connector for Tencent IMA
|
||||
// (ima.qq.com), syncing documents and files out of IMA knowledge bases via the
|
||||
// /openapi/wiki/v1 OpenAPI.
|
||||
package ima
|
||||
@@ -15,15 +15,15 @@ import (
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/Tencent/WeKnora/internal/datasource"
|
||||
"github.com/Tencent/WeKnora/internal/logger"
|
||||
"github.com/Tencent/WeKnora/internal/utils"
|
||||
"academy/internal/datasource"
|
||||
"academy/internal/logger"
|
||||
"academy/internal/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
defaultTimeout = 60 * time.Second
|
||||
defaultPageSize = 50
|
||||
userAgent = "WeKnora-IMA-Connector/1.0"
|
||||
userAgent = "Academy-IMA-Connector/1.0"
|
||||
|
||||
// IMA hard limit: get_knowledge_list max limit=50; search_knowledge_base max=20.
|
||||
searchPageSize = 20
|
||||
|
||||
@@ -8,9 +8,9 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/Tencent/WeKnora/internal/datasource"
|
||||
"github.com/Tencent/WeKnora/internal/logger"
|
||||
"github.com/Tencent/WeKnora/internal/types"
|
||||
"academy/internal/datasource"
|
||||
"academy/internal/logger"
|
||||
"academy/internal/types"
|
||||
)
|
||||
|
||||
// Compile-time proof that *Connector satisfies the datasource.Connector interface.
|
||||
@@ -534,9 +534,9 @@ func fetchOneMedia(
|
||||
ext := extensionForMediaType(info.MediaType)
|
||||
|
||||
// A media type with no fixed extension (web page, WeChat article, ...) is
|
||||
// normally handed to the ingest layer as a bare URL so WeKnora fetches it
|
||||
// normally handed to the ingest layer as a bare URL so Academy fetches it
|
||||
// itself. That only works for publicly reachable links: when IMA attaches
|
||||
// auth headers the URL points at IMA-hosted storage and WeKnora's own
|
||||
// auth headers the URL points at IMA-hosted storage and Academy's own
|
||||
// fetch — which cannot carry those headers — would be rejected. In that
|
||||
// case download here, where the headers are available, and infer the
|
||||
// extension from the response instead.
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/Tencent/WeKnora/internal/datasource"
|
||||
"github.com/Tencent/WeKnora/internal/types"
|
||||
"academy/internal/datasource"
|
||||
"academy/internal/types"
|
||||
)
|
||||
|
||||
func TestConnector_Type(t *testing.T) {
|
||||
@@ -365,7 +365,7 @@ func TestFetchAll_AISessionIsStillSkipped(t *testing.T) {
|
||||
}
|
||||
|
||||
// TestFetchAll_AuthenticatedURLIsDownloaded covers media types with no fixed
|
||||
// extension. When IMA attaches auth headers the URL is IMA-hosted and WeKnora's
|
||||
// extension. When IMA attaches auth headers the URL is IMA-hosted and Academy's
|
||||
// own fetch could not authenticate, so the connector must download it here and
|
||||
// forward the headers.
|
||||
func TestFetchAll_AuthenticatedURLIsDownloaded(t *testing.T) {
|
||||
@@ -397,7 +397,7 @@ func TestFetchAll_AuthenticatedURLIsDownloaded(t *testing.T) {
|
||||
|
||||
// TestFetchAll_PublicURLStaysURLOnly is the counterpart: without auth headers
|
||||
// the link is publicly reachable, so it is handed to the ingest layer as a URL
|
||||
// and WeKnora renders the live page instead of a snapshot.
|
||||
// and Academy renders the live page instead of a snapshot.
|
||||
func TestFetchAll_PublicURLStaysURLOnly(t *testing.T) {
|
||||
f := newFakeIMA(t)
|
||||
f.setKB("kb1", []fakeFile{{MediaID: "m-web", Title: "Article", MediaType: mediaTypeWeb, Body: "ignored"}})
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/Tencent/WeKnora/internal/types"
|
||||
secutils "github.com/Tencent/WeKnora/internal/utils"
|
||||
"academy/internal/types"
|
||||
secutils "academy/internal/utils"
|
||||
)
|
||||
|
||||
// TestMain whitelists loopback for SSRF so the httptest servers (127.0.0.1)
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/Tencent/WeKnora/internal/logger"
|
||||
"academy/internal/logger"
|
||||
)
|
||||
|
||||
// paginationHopCap mirrors maxPaginationHops in connector.go. It is spelled as
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/Tencent/WeKnora/internal/datasource"
|
||||
"github.com/Tencent/WeKnora/internal/types"
|
||||
"academy/internal/datasource"
|
||||
"academy/internal/types"
|
||||
)
|
||||
|
||||
// DefaultBaseURL is the IMA OpenAPI base URL. The Path prefix is baked into
|
||||
@@ -267,7 +267,7 @@ type imaCursor struct {
|
||||
// Rationale:
|
||||
//
|
||||
// - kb_id keeps identities isolated across knowledge bases (same file
|
||||
// copied into two KBs is two distinct docs from WeKnora's perspective).
|
||||
// copied into two KBs is two distinct docs from Academy's perspective).
|
||||
// - parent_folder_id + title anchor the doc to its folder location and
|
||||
// display name — the tuple IMA's own check_repeated_names uses to gate
|
||||
// uploads (see api.md), so IMA's own uniqueness constraint enforces
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/Tencent/WeKnora/internal/datasource"
|
||||
"github.com/Tencent/WeKnora/internal/types"
|
||||
"academy/internal/datasource"
|
||||
"academy/internal/types"
|
||||
)
|
||||
|
||||
func TestLogicalKey_IsStableAndScoped(t *testing.T) {
|
||||
|
||||
Reference in new issue
Block a user