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

+25 -13
View File
@@ -19,9 +19,11 @@ ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo
ENV PATH=/usr/local/cargo/bin:$PATH
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
COPY scripts/build_browserskill.sh scripts/browserskill-release.json ./scripts/
# 离线快速通道:优先使用仓库内预构建产物(air-gapped/网络受限环境无需 clone GitHub)
COPY artifacts/browserskill ./artifacts/browserskill/
ARG TARGETOS
ARG TARGETARCH
RUN bash scripts/build_browserskill.sh /opt/weknora/browserskill "${TARGETOS}/${TARGETARCH}"
RUN bash scripts/build_browserskill.sh /opt/academy/browserskill "${TARGETOS}/${TARGETARCH}"
# Build stage
FROM golang:1.26-bookworm AS builder
@@ -132,18 +134,30 @@ FROM debian:12.12-slim
WORKDIR /app
ARG APK_MIRROR_ARG
# PyPI 镜像(国内网络直连 pypi.org 常超时;由 compose 传入国内源,留空回退官方源)
ARG PIP_INDEX_ARG
# apt bootstrap 镜像(须为不跳转 HTTPS 的纯 HTTP 源,如 mirrors.aliyun.com)
ARG BOOTSTRAP_MIRROR_ARG
# Pairing derives the gateway URL from the user's page origin by default.
ENV BROWSERSKILL_BINARY=/opt/weknora/browserskill/bsk \
BROWSERSKILL_EXTENSION_PATH=/opt/weknora/browserskill/browser-skill-weknora-0.3.1.zip
COPY --from=browserskill /opt/weknora/browserskill /opt/weknora/browserskill
ENV BROWSERSKILL_BINARY=/opt/academy/browserskill/bsk \
BROWSERSKILL_EXTENSION_PATH=/opt/academy/browserskill/browser-skill-academy-0.3.1.zip
COPY --from=browserskill /opt/academy/browserskill /opt/academy/browserskill
# Create a non-root user first
RUN useradd -m -s /bin/bash appuser
# First, install ca-certificates without mirror to ensure HTTPS works
RUN apt-get update && \
# First, install ca-certificates via an HTTP-only bootstrap mirror (国内直连官方源
# 速率极慢;主镜像会 302 跳 HTTPS 而此刻尚无信任库,故 bootstrap 需用不跳转的 HTTP 源),
# 装好信任库后立即把源切到 APK_MIRROR_ARG 供后续步骤使用
RUN if [ -n "$BOOTSTRAP_MIRROR_ARG" ]; then \
sed -i "s@deb.debian.org@${BOOTSTRAP_MIRROR_ARG}@g" /etc/apt/sources.list.d/debian.sources; \
fi && \
apt-get update && \
apt-get install -y --no-install-recommends ca-certificates && \
if [ -n "$APK_MIRROR_ARG" ]; then \
sed -i "s@${BOOTSTRAP_MIRROR_ARG:-deb.debian.org}@${APK_MIRROR_ARG}@g" /etc/apt/sources.list.d/debian.sources; \
fi && \
rm -rf /var/lib/apt/lists/*
# Then switch to mirror if specified and install other packages
@@ -158,12 +172,10 @@ RUN if [ -n "$APK_MIRROR_ARG" ]; then \
nodejs npm \
gosu \
ffmpeg && \
python3 -m pip install --break-system-packages --upgrade pip setuptools wheel && \
mkdir -p /home/appuser/.local/bin && \
curl -LsSf https://astral.sh/uv/install.sh | CARGO_HOME=/home/appuser/.cargo UV_INSTALL_DIR=/home/appuser/.local/bin sh && \
python3 -m pip install --break-system-packages -i ${PIP_INDEX_ARG:-https://pypi.org/simple} --upgrade pip setuptools wheel && \
# uv 通过 PyPI 镜像安装(uvx 由 pip 装入 /usr/local/bin;官方 astral.sh 安装脚本在受限网络不可达)
python3 -m pip install --break-system-packages -i ${PIP_INDEX_ARG:-https://pypi.org/simple} uv && \
chown -R appuser:appuser /home/appuser && \
ln -sf /home/appuser/.local/bin/uvx /usr/local/bin/uvx && \
chmod +x /usr/local/bin/uvx && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
@@ -181,7 +193,7 @@ COPY --from=builder /app/scripts ./scripts
COPY --from=builder /app/migrations ./migrations
COPY --from=builder /app/dataset/samples ./dataset/samples
COPY --from=builder /root/.duckdb /home/appuser/.duckdb
COPY --from=builder /app/WeKnora .
COPY --from=builder /app/Academy .
COPY --from=builder /license-bundle/ ./
# Copy and make entrypoint script executable
@@ -195,4 +207,4 @@ EXPOSE 8080
ENTRYPOINT ["./scripts/docker-entrypoint.sh"]
CMD ["./WeKnora"]
CMD ["./Academy"]
+9 -9
View File
@@ -1,4 +1,4 @@
# WeKnora Sandbox Image
# Academy Sandbox Image
# Pre-built environment for executing agent skill scripts in Docker sandbox
# Multi-stage build, minimal dependencies
#
@@ -70,7 +70,7 @@ RUN npm install -g pnpm
# curl is not optional: the sandbox connectivity check probes egress with it,
# and skills that fetch a URL expect it to be there. The compression tools are
# here because skill bundles and their assets arrive archived. git backs
# per-turn workspace checkpoints (object store at /var/lib/weknora/workspace.git,
# per-turn workspace checkpoints (object store at /var/lib/academy/workspace.git,
# work tree /workspace) that session fork and rewind roll back to.
RUN apt-get update && apt-get install -y --no-install-recommends \
jq \
@@ -107,10 +107,10 @@ RUN mkdir -p /workspace/input /workspace/output && \
# Classic user@host:path prompt (colored). E2B's provisioner later appends
# `PS1='\w $ '`; the script reapplies this prompt via PROMPT_COMMAND so
# Cube, Docker, and E2B all show the same Debian-style line.
COPY docker/sandbox-pty-prompt.sh /etc/weknora/pty-prompt.sh
RUN echo '. /etc/weknora/pty-prompt.sh' > /etc/profile.d/zz-weknora-prompt.sh && \
echo '. /etc/weknora/pty-prompt.sh' >> /root/.bashrc && \
echo '. /etc/weknora/pty-prompt.sh' >> /home/user/.bashrc
COPY docker/sandbox-pty-prompt.sh /etc/academy/pty-prompt.sh
RUN echo '. /etc/academy/pty-prompt.sh' > /etc/profile.d/zz-academy-prompt.sh && \
echo '. /etc/academy/pty-prompt.sh' >> /root/.bashrc && \
echo '. /etc/academy/pty-prompt.sh' >> /home/user/.bashrc
WORKDIR /workspace
USER root
@@ -119,7 +119,7 @@ USER root
#
# envd is what Cube talks to for everything — the readiness probe that decides
# whether a template build succeeds, plus every later exec and file call. It
# runs as root and selects the account named in each request. WeKnora names
# runs as root and selects the account named in each request. Academy names
# root by default, matching the runtime stage.
#
# Built for amd64 and arm64: cubesandbox-base ships both, and Cube runs on
@@ -151,7 +151,7 @@ ENTRYPOINT ["/usr/local/bin/cube-entrypoint.sh"]
#
# Debian package names (runtime is python:3.12-slim, not Ubuntu). Do not run
# `yes | unminimize` — Debian has no such command. Do not clone noVNC; the
# WeKnora frontend uses @novnc/novnc and the sandbox only needs websockify.
# Academy frontend uses @novnc/novnc and the sandbox only needs websockify.
# procps supplies pgrep for the start script; util-linux supplies flock.
FROM runtime AS desktop-runtime
@@ -163,7 +163,7 @@ USER root
ENV DEBIAN_FRONTEND=noninteractive
# XFCE apps (mousepad, xfce4-terminal) decode files with the process locale.
# python:slim defaults to POSIX/C, which is why the desktop shows mojibake
# while the WeKnora terminal tab does not: that tab is xterm.js in the
# while the Academy terminal tab does not: that tab is xterm.js in the
# browser, and Cube/E2B already stamp LANG/LC_ALL on the envd PTY.
# C.UTF-8 is built into glibc; do not pull locales-all.
ENV LANG=C.UTF-8
+3 -3
View File
@@ -7,14 +7,14 @@ loglevel=info
pidfile=/var/run/supervisord.pid
user=root
[program:WeKnora]
command=/app/WeKnora
[program:Academy]
command=/app/Academy
directory=/app
autostart=true
autorestart=true
startretries=5
redirect_stderr=true
stdout_logfile=/var/log/WeKnora.log
stdout_logfile=/var/log/Academy.log
stdout_logfile_maxbytes=50MB
stdout_logfile_backups=10
environment=CGO_ENABLED=1
+8 -8
View File
@@ -1,7 +1,7 @@
# WeKnora interactive PTY prompt: classic \u@\h:\W\$
# Academy interactive PTY prompt: classic \u@\h:\W\$
# (user@host:last-path-segment, # for root / $ otherwise).
#
# \W is the last directory only (e.g. /opt/weknora/skills → skills),
# \W is the last directory only (e.g. /opt/academy/skills → skills),
# so deep cwd does not blow the prompt width.
#
# Bold green (01;32) is user@host; bold blue (01;34) is the path — the
@@ -16,11 +16,11 @@
[ -n "${BASH_VERSION-}" ] || return 0
weknora_set_pty_prompt() {
academy_set_pty_prompt() {
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ '
}
weknora_set_pty_prompt
academy_set_pty_prompt
# Debian/Ubuntu interactive shortcuts. Aliases only apply in interactive
# shells, so skill scripts still see the real ls/grep.
@@ -40,15 +40,15 @@ case "$-" in
esac
case ";${PROMPT_COMMAND-};" in
*weknora_set_pty_prompt*) ;;
*academy_set_pty_prompt*) ;;
*)
if [ -n "${PROMPT_COMMAND-}" ]; then
PROMPT_COMMAND="weknora_set_pty_prompt; ${PROMPT_COMMAND}"
PROMPT_COMMAND="academy_set_pty_prompt; ${PROMPT_COMMAND}"
else
PROMPT_COMMAND="weknora_set_pty_prompt"
PROMPT_COMMAND="academy_set_pty_prompt"
fi
;;
esac
# PS1 and PROMPT_COMMAND stay shell-local. Exporting PS1 makes child
# processes look interactive (`[ -z "$PS1" ]`); exporting PROMPT_COMMAND
# without `export -f weknora_set_pty_prompt` breaks nested bash.
# without `export -f academy_set_pty_prompt` breaks nested bash.
+3 -3
View File
@@ -1,12 +1,12 @@
#!/bin/sh
# Idempotent desktop stack for WeKnora sandbox images.
# Idempotent desktop stack for Academy sandbox images.
# Safe to re-run after pause/resume; serialised with flock so concurrent Exec
# (dual tabs, retries, multiple replicas) cannot split the VNC secret.
set -eu
export DISPLAY=:0
# UTF-8 for every daemon this script starts (XFCE session, xfce4-terminal,
# mousepad). Without it they inherit POSIX/C from python:slim and UTF-8
# files render as mojibake; the WeKnora terminal tab is unaffected because
# files render as mojibake; the Academy terminal tab is unaffected because
# it is drawn in the browser. Prefer an image-provided LANG, fall back here
# so a wrapped older image still starts a UTF-8 session.
export LANG="${LANG:-C.UTF-8}"
@@ -137,7 +137,7 @@ port_open 5900 || \
# path that bypasses CubeProxy. Port-guarded for the same reason as 7.
port_open 6080 || \
spawn websockify websockify --auth-plugin BasicHTTPAuth \
--auth-source "weknora:$(cat /run/desktop/secret)" \
--auth-source "academy:$(cat /run/desktop/secret)" \
--heartbeat 30 6080 127.0.0.1:5900
# 9. Wait for ready (lock held so waiters queue instead of starting twice).
+3 -3
View File
@@ -1,7 +1,7 @@
use_default_settings: true
general:
instance_name: "WeKnora SearXNG"
instance_name: "Academy SearXNG"
privacypolicy_url: false
donation_url: false
contact_url: false
@@ -14,8 +14,8 @@ server:
image_proxy: true
http_protocol_version: "1.0"
method: "GET"
# Disabled so WeKnora's backend can call /search without IP-based throttling.
# Re-enable and add WeKnora's egress IP to a limiter allowlist if you expose
# Disabled so Academy's backend can call /search without IP-based throttling.
# Re-enable and add Academy's egress IP to a limiter allowlist if you expose
# this instance to the public internet.
limiter: false
public_instance: false