init: ops-assistant codebase

This commit is contained in:
OpenClaw Agent
2026-03-19 21:23:28 +08:00
commit 81deba4766
94 changed files with 10767 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
# API Response Convention
统一响应格式JSON 接口):
- 成功:
```json
{
"code": "OK",
"message": "ok|success|...",
"data": { }
}
```
- 失败:
```json
{
"code": "ERR_...",
"message": "..."
}
```
## 约定
1. 所有 `/api/v1/*` JSON 接口使用统一结构。
2. 文件流接口(如 CSV 导出)成功时返回文件内容;失败时返回统一错误 JSON。
3. 权限失败统一 `ERR_PERMISSION_DENIED`
4. 执行失败统一至少返回一个业务错误码(例如 `ERR_STEP_FAILED`)。
5. `message` 用于人类可读,`code` 用于前端逻辑分支。
## 已接入范围2026-03-10
- Ops: jobs/list/detail/cancel/retry
- Flags: list/patch
- Channels: list/patch/publish/reload/enable/disable/disable-all/test/apply
- Records: list/delete
- Audit: list