Skip to content

refactor(domain): rename generation to orchestrator, add domain bound… - #76

Open
xiaocheny214 wants to merge 8 commits into
1024XEngineer:mainfrom
xiaocheny214:refactor/domain-rename-orchestrator
Open

refactor(domain): rename generation to orchestrator, add domain bound…#76
xiaocheny214 wants to merge 8 commits into
1024XEngineer:mainfrom
xiaocheny214:refactor/domain-rename-orchestrator

Conversation

@xiaocheny214

Copy link
Copy Markdown
Contributor

…ary docs

  • Rename server/generation/ to server/orchestrator/ (任务调度)
  • Update all import references (web/api/generation.py keeps its name)
  • Update module-split.md with 4-domain structure (foundation/workflow/pipeline/result)
  • Add domain boundary explanations and rationale
  • Update product-domains.svg with color coding and domain annotations
  • Remove unimplemented modules from documentation

…ary docs

- Rename server/generation/ to server/orchestrator/ (任务调度)
- Update all import references (web/api/generation.py keeps its name)
- Update module-split.md with 4-domain structure (foundation/workflow/pipeline/result)
- Add domain boundary explanations and rationale
- Update product-domains.svg with color coding and domain annotations
- Remove unimplemented modules from documentation
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
windup Ignored Ignored Preview Aug 5, 2026 8:19am

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found two documentation inconsistencies that should be corrected before merging.

Comment thread backend/docs/diagrams/product-domains.json Outdated
Comment thread backend/docs/module-split.md Outdated
- module-split.md: 新增 workflow(工作流画布)和 agent(懒人智能体)模块定义
- product-domains.svg: 更新架构图,调整模块布局,调用链路为 agent → workflow → orchestrator → ai_engine
- server/workflow/: 领域模型、Pydantic Schema、服务接口
  - model.py: CardType/CardStatus/Workflow/CanvasCard/GenerationAttempt
  - schema.py: 显式定义 CHARACTER/ACTION/EXPORT 卡片输入参数
  - interface.py: WorkflowService + CardService 抽象接口

- server/agent/: 领域模型、Pydantic Schema、服务接口
  - model.py: AgentSession/AgentMessage/ToolCall/ContentBlock
  - schema.py: 会话/消息/工具调用请求响应模型
  - interface.py: AgentService 抽象接口

- web/api/: API 路由定义
  - workflow.py: 9 个工作流画布端点
  - agent.py: 5 个智能体端点

- bootstrap/app.py: 注册 workflow_router 和 agent_router
- event_bus.py: 双模式 EventBus(Task/Session),内存发布订阅
- stream.py: Task SSE 端点,推送生成任务进度
- session.py: Agent SSE 端点,推送对话事件
- progress.py: 进度跟踪工具
…M 代理

- SSE: event_bus 改为通用 channel pub/sub,stream.py 去掉业务域引用,删除 session.py
- workflow_run: 新增树形执行记录模型(WorkflowRun + WorkflowRunNode),替代旧卡片体系
- agent: 删除 server/agent 模块,web/api/agent.py 简化为 POST /ai/chat LLM 代理
- bootstrap: 挂载 SSE 路由,创建 EventBus 实例,更新导入
Comment thread backend/docs/module-split.md Outdated
Comment thread backend/packages/app/src/windup_app/web/sse/stream.py Outdated
Comment thread backend/packages/app/src/windup_app/web/api/workflow_run.py Outdated
- 删除 web/sse/ 模块(event_bus/stream/progress/session)
- SSE 端点移至 GET /generation/tasks/{task_id}/stream
- EventBus 内置于 generation.py
- bootstrap 去掉 SSE 路由挂载
- workflow_run 简化为 JSONB 存储(去掉 node 表)
- 删除 docs/ 目录(已迁移至 Issue)
GET /workflow-runs/{id} 获取执行记录(含 nodes)
PATCH /workflow-runs/{id} 全量更新(含 nodes)
DELETE /workflow-runs/{id} 软删除
POST /workflow-runs/{id}/diff/{old_id} 对比新旧 run

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个我没理解,是为了满足什么样的用户功能存在的?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用户在资产库或者预览台发现某个角色的动作不行,前端做回退逻辑,可以调用后端提供的get方法:workflow_runs的,获取执行的记录。然后根据这个信息回退到这个图的某一节点下,再去做节点的推进、编排,调用后端提供的生成动作的能力,收集到这些信息就更新,然后向后端得PATCH 方法做更新操作。
还有一种场景就是,用户对角色不太满意,但对已经形成动作很满意。前端调用get方法,拿到完整的信息,发现回退需要删除整个图,但为了留存记录,就需要做一个软删除逻辑,也就是delete方法,标记之后。前端重新创建一条workflow_run的图,但为了保证后续的动作要跟上一个图的动作相似或者一样,就可以调用post方法,来比对新的图以及旧得图之间有没有可复用的信息能力。
我似乎少给了一个一开始创建空白workflow_run的接口。

task_id: int | None = Field(default=None, description="关联的生成任务 ID")
node_order: int = Field(default=0, description="同级节点执行顺序")
project_id: int
parent_run_id: int | None = None

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的 parent_run_id、root_capability 等好像会跟刚刚跟前端同学说的 workflow-run 的设定有关系,晚点一起讨论吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants