feat: 重构项目心跳数据结构并实现项目列表API

- 新增统一项目列表Redis键和迁移工具
- 实现GET /api/projects端点获取项目列表
- 实现POST /api/projects/migrate端点支持数据迁移
- 更新前端ProjectSelector组件使用真实项目数据
- 扩展projectStore状态管理
- 更新相关文档和OpenSpec规范
- 添加测试用例验证新功能
This commit is contained in:
2026-01-13 19:45:05 +08:00
parent 19e65d78dc
commit 282f7268ed
66 changed files with 4378 additions and 456 deletions

View File

@@ -2,7 +2,7 @@
# Copy this file to `.env` and fill values before running locally
# Redis connection
REDIS_HOST=localhost # Redis host (default: localhost)
REDIS_HOST=10.8.8.109 # Redis host (default: localhost)
REDIS_PORT=6379 # Redis port (default: 6379)
REDIS_PASSWORD= # Redis password (leave empty if not set)
REDIS_DB=0 # Redis database number (default: 0)
@@ -12,5 +12,13 @@ REDIS_CONNECT_TIMEOUT_MS=2000 # Connection timeout in ms (default: 2000)
# Optional: port for backend server. Current default in code is 3001 but you can override it here.
PORT=3001
# Command control (HTTP)
# Timeout for calling target project APIs (ms)
COMMAND_API_TIMEOUT_MS=5000
# Heartbeat liveness
# If now - lastActiveAt > threshold, treat project as offline (ms)
HEARTBEAT_OFFLINE_THRESHOLD_MS=10000
# Node environment (development|production)
NODE_ENV=development