feat: add Goal/Task data models, service layer, and API routes (Phase 1)

Main Agent 数字员工工厂基础设施:
- 新增 Goal 和 Task SQLAlchemy 数据模型
- Agent 模型新增 agent_type / input_schema / output_schema
- Execution 模型新增 goal_id 关联
- 新增 Goal/Task CRUD 服务层(含依赖检查、任务树、进度计算)
- 新增 /api/v1/goals (9端点) + /api/v1/tasks (8端点)
- 数据库迁移 013_add_goals_tasks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
renjianbo
2026-05-08 19:50:16 +08:00
parent 10ee7ee625
commit 02d7cf8f62
11 changed files with 1017 additions and 2 deletions

View File

@@ -54,4 +54,6 @@ def init_db():
import app.models.notification
import app.models.orchestration_template
import app.models.plugin
import app.models.goal
import app.models.task
Base.metadata.create_all(bind=engine)