Files
ops-assistant/docs/frontend-joint-checklist.md
T
openclaw 81939825d1 feat: 模块化命令框架 + runbook 严格断言与查询结果回传
- core/module: 命令模板、门控(feature flag/confirm/dry-run)、ecode 错误标签、ResultFormatter
- runbook executor: http.get/http.post/assert.json(expect_success 严格断言)、目标主机管理、任务落库、最终 stdout 直接回传
- cf 模块: /cf dns list 支持域名自动解析 zone_id;dns list/zones/workers list 格式化回传;API success:false 判真失败
- 全部 CF/CPA runbook 接入严格断言,杜绝假阳性 success
- 新增 cpa/cfdav/mail/sub 模块与 runbooks;QQ 订阅到期提醒调度
- Web 后台: 模块设置(CF/CPA/cfdav/AI)、OPS 任务、渠道管理、审计页
2026-09-13 07:42:17 +08:00

99 lines
2.2 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.
# Ops-Assistant 前后端联调检查清单(给前端/Gemini)
更新日期:2026-03-10
---
## A. 统一基础
- [ ] 所有请求走 `/api/v1/*`(禁用新代码调用 legacy 路由)
- [ ] `apiClient` 统一解析 `{code,message,data}`
- [ ] 全局错误 toast 仅展示 `message`
- [ ] 鉴权失败统一跳转登录
---
## B. 登录后初始化
- [ ] 调 `GET /api/v1/me`
- [ ] 用 `effective_capabilities` 控制页面和按钮显隐
- [ ] 没有权限时不渲染可操作按钮
---
## C. Dashboard
- [ ] 首屏并行请求:
- `GET /api/v1/dashboard/summary`
- `GET /api/v1/dashboard/overview`
- [ ] 状态卡片展示 jobs 统计、模块状态、通道状态
- [ ] 10~20 秒轮询刷新
---
## D. Modules 页面
- [ ] 列表:`GET /api/v1/modules`
- [ ] 开关:`POST /api/v1/modules/:module/toggle`
- [ ] reason 必填
- [ ] 处理 `message=noop`
- [ ] cpa 禁用失败提示
- [ ] 成功后刷新 modules + overview
---
## E. Ops Jobs 页面
- [ ] 列表:`GET /api/v1/ops/jobs`
- [ ] 支持筛选字段:
- [ ] status
- [ ] target
- [ ] runbook
- [ ] request_id
- [ ] operator
- [ ] risk_level
- [ ] q
- [ ] from/to(RFC3339)
- [ ] 展示后端回显的 `filters`
- [ ] 详情:`GET /api/v1/ops/jobs/:id`
- [ ] step_stats
- [ ] step_total
- [ ] duration.job_ms / duration.steps_ms_sum
- [ ] request_id 反查:`GET /api/v1/ops/jobs/request/:requestID`
- [ ] cancel/retry:
- [ ] reason 必填
- [ ] 按权限按钮显隐(can_cancel_ops / can_retry_ops)
---
## F. Channels 页面
- [ ] `GET /api/v1/admin/channels`
- [ ] patch/publish/reload/apply 流程联通
- [ ] secrets 脱敏显示并正确提交
---
## G. Audit 页面
- [ ] `GET /api/v1/admin/audit`
- [ ] 支持 from/to、action、target_type、result、actor_id
---
## H. Legacy 迁移看板(管理页)
- [ ] `GET /api/v1/admin/legacy/usage`
- [ ] `GET /api/v1/admin/legacy/trend?days=7`
- [ ] `GET /api/v1/admin/legacy/readiness?days=7&zero_days=3`
- [ ] 显示 `ready` + `recommendation`
---
## I. 验收标准
- [ ] 前端无新代码依赖 legacy 路由
- [ ] 所有核心页面可在 ops-assistant 独立运行
- [ ] 权限控制、错误处理、轮询刷新行为正常
- [ ] readiness 达标后可计划 legacy 下线窗口