feat: 重构项目心跳数据结构并实现项目列表API
- 新增统一项目列表Redis键和迁移工具 - 实现GET /api/projects端点获取项目列表 - 实现POST /api/projects/migrate端点支持数据迁移 - 更新前端ProjectSelector组件使用真实项目数据 - 扩展projectStore状态管理 - 更新相关文档和OpenSpec规范 - 添加测试用例验证新功能
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
## MODIFIED Requirements
|
||||
|
||||
### Requirement: Command Sending to Redis
|
||||
|
||||
The system SHALL send commands to a per-target Redis key.
|
||||
|
||||
#### Scenario: Console enqueues a command for a target project
|
||||
|
||||
- **WHEN** the user sends a command from the console
|
||||
- **THEN** the backend SHALL append a JSON message to Redis LIST key `${targetProjectName}_控制`
|
||||
- **AND** the JSON message SHALL represent the command payload (an object)
|
||||
|
||||
#### Scenario: Target project consumes a command
|
||||
|
||||
- **WHEN** a target project listens for commands
|
||||
- **THEN** it SHALL consume messages from `${projectName}_控制` as JSON objects
|
||||
- **AND** it SHOULD use Redis LIST queue semantics (producer `RPUSH`, consumer `BLPOP`)
|
||||
|
||||
Reference in New Issue
Block a user