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

+2 -2
View File
@@ -5,7 +5,7 @@ import (
"encoding/json"
"strconv"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
"github.com/hibiken/asynq"
"go.opentelemetry.io/otel/propagation"
oteltrace "go.opentelemetry.io/otel/trace"
@@ -20,7 +20,7 @@ import (
// re-extracts it so worker-side spans are children of the same trace —
// giving LiteFuse one stitched tree across the HTTP request and the async
// processing. This also makes a sop3 run's traceparent propagate through to
// any asynq jobs WeKnora enqueues while serving sop3's agent-chat call.
// any asynq jobs Academy enqueues while serving sop3's agent-chat call.
//
// Safe to call unconditionally: when Langfuse is disabled or no span is
// present on ctx, it writes a zero-valued TracingContext — which round-trips
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"strings"
"testing"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
"github.com/hibiken/asynq"
)
+3 -3
View File
@@ -1,4 +1,4 @@
// Package langfuse implements WeKnora's Langfuse/LiteFuse LLM tracing client on
// Package langfuse implements Academy's Langfuse/LiteFuse LLM tracing client on
// top of the OpenTelemetry Go SDK. It records chat/embedding/rerank/VLM/ASR
// generations plus the surrounding agent/HTTP/asynq spans as OTLP/HTTP spans
// to a Langfuse v3+ or LiteFuse backend (POST /api/public/otel/v1/traces).
@@ -6,7 +6,7 @@
// The integration is fully opt-in: when disabled (the default), every public
// entry point is a cheap no-op, so callers can wire them unconditionally. A
// W3C traceparent propagated from upstream callers (e.g. sop3) is inherited so
// WeKnora's trace shares the upstream trace id — correlating runs across
// Academy's trace shares the upstream trace id — correlating runs across
// services in the LiteFuse UI.
package langfuse
@@ -24,7 +24,7 @@ import (
//
// In practice users enable Langfuse purely through environment variables —
// Host / PublicKey / SecretKey — which matches every other Langfuse SDK and
// keeps WeKnora's YAML config free of secrets.
// keeps Academy's YAML config free of secrets.
type Config struct {
// Enabled is the master switch. If false the entire package is a no-op.
Enabled bool
+1 -1
View File
@@ -3,7 +3,7 @@ package langfuse
import (
"context"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
"go.opentelemetry.io/otel/propagation"
oteltrace "go.opentelemetry.io/otel/trace"
)
+1 -1
View File
@@ -17,7 +17,7 @@ import (
// header is the gate opt-in that LiteFuse/Langfuse v3 require for the OTel
// direct-write path (verified against directWriteHelpers.ts — without it the
// server returns 400 "requires Python SDK >= 4.0.0"). The x-langfuse-sdk-*
// markers are sent for parity; WeKnora is a Go client, not the Python SDK.
// markers are sent for parity; Academy is a Go client, not the Python SDK.
func newExporter(ctx context.Context, cfg Config) (sdktrace.SpanExporter, error) {
endpoint := strings.TrimRight(cfg.Host, "/") + "/api/public/otel/v1/traces"
creds := cfg.PublicKey + ":" + cfg.SecretKey
+2 -2
View File
@@ -5,7 +5,7 @@ import (
"sync"
"sync/atomic"
"github.com/Tencent/WeKnora/internal/logger"
"academy/internal/logger"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
@@ -54,7 +54,7 @@ func Init(cfg Config) (*Manager, error) {
m := &Manager{cfg: cfg}
if cfg.Enabled {
resAttrs := []attribute.KeyValue{
attribute.String("service.name", "weknora"),
attribute.String("service.name", "academy"),
attribute.String(attrLangfusePubKey, cfg.PublicKey),
}
if cfg.Environment != "" {
+1 -1
View File
@@ -1,7 +1,7 @@
package langfuse
import (
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
)
// SummarizeMemoryRecallOutput builds Langfuse output for a memory.recall span.
+1 -1
View File
@@ -3,7 +3,7 @@ package langfuse
import (
"testing"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
)
func TestSummarizeMemoryRecallOutput_includesMetaAndItems(t *testing.T) {
+3 -3
View File
@@ -5,7 +5,7 @@ import (
"strconv"
"strings"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
"github.com/gin-gonic/gin"
"go.opentelemetry.io/otel/propagation"
)
@@ -26,9 +26,9 @@ func GinMiddleware() gin.HandlerFunc {
}
ctx := c.Request.Context()
// Extract a W3C traceparent from the incoming request so the WeKnora
// Extract a W3C traceparent from the incoming request so the Academy
// trace inherits the upstream caller's trace id. This is what lets a
// sop3 pipeline run (identified by its W3C trace_id) and the WeKnora
// sop3 pipeline run (identified by its W3C trace_id) and the Academy
// agent-chat call it triggers land under the same trace in LiteFuse.
// When no traceparent is present (human UI calls, other clients) the
// root span starts a fresh trace as before.
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"fmt"
"sort"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
)
const defaultHitPreviewLimit = 25
@@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
)
func TestSummarizeRetrieveOutput_countsAndPreviews(t *testing.T) {
+2 -2
View File
@@ -5,7 +5,7 @@ import (
"encoding/json"
"time"
"github.com/Tencent/WeKnora/internal/logger"
"academy/internal/logger"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/trace"
@@ -84,7 +84,7 @@ type SpanOptions struct {
// StartTrace opens a root span. When ctx carries a remote SpanContext (from a
// W3C traceparent extracted by GinMiddleware), the root span inherits the
// upstream trace id — this is what makes a sop3 run and its WeKnora call land
// upstream trace id — this is what makes a sop3 run and its Academy call land
// under the same trace in LiteFuse. The returned *Trace is non-nil even when
// disabled (methods are no-ops), so callers don't need nil checks.
func (m *Manager) StartTrace(ctx context.Context, opts TraceOptions) (context.Context, *Trace) {
+6 -6
View File
@@ -372,8 +372,8 @@ func TestStartSpan_AutoRootExported(t *testing.T) {
// TestTraceparentPropagation is the sop3 correlation core test: an incoming
// W3C traceparent (as injected by an upstream caller like sop3) is extracted,
// and the WeKnora root span inherits the upstream trace id — so in LiteFuse
// the WeKnora trace and the upstream caller's trace are the same trace.
// and the Academy root span inherits the upstream trace id — so in LiteFuse
// the Academy trace and the upstream caller's trace are the same trace.
func TestTraceparentPropagation(t *testing.T) {
m, exp := newTestManager(t)
@@ -388,20 +388,20 @@ func TestTraceparentPropagation(t *testing.T) {
// The HTTP middleware extracts the traceparent into the request context.
httpCtx := propagator.Extract(context.Background(), carrier)
_, trace := m.StartTrace(httpCtx, TraceOptions{Name: "weknora-root"})
_, trace := m.StartTrace(httpCtx, TraceOptions{Name: "academy-root"})
trace.Finish(nil, nil)
for _, s := range exp.GetSpans() {
if s.Name != "weknora-root" {
if s.Name != "academy-root" {
continue
}
if s.SpanContext.TraceID() != remoteTraceID {
t.Errorf("weknora root trace id = %s, want upstream %s (traceparent not inherited)",
t.Errorf("academy root trace id = %s, want upstream %s (traceparent not inherited)",
s.SpanContext.TraceID(), remoteTraceID)
}
return
}
t.Fatal("weknora-root span not exported")
t.Fatal("academy-root span not exported")
}
// TestAttachTraceparent_FollowUpJoinsOriginatingTrace is the follow-up