feat(ai): temporal worker for lesson plan workflow

- deploy temporal server (postgresql + auto-setup + ui) in docker-compose
- new temporal/ module: workflow + activities + worker manager
- convert lesson plan 4-step orchestration to temporal workflow
- activities wrap existing analyze/recommend/generate/prepare_review steps
- worker injects failover_chain/content_client/data_ana_client via module globals
- start() uses temporal client.start_workflow, falls back to asyncio in dev
- register temporal ports 7233/8085 in port-allocation

Implements M6.5 of v2.1 migration plan (ADR-030).
This commit is contained in:
SpecialX
2026-07-15 02:34:34 +08:00
parent ce5aeec955
commit 47e950c664
11 changed files with 701 additions and 40 deletions

View File

@@ -22,6 +22,8 @@ dependencies = [
"tenacity>=9.0.0",
# GraphQL Federation 2 子图v2.1 M1Apollo Router 组合)
"strawberry-graphql[asgi]>=0.257.0",
# Temporal 工作流引擎v2.1 §8.2 ADR-030AI 耗时工作流)
"temporalio>=1.7.0",
]
[tool.uv.sources]