feat(client): persist digital governance events
This commit is contained in:
@@ -514,6 +514,25 @@ GET /api/digital-employee/sync/records
|
||||
- 后续再拆分管理端 Plan / Task / Run / Event 查询模型,让同步记录从通用 payload 观察面升级为业务视图。
|
||||
- 数字员工页面继续补充管理端业务视图入口和失败分组统计。
|
||||
|
||||
管理端业务视图建议:
|
||||
|
||||
```text
|
||||
GET /api/digital-employee/plans
|
||||
GET /api/digital-employee/plans/{plan_id}
|
||||
GET /api/digital-employee/tasks
|
||||
GET /api/digital-employee/runs
|
||||
GET /api/digital-employee/events
|
||||
GET /api/digital-employee/artifacts
|
||||
GET /api/digital-employee/approvals
|
||||
```
|
||||
|
||||
- 查询参数沿用同步记录维度:`client_key`、`device_id`、`entity_id`、`remote_id`、`status`、`sync_status`、`updated_from`、`updated_to`、`page_no`、`page_size`。
|
||||
- 业务视图先从通用 sync record 的 `entity_type/entity_id/payload/status/created_at/updated_at` 聚合,不要求立即拆物理表;后续再按容量和查询压力拆正式业务表。
|
||||
- Plan 视图输出 `plan_id`、`title`、`objective`、`status`、`client_key_masked`、`device_id`、`task_count`、`run_count`、`latest_event_at`、`sync_status`。
|
||||
- Task / Run 视图保留 `plan_id`、`task_id`、`run_id` 关联,Run 额外输出 `started_at`、`finished_at`、`duration_ms`、`last_event_message`。
|
||||
- Event / Artifact / Approval 视图保留原始 payload 抽屉,但列表层必须提炼 `kind/title/message/status/occurred_at`,避免管理端只能看 JSON 排障。
|
||||
- qimingclaw 客户端的失败详情深链仍指向 sync record;管理端命中后可跳转到对应业务视图详情,形成“同步诊断 -> 业务事实”的双入口。
|
||||
|
||||
## 管理端联动原则
|
||||
|
||||
数字员工状态是本地优先,但不能成为本地孤岛。
|
||||
|
||||
Reference in New Issue
Block a user