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
+20
-20
@@ -13,20 +13,20 @@ import (
|
||||
ginSwagger "github.com/swaggo/gin-swagger"
|
||||
"go.uber.org/dig"
|
||||
|
||||
"github.com/Tencent/WeKnora/internal/agent/operations"
|
||||
"github.com/Tencent/WeKnora/internal/application/service"
|
||||
"github.com/Tencent/WeKnora/internal/config"
|
||||
"github.com/Tencent/WeKnora/internal/handler"
|
||||
"github.com/Tencent/WeKnora/internal/handler/orgcenter"
|
||||
"github.com/Tencent/WeKnora/internal/handler/session"
|
||||
"github.com/Tencent/WeKnora/internal/handler/training"
|
||||
"github.com/Tencent/WeKnora/internal/logger"
|
||||
"github.com/Tencent/WeKnora/internal/mcpserver"
|
||||
"github.com/Tencent/WeKnora/internal/middleware"
|
||||
"github.com/Tencent/WeKnora/internal/tracing/langfuse"
|
||||
"github.com/Tencent/WeKnora/internal/types/interfaces"
|
||||
"academy/internal/agent/operations"
|
||||
"academy/internal/application/service"
|
||||
"academy/internal/config"
|
||||
"academy/internal/handler"
|
||||
"academy/internal/handler/orgcenter"
|
||||
"academy/internal/handler/session"
|
||||
"academy/internal/handler/training"
|
||||
"academy/internal/logger"
|
||||
"academy/internal/mcpserver"
|
||||
"academy/internal/middleware"
|
||||
"academy/internal/tracing/langfuse"
|
||||
"academy/internal/types/interfaces"
|
||||
|
||||
_ "github.com/Tencent/WeKnora/docs" // swagger docs
|
||||
_ "academy/docs" // swagger docs
|
||||
)
|
||||
|
||||
// RouterParams 路由参数
|
||||
@@ -94,7 +94,7 @@ type RouterParams struct {
|
||||
RedisClient *redis.Client
|
||||
DataSourceHandler *handler.DataSourceHandler
|
||||
DataSourceCredentialsHandler *handler.DataSourceCredentialsHandler
|
||||
WeKnoraCloudHandler *handler.WeKnoraCloudHandler
|
||||
AcademyCloudHandler *handler.AcademyCloudHandler
|
||||
WikiPageHandler *handler.WikiPageHandler
|
||||
MemoryHandler *handler.MemoryHandler
|
||||
AutomationHandler *handler.AutomationHandler
|
||||
@@ -116,7 +116,7 @@ func NewRouter(params RouterParams) *gin.Engine {
|
||||
// embed endpoints rate-limit per (channel, ClientIP), so a spoofed XFF would
|
||||
// trivially bypass the limiter. Restrict to the fronting proxy network so
|
||||
// only the real client IP (appended by nginx) is returned. Configurable via
|
||||
// WEKNORA_TRUSTED_PROXIES (comma-separated CIDRs/IPs).
|
||||
// ACADEMY_TRUSTED_PROXIES (comma-separated CIDRs/IPs).
|
||||
if err := r.SetTrustedProxies(trustedProxies()); err != nil {
|
||||
logger.Errorf(context.Background(), "[Router] failed to set trusted proxies: %v", err)
|
||||
}
|
||||
@@ -132,7 +132,7 @@ func NewRouter(params RouterParams) *gin.Engine {
|
||||
AllowMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
|
||||
AllowHeaders: []string{
|
||||
"Origin", "Content-Type", "Accept", "Authorization", "X-API-Key", "X-Request-ID", "X-Tenant-ID",
|
||||
"X-Embed-Session", "X-External-User-ID", "X-External-User-Token", "X-WeKnora-Desktop-Token",
|
||||
"X-Embed-Session", "X-External-User-ID", "X-External-User-Token", "X-Academy-Desktop-Token",
|
||||
// Streamable HTTP MCP clients running in a browser send these on
|
||||
// the /mcp/:endpoint_id surface.
|
||||
"MCP-Protocol-Version", "Mcp-Method", "Mcp-Name", "Mcp-Session-Id", "Last-Event-ID",
|
||||
@@ -199,7 +199,7 @@ func NewRouter(params RouterParams) *gin.Engine {
|
||||
RegisterMCPServerRoutes(r, params.MCPServer, params.MCPEndpointService, params.TenantService)
|
||||
|
||||
// Short-lived capability URLs for IM and other clients that cannot attach
|
||||
// WeKnora authentication headers.
|
||||
// Academy authentication headers.
|
||||
serveResourceGrants(r, params.ResourceCatalog, params.TenantService, params.FileService, params.StorageBackendResolver)
|
||||
|
||||
// Sandbox terminal WebSocket (self-authenticated via a short-lived
|
||||
@@ -332,7 +332,7 @@ func NewRouter(params RouterParams) *gin.Engine {
|
||||
RegisterEmbedChannelRoutes(v1, params.EmbedChannelHandler, rbacGuards)
|
||||
RegisterMCPEndpointRoutes(v1, params.MCPEndpointHandler, rbacGuards)
|
||||
RegisterDataSourceRoutes(v1, params.DataSourceHandler, params.DataSourceCredentialsHandler, rbacGuards)
|
||||
RegisterWeKnoraCloudRoutes(v1, params.WeKnoraCloudHandler, rbacGuards)
|
||||
RegisterAcademyCloudRoutes(v1, params.AcademyCloudHandler, rbacGuards)
|
||||
RegisterWikiPageRoutes(v1, params.WikiPageHandler, rbacGuards)
|
||||
RegisterMemoryRoutes(v1, params.MemoryHandler, rbacGuards)
|
||||
RegisterAutomationRoutes(v1, params.AutomationHandler, rbacGuards)
|
||||
@@ -358,10 +358,10 @@ func NewRouter(params RouterParams) *gin.Engine {
|
||||
// trustedProxies returns the proxy CIDRs/IPs whose X-Forwarded-For headers
|
||||
// gin should trust when resolving the client IP. Defaults to loopback and
|
||||
// private ranges (covers the bundled nginx in a container network); override
|
||||
// with WEKNORA_TRUSTED_PROXIES (comma-separated). An explicit empty value
|
||||
// with ACADEMY_TRUSTED_PROXIES (comma-separated). An explicit empty value
|
||||
// disables proxy trust entirely so ClientIP() returns the direct peer.
|
||||
func trustedProxies() []string {
|
||||
raw, ok := os.LookupEnv("WEKNORA_TRUSTED_PROXIES")
|
||||
raw, ok := os.LookupEnv("ACADEMY_TRUSTED_PROXIES")
|
||||
if !ok {
|
||||
return []string{
|
||||
"127.0.0.0/8",
|
||||
|
||||
Reference in new issue
Block a user