完善联调标准化与诊断链路

This commit is contained in:
2026-04-03 17:01:04 +08:00
parent 114c524044
commit b09c21c814
35 changed files with 2677 additions and 175 deletions

View File

@@ -1,6 +1,6 @@
# API 清单
> 文档版本v1.8
> 最后更新2026-04-03 12:36:15
> 文档版本v1.9
> 最后更新2026-04-03 16:16:38
本文档只记录当前 backend 已实现接口,不写未来规划接口。
@@ -436,6 +436,61 @@
- 自动准备 demo tenant / channel / event / release / card
### `POST /dev/client-logs`
环境:
- 仅 non-production
用途:
- 接收 frontend 主动上报的调试日志
- 供 backend 通过 workbench 统一查看和排查
请求体重点:
- `source`
- `level`
- `category`
- `message`
- `eventId`
- `releaseId`
- `sessionId`
- `manifestUrl`
- `route`
- `occurredAt`
- `details`
补充说明:
- 当前只保存在内存中
- 默认最多保留最近 200 条
- 仅用于联调调试
### `GET /dev/client-logs`
环境:
- 仅 non-production
用途:
- 获取 frontend 最近上报的调试日志
查询参数:
- `limit`
### `DELETE /dev/client-logs`
环境:
- 仅 non-production
用途:
- 清空当前内存中的 frontend 调试日志
### `GET /dev/workbench`
环境:
@@ -459,6 +514,26 @@
- scenarios
- request history
- curl 导出
- frontend 调试日志查看/清空
### `GET /dev/manifest-summary`
环境:
- 仅 non-production
用途:
- 由 backend 代读指定 manifest
- 返回最小调试摘要:
- `schemaVersion`
- `playfield.kind`
- `game.mode`
补充说明:
- 只用于 workbench 联调排查
- 不参与正式客户端运行链路
### `GET /dev/config/local-files`