feat(client): record computer tasks for digital employee
This commit is contained in:
@@ -350,6 +350,35 @@ digitalEmployee:getState
|
||||
- 在 computer server 的 `/computer/chat` 入口创建 Task / Run。
|
||||
- 在 ACP event forwarder 中写入 Run/Event。
|
||||
|
||||
## Phase 5:管理端任务入口落地(已开始)
|
||||
|
||||
目标:管理端或后端通过 `/computer/chat` 下发任务时,qimingclaw 本地数字员工状态可以生成真实任务记录。
|
||||
|
||||
当前 qimingclaw 已接入:
|
||||
|
||||
```text
|
||||
crates/agent-electron-client/src/main/services/computerServer.ts
|
||||
crates/agent-electron-client/src/main/ipc/computerHandlers.ts
|
||||
crates/agent-electron-client/src/main/services/digitalEmployee/stateService.ts
|
||||
```
|
||||
|
||||
记录时点:
|
||||
|
||||
- 收到 chat 请求:创建/更新 Plan、Task、Run,写入 `computer_chat_received`。
|
||||
- chat 成功返回:Run 标记 completed,写入 `computer_chat_completed`。
|
||||
- chat 失败返回:Run 标记 failed,写入 `computer_chat_failed`。
|
||||
|
||||
当前联动意义:
|
||||
|
||||
- 管理端任务进入客户端后,本地 SQLite 会立即有可追溯记录。
|
||||
- 对应 Plan / Task / Run / Event 均进入 `digital_sync_outbox`。
|
||||
- 后续管理端 sync API 确定后,可将 outbox 推送到管理端并回填 `remote_id`。
|
||||
|
||||
下一步:
|
||||
|
||||
- 接 ACP event forwarder,把 token、tool、step、artifact 写入 Run/Event/Artifact。
|
||||
- 增加 sync worker,根据 `step1_config.serverHost` 和登录 token 推送 outbox。
|
||||
|
||||
## 管理端联动原则
|
||||
|
||||
数字员工状态是本地优先,但不能成为本地孤岛。
|
||||
|
||||
Reference in New Issue
Block a user