greatmengqi 74b7a7eff9 refactor(config): thread AppConfig through RunContext into Worker
Phase 2 Task P2-5 (partial, Category D): RunContext gains an optional
app_config field. Gateway deps.get_run_context populates it from
app.state.config. Worker builds DeerFlowContext from ctx.app_config when
provided, falling back to AppConfig.current() for legacy callers.

This is the key path: Gateway-mode agent runs now construct
DeerFlowContext without consulting the process-global at all — app_config
flows from FastAPI's app.state through RunContext to Worker to
Runtime.context. Standalone providers (checkpointer/store/stream_bridge)
already accept optional config parameter from P1, so they are Phase 2-ready.

59 gateway/worker/run_manager tests pass.
2026-04-17 00:27:29 +08:00
..