feat(client): bridge digital employee status

This commit is contained in:
baiyanyun
2026-06-05 15:59:48 +08:00
parent 31b4b5a281
commit 15a3285ed5
7 changed files with 268 additions and 60 deletions

View File

@@ -267,6 +267,52 @@ POST /api/skill/:skillId/enabled
- 新增本地数字员工状态服务,持久化 Plan / Task / Run / Event / Artifact / Approval。
-`/computer/chat`、ACP session、MCP tool status 写入 Run/Event。
## Phase 3webview 只读状态桥(已开始)
目标:让 embedded 数字员工页能读取 qimingclaw 客户端真实状态,同时保持 webview 权限收敛。
当前 qimingclaw 已扩展:
```text
crates/agent-electron-client/src/preload/webviewPerfBridge.ts
crates/agent-electron-client/src/main/main.ts
```
桥接对象:
```text
window.QimingClawBridge.digital.getSnapshot()
```
当前 snapshot 内容:
- Agent service status
- MCP proxy status
- Computer Server status
- Lanproxy status
- File Server status
- GUI Server status
- ACP detailed sessions summary
安全边界:
- 只读。
- 不暴露 start / stop / restart。
- 不暴露 prompt / shell / computer chat。
- webview 页面只能拿到状态快照,再由 adapter 映射到数字员工页面。
当前页面表现:
- “客户端运行状态巡检”会显示 Agent、MCP、活跃会话数。
- “远程任务接入准备”会显示 Computer Server、Lanproxy、File Server 状态。
- 在非 Electron webview 环境下adapter 自动降级为“未连接 bridge”的 fallback 文案。
下一步:
- 新增 qimingclaw digital employee state service。
- 将 bridge snapshot 写入 Run/Event而不是只作为页面即时 projection。
-`/computer/chat` 请求生成真实 Task / Run / Event。
### 产出
- 数字员工页面可以从源码重新构建。