diff --git a/README.MD b/README.MD index ebb8a70..a596f95 100644 --- a/README.MD +++ b/README.MD @@ -17,7 +17,7 @@ 语言 / Language: [中文](README.MD) | [English](README.en.md) -将 DeepSeek Web 对话能力转换为 OpenAI、Claude 与 Gemini 兼容 API。后端为 **Go 全量实现**,前端为 React WebUI 管理台(源码在 `webui/`,部署时自动构建到 `static/admin`)。 +将 DeepSeek Web 对话能力转换为 OpenAI、Claude 与 Gemini 兼容 API。核心后端以 **Go** 实现,Vercel 流式桥接额外使用少量 Node Runtime,前端为 React WebUI 管理台(源码在 `webui/`,部署时自动构建到 `static/admin`)。 文档入口:[文档导航](docs/README.md) / [架构说明](docs/ARCHITECTURE.md) / [接口文档](API.md) @@ -424,10 +424,10 @@ npm run build --prefix webui 工作流文件:`.github/workflows/release-artifacts.yml` -- **触发条件**:仅在 GitHub Release `published` 时触发(普通 push 不会触发) -- **构建产物**:多平台二进制包(`linux/amd64`、`linux/arm64`、`linux/armv7`、`darwin/amd64`、`darwin/arm64`、`windows/amd64`、`windows/arm64`)+ `sha256sums.txt` +- **触发条件**:默认仅在 GitHub Release `published` 时自动触发;也支持在 Actions 页面手动 `workflow_dispatch`,并填写 `release_tag` 复跑/补发 +- **构建产物**:多平台二进制包(`linux/amd64`、`linux/arm64`、`linux/armv7`、`darwin/amd64`、`darwin/arm64`、`windows/amd64`、`windows/arm64`)、Linux Docker 镜像导出包 + `sha256sums.txt` - **容器镜像发布**:仅推送到 GHCR(`ghcr.io/cjackhwang/ds2api`) -- **每个压缩包包含**:`ds2api` 可执行文件、`static/admin`、WASM 文件(同时支持内置 fallback)、`config.example.json` 配置示例、README、LICENSE +- **每个二进制压缩包包含**:`ds2api` 可执行文件、`static/admin`、`config.example.json`、`.env.example`、`README.MD`、`README.en.md`、`LICENSE` ## 免责声明 diff --git a/README.en.md b/README.en.md index 267f7b1..773d96f 100644 --- a/README.en.md +++ b/README.en.md @@ -16,7 +16,7 @@ Language: [中文](README.MD) | [English](README.en.md) -DS2API converts DeepSeek Web chat capability into OpenAI-compatible, Claude-compatible, and Gemini-compatible APIs. The backend is a **pure Go implementation**, with a React WebUI admin panel (source in `webui/`, build output auto-generated to `static/admin` during deployment). +DS2API converts DeepSeek Web chat capability into OpenAI-compatible, Claude-compatible, and Gemini-compatible APIs. The core backend is Go-based, with a small Node Runtime bridge used for Vercel streaming, and the React WebUI admin panel lives in `webui/` (build output auto-generated to `static/admin` during deployment). Documentation entry: [Docs Index](docs/README.md) / [Architecture](docs/ARCHITECTURE.en.md) / [API Reference](API.en.md) @@ -409,10 +409,10 @@ npm run build --prefix webui Workflow: `.github/workflows/release-artifacts.yml` -- **Trigger**: only on GitHub Release `published` (normal pushes do not trigger builds) -- **Outputs**: multi-platform archives (`linux/amd64`, `linux/arm64`, `linux/armv7`, `darwin/amd64`, `darwin/arm64`, `windows/amd64`, `windows/arm64`) + `sha256sums.txt` +- **Trigger**: by default only on GitHub Release `published`; you can also run it manually via `workflow_dispatch` and pass `release_tag` to rerun / backfill +- **Outputs**: multi-platform binary archives (`linux/amd64`, `linux/arm64`, `linux/armv7`, `darwin/amd64`, `darwin/arm64`, `windows/amd64`, `windows/arm64`), Linux Docker image export tarballs, and `sha256sums.txt` - **Container publishing**: GHCR only (`ghcr.io/cjackhwang/ds2api`) -- **Each archive includes**: `ds2api` executable, `static/admin`, WASM file (with embedded fallback support), `config.example.json`-based config template, README, LICENSE +- **Each binary archive includes**: the `ds2api` executable, `static/admin`, `config.example.json`, `.env.example`, `README.MD`, `README.en.md`, and `LICENSE` ## Disclaimer diff --git a/VERSION b/VERSION index fae6e3d..af8c8ec 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.2.1 +4.2.2 diff --git a/docs/CONTRIBUTING.en.md b/docs/CONTRIBUTING.en.md index 8dd9a40..94cade1 100644 --- a/docs/CONTRIBUTING.en.md +++ b/docs/CONTRIBUTING.en.md @@ -36,7 +36,7 @@ go run ./cmd/ds2api cd webui # 2. Install dependencies -npm install +npm ci # 3. Start dev server (hot reload) npm run dev diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 0a9187d..69424d4 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -36,7 +36,7 @@ go run ./cmd/ds2api cd webui # 2. 安装依赖 -npm install +npm ci # 3. 启动开发服务器(热更新) npm run dev diff --git a/docs/DEPLOY.en.md b/docs/DEPLOY.en.md index b2ed75e..7390097 100644 --- a/docs/DEPLOY.en.md +++ b/docs/DEPLOY.en.md @@ -64,8 +64,8 @@ Use `config.json` as the single source of truth: Built-in GitHub Actions workflow: `.github/workflows/release-artifacts.yml` -- **Trigger**: only on Release `published` (no build on normal push) -- **Outputs**: multi-platform binary archives + `sha256sums.txt` +- **Trigger**: by default only on Release `published`; you can also run it manually via `workflow_dispatch` and pass `release_tag` to rerun / backfill +- **Outputs**: multi-platform binary archives, Linux Docker image export tarballs, and `sha256sums.txt` - **Container publishing**: GHCR only (`ghcr.io/cjackhwang/ds2api`) | Platform | Architecture | Format | @@ -419,7 +419,7 @@ Or step by step: ```bash cd webui -npm install +npm ci npm run build # Output goes to static/admin/ ``` diff --git a/docs/DEPLOY.md b/docs/DEPLOY.md index 4a1b75f..29e3d0f 100644 --- a/docs/DEPLOY.md +++ b/docs/DEPLOY.md @@ -64,8 +64,8 @@ cp config.example.json config.json 仓库内置 GitHub Actions 工作流:`.github/workflows/release-artifacts.yml` -- **触发条件**:仅在 Release `published` 时触发(普通 push 不会构建) -- **构建产物**:多平台二进制压缩包 + `sha256sums.txt` +- **触发条件**:默认仅在 Release `published` 时自动触发;也支持在 Actions 页面手动 `workflow_dispatch`,并填写 `release_tag` 复跑/补发 +- **构建产物**:多平台二进制压缩包、Linux Docker 镜像导出包 + `sha256sums.txt` - **容器镜像发布**:仅发布到 GHCR(`ghcr.io/cjackhwang/ds2api`) | 平台 | 架构 | 文件格式 | @@ -429,7 +429,7 @@ go run ./cmd/ds2api ```bash cd webui -npm install +npm ci npm run build # 产物输出到 static/admin/ ``` diff --git a/docs/README.md b/docs/README.md index b3556eb..426c343 100644 --- a/docs/README.md +++ b/docs/README.md @@ -22,7 +22,7 @@ ### 文档维护约定 -- 文档更新必须以实际代码实现为依据:总路由装配看 `internal/server/router.go`,协议/resource 路由看 `internal/httpapi/*/**/routes.go` 与 `internal/httpapi/admin/handler.go`,配置默认值看 `internal/config/*`,模型/alias 看 `internal/config/models.go`,prompt 兼容链路看 `docs/prompt-compatibility.md` 列出的代码入口。 +- 文档更新必须以实际代码实现为依据:总路由装配看 `internal/server/router.go`,协议/resource 路由看 `internal/httpapi/**/handler*.go` 与 `internal/httpapi/admin/handler.go`,配置默认值看 `internal/config/*`,模型/alias 看 `internal/config/models.go`,prompt 兼容链路看 `docs/prompt-compatibility.md` 列出的代码入口。 - `README.MD` / `README.en.md`:面向首次接触用户,保留“是什么 + 怎么快速跑起来”。 - `docs/ARCHITECTURE*.md`:面向开发者,集中维护项目结构、模块职责与调用链。 - `API*.md`:面向客户端接入者,聚焦接口行为、鉴权和示例。 @@ -53,7 +53,7 @@ Recommended reading order: ### Maintenance conventions -- Documentation updates must be grounded in the actual implementation: root routing lives in `internal/server/router.go`, protocol/resource routes live in `internal/httpapi/*/**/routes.go` and `internal/httpapi/admin/handler.go`, config defaults in `internal/config/*`, models/aliases in `internal/config/models.go`, and the prompt compatibility pipeline in the code entrypoints listed by `docs/prompt-compatibility.md`. +- Documentation updates must be grounded in the actual implementation: root routing lives in `internal/server/router.go`, protocol/resource routes live in `internal/httpapi/**/handler*.go` and `internal/httpapi/admin/handler.go`, config defaults in `internal/config/*`, models/aliases in `internal/config/models.go`, and the prompt compatibility pipeline in the code entrypoints listed by `docs/prompt-compatibility.md`. - `README.MD` / `README.en.md`: onboarding-oriented (“what + quick start”). - `docs/ARCHITECTURE*.md`: developer-oriented source of truth for module boundaries and execution flow. - `API*.md`: integration-oriented behavior/contracts.