Files
admin-web/src/modules/downloads/AGENTS.md
T
ouyangxq b34626bd4b docs(admin): add module-level AGENTS indexes for all 33 modules
新增 29 个模块级 AGENTS.md,补齐入口表指向,使 33 个业务模块均可从入口直达页面与接口。

- 每个模块指引统一为:路径基准 / 页面与入口表 / 关键边界 / 验证入口
- 入口表 35 行改为指向 modules 下的 AGENTS.md,补齐费用项目、审计日志、尺寸配置、装柜照片等缺失词条
- 详细索引最长行从 1315 字符压缩到 699 字符,规则正文移入新增的“货柜工作台规则”小节
- 仅索引文档,未改动业务代码
2026-10-20 12:45:00 +08:00

28 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Admin 下载中心模块指引
## 路径基准与读取顺序
- 本文件适用于 `src/modules/downloads/`,代码路径相对本目录;应用公共规则见 `../../../AGENTS.md`。
- 只有 `pages/DownloadCenterView.vue`、`useExportTask.ts`、`api/platformExportTasks.ts`;所有业务导出都走这一套。
- 后端归 `file/`(`PlatformExportTaskController`、`ExportTaskService`、`ExportStateService`、`ExportDefinitionRegistry`),实际取数由各业务服务的 Provider 分批提供。
## 页面与入口
| 目标 | 页面/入口 | API 与后端 |
|---|---|---|
| 导出任务列表、下载与失败重试 | `pages/DownloadCenterView.vue` | `api/platformExportTasks.ts`;`file/` |
| 业务页面创建导出任务 | `useExportTask.ts`(供其他模块调用) | `api/platformExportTasks.ts` |
| 自动退避与重试状态 | 任务行 `attemptCount/maxAttempts/nextRetryAt` | `file/` `ExportStateService` |
## 关键边界
- 业务页面只创建异步任务,不直接拼装文件,也不直连 Provider。
- 重试只允许 `FAILED`,或 `PENDING` 且已有失败尝试、正在等待自动退避的任务;`RUNNING`、初次等待、已成功或已过期任务拒绝重试。
- 导出类型必须在 `ExportDefinitionRegistry` 登记;新增类型同步检查业务 Provider、权限、页面标签与重试映射。
- 下载链接走鉴权接口,不缓存为公共地址;导出文件不进入浏览器本地持久化。
## 验证
- 定向:`pnpm test src/modules/downloads/<目标测试>`;导出类型变化同时核对 `file/` 的 Provider 契约与业务服务 Provider。
- 本文件或索引变更后,从后端根运行 `./scripts/agents-index-contract.ps1`。