Files
cc-web/.planning/2026-08-24-gitea-workflow-management/task_plan.md

25 lines
1.1 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.

# Gitea Workflow 管理 API 与页面实施计划
## 目标
在不覆盖 Gitea Workflow 核心领域模块的前提下,为 cc-web 增加可挂接的管理 API、
前端管理页面和最小回归测试。页面展示仓库、队列、turn、日志与脏目录原因,并提供
全局暂停、仓库启停、取消排队、中止 turn 及操作者/原因审计。
## 步骤
1. 读取现有前端路由、API 契约并确定挂接边界
2. 实现独立 Gitea Workflow 管理 API 适配器与服务注入契约
3. 接入 server.js 路由、鉴权与前端资源版本计算
4. 实现 Workflow 管理页面脚本、样式并挂到现有入口
5. 补充最小 API 与前端契约测试
6. 运行语法检查、单测与回归并修复问题
7. 汇总变更、清理临时清单并回报交付
## 边界
- 新增管理适配器与前端资源;核心队列/工作区/会话实现由注入的 service 提供。
- server.js 只做路由挂接和鉴权,不复制领域状态机。
- 兼容 service 不可用时的只读空状态,控制操作返回明确的 503。
- 不安装依赖,不修改与本任务无关的现有未提交文件。