feat: 重构项目心跳数据结构并实现项目列表API
- 新增统一项目列表Redis键和迁移工具 - 实现GET /api/projects端点获取项目列表 - 实现POST /api/projects/migrate端点支持数据迁移 - 更新前端ProjectSelector组件使用真实项目数据 - 扩展projectStore状态管理 - 更新相关文档和OpenSpec规范 - 添加测试用例验证新功能
This commit is contained in:
27
openspec/changes/update-command-control-api/tasks.md
Normal file
27
openspec/changes/update-command-control-api/tasks.md
Normal file
@@ -0,0 +1,27 @@
|
||||
## 1. OpenSpec
|
||||
|
||||
- [ ] 1.1 Add command spec delta for HTTP control (remove Redis control queue)
|
||||
- [ ] 1.2 Add design notes for baseUrl mapping + request format
|
||||
- [ ] 1.3 Run `openspec validate update-command-control-api --strict`
|
||||
|
||||
## 2. Backend
|
||||
|
||||
- [ ] 2.1 Add Redis heartbeat parsing (apiBaseUrl + lastActiveAt) and offline detection (10s)
|
||||
- [ ] 2.2 Update POST `/api/commands` to parse `apiName` + args and call target HTTP API using heartbeat apiBaseUrl
|
||||
- [ ] 2.3 Return structured result to frontend (success/failed + upstream status/body)
|
||||
|
||||
## 3. Frontend
|
||||
|
||||
- [ ] 3.1 Update Console send behavior + UI copy to reflect API control
|
||||
- [ ] 3.2 Validate input format (needs at least apiName)
|
||||
|
||||
## 4. Docs
|
||||
|
||||
- [ ] 4.1 Update docs/redis-integration-protocol.md: remove control queue; add HTTP control API section
|
||||
- [ ] 4.2 Update .env.example with new optional variables (timeouts/offline threshold)
|
||||
|
||||
## 5. Verify
|
||||
|
||||
- [ ] 5.1 Run `npm run lint`
|
||||
- [ ] 5.2 Run `npm run build`
|
||||
- [ ] 5.3 Smoke test backend endpoints
|
||||
Reference in New Issue
Block a user