mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-07-22 04:06:44 +08:00
docs: align project status with official sync pipeline
Update the authoritative docs, guides, architecture notes, gap list, deployment guidance, handoff notes, and changelog to reflect the current Rust official resource sync boundary.
This commit is contained in:
+44
-23
@@ -4,12 +4,14 @@
|
||||
|
||||
BlueArchive Toolkit 采用 **Monorepo + 多语言混合** 架构,旨在构建一个可持续维护十年以上的工业级开源项目。
|
||||
|
||||
当前文档描述目标架构。实际实现状态以根目录 `CURRENT_STATUS.md` 和 `PROJECT_PLAN.md` 为准。
|
||||
当前文档描述目标架构和已经落地的关键边界。实际实现状态以根目录 `CURRENT_STATUS.md` 和 `PROJECT_PLAN.md` 为准。
|
||||
|
||||
当前已经可用的官方资源入口包括:
|
||||
|
||||
- `infrastructure/examples/official_pull_plan.rs`:Linux 生产资源拉取路径,显式读取官方 `server-info` 输入。
|
||||
- `infrastructure/examples/official_update_check.rs`:Linux 自动更新检查入口,保存 snapshot 并按需拉取。
|
||||
- `infrastructure/src/bin/bat_official_sync.rs`:Linux 官方资源同步正式入口,支持 one-shot 和 `--watch` 常驻更新。
|
||||
- `infrastructure/src/official_update.rs`:官方自动更新核心服务,负责 auto-discover、snapshot、marker diff、本地 audit/repair。
|
||||
- `infrastructure/examples/official_pull_plan.rs`:开发/审计用 pull plan 入口。
|
||||
- `infrastructure/examples/official_update_check.rs`:历史/开发入口,生产优先使用 `bat-official-sync`。
|
||||
- `infrastructure/examples/official_launcher_bootstrap.rs`:显式开发/审计辅助路径,用于核查官方 launcher metadata,不是生产运行依赖。
|
||||
- `docs/guides/official-resource-test-pull.md`
|
||||
|
||||
@@ -33,14 +35,14 @@ BlueArchive Toolkit 采用 **Monorepo + 多语言混合** 架构,旨在构建
|
||||
|
||||
| 模块 | 语言 | 理由 |
|
||||
|------|------|------|
|
||||
| CLI、API Server、下载器 | Go | 并发模型优秀、部署简单、生态成熟 |
|
||||
| AssetBundle 解析、Patch 引擎、CAS 引擎 | Rust | 零成本抽象、内存安全、性能极致 |
|
||||
| CLI、API Server、服务编排 | Go | 并发模型优秀、部署简单、生态成熟 |
|
||||
| 官方资源同步核心、AssetBundle 解析、Patch 引擎、CAS 引擎 | Rust | 零成本抽象、内存安全、性能和二进制处理更可靠 |
|
||||
| Web 管理后台 | Vue 3 + TypeScript | 渐进式、类型安全、生态完善 |
|
||||
|
||||
### 3. 数据流设计
|
||||
|
||||
```
|
||||
用户请求 → CLI/API → Go 业务层 → Rust 核心层 → CAS 存储 → 数据库
|
||||
用户请求 → CLI/API → Go 业务层 → Rust 核心/同步层 → CAS 存储 → 数据库
|
||||
↓ ↓
|
||||
Web UI 缓存层 (Redis)
|
||||
```
|
||||
@@ -89,25 +91,41 @@ cas/
|
||||
|
||||
---
|
||||
|
||||
### 2. 资源同步器 (Go)
|
||||
### 2. 官方资源同步器 (Rust 当前实现,Go 后续编排)
|
||||
|
||||
**职责**:从游戏服务器下载资源、增量更新、完整性校验
|
||||
**职责**:从官方日服 HTTP metadata 自动发现资源入口,下载 Windows + Android 官方资源,增量检查,完整性校验,保持本地状态。
|
||||
|
||||
**当前实现**:
|
||||
|
||||
- `OfficialUpdateService`:auto-discover、snapshot、marker diff、本地 manifest audit/repair。
|
||||
- `OfficialResourcePullService`:官方 URL 校验、`.part` 断点续传、重试、下载 manifest、官方 seed `.hash` 校验。
|
||||
- `bat-official-sync`:正式 binary,支持 one-shot 和 `--watch`。
|
||||
|
||||
**当前数据流**:
|
||||
|
||||
**架构**:
|
||||
```
|
||||
Manifest Parser → Version Manager → Downloader → CAS Storage
|
||||
↓
|
||||
Task Queue (多线程)
|
||||
↓
|
||||
Progress Reporter
|
||||
官方 metadata → GameMainConfig → server-info → discovery endpoints
|
||||
↓
|
||||
seed catalog → inventory → pull plan → downloader → output directory
|
||||
↓
|
||||
official-sync-snapshot.json + official-download-manifest.json
|
||||
```
|
||||
|
||||
**特性**:
|
||||
- 多线程并发下载
|
||||
- 断点续传(Range 请求)
|
||||
- 自动重试机制(指数退避)
|
||||
- 限速支持
|
||||
- Hash 校验(下载后立即验证)
|
||||
**已具备特性**:
|
||||
|
||||
- 不安装、不执行官方 launcher。
|
||||
- 默认平台 `Windows + Android`。
|
||||
- `--auto-discover` 自动获取 `app-version`、`connection-group` 和 `server-info`。
|
||||
- `--watch` 常驻检查,默认 1 小时。
|
||||
- 远端 marker 无变化且本地 manifest clean 时不下载。
|
||||
- 本地文件损坏时 repair。
|
||||
- 官方 seed `.hash` 强校验;Addressables `catalog_*.hash` 作为变更 marker。
|
||||
|
||||
**后续 Go 职责**:
|
||||
|
||||
- 提供最小稳定 CLI。
|
||||
- 包装或调用 Rust 同步入口,转发 JSON report。
|
||||
- 编排 API Server、任务队列、Provider 和用户配置。
|
||||
|
||||
---
|
||||
|
||||
@@ -369,7 +387,10 @@ API Server (多实例)
|
||||
更多详细设计文档:
|
||||
|
||||
- [官方资源后端说明](./official-resource-backend.md)
|
||||
- [CAS 存储引擎设计](./cas-storage.md)
|
||||
- [AssetBundle 解析器设计](./assetbundle-parser.md)
|
||||
- [翻译系统设计](./translation-system.md)
|
||||
- [API 设计](../api/README.md)
|
||||
|
||||
待创建的详细设计文档:
|
||||
|
||||
- `docs/architecture/cas.md`
|
||||
- `docs/architecture/assetbundle.md`
|
||||
- `docs/architecture/translation.md`
|
||||
|
||||
Reference in New Issue
Block a user