feat(i18n): 接入翻译 provider worker
bat-rust / Build and test Rust (push) Canceled after 0s
bat-rust / Build and test Go API (push) Canceled after 0s

Closes #44
This commit is contained in:
2026-08-30 21:13:31 +08:00
parent 7f465523e1
commit f441f1810e
29 changed files with 3815 additions and 130 deletions
+23 -13
View File
@@ -1,16 +1,26 @@
# bat-api Admin Panel
This directory is reserved for the future player-facing `bat-api` management
panel. The current backend exposes a non-mutating index at `GET /admin/` that
returns JSON links for health, readiness, bootstrap, release, resources, and
OpenAPI. `GET /admin/schedules` and mutating
`/admin/control/schedule-{add,update,remove,run}` routes are protected by the
configured admin token and forward the Rust-owned schedule contract.
`GET /admin/schedules` accepts optional `id`, `group`, and `enabled` filters.
`POST /admin/control/translation-task-update` uses the same token and forwards
the narrow `translation.task.update` provider-worker status contract.
本目录预留给后续 `bat-api` 管理面板。当前后端已提供只读入口
`GET /admin/`,返回 health、ready、bootstrap、release、resources 和 OpenAPI
链接。
The production panel must reuse the same HTTP authentication, rate limiting,
access logging, reverse-proxy handling, and no-store dynamic response policy as
the resource API. Static frontend assets are not implemented yet. See
`docs/reports/GO_STATUS.md` for the current component boundary and status.
需要配置 `BAT_API_AUTH_TOKEN` 的接口:
- `GET /admin/schedules`:转发 Rust 持有的 schedule 查询,支持 `id``group`
`enabled` 过滤。
- `POST /admin/control/schedule-{add,update,remove,run}`:转发
`schedule.*` 计划控制。
- `POST /admin/control/translation-task-update`:转发
`translation.task.update`,供外部 provider 流程回写任务状态。
- `POST /admin/control/translation-worker-run`:转发
`translation.worker.run`,触发 Rust provider worker。
- `POST /admin/control/translation-proofread`:转发
`translation.proofread`,把汉化 workflow 标记为人工校对中。
- `GET /admin/translation/tasks`:转发 `translation.tasks`,按分页、release、
TextUnit、状态和失败原因过滤查询 worker 状态。
- `GET /admin/translation/handoff`:转发 `translation.handoff`,读取当前
release 的完整翻译交接视图。
正式前端必须复用资源 API 的 HTTP 鉴权、限流、访问日志、反代处理和动态响应
`Cache-Control: no-store` 策略。静态前端资产仍为 not implemented,尚未作为
本目录的稳定交付物。当前组件边界见 `docs/reports/GO_STATUS.md`