From b129c4437a3a77abfb166e1b333cdea8870183f7 Mon Sep 17 00:00:00 2001 From: Estrella Pan Date: Sat, 24 Oct 2026 11:46:50 +0200 Subject: [PATCH] =?UTF-8?q?chore(release):=20=E5=87=86=E5=A4=87=204.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 部署文档、升级指南与 README 改为正式版说法:latest = 4.0,3.3 固定为 3.3.7 - docs/changelog/4.0.md 新增 4.0.0 汇总(升级前必读、破坏性变更、新功能、主要修复),链接改为绝对地址 - 文档站与插件市场改为从 main 发布,插件上架 PR 的目标分支改为 main - 文档站页脚版本 v4.0.0;en/ja README 的 star history 地址 --- .github/PULL_REQUEST_TEMPLATE/plugin.md | 2 +- .github/workflows/docs.yml | 4 +- .github/workflows/plugin-registry.yml | 8 ++-- CHANGELOG.md | 8 ++++ CLAUDE.md | 5 ++- README.en.md | 4 +- README.ja.md | 4 +- README.md | 2 +- backend/pyproject.toml | 2 +- backend/uv.lock | 2 +- docs/.vitepress/config.ts | 2 +- docs/changelog/4.0.md | 49 +++++++++++++++++++++++-- docs/deploy/docker-cli.md | 4 +- docs/deploy/docker-compose.md | 4 +- docs/deploy/dsm.md | 4 +- docs/deploy/quick-start.md | 4 +- docs/deploy/upgrade-4.0.md | 18 ++++----- docs/dev/plugins/publish.md | 6 +-- docs/en/changelog/4.0.md | 49 +++++++++++++++++++++++-- docs/en/deploy/docker-cli.md | 4 +- docs/en/deploy/docker-compose.md | 4 +- docs/en/deploy/dsm.md | 4 +- docs/en/deploy/quick-start.md | 4 +- docs/en/deploy/upgrade-4.0.md | 18 ++++----- docs/en/dev/plugins/publish.md | 6 +-- docs/ja/changelog/4.0.md | 49 +++++++++++++++++++++++-- docs/ja/deploy/docker-cli.md | 4 +- docs/ja/deploy/docker-compose.md | 4 +- docs/ja/deploy/dsm.md | 4 +- docs/ja/deploy/quick-start.md | 4 +- docs/ja/deploy/upgrade-4.0.md | 18 ++++----- docs/ja/dev/plugins/publish.md | 6 +-- 32 files changed, 215 insertions(+), 95 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/plugin.md b/.github/PULL_REQUEST_TEMPLATE/plugin.md index cc9784d1..347a70fa 100644 --- a/.github/PULL_REQUEST_TEMPLATE/plugin.md +++ b/.github/PULL_REQUEST_TEMPLATE/plugin.md @@ -1,4 +1,4 @@ - + ## Plugin diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index fd967e48..154bcfc0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,9 +2,9 @@ name: Deploy Docs on: push: - # 只从 4.0-dev 部署:main 与 3.3-dev 仍是 3.3 文档,多分支部署会互相覆盖。4.0 正式版后改为 main。 + # 只从 main 部署:文档与已发布的版本一致,多分支部署会互相覆盖。 branches: - - 4.0-dev + - main paths: - "docs/**" - ".github/workflows/docs.yml" diff --git a/.github/workflows/plugin-registry.yml b/.github/workflows/plugin-registry.yml index 7b784709..fd7383d6 100644 --- a/.github/workflows/plugin-registry.yml +++ b/.github/workflows/plugin-registry.yml @@ -9,10 +9,10 @@ name: Plugin Registry # 并校验 sha256,核对每个新 zip 的 id 与来源,再签名发布。 on: pull_request: - branches: ["4.0-dev"] + branches: ["main"] paths: ["plugins/**"] push: - branches: ["4.0-dev"] + branches: ["main"] paths: ["plugins/**"] workflow_dispatch: inputs: @@ -84,8 +84,8 @@ jobs: --catalog old/catalog.json --out dist | tee -a "$GITHUB_STEP_SUMMARY" plan: - # 带着签名密钥的发布只从 4.0-dev 运行 - if: github.event_name != 'pull_request' && github.ref == 'refs/heads/4.0-dev' + # 带着签名密钥的发布只从 main 运行 + if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest outputs: build: ${{ steps.plan.outputs.build }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 38e6f308..8d78ee6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# [4.0.0] - 2026-10-24 + +4.0 正式版:插件化重构。与 4.0.0-beta.9 相比没有代码变更,只更新了文档与发布说明。完整说明(升级前必读、破坏性变更、新功能)见 [docs/changelog/4.0.md](docs/changelog/4.0.md)。 + +- **变更(镜像标签)**:`latest` 指向 4.0。使用 `latest` 的 3.3 用户下一次拉取镜像就会升级到 4.0,请先备份 `config` 与 `data`;暂不升级请固定为 `3.3.7` +- **文档**:部署文档、升级指南与 README 改为正式版说法,升级指南的镜像标签表改为 `4.0.0` / `latest` / `3.3.7`,说明应用内更新不能从 3.3 升级到 4.0 +- **变更(仓库)**:文档站与插件市场改为从 `main` 发布;插件上架 PR 的目标分支改为 `main` + # [4.0.0-beta.9] - 2026-10-24 - **修复(升级与回滚)**:回滚到 3.3 并还原数据库后再次升级到 4.0,数据库备份 `data.db.v3.bak` 会用回滚后的 3.3 数据库重新生成。之前保留的是第一次升级时的备份,再次回滚会丢失回滚期间在 3.3 中的改动。迁移失败导致容器反复重启时,备份仍只有一份 diff --git a/CLAUDE.md b/CLAUDE.md index 536b18b2..f330cc44 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -131,10 +131,11 @@ webui/src/ ## Git Branching -- `main`: Stable releases only -- `X.Y-dev` branches: Active development (e.g., `3.2-dev`) +- `main`: Stable releases, plus plugin registry PRs (`plugins/registry/`) +- `X.Y-dev` branches: Active development (e.g., `4.0-dev`) - Bug fixes → PR to current released version's `-dev` branch - New features → PR to next version's `-dev` branch +- Plugin listings → PR to `main`; `plugin-registry.yml` and `docs.yml` publish from `main`. Merge `main` back into the `-dev` branch before each release ## Releasing diff --git a/README.en.md b/README.en.md index d91e36f3..6297866e 100644 --- a/README.en.md +++ b/README.en.md @@ -99,7 +99,7 @@ Start the container: docker compose up -d ``` -Open `http://:7892` and complete the setup wizard. For the 4.0 beta, use the `4.0.0-beta.N` or `dev-latest` tag. For other deployment methods, see the [deployment docs](https://www.autobangumi.org/en/deploy/quick-start.html). +Open `http://:7892` and complete the setup wizard. Before you upgrade from 3.3, read [Upgrade from 3.3 to 4.0](https://www.autobangumi.org/en/deploy/upgrade-4.0). For other deployment methods, see the [deployment docs](https://www.autobangumi.org/en/deploy/quick-start.html). ## Upgrade from 3.x @@ -127,7 +127,7 @@ Issues and pull requests are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) be ## Star History -[![Star History Chart](https://api.star-history.com/svg?repos=EstrellaXD/Auto_Bangumi&type=Date)](https://star-history.com/#EstrellaXD/Auto_Bangumi) +[![Star History Chart](https://star-history.dera.page/svg?repos=EstrellaXD/Auto_Bangumi&type=Date)](https://star-history.dera.page/#EstrellaXD/Auto_Bangumi) ## Licence diff --git a/README.ja.md b/README.ja.md index 890a9297..62e0092f 100644 --- a/README.ja.md +++ b/README.ja.md @@ -95,7 +95,7 @@ services: docker compose up -d ``` -`http://<ホスト>:7892` を開き、セットアップウィザードに従って設定します。4.0 ベータ版には `4.0.0-beta.N` または `dev-latest` タグを使用してください。その他のデプロイ方法は [デプロイドキュメント](https://www.autobangumi.org/ja/deploy/quick-start.html) を参照してください。 +`http://<ホスト>:7892` を開き、セットアップウィザードに従って設定します。3.3 からアップグレードする前に [3.3 から 4.0 へのアップグレード](https://www.autobangumi.org/ja/deploy/upgrade-4.0) を読んでください。その他のデプロイ方法は [デプロイドキュメント](https://www.autobangumi.org/ja/deploy/quick-start.html) を参照してください。 ## 3.x からのアップグレード @@ -123,7 +123,7 @@ Issue や PR を歓迎します。コードを提供する前に [CONTRIBUTING.m ## Star History -[![Star History Chart](https://api.star-history.com/svg?repos=EstrellaXD/Auto_Bangumi&type=Date)](https://star-history.com/#EstrellaXD/Auto_Bangumi) +[![Star History Chart](https://star-history.dera.page/svg?repos=EstrellaXD/Auto_Bangumi&type=Date)](https://star-history.dera.page/#EstrellaXD/Auto_Bangumi) ## Licence diff --git a/README.md b/README.md index 1bc428f7..bb4239db 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ services: docker compose up -d ``` -打开 `http://<主机地址>:7892`,按设置向导完成配置。4.0 测试版请使用 `4.0.0-beta.N` 或 `dev-latest` 标签。更多部署方式见 [部署文档](https://www.autobangumi.org/deploy/quick-start.html)。 +打开 `http://<主机地址>:7892`,按设置向导完成配置。从 3.3 升级前请阅读 [从 3.3 升级到 4.0](https://www.autobangumi.org/deploy/upgrade-4.0)。更多部署方式见 [部署文档](https://www.autobangumi.org/deploy/quick-start.html)。 ## 从 3.x 升级 diff --git a/backend/pyproject.toml b/backend/pyproject.toml index c7116793..3dda0ae0 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "auto-bangumi" -version = "4.0.0-beta.9" +version = "4.0.0" description = "AutoBangumi - Automated anime download manager" requires-python = ">=3.14" dependencies = [ diff --git a/backend/uv.lock b/backend/uv.lock index adc49f0f..b87fb4a0 100644 --- a/backend/uv.lock +++ b/backend/uv.lock @@ -139,7 +139,7 @@ wheels = [ [[package]] name = "auto-bangumi" -version = "4.0.0b9" +version = "4.0.0" source = { virtual = "." } dependencies = [ { name = "anthropic" }, diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 3a79019c..3c2fec84 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,6 +1,6 @@ import { defineConfig } from 'vitepress' -const version = `v3.3.2` +const version = `v4.0.0` // Shared configuration const sharedConfig = { diff --git a/docs/changelog/4.0.md b/docs/changelog/4.0.md index 98963cc5..d22bde6d 100644 --- a/docs/changelog/4.0.md +++ b/docs/changelog/4.0.md @@ -1,8 +1,49 @@ -# [4.0] — Beta +# [4.0] -4.0 是插件化重构的大版本:下载、通知、解析、搜索、重命名与整理都通过同一套扩展点实现,内置功能与第三方插件走相同的接口。下载器可以有多个实例,重命名、硬链接、种子过滤与媒体库刷新由内置插件提供。只支持从 3.3.x 升级,第一次启动时自动迁移配置并备份原文件。 +## 4.0.0 — 插件化重构 -升级步骤、回滚方法与升级后的检查项见 [从 3.3 升级到 4.0](../deploy/upgrade-4.0)。 +4.0 是插件化重构的大版本:下载、通知、解析、搜索、重命名与整理都通过同一套扩展点实现,内置功能与第三方插件走相同的接口。下载器可以有多个实例;重命名、硬链接、种子过滤与媒体库刷新由内置插件提供;新增插件市场。 + +Docker 镜像:`ghcr.io/estrellaxd/auto_bangumi:4.0.0`(Docker Hub:`estrellaxd/auto_bangumi:4.0.0`)。`latest` 现在指向 4.0。 + +### 升级前必读 + +- **只支持从 3.3.x 升级。** 检测到更早版本的数据时拒绝启动,并提示先升级到最新的 3.3.x 启动一次。 +- **使用 `latest` 标签的 3.3 用户,下一次拉取镜像就会升级到 4.0。** 拉取前请备份 `config` 与 `data` 目录。暂时不升级,就把标签固定为 `3.3.7`。 +- **第一次启动自动迁移。** 原配置备份为 `config.json.v3.bak`;数据库升级到 schema v28,3.3 的数据库备份为 `data/data.db.v3.bak`。 +- **应用内更新不能从 3.3 升级到 4.0**,请更换镜像标签。3.3.7 起,3.3 的应用内更新只提供 3.x 版本。 +- 升级步骤、迁移细节与回滚方法见 [从 3.3 升级到 4.0](https://www.autobangumi.org/deploy/upgrade-4.0)。 + +### 破坏性变更 + +- **配置结构。** 下载器改为 `plugins.instances` 中的实例,`plugins.slots.downloader` 指向默认实例;重命名方式与版本冲突策略移到 `plugins.slots.rename_strategy` / `plugins.slots.conflict_policy`。第一次启动时自动迁移。`AB_DOWNLOADER_*`、`AB_DOWNLOAD_PATH`、`AB_METHOD`、`AB_REVISION_CONFLICT_POLICY` 环境变量照常生效。 +- **通知渠道旧字段。** Bark 改用 `device_key`(不再读取 `token`),WeCom 改用 `webhook_url`(不再读取 `chat_id`)。自动迁移。 +- **移除的 API 与配置。** 3.2 兼容的 GET 控制端点(`/api/v1/restart`、`/start`、`/stop`、`/shutdown`)与 `GET /api/v1/auth/refresh_token` 已移除,请改用 POST。移除 `experimental_openai` 配置节、通知的单渠道旧字段与 `normal` 重命名方式(自动改为行为相同的 `none`)。 +- **MCP** 只提供 Streamable HTTP,端点为 `/mcp`;旧的 `/mcp/sse` 已删除,请更新 MCP 客户端的地址。 +- **API。** 带 JSON 请求体的调用必须发送 `Content-Type: application/json`,否则返回 422;未知的 `/api/…` 路径返回 404。 +- **运行环境与插件 SDK。** Docker 镜像使用 Python 3.14,HTTP 客户端换成 httpx2。插件 SDK `ab_sdk` 0.6.0 的 `build_http_client` 返回 `httpx2.AsyncClient`。 + +### 新功能 + +- **插件系统。** 插件可以提供下载器、通知渠道、LLM 解析、搜索站点、元数据源、定时任务、REST 路由、MCP 工具与 WebUI 界面,也可以在 RSS 下载流程中过滤种子、修正解析结果、修改保存路径与请求头。钩子有超时,连续失败 5 次的插件被自动停用。 +- **插件市场。** 新增「插件市场」页面:按分类与状态筛选,安装前确认来源、权限与前端。安装时校验 sha256 与 ed25519 签名。首批上架:Webhook、ntfy、Slack、Synology Chat 与 Apprise 通知,运行外部命令,STRM 文件,NFO 文件,模板重命名,自定义 RSS 站点,手动选种。第三方插件经 PR 上架。 +- **多下载器。** 可以添加多个 qBittorrent、aria2 或插件提供的下载器实例。规则与订阅可以选择下载器;每个种子记录它所在的实例,重命名与删除都在该实例上进行。 +- **重命名与整理。** `pn` / `advance` 由内置插件提供,输出与 3.3 逐字一致;新增 `template` 模板重命名。新增内置插件「硬链接到媒体库」(默认停用)、「媒体库刷新」(Jellyfin / Emby / Plex)与「种子过滤」。 +- **事件与通知。** 系统事件发布到事件总线,插件可以订阅;通知中心改为即时推送。Bark 可以设置铃声、分组、中断级别、图标与点击后打开的地址。 +- **插件开发。** `autobangumi-sdk` 轮子与 `ab-plugin` 命令行(`new` / `validate` / `pack` / `dev`)、契约测试套件、13 个示例插件与插件作者 agent skill,随每个 GitHub Release 发布。文档提供中 / 英 / 日三种语言,见 [插件开发](https://www.autobangumi.org/dev/plugins)。 +- **界面。** 图标换成 Lucide,弹窗与输入框使用统一组件。逐页检查桌面、平板、手机与深色模式,修复 150 余处对齐、溢出与布局问题。 +- **性能。** 下载器页改为虚拟滚动表格:2 万个种子时打开时间从约 15 秒降到 0.2 秒以内,内存从约 3 GB 降到几十 MB。RSS 刷新时每个订阅每轮只拉取一次;事件流流量约减少 80 %;静态文件与 API 启用 gzip;启动更快,内存约少 30 MB。 + +### 相比 3.3 的主要修复 + +- 回滚到 3.3 时不再误跑 3.0 迁移、重建数据库:4.x 把运行版本写入 `config/version_v4.info`。回滚后再升级会重新备份数据库。 +- 从搜索结果建立的订阅不再带入集号,可以收到整季的更新(#1138)。 +- 文件名不需要改变时,下载完成也会发送通知(#1082)。 +- 偏移检测:复扫没有发现偏移时清除旧标记,同一偏移只通知一次(#1072)。 +- 登录成功后页面不跳转、需要手动刷新的问题(#1145)。 +- 一个下载器出错不再中止其它下载器的重命名;任务在两次请求之间被删除时,只跳过这一个任务。 + +每个测试版的完整变更见下文与 [CHANGELOG.md](https://github.com/EstrellaXD/Auto_Bangumi/blob/main/CHANGELOG.md)。 ## 4.0.0-beta.3 @@ -71,7 +112,7 @@ Docker 镜像:`ghcr.io/estrellaxd/auto_bangumi:4.0.0-beta.1`(`dev-latest` - `ab_sdk.testing` 提供下载器、重命名方式、通知渠道、搜索站点的契约测试套件。 - 新增 5 个示例插件(`examples/plugins/`,CI 逐个运行它们的测试):`webhook-on-event`、`custom-rss-site`、`template-rename`、`nfo-writer`、`ntfy-notifier`。 - 新增插件作者 agent skill,随 GitHub Release 以 `autobangumi-plugin-skill-<版本>.zip` 发布。 -- 插件开发文档拆为总览、核心概念与每个扩展点一页(中 / 英 / 日),见 [插件开发](../dev/plugins)。 +- 插件开发文档拆为总览、核心概念与每个扩展点一页(中 / 英 / 日),见 [插件开发](https://www.autobangumi.org/dev/plugins)。 ### 修复 diff --git a/docs/deploy/docker-cli.md b/docs/deploy/docker-cli.md index c4b65d9e..de2a277c 100644 --- a/docs/deploy/docker-cli.md +++ b/docs/deploy/docker-cli.md @@ -1,7 +1,7 @@ # 使用 Docker CLI 部署 -::: tip 4.0 测试版 -本页命令使用 `latest` 标签,安装的是 3.3 正式版。要使用 4.0 测试版,把镜像标签换成 `4.0.0-beta.N`(例如 `4.0.0-beta.1`);挂载卷与环境变量不变。从 3.3 升级前请阅读 [从 3.3 升级到 4.0](./upgrade-4.0)。4.0 的硬链接插件需要把媒体库目录也挂载进容器,见 [番剧管理设置](../config/manager)。 +::: tip 从 3.3 升级 +本页命令使用 `latest` 标签,安装的是 4.0 正式版。正在使用 3.3 时,拉取新镜像前请先阅读 [从 3.3 升级到 4.0](./upgrade-4.0);暂时不升级,就把标签固定为 `3.3.7`。4.0 的硬链接插件需要把媒体库目录也挂载进容器,见 [番剧管理设置](../config/manager)。 ::: ## 新版本说明 diff --git a/docs/deploy/docker-compose.md b/docs/deploy/docker-compose.md index 670145ac..d9880978 100644 --- a/docs/deploy/docker-compose.md +++ b/docs/deploy/docker-compose.md @@ -2,8 +2,8 @@ 使用 `docker-compose.yml` 文件一键部署 **AutoBangumi**。 -::: tip 4.0 测试版 -本页命令使用 `latest` 标签,安装的是 3.3 正式版。要使用 4.0 测试版,把镜像标签换成 `4.0.0-beta.N`(例如 `4.0.0-beta.1`);挂载卷与环境变量不变。从 3.3 升级前请阅读 [从 3.3 升级到 4.0](./upgrade-4.0)。4.0 的硬链接插件需要把媒体库目录也挂载进容器,见 [番剧管理设置](../config/manager)。 +::: tip 从 3.3 升级 +本页命令使用 `latest` 标签,安装的是 4.0 正式版。正在使用 3.3 时,拉取新镜像前请先阅读 [从 3.3 升级到 4.0](./upgrade-4.0);暂时不升级,就把标签固定为 `3.3.7`。4.0 的硬链接插件需要把媒体库目录也挂载进容器,见 [番剧管理设置](../config/manager)。 ::: ## 安装 Docker Compose diff --git a/docs/deploy/dsm.md b/docs/deploy/dsm.md index 56d7ce76..d754872d 100644 --- a/docs/deploy/dsm.md +++ b/docs/deploy/dsm.md @@ -2,8 +2,8 @@ DSM 7.2 支持 Docker Compose,因此我们建议使用 Docker Compose 进行一键部署。 -::: tip 4.0 测试版 -本页使用 `latest` 标签,安装的是 3.3 正式版。要使用 4.0 测试版,把镜像标签换成 `4.0.0-beta.N`(例如 `4.0.0-beta.1`)。从 3.3 升级前请阅读 [从 3.3 升级到 4.0](./upgrade-4.0)。 +::: tip 从 3.3 升级 +本页使用 `latest` 标签,安装的是 4.0 正式版。正在使用 3.3 时,拉取新镜像前请先阅读 [从 3.3 升级到 4.0](./upgrade-4.0);暂时不升级,就把标签固定为 `3.3.7`。 ::: ## 创建配置和数据目录 diff --git a/docs/deploy/quick-start.md b/docs/deploy/quick-start.md index 69b316a0..a05cb720 100644 --- a/docs/deploy/quick-start.md +++ b/docs/deploy/quick-start.md @@ -3,8 +3,8 @@ 我们推荐使用 Docker 部署 AutoBangumi。 部署前,请确保已安装 [Docker Engine][docker-engine] 或 [Docker Desktop][docker-desktop]。 -::: tip 4.0 测试版 -本页命令使用 `latest` 标签,安装的是 3.3 正式版。要使用 4.0 测试版,把镜像标签换成 `4.0.0-beta.N`(例如 `4.0.0-beta.1`);挂载卷与环境变量不变。从 3.3 升级前请阅读 [从 3.3 升级到 4.0](./upgrade-4.0)。4.0 的硬链接插件需要把媒体库目录也挂载进容器,见 [番剧管理设置](../config/manager)。 +::: tip 从 3.3 升级 +本页命令使用 `latest` 标签,安装的是 4.0 正式版。正在使用 3.3 时,拉取新镜像前请先阅读 [从 3.3 升级到 4.0](./upgrade-4.0);暂时不升级,就把标签固定为 `3.3.7`。4.0 的硬链接插件需要把媒体库目录也挂载进容器,见 [番剧管理设置](../config/manager)。 ::: ## 创建数据和配置目录 diff --git a/docs/deploy/upgrade-4.0.md b/docs/deploy/upgrade-4.0.md index f2eaeba5..f7f70c33 100644 --- a/docs/deploy/upgrade-4.0.md +++ b/docs/deploy/upgrade-4.0.md @@ -2,10 +2,6 @@ 4.0 是插件化重构的大版本:下载器改为可以有多个的实例,重命名、硬链接、种子过滤、媒体库刷新改由内置插件提供。第一次启动时,AB 会自动把 3.3 的配置迁移到新位置。本页说明迁移改了什么、如何升级、升级后检查什么,以及如何回滚到 3.3。 -::: warning 4.0 目前是测试版 -4.0 只以 `4.0.0-beta.N` 测试版发布。`latest` 镜像标签在 4.0 正式版发布前仍指向 3.3。生产环境请先完成下面的备份。 -::: - ## 升级前 1. **确认当前版本是 3.3.x。** 4.0 只支持从 3.3.x 升级。检测到更早版本的数据(`config/version.info` 记录的版本低于 3.3,或残留 2.x 的 `data/data.json`)时,AB 拒绝启动,并提示先升级到最新的 3.3.x 启动一次。被拒绝时 `config.json` 可能已经被改写为 4.0 格式,请先用 `config.json.v3.bak` 覆盖它,再换回 3.3.x。 @@ -19,13 +15,13 @@ cp -a ${HOME}/AutoBangumi/data ${HOME}/AutoBangumi/data.bak-3.3 ## 更换镜像标签 -4.0 测试版的镜像标签: +4.0 的镜像标签: | 标签 | 含义 | | --- | --- | -| `4.0.0-beta.N` | 指定的测试版,例如 `4.0.0-beta.1`。**推荐**,升级与回滚都可控 | -| `dev-latest` | 最新推送的测试版。任何 `X.Y.Z-beta.N` 发布都会更新它,不只是 4.0 | -| `latest` | 最新正式版。4.0 正式版发布前仍是 3.3 | +| `4.0.0` | 指定的版本。**推荐**,升级与回滚都可控 | +| `latest` | 最新正式版,现在是 4.0。仍在使用 `latest` 的 3.3 用户,拉取新镜像就会升级到 4.0,请先完成上面的备份 | +| `3.3.7` | 3.3 的最后一个版本。暂时不升级时把标签固定为它 | 镜像同时发布到 `ghcr.io/estrellaxd/auto_bangumi` 与 Docker Hub 的 `estrellaxd/auto_bangumi`。 @@ -34,7 +30,7 @@ Docker Compose:修改 `image` 后重新创建容器。 ```yaml services: AutoBangumi: - image: "ghcr.io/estrellaxd/auto_bangumi:4.0.0-beta.1" + image: "ghcr.io/estrellaxd/auto_bangumi:4.0.0" ``` ```shell @@ -46,9 +42,9 @@ Docker CLI:删除旧容器,用新标签和原来的参数重新运行 `docke 挂载卷(`/app/config`、`/app/data`)、端口与环境变量都没有变化,4.0 没有新增环境变量。插件安装在 `config/plugins/` 下,已经包含在 `/app/config` 卷里。 -### 应用内更新(3.3 测试版渠道) +### 应用内更新 -3.3 中更新渠道选择「测试版」的用户,会在 **设置 → 软件更新** 看到 `4.0.0-beta.N`。4.0 的更新包要求镜像版本不低于 `4.0.0-beta.1`,3.3 镜像上点击 **立即更新** 会失败,提示镜像版本过低、需要拉取新镜像。请按上一节更换镜像标签。选择「稳定版」渠道的用户不会看到 4.0 测试版。 +应用内更新不能把 3.3 升级到 4.0:4.0 的更新包要求镜像版本不低于 `4.0.0-beta.1`。3.3.7 起,**设置 → 软件更新** 在稳定版与测试版渠道都只提供 3.x 版本。更早的 3.3.x 会显示 4.0,点击 **立即更新** 会失败,提示镜像版本过低、需要拉取新镜像。请按上一节更换镜像标签。 ## 第一次启动:配置迁移 diff --git a/docs/dev/plugins/publish.md b/docs/dev/plugins/publish.md index 2cfb7f57..d7733817 100644 --- a/docs/dev/plugins/publish.md +++ b/docs/dev/plugins/publish.md @@ -1,6 +1,6 @@ # 上架插件 -插件的源码留在作者自己的公开 GitHub 仓库。要上架或更新插件,作者向 `EstrellaXD/Auto_Bangumi` 提交一个 PR(目标分支 `4.0-dev`),新增或修改一个文件:`plugins/registry/.toml`。 +插件的源码留在作者自己的公开 GitHub 仓库。要上架或更新插件,作者向 `EstrellaXD/Auto_Bangumi` 提交一个 PR(目标分支 `main`),新增或修改一个文件:`plugins/registry/.toml`。 CI 自动检查这个文件指向的代码。维护者阅读代码后合并。合并后 CI 打包、签名并发布到签名目录。 @@ -45,7 +45,7 @@ sha256 = "<64 位>" # PR 检查打出的 zip 的 sha256;先留空,CI 会 git rev-parse HEAD ``` -5. Fork `EstrellaXD/Auto_Bangumi`,新增 `plugins/registry/.toml`,向 `4.0-dev` 提交 PR。PR 里只能改 `plugins/registry/` 下的文件。在 PR 描述中选用插件模板(`?template=plugin.md`),逐项勾选清单。 +5. Fork `EstrellaXD/Auto_Bangumi`,新增 `plugins/registry/.toml`,向 `main` 提交 PR。PR 里只能改 `plugins/registry/` 下的文件。在 PR 描述中选用插件模板(`?template=plugin.md`),逐项勾选清单。 ## CI 规则 @@ -82,7 +82,7 @@ sha256 = "<64 位>" # PR 检查打出的 zip 的 sha256;先留空,CI 会 1. 在自己的仓库里改代码,并提高 `plugin.toml` 里的 `version`。 2. 推送,用 `git rev-parse HEAD` 取得新的完整 SHA。 -3. 向 `4.0-dev` 提交 PR,把 `plugins/registry/.toml` 里的 `commit` 改成新 SHA,再按 CI 摘要更新 `sha256`。 +3. 向 `main` 提交 PR,把 `plugins/registry/.toml` 里的 `commit` 改成新 SHA,再按 CI 摘要更新 `sha256`。 版本必须高于目录中已有的版本,否则 CI 拒绝。 diff --git a/docs/en/changelog/4.0.md b/docs/en/changelog/4.0.md index 0966116d..afa8d41b 100644 --- a/docs/en/changelog/4.0.md +++ b/docs/en/changelog/4.0.md @@ -1,8 +1,49 @@ -# [4.0] — Beta +# [4.0] -4.0 is a large release that adds plugins. Download, notification, parsing, search, rename, and file organization all use one set of extension points. Built-in features and third-party plugins use the same interfaces. You can have more than one downloader instance. Built-in plugins supply rename, hard links, torrent filters, and media server refresh. You can upgrade only from 3.3.x. At the first start, AB migrates the configuration and keeps a backup of the original file. +## 4.0.0 — Plugin architecture -For the upgrade procedure, the rollback procedure, and the checks after the upgrade, refer to [Upgrade from 3.3 to 4.0](../deploy/upgrade-4.0). +4.0 is a large release that adds plugins. Download, notification, parsing, search, rename, and file organization all use one set of extension points. Built-in features and third-party plugins use the same interfaces. You can have more than one downloader instance. Built-in plugins supply rename, hard links, torrent filters, and media server refresh. A new plugin market lists plugins that you can install. + +Docker image: `ghcr.io/estrellaxd/auto_bangumi:4.0.0` (Docker Hub: `estrellaxd/auto_bangumi:4.0.0`). `latest` now points to 4.0. + +### Read before you upgrade + +- **You can upgrade only from 3.3.x.** If AB finds data from an older version, it does not start. The log tells you to upgrade to the latest 3.3.x and start it once. +- **If a 3.3 installation uses the `latest` tag, the next pull upgrades it to 4.0.** Back up the `config` and `data` directories before you pull. To stay on 3.3 for now, set the tag to `3.3.7`. +- **The first start migrates your data.** AB keeps the original configuration as `config.json.v3.bak`. It upgrades the database to schema v28 and keeps the 3.3 database as `data/data.db.v3.bak`. +- **The in-app update cannot upgrade 3.3 to 4.0.** Change the image tag. From 3.3.7, the 3.3 in-app update offers only 3.x versions. +- For the upgrade procedure, the migration details, and the rollback procedure, refer to [Upgrade from 3.3 to 4.0](https://www.autobangumi.org/en/deploy/upgrade-4.0). + +### Breaking changes + +- **Configuration structure.** Downloaders are now instances in `plugins.instances`, and `plugins.slots.downloader` points to the default instance. The rename method and the revision conflict policy moved to `plugins.slots.rename_strategy` and `plugins.slots.conflict_policy`. AB migrates these at the first start. The environment variables `AB_DOWNLOADER_*`, `AB_DOWNLOAD_PATH`, `AB_METHOD`, and `AB_REVISION_CONFLICT_POLICY` continue to work. +- **Old notification fields.** Bark uses `device_key` and no longer reads `token`. WeCom uses `webhook_url` and no longer reads `chat_id`. AB migrates them. +- **Removed API and configuration.** The 3.2-compatible GET control endpoints (`/api/v1/restart`, `/start`, `/stop`, `/shutdown`) and `GET /api/v1/auth/refresh_token` are removed. Use POST. The `experimental_openai` section, the old single-channel notification fields, and the `normal` rename method are removed. AB changes `normal` to `none`, which has the same behavior. +- **MCP** uses only Streamable HTTP at `/mcp`. The old `/mcp/sse` endpoint is removed. Update the address in your MCP client. +- **API.** A call with a JSON body must send `Content-Type: application/json`, or it gets 422. An unknown `/api/…` path returns 404. +- **Runtime and plugin SDK.** The Docker image uses Python 3.14, and the HTTP client is now httpx2. In plugin SDK `ab_sdk` 0.6.0, `build_http_client` returns `httpx2.AsyncClient`. + +### New features + +- **Plugin system.** Plugins can supply downloaders, notification channels, LLM parsing, search sites, metadata sources, scheduled tasks, REST routes, MCP tools, and WebUI screens. In the RSS download flow, they can filter torrents, correct parse results, and change the save path and request headers. Hooks have a timeout. AB disables a plugin after 5 failures in a row. +- **Plugin market.** A new Plugin Market page filters by category and status. Before an install, it shows the source, the permissions, and the frontend. AB checks the sha256 and the ed25519 signature at install. The first listings: Webhook, ntfy, Slack, Synology Chat, and Apprise notifications, run an external command, STRM files, NFO files, template rename, a custom RSS site, and manual pick. Third-party plugins are listed through a PR. +- **More than one downloader.** You can add qBittorrent, aria2, or plugin downloader instances. Rules and subscriptions can select a downloader. Each torrent records its instance, and AB renames and deletes it on that instance. +- **Rename and organization.** A built-in plugin supplies `pn` and `advance`, with the same output as 3.3. The new `template` method uses a template for file names. New built-in plugins: Hard link to media library (off by default), Media server refresh (Jellyfin, Emby, Plex), and Torrent filter. +- **Events and notifications.** AB publishes system events on an event bus that plugins can subscribe to. The notification center now updates immediately. Bark can set the sound, group, interruption level, icon, and the address to open. +- **Plugin development.** The `autobangumi-sdk` wheel with the `ab-plugin` command line (`new`, `validate`, `pack`, `dev`), contract test suites, 13 example plugins, and an agent skill for plugin authors are attached to each GitHub release. The documentation is in Chinese, English, and Japanese. Refer to [Plugin Development](https://www.autobangumi.org/en/dev/plugins). +- **Interface.** The icons are now Lucide, and dialogs and inputs use the same components. A page-by-page check on desktop, tablet, phone, and dark mode fixed more than 150 alignment, overflow, and layout problems. +- **Performance.** The downloader page is now one virtual-scroll table. With 20,000 torrents, it opens in less than 0.2 s instead of approximately 15 s, and uses tens of MB instead of approximately 3 GB. An RSS refresh fetches each subscription once per round. The event stream sends approximately 80 % less data. Static files and API responses use gzip. AB starts faster and uses approximately 30 MB less memory. + +### Main fixes since 3.3 + +- A rollback to 3.3 no longer runs the 3.0 migration and rebuilds the database: 4.x writes its version to `config/version_v4.info`. An upgrade after a rollback makes a new database backup. +- A subscription made from search results no longer keeps the episode in its keywords, so it gets the whole season (#1138). +- AB sends the download-complete notification also when the file name does not need to change (#1082). +- Offset check: a scan that finds no offset clears the old mark, and AB notifies about the same offset only once (#1072). +- After a successful login, the page now opens without a manual reload (#1145). +- A failure on one downloader no longer stops renames on the others. If a task is deleted between two requests, AB skips only that task. + +For all changes in each beta, refer to the sections below and to [CHANGELOG.md](https://github.com/EstrellaXD/Auto_Bangumi/blob/main/CHANGELOG.md). ## 4.0.0-beta.3 @@ -71,7 +112,7 @@ Docker image: `ghcr.io/estrellaxd/auto_bangumi:4.0.0-beta.1`. `dev-latest` also - `ab_sdk.testing` has contract test suites for downloaders, rename methods, notification channels, and search sites. - 5 new example plugins in `examples/plugins/`: `webhook-on-event`, `custom-rss-site`, `template-rename`, `nfo-writer`, and `ntfy-notifier`. CI runs the tests of each one. - New agent skill for plugin authors, on each GitHub Release as `autobangumi-plugin-skill-.zip`. -- The plugin development documentation now has an overview, core concepts, and one page for each extension point, in Chinese, English, and Japanese. Refer to [Plugin Development](../dev/plugins). +- The plugin development documentation now has an overview, core concepts, and one page for each extension point, in Chinese, English, and Japanese. Refer to [Plugin Development](https://www.autobangumi.org/en/dev/plugins). ### Fixes diff --git a/docs/en/deploy/docker-cli.md b/docs/en/deploy/docker-cli.md index d7107cb8..bc4a4316 100644 --- a/docs/en/deploy/docker-cli.md +++ b/docs/en/deploy/docker-cli.md @@ -1,7 +1,7 @@ # Deploy with Docker CLI -::: tip 4.0 beta -The commands on this page use the `latest` tag, which installs the 3.3 stable release. To use the 4.0 beta, change the image tag to `4.0.0-beta.N` (for example `4.0.0-beta.1`). The volumes and the environment variables do not change. Before you upgrade from 3.3, read [Upgrade from 3.3 to 4.0](./upgrade-4.0). The 4.0 hard link plugin also needs the media library directory mounted into the container. Refer to [Bangumi Manager](../config/manager). +::: tip Upgrade from 3.3 +The commands on this page use the `latest` tag, which installs the 4.0 stable release. If you use 3.3 now, read [Upgrade from 3.3 to 4.0](./upgrade-4.0) before you pull the new image. To stay on 3.3, set the tag to `3.3.7`. The 4.0 hard link plugin also needs the media library directory mounted into the container. Refer to [Bangumi Manager](../config/manager). ::: ## Note on New Versions diff --git a/docs/en/deploy/docker-compose.md b/docs/en/deploy/docker-compose.md index 071f7aac..80ecdd16 100644 --- a/docs/en/deploy/docker-compose.md +++ b/docs/en/deploy/docker-compose.md @@ -2,8 +2,8 @@ A one-click deployment method for **AutoBangumi** using a `docker-compose.yml` file. -::: tip 4.0 beta -The commands on this page use the `latest` tag, which installs the 3.3 stable release. To use the 4.0 beta, change the image tag to `4.0.0-beta.N` (for example `4.0.0-beta.1`). The volumes and the environment variables do not change. Before you upgrade from 3.3, read [Upgrade from 3.3 to 4.0](./upgrade-4.0). The 4.0 hard link plugin also needs the media library directory mounted into the container. Refer to [Bangumi Manager](../config/manager). +::: tip Upgrade from 3.3 +The commands on this page use the `latest` tag, which installs the 4.0 stable release. If you use 3.3 now, read [Upgrade from 3.3 to 4.0](./upgrade-4.0) before you pull the new image. To stay on 3.3, set the tag to `3.3.7`. The 4.0 hard link plugin also needs the media library directory mounted into the container. Refer to [Bangumi Manager](../config/manager). ::: ## Install Docker Compose diff --git a/docs/en/deploy/dsm.md b/docs/en/deploy/dsm.md index e0a74baa..d6fe381f 100644 --- a/docs/en/deploy/dsm.md +++ b/docs/en/deploy/dsm.md @@ -2,8 +2,8 @@ DSM 7.2 supports Docker Compose, so we recommend using Docker Compose for one-click deployment. -::: tip 4.0 beta -This page uses the `latest` tag, which installs the 3.3 stable release. To use the 4.0 beta, change the image tag to `4.0.0-beta.N` (for example `4.0.0-beta.1`). Before you upgrade from 3.3, read [Upgrade from 3.3 to 4.0](./upgrade-4.0). +::: tip Upgrade from 3.3 +This page uses the `latest` tag, which installs the 4.0 stable release. If you use 3.3 now, read [Upgrade from 3.3 to 4.0](./upgrade-4.0) before you pull the new image. To stay on 3.3, set the tag to `3.3.7`. ::: ## Create Configuration and Data Directories diff --git a/docs/en/deploy/quick-start.md b/docs/en/deploy/quick-start.md index d7570e50..98a8a0c7 100644 --- a/docs/en/deploy/quick-start.md +++ b/docs/en/deploy/quick-start.md @@ -3,8 +3,8 @@ We recommend deploying AutoBangumi in Docker. Before deployment, make sure you have [Docker Engine][docker-engine] or [Docker Desktop][docker-desktop] installed. -::: tip 4.0 beta -The commands on this page use the `latest` tag, which installs the 3.3 stable release. To use the 4.0 beta, change the image tag to `4.0.0-beta.N` (for example `4.0.0-beta.1`). The volumes and the environment variables do not change. Before you upgrade from 3.3, read [Upgrade from 3.3 to 4.0](./upgrade-4.0). The 4.0 hard link plugin also needs the media library directory mounted into the container. Refer to [Bangumi Manager](../config/manager). +::: tip Upgrade from 3.3 +The commands on this page use the `latest` tag, which installs the 4.0 stable release. If you use 3.3 now, read [Upgrade from 3.3 to 4.0](./upgrade-4.0) before you pull the new image. To stay on 3.3, set the tag to `3.3.7`. The 4.0 hard link plugin also needs the media library directory mounted into the container. Refer to [Bangumi Manager](../config/manager). ::: ## Create Data and Configuration Directories diff --git a/docs/en/deploy/upgrade-4.0.md b/docs/en/deploy/upgrade-4.0.md index 543fdc28..9a65b80b 100644 --- a/docs/en/deploy/upgrade-4.0.md +++ b/docs/en/deploy/upgrade-4.0.md @@ -2,10 +2,6 @@ 4.0 is a large release that adds plugins. You can now have more than one downloader instance. Built-in plugins now supply rename, hard links, torrent filters, and media server refresh. At the first start, AB moves the 3.3 configuration to the new locations. This page tells what the migration changes, how to upgrade, what to check after the upgrade, and how to roll back to 3.3. -::: warning 4.0 is a beta -4.0 is only available as `4.0.0-beta.N` beta releases. Until the 4.0 stable release, the `latest` image tag continues to point to 3.3. Make the backups below before you upgrade a production system. -::: - ## Before you upgrade 1. **Make sure that you use 3.3.x.** You can upgrade to 4.0 only from 3.3.x. AB does not start if it finds data from an older version: a version below 3.3 in `config/version.info`, or a 2.x `data/data.json` file. The log tells you to upgrade to the latest 3.3.x and start it once. At that time, AB can already have changed `config.json` to the 4.0 format. Copy `config.json.v3.bak` back to `config.json` before you go back to 3.3.x. @@ -19,13 +15,13 @@ cp -a ${HOME}/AutoBangumi/data ${HOME}/AutoBangumi/data.bak-3.3 ## Change the image tag -Image tags for the 4.0 beta: +Image tags for 4.0: | Tag | Meaning | | --- | --- | -| `4.0.0-beta.N` | One specified beta, for example `4.0.0-beta.1`. **Recommended**: you control when you upgrade and roll back | -| `dev-latest` | The most recent beta. Each `X.Y.Z-beta.N` release moves this tag, not only 4.0 releases | -| `latest` | The most recent stable release. This is 3.3 until the 4.0 stable release | +| `4.0.0` | One specified version. **Recommended**: you control when you upgrade and roll back | +| `latest` | The most recent stable release, which is now 4.0. If a 3.3 installation uses `latest`, the next pull upgrades it to 4.0. Make the backups above first | +| `3.3.7` | The last 3.3 release. Set the tag to it to stay on 3.3 for now | The images are on `ghcr.io/estrellaxd/auto_bangumi` and on Docker Hub as `estrellaxd/auto_bangumi`. @@ -34,7 +30,7 @@ Docker Compose: change `image`, then create the container again. ```yaml services: AutoBangumi: - image: "ghcr.io/estrellaxd/auto_bangumi:4.0.0-beta.1" + image: "ghcr.io/estrellaxd/auto_bangumi:4.0.0" ``` ```shell @@ -46,9 +42,9 @@ Docker CLI: remove the old container. Then run `docker run` again with the new t The volumes (`/app/config`, `/app/data`), the port, and the environment variables do not change. 4.0 adds no environment variables. AB installs plugins in `config/plugins/`, which is in the `/app/config` volume. -### In-app update (3.3 beta channel) +### In-app update -If you selected the beta update channel in 3.3, **Settings → Software Update** shows `4.0.0-beta.N`. 4.0 update bundles need image version `4.0.0-beta.1` or later. On a 3.3 image, **Update now** fails with a message that the image is too old and that you must pull a newer image. Change the image tag as the previous section tells you. Users on the stable channel do not see 4.0 betas. +The in-app update cannot upgrade 3.3 to 4.0: 4.0 update bundles need image version `4.0.0-beta.1` or later. From 3.3.7, **Settings → Software Update** offers only 3.x versions, on the stable and on the beta channel. Earlier 3.3.x versions show 4.0, and **Update now** fails with a message that the image is too old and that you must pull a newer image. Change the image tag as the previous section tells you. ## First start: configuration migration diff --git a/docs/en/dev/plugins/publish.md b/docs/en/dev/plugins/publish.md index 6d477495..ca0b213c 100644 --- a/docs/en/dev/plugins/publish.md +++ b/docs/en/dev/plugins/publish.md @@ -1,6 +1,6 @@ # List a Plugin -The source of a plugin stays in the author's own public GitHub repository. To list or update a plugin, the author opens a PR to `EstrellaXD/Auto_Bangumi` (base branch `4.0-dev`). The PR adds or edits one file: `plugins/registry/.toml`. +The source of a plugin stays in the author's own public GitHub repository. To list or update a plugin, the author opens a PR to `EstrellaXD/Auto_Bangumi` (base branch `main`). The PR adds or edits one file: `plugins/registry/.toml`. CI checks the code that this file points to. A maintainer reads the code and merges. After the merge, CI packs and signs the plugin and publishes it to the signed catalog. @@ -45,7 +45,7 @@ A PR can change several entries. We recommend one plugin per PR. git rev-parse HEAD ``` -5. Fork `EstrellaXD/Auto_Bangumi`, add `plugins/registry/.toml`, and open a PR to `4.0-dev`. Change only files under `plugins/registry/`. In the PR description, use the plugin template (`?template=plugin.md`) and tick each item. +5. Fork `EstrellaXD/Auto_Bangumi`, add `plugins/registry/.toml`, and open a PR to `main`. Change only files under `plugins/registry/`. In the PR description, use the plugin template (`?template=plugin.md`) and tick each item. ## CI rules @@ -82,7 +82,7 @@ A user sees the new plugin or version through `GET /api/v1/plugins/catalog`. For 1. Change the code in your repository and raise `version` in `plugin.toml`. 2. Push, then get the new full SHA with `git rev-parse HEAD`. -3. Open a PR to `4.0-dev`. In `plugins/registry/.toml`, change `commit` to the new SHA, then set `sha256` to the value from the CI summary. +3. Open a PR to `main`. In `plugins/registry/.toml`, change `commit` to the new SHA, then set `sha256` to the value from the CI summary. The version must be higher than the listed version. If not, CI rejects the PR. diff --git a/docs/ja/changelog/4.0.md b/docs/ja/changelog/4.0.md index f242e1f5..1b45cb7a 100644 --- a/docs/ja/changelog/4.0.md +++ b/docs/ja/changelog/4.0.md @@ -1,8 +1,49 @@ -# [4.0] — Beta +# [4.0] -4.0 はプラグイン化のための大型リリースです。ダウンロード、通知、解析、検索、リネーム、ファイル整理はすべて同じ拡張ポイントで実装され、内蔵機能とサードパーティープラグインは同じインターフェースを使います。ダウンローダーは複数のインスタンスを持てるようになり、リネーム、ハードリンク、トレントフィルター、メディアサーバーの更新は内蔵プラグインが提供します。アップグレードは 3.3.x からのみ対応し、初回起動時に設定を自動移行して元のファイルをバックアップします。 +## 4.0.0 — プラグイン化 -アップグレード手順、ロールバック方法、アップグレード後の確認項目は [3.3 から 4.0 へのアップグレード](../deploy/upgrade-4.0) を参照してください。 +4.0 はプラグイン化のための大型リリースです。ダウンロード、通知、解析、検索、リネーム、ファイル整理はすべて同じ拡張ポイントで実装され、内蔵機能とサードパーティープラグインは同じインターフェースを使います。ダウンローダーは複数のインスタンスを持てます。リネーム、ハードリンク、トレントフィルター、メディアサーバーの更新は内蔵プラグインが提供します。プラグインマーケットが追加されました。 + +Docker イメージ:`ghcr.io/estrellaxd/auto_bangumi:4.0.0`(Docker Hub:`estrellaxd/auto_bangumi:4.0.0`)。`latest` は 4.0 を指すようになりました。 + +### アップグレード前に読んでください + +- **アップグレードは 3.3.x からのみ対応します。** それより前のバージョンのデータがあると起動せず、最新の 3.3.x にアップグレードして一度起動するよう求めます。 +- **`latest` タグを使っている 3.3 の環境は、次の pull で 4.0 にアップグレードされます。** pull の前に `config` と `data` フォルダーをバックアップしてください。当面 3.3 を使い続ける場合は、タグを `3.3.7` に固定してください。 +- **初回起動時に自動で移行します。** 元の設定は `config.json.v3.bak` に保存されます。データベースは schema v28 に更新され、3.3 のデータベースは `data/data.db.v3.bak` に保存されます。 +- **アプリ内更新では 3.3 から 4.0 にアップグレードできません。** イメージタグを変更してください。3.3.7 以降、3.3 のアプリ内更新は 3.x のバージョンだけを表示します。 +- アップグレード手順、移行の詳細、ロールバック方法は [3.3 から 4.0 へのアップグレード](https://www.autobangumi.org/ja/deploy/upgrade-4.0) を参照してください。 + +### 互換性のない変更 + +- **設定の構造。** ダウンローダーは `plugins.instances` のインスタンスになり、`plugins.slots.downloader` が既定のインスタンスを指します。リネーム方式とリビジョン競合ポリシーは `plugins.slots.rename_strategy` / `plugins.slots.conflict_policy` に移りました。初回起動時に自動で移行します。環境変数 `AB_DOWNLOADER_*`、`AB_DOWNLOAD_PATH`、`AB_METHOD`、`AB_REVISION_CONFLICT_POLICY` は引き続き使えます。 +- **通知チャンネルの古いフィールド。** Bark は `device_key` を使い、`token` を読みません。WeCom は `webhook_url` を使い、`chat_id` を読みません。自動で移行します。 +- **削除された API と設定。** 3.2 互換の GET 制御エンドポイント(`/api/v1/restart`、`/start`、`/stop`、`/shutdown`)と `GET /api/v1/auth/refresh_token` は削除されました。POST を使ってください。`experimental_openai` セクション、通知の単一チャンネル用の古いフィールド、`normal` リネーム方式(同じ動作の `none` に自動変更)も削除されました。 +- **MCP** は Streamable HTTP のみで、エンドポイントは `/mcp` です。古い `/mcp/sse` は削除されました。MCP クライアントのアドレスを更新してください。 +- **API。** JSON の本文を持つ呼び出しは `Content-Type: application/json` を送る必要があり、送らないと 422 を返します。不明な `/api/…` パスは 404 を返します。 +- **実行環境とプラグイン SDK。** Docker イメージは Python 3.14 を使い、HTTP クライアントは httpx2 になりました。プラグイン SDK `ab_sdk` 0.6.0 の `build_http_client` は `httpx2.AsyncClient` を返します。 + +### 新機能 + +- **プラグインシステム。** プラグインはダウンローダー、通知チャンネル、LLM 解析、検索サイト、メタデータソース、定期タスク、REST ルート、MCP ツール、WebUI の画面を提供できます。RSS のダウンロード処理では、トレントのフィルター、解析結果の修正、保存先とリクエストヘッダーの変更ができます。フックにはタイムアウトがあり、5 回続けて失敗したプラグインは自動で無効になります。 +- **プラグインマーケット。** 新しい「プラグインマーケット」ページで、カテゴリーと状態で絞り込めます。インストール前に提供元、権限、フロントエンドを確認でき、インストール時に sha256 と ed25519 署名を検証します。最初の掲載:Webhook、ntfy、Slack、Synology Chat、Apprise の通知、外部コマンドの実行、STRM ファイル、NFO ファイル、テンプレートリネーム、カスタム RSS サイト、手動選択。サードパーティーのプラグインは PR で掲載します。 +- **複数のダウンローダー。** qBittorrent、aria2、またはプラグインのダウンローダーのインスタンスを複数追加できます。ルールと購読はダウンローダーを選べます。各トレントは所属するインスタンスを記録し、リネームと削除はそのインスタンスで行います。 +- **リネームと整理。** `pn` / `advance` は内蔵プラグインが提供し、出力は 3.3 と同じです。新しい `template` 方式ではテンプレートでファイル名を決められます。新しい内蔵プラグイン:「メディアライブラリへのハードリンク」(既定は無効)、「メディアサーバーの更新」(Jellyfin / Emby / Plex)、「トレントフィルター」。 +- **イベントと通知。** システムイベントはイベントバスに送られ、プラグインが購読できます。通知センターはすぐに更新されるようになりました。Bark では着信音、グループ、割り込みレベル、アイコン、開くアドレスを設定できます。 +- **プラグイン開発。** `autobangumi-sdk` の wheel と `ab-plugin` コマンドライン(`new` / `validate` / `pack` / `dev`)、コントラクトテスト、13 個のサンプルプラグイン、プラグイン作者向けの agent skill を各 GitHub Release に添付します。ドキュメントは中国語 / 英語 / 日本語で、[プラグイン開発](https://www.autobangumi.org/ja/dev/plugins) を参照してください。 +- **画面。** アイコンを Lucide に変え、ダイアログと入力欄は共通のコンポーネントを使います。デスクトップ、タブレット、スマートフォン、ダークモードをページごとに確認し、150 か所以上の位置ずれ、はみ出し、レイアウトの問題を直しました。 +- **パフォーマンス。** ダウンローダーページは仮想スクロールの表 1 つになりました。2 万件のトレントで、開く時間は約 15 秒から 0.2 秒未満に、メモリは約 3 GB から数十 MB になりました。RSS の更新では購読ごとに 1 回だけ取得します。イベントストリームの通信量は約 80 % 減りました。静的ファイルと API は gzip を使います。起動が速くなり、メモリは約 30 MB 減りました。 + +### 3.3 からの主な修正 + +- 3.3 にロールバックしたときに 3.0 の移行が実行されてデータベースが作り直される問題を修正しました。4.x は実行バージョンを `config/version_v4.info` に書き込みます。ロールバック後に再びアップグレードすると、データベースのバックアップを作り直します。 +- 検索結果から作った購読のキーワードに話数が残らなくなり、シーズン全体の更新を受け取れます(#1138)。 +- ファイル名を変える必要がない場合も、ダウンロード完了の通知を送ります(#1082)。 +- オフセット検出:再スキャンでオフセットが見つからない場合は古い印を消し、同じオフセットの通知は 1 回だけにしました(#1072)。 +- ログイン成功後にページが切り替わらず、手動で再読み込みが必要な問題を修正しました(#1145)。 +- 1 つのダウンローダーのエラーで、ほかのダウンローダーのリネームが止まらなくなりました。2 回のリクエストの間にタスクが削除された場合は、そのタスクだけをスキップします。 + +各ベータ版のすべての変更は、以下の各セクションと [CHANGELOG.md](https://github.com/EstrellaXD/Auto_Bangumi/blob/main/CHANGELOG.md) を参照してください。 ## 4.0.0-beta.3 @@ -71,7 +112,7 @@ Docker イメージ:`ghcr.io/estrellaxd/auto_bangumi:4.0.0-beta.1`(`dev-late - `ab_sdk.testing` にダウンローダー、リネーム方式、通知チャンネル、検索サイトの契約テストスイートを追加しました。 - `examples/plugins/` に 5 つのサンプルプラグインを追加しました:`webhook-on-event`、`custom-rss-site`、`template-rename`、`nfo-writer`、`ntfy-notifier`。CI がそれぞれのテストを実行します。 - プラグイン作者向けの agent skill を各 GitHub Release に `autobangumi-plugin-skill-<バージョン>.zip` として添付します。 -- プラグイン開発ドキュメントを概要、基本概念、拡張ポイントごとのページに分けました(中国語 / 英語 / 日本語)。[プラグイン開発](../dev/plugins) を参照してください。 +- プラグイン開発ドキュメントを概要、基本概念、拡張ポイントごとのページに分けました(中国語 / 英語 / 日本語)。[プラグイン開発](https://www.autobangumi.org/ja/dev/plugins) を参照してください。 ### 修正 diff --git a/docs/ja/deploy/docker-cli.md b/docs/ja/deploy/docker-cli.md index 69d2b3c1..79e6cdac 100644 --- a/docs/ja/deploy/docker-cli.md +++ b/docs/ja/deploy/docker-cli.md @@ -1,7 +1,7 @@ # Docker CLIでデプロイ -::: tip 4.0 ベータ版 -このページのコマンドは `latest` タグを使い、3.3 の正式版をインストールします。4.0 ベータ版を使うには、イメージタグを `4.0.0-beta.N`(例:`4.0.0-beta.1`)に変更してください。ボリュームと環境変数は変わりません。3.3 からアップグレードする前に [3.3 から 4.0 へのアップグレード](./upgrade-4.0) を読んでください。4.0 のハードリンクプラグインを使う場合は、メディアライブラリのフォルダーもコンテナにマウントする必要があります。[アニメ管理設定](../config/manager) を参照してください。 +::: tip 3.3 からのアップグレード +このページのコマンドは `latest` タグを使い、4.0 の正式版をインストールします。現在 3.3 を使っている場合は、新しいイメージを取得する前に [3.3 から 4.0 へのアップグレード](./upgrade-4.0) を読んでください。3.3 のままにする場合は、タグを `3.3.7` に固定してください。4.0 のハードリンクプラグインを使う場合は、メディアライブラリのフォルダーもコンテナにマウントする必要があります。[アニメ管理設定](../config/manager) を参照してください。 ::: ## 新バージョンに関する注意 diff --git a/docs/ja/deploy/docker-compose.md b/docs/ja/deploy/docker-compose.md index d4d6c7b6..94a8a824 100644 --- a/docs/ja/deploy/docker-compose.md +++ b/docs/ja/deploy/docker-compose.md @@ -2,8 +2,8 @@ `docker-compose.yml`ファイルを使用した**AutoBangumi**のワンクリックデプロイ方法です。 -::: tip 4.0 ベータ版 -このページのコマンドは `latest` タグを使い、3.3 の正式版をインストールします。4.0 ベータ版を使うには、イメージタグを `4.0.0-beta.N`(例:`4.0.0-beta.1`)に変更してください。ボリュームと環境変数は変わりません。3.3 からアップグレードする前に [3.3 から 4.0 へのアップグレード](./upgrade-4.0) を読んでください。4.0 のハードリンクプラグインを使う場合は、メディアライブラリのフォルダーもコンテナにマウントする必要があります。[アニメ管理設定](../config/manager) を参照してください。 +::: tip 3.3 からのアップグレード +このページのコマンドは `latest` タグを使い、4.0 の正式版をインストールします。現在 3.3 を使っている場合は、新しいイメージを取得する前に [3.3 から 4.0 へのアップグレード](./upgrade-4.0) を読んでください。3.3 のままにする場合は、タグを `3.3.7` に固定してください。4.0 のハードリンクプラグインを使う場合は、メディアライブラリのフォルダーもコンテナにマウントする必要があります。[アニメ管理設定](../config/manager) を参照してください。 ::: ## Docker Composeのインストール diff --git a/docs/ja/deploy/dsm.md b/docs/ja/deploy/dsm.md index 119725ad..18824910 100644 --- a/docs/ja/deploy/dsm.md +++ b/docs/ja/deploy/dsm.md @@ -2,8 +2,8 @@ DSM 7.2はDocker Composeをサポートしているため、ワンクリックデプロイにDocker Composeの使用を推奨します。 -::: tip 4.0 ベータ版 -このページは `latest` タグを使い、3.3 の正式版をインストールします。4.0 ベータ版を使うには、イメージタグを `4.0.0-beta.N`(例:`4.0.0-beta.1`)に変更してください。3.3 からアップグレードする前に [3.3 から 4.0 へのアップグレード](./upgrade-4.0) を読んでください。 +::: tip 3.3 からのアップグレード +このページは `latest` タグを使い、4.0 の正式版をインストールします。現在 3.3 を使っている場合は、新しいイメージを取得する前に [3.3 から 4.0 へのアップグレード](./upgrade-4.0) を読んでください。3.3 のままにする場合は、タグを `3.3.7` に固定してください。 ::: ## 設定とデータディレクトリの作成 diff --git a/docs/ja/deploy/quick-start.md b/docs/ja/deploy/quick-start.md index faa8ba31..1c1aeae7 100644 --- a/docs/ja/deploy/quick-start.md +++ b/docs/ja/deploy/quick-start.md @@ -3,8 +3,8 @@ AutoBangumiはDockerでのデプロイを推奨しています。 デプロイ前に、[Docker Engine][docker-engine]または[Docker Desktop][docker-desktop]がインストールされていることを確認してください。 -::: tip 4.0 ベータ版 -このページのコマンドは `latest` タグを使い、3.3 の正式版をインストールします。4.0 ベータ版を使うには、イメージタグを `4.0.0-beta.N`(例:`4.0.0-beta.1`)に変更してください。ボリュームと環境変数は変わりません。3.3 からアップグレードする前に [3.3 から 4.0 へのアップグレード](./upgrade-4.0) を読んでください。4.0 のハードリンクプラグインを使う場合は、メディアライブラリのフォルダーもコンテナにマウントする必要があります。[アニメ管理設定](../config/manager) を参照してください。 +::: tip 3.3 からのアップグレード +このページのコマンドは `latest` タグを使い、4.0 の正式版をインストールします。現在 3.3 を使っている場合は、新しいイメージを取得する前に [3.3 から 4.0 へのアップグレード](./upgrade-4.0) を読んでください。3.3 のままにする場合は、タグを `3.3.7` に固定してください。4.0 のハードリンクプラグインを使う場合は、メディアライブラリのフォルダーもコンテナにマウントする必要があります。[アニメ管理設定](../config/manager) を参照してください。 ::: ## データと設定ディレクトリの作成 diff --git a/docs/ja/deploy/upgrade-4.0.md b/docs/ja/deploy/upgrade-4.0.md index 294af6dc..b02adc18 100644 --- a/docs/ja/deploy/upgrade-4.0.md +++ b/docs/ja/deploy/upgrade-4.0.md @@ -2,10 +2,6 @@ 4.0 はプラグイン化のための大型リリースです。ダウンローダーは複数のインスタンスを持てるようになり、リネーム、ハードリンク、トレントフィルター、メディアサーバーの更新は内蔵プラグインが提供します。初回起動時に、AB は 3.3 の設定を新しい場所へ自動的に移行します。このページでは、移行で何が変わるか、アップグレード手順、アップグレード後の確認項目、3.3 へのロールバック方法を説明します。 -::: warning 4.0 はベータ版です -4.0 は `4.0.0-beta.N` のベータ版としてのみ公開されています。4.0 正式版の公開までは、`latest` イメージタグは 3.3 を指します。本番環境では、先に下記のバックアップを取ってください。 -::: - ## アップグレードの前に 1. **現在のバージョンが 3.3.x であることを確認します。** 4.0 へは 3.3.x からのみアップグレードできます。古いバージョンのデータ(`config/version.info` の記録が 3.3 未満、または 2.x の `data/data.json` が残っている)を検出すると、AB は起動を拒否し、最新の 3.3.x に一度アップグレードして起動するよう案内します。このとき `config.json` はすでに 4.0 形式に書き換えられている場合があります。3.3.x に戻す前に、`config.json.v3.bak` で `config.json` を上書きしてください。 @@ -19,13 +15,13 @@ cp -a ${HOME}/AutoBangumi/data ${HOME}/AutoBangumi/data.bak-3.3 ## イメージタグの変更 -4.0 ベータ版のイメージタグ: +4.0 のイメージタグ: | タグ | 意味 | | --- | --- | -| `4.0.0-beta.N` | 指定したベータ版。例:`4.0.0-beta.1`。アップグレードとロールバックを管理しやすいため**推奨** | -| `dev-latest` | 最新のベータ版。4.0 に限らず、すべての `X.Y.Z-beta.N` リリースで更新されます | -| `latest` | 最新の正式版。4.0 正式版の公開までは 3.3 です | +| `4.0.0` | 指定したバージョン。アップグレードとロールバックを管理しやすいため**推奨** | +| `latest` | 最新の正式版で、現在は 4.0 です。`latest` を使っている 3.3 の環境は、次の pull で 4.0 にアップグレードされます。先に上記のバックアップを取ってください | +| `3.3.7` | 3.3 の最後のリリース。当面 3.3 を使い続ける場合はこのタグに固定してください | イメージは `ghcr.io/estrellaxd/auto_bangumi` と Docker Hub の `estrellaxd/auto_bangumi` に公開されます。 @@ -34,7 +30,7 @@ Docker Compose:`image` を変更し、コンテナを作り直します。 ```yaml services: AutoBangumi: - image: "ghcr.io/estrellaxd/auto_bangumi:4.0.0-beta.1" + image: "ghcr.io/estrellaxd/auto_bangumi:4.0.0" ``` ```shell @@ -46,9 +42,9 @@ Docker CLI:古いコンテナを削除し、新しいタグと同じオプシ ボリューム(`/app/config`、`/app/data`)、ポート、環境変数は変わりません。4.0 で追加された環境変数はありません。プラグインは `config/plugins/` にインストールされ、`/app/config` ボリュームに含まれます。 -### アプリ内更新(3.3 のベータチャンネル) +### アプリ内更新 -3.3 で更新チャンネルにベータ版を選んでいる場合、**設定 → ソフトウェア更新** に `4.0.0-beta.N` が表示されます。4.0 の更新パッケージはイメージバージョン `4.0.0-beta.1` 以上を必要とします。3.3 のイメージで **今すぐ更新** を押すと、イメージが古いため新しいイメージを pull するよう求めるエラーで失敗します。前の節のとおりイメージタグを変更してください。安定版チャンネルのユーザーには 4.0 ベータ版は表示されません。 +アプリ内更新では 3.3 から 4.0 にアップグレードできません。4.0 の更新パッケージはイメージバージョン `4.0.0-beta.1` 以上を必要とします。3.3.7 以降、**設定 → ソフトウェア更新** は安定版とベータ版のどちらのチャンネルでも 3.x のバージョンだけを表示します。それより前の 3.3.x では 4.0 が表示され、**今すぐ更新** を押すと、イメージが古いため新しいイメージを pull するよう求めるエラーで失敗します。前の節のとおりイメージタグを変更してください。 ## 初回起動:設定の移行 diff --git a/docs/ja/dev/plugins/publish.md b/docs/ja/dev/plugins/publish.md index ddc9b4c6..3c12dc26 100644 --- a/docs/ja/dev/plugins/publish.md +++ b/docs/ja/dev/plugins/publish.md @@ -1,6 +1,6 @@ # プラグインを掲載する -プラグインのソースは、作者自身の公開 GitHub リポジトリに置いたままにします。プラグインを掲載または更新するには、作者が `EstrellaXD/Auto_Bangumi`(ベースブランチ `4.0-dev`)に PR を作ります。PR では 1 つのファイル `plugins/registry/.toml` を追加または編集します。 +プラグインのソースは、作者自身の公開 GitHub リポジトリに置いたままにします。プラグインを掲載または更新するには、作者が `EstrellaXD/Auto_Bangumi`(ベースブランチ `main`)に PR を作ります。PR では 1 つのファイル `plugins/registry/.toml` を追加または編集します。 CI はこのファイルが指すコードを検査します。メンテナーがコードを読んでマージします。マージ後、CI がプラグインをパックして署名し、署名付きカタログに公開します。 @@ -45,7 +45,7 @@ sha256 = "<64 桁>" # PR チェックで作られる zip の sha256。最初 git rev-parse HEAD ``` -5. `EstrellaXD/Auto_Bangumi` を fork し、`plugins/registry/.toml` を追加して、`4.0-dev` に PR を作ります。変更するのは `plugins/registry/` 以下のファイルだけです。PR の説明ではプラグイン用テンプレート(`?template=plugin.md`)を使い、各項目にチェックを入れます。 +5. `EstrellaXD/Auto_Bangumi` を fork し、`plugins/registry/.toml` を追加して、`main` に PR を作ります。変更するのは `plugins/registry/` 以下のファイルだけです。PR の説明ではプラグイン用テンプレート(`?template=plugin.md`)を使い、各項目にチェックを入れます。 ## CI のルール @@ -82,7 +82,7 @@ sha256 = "<64 桁>" # PR チェックで作られる zip の sha256。最初 1. 自分のリポジトリでコードを変更し、`plugin.toml` の `version` を上げます。 2. push して、`git rev-parse HEAD` で新しい完全な SHA を取得します。 -3. `4.0-dev` に PR を作ります。`plugins/registry/.toml` の `commit` を新しい SHA に変更し、CI サマリーの値で `sha256` を更新します。 +3. `main` に PR を作ります。`plugins/registry/.toml` の `commit` を新しい SHA に変更し、CI サマリーの値で `sha256` を更新します。 バージョンはカタログにあるバージョンより高くする必要があります。そうでない場合、CI は PR を拒否します。