feat: 新增独立企业深度研究工作台,并接入工作流报告结构与 8BF 深色锁定

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
董宏凯andCursor committed 2026-08-20 16:43:03 +08:00
1 parent e881c242fe
commit 11f928bc95
24 files changed
+3275 -40

No files matched your search

@@ -305,6 +305,31 @@ async def langgraph_runtime(app: FastAPI) -> AsyncGenerator[None, None]:
app.state.report_structure_store = make_report_structure_store(sf)
from deerflow.persistence.enterprise_research import (
make_enterprise_research_report_job_store,
make_enterprise_research_task_store,
)
app.state.enterprise_research_task_store = make_enterprise_research_task_store(sf)
app.state.enterprise_research_report_job_store = make_enterprise_research_report_job_store(sf)
# 企业研究报告写作是独立的、冻结计划/证据快照的后台任务;它不复用或改变
# 已有 deep-research 的 Job / dispatcher。
from app.gateway.enterprise_research_report_executor import EnterpriseResearchReportExecutor
app.state.enterprise_research_report_executor = EnterpriseResearchReportExecutor(
app.state.enterprise_research_task_store,
app.state.enterprise_research_report_job_store,
)
async def _recover_enterprise_research_reports() -> None:
try:
await app.state.enterprise_research_report_executor.recover_pending()
except Exception: # noqa: BLE001
logger.warning("[enterprise-research] startup report recovery failed", exc_info=True)
asyncio.create_task(_recover_enterprise_research_reports())
from deerflow.integrations.weknora.runtime import register_llmwiki_store
from deerflow.persistence.llmwiki import make_llmwiki_store