gozeros
66a443e915
sync update from LAN repo (source master @ c21a2a4a)
2026-11-10 14:03:50 +08:00
gozeros
ea9dcff9c0
sync update from LAN repo (source master @ ca48c4ec)
2026-11-05 10:53:54 +08:00
gozeros
8bc8b0e082
sync: 鍚屾灞€鍩熺綉鏈€鏂颁唬鐮?(source master @ b69568e4)
2026-10-21 14:51:31 +08:00
吉鑫升
49d9ced04f
Merge branch 'ji' into master
2026-09-03 10:25:57 +08:00
董宏凯
6d326a21cd
feat(backend): 完善 Workflow 与 DeepResearch 的运行链路与持久化能力
...
功能说明:\n- 重构并增强工作流网关执行链路,支持更完整的 proposal 与 run 调度参数透传\n- 增加 DeepResearch/workflow 运行事件持久化能力并补齐建表 SQL 与查询/保存接口适配\n- 优化 lead agent 与 deep research runner 的中间态处理,增强线程收集与执行链并发控制\n- 调整工作流执行器与任务路由,提升兼容性并完善错误与回放行为\n- 补充回归测试:deep_research 持久化、workflow 并发、定义加载、引擎执行、run 流程等覆盖
2026-09-02 12:52:37 +08:00
董宏凯
553f72604a
Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-code into master-nj
2026-09-01 15:36:47 +08:00
董宏凯
1706a24182
feat(workflow): 增加会话级多智能体任务规划运行能力
...
提交范围聚焦于工作流编排新增:新增 workflow_planning 路由与前后端运行入口(workflow_planning.py、workflow_proposal_planner.py、workflow_deep_research_adapter.py),支持基于会话的提案-规划-执行流程,满足任务驱动式多智能体协作。
完成网关层运行时适配:扩展 workflow_resource_checks、workflow_executor、workflow_runs、workflow_agent_runner 与依赖注入,新增/更新配置(config.yaml、workflow_config),并补充 lead_agent 路径与节点实现,确保 Planner 与普通工作流运行态衔接一致。
补齐持久化与建模:新增 workflow_planning 持久化模块与 MySQL migration(20260831_01_workflow_planning_sessions),注册 SQL 与模型、内存 store,并扩展错误/表达式/validator/节点语义以承载新会话态输入输出。
增强文档与测试:新增会话式多智能体编排中文说明、更新开发文档与 AGENTS 指南、补充 workflow_engine/workflow_runs 回归测试,提高新路径的行为可验证性;同时留存 seed 资产(workflow-planner)便于一体化部署。
2026-09-01 11:47:30 +08:00
fengxiangdebaozi
57b6a89f20
Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-code into master-nj
...
# Conflicts:
# frontend-web/src/components/workspace/messages/message-group.tsx
# offline-backend-20260512/backend/packages/harness/deerflow/agents/lead_agent/prompt.py
2026-08-31 20:12:05 +08:00
吉鑫升
40542db400
feat: add configurable chat display modes
2026-08-31 17:49:48 +08:00
董宏凯
3384f2e51c
fix: 会商席位与总控角色隔离,编排能力只归总控
2026-08-30 20:02:09 +08:00
董宏凯
4964967295
fix: writing mode first-report allows only the pipeline to write the report
...
- Strip write_file/str_replace/bash from the model binding in the
first-report run: after_model rewrites only fire after a full model
response, so any bound write tool let weak models draft the whole
essay into tool args (write_file content or bash cat>/python
heredocs) for tens of invisible seconds before interception
- Hallucinated hand-writes are still handled: after_model rewrites
bash cat >/python open('w')/tee and leftover write calls to
deep_research_report; wrap_tool_call rejects whatever reaches the
tool layer; post-success writes are dropped, nudged to a 2-3
sentence summary, and patched with a fallback closing message so
the turn never ends silently
- The rewritten pipeline call carries topic = original request
(clarification answers skipped) plus focus = clarification answers,
so the pipeline writes the clarified subject instead of the raw
prompt text; prompts updated to match (tools unavailable, call the
tool directly, do not draft first)
- Frontend write-step interception and streaming preview scoping now
applies only in writing mode; normal mode shows/previews writes
exactly as before
2026-08-30 15:53:43 +08:00
董宏凯 and Cursor
49c01cb72b
fix: writing mode uses chat search then pipeline write only
...
Keep deep_research_report as a write-only deliverable from conversation materials, block post-success rewrite loops with a summary nudge, fill thin/empty pools from model knowledge, and open the sandbox only on real report.md content.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-30 12:41:04 +08:00
董宏凯
440b490b0d
Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-code into master-nj
2026-08-27 16:33:33 +08:00
董宏凯 and Cursor
52b9cbf707
feat: 新增 agentfx 任务深链与研判报告入库流程
...
支持 goPath=agentfx 的 iframe 嵌入问答、内置研判助手种子与报告导入协助卡,并完善深度研究流式报告能力。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-27 16:32:22 +08:00
吉鑫升
1b43205c1b
feat: improve skill uploads and agent runtime stability
2026-08-27 11:28:03 +08:00
吉鑫升
11326eeb1c
feat: improve skill uploads and agent runtime stability
2026-08-27 11:14:23 +08:00
吉鑫升
485a8fa9d9
feat: standardize Word export and Office conversion
2026-08-27 00:09:53 +08:00
董宏凯
babc5e95c6
代码提交
2026-08-24 20:47:31 +08:00
吉鑫升
bc49df4561
feat: add public wiki embeds and ES query routing
2026-08-24 15:21:28 +08:00
董宏凯 and Cursor
b81d200eca
fix: 协助卡停轮与提交防 409,隐藏配置向导会话,并限制岗位会商产物重复写入
...
澄清中间件改为 ToolMessage + after_model 停轮,前端提交前取消残留 run;系统/向导 thread_type 从对话列表排除;岗位总结席位加 write_file 上限。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-23 20:29:59 +08:00
董宏凯 and Cursor
51afebb394
feat: 报告结构支持检索方向/来源与智能新增,并修复协助卡停轮与宿主跳转
...
为深度研究报告结构增加检索方向与技能来源、对话式智能新增页与详情排版;澄清中间件在 after_model 可靠结束本轮,避免弱模型出卡后继续生成;任务按钮补充 host 跳转与相关深链能力。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-22 17:46:06 +08:00
Administrator
56044d9cb7
fix: improve llmwiki search integration
2026-08-13 16:03:08 +08:00
董宏凯
221e947488
Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-server into dhk-dev
...
# Conflicts:
# frontend-web/src/open-canvas/components/ai-writing/AIWritingForm.tsx
# frontend-web/src/open-canvas/components/ai-writing/AIWritingPanel.tsx
# offline-backend-20260512/backend/CLAUDE.md
# offline-backend-20260512/backend/app/gateway/services.py
# offline-backend-20260512/backend/tests/test_ai_writing_knowledge_base.py
2026-07-03 22:28:21 +08:00
吉鑫升
36a3851233
feat: inject 3q context into rwfx chat
2026-07-02 10:03:34 +08:00
董宏凯
025e43f4c5
feat: improve ai writing imitation flow
2026-07-01 17:16:12 +08:00
fengxiangdebaozi
3ea8e73389
Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-server into dhk-1
2026-06-24 19:48:15 +08:00
fengxiangdebaozi and Claude Opus 4.8
304e1b637a
feat(ai写作): 意图解析顺便生成检索词 + 修复快捷模式
...
- 意图解析(intent_parser)与意图理解共用同一次 LLM 调用顺便生成检索词
(结合意图 + 大纲覆盖各章节主题),存入 state.precomputed_keywords;
researcher 首轮直接复用,省掉素材收集阶段单独的「生成检索词」LLM 往返。
解析失败/为空时回退到 researcher 自己生成(优雅降级);re_search 仍重新生成。
keyword_outline_section 提到 _utils 供两处共用。
- 修复快捷模式:之前被「大纲先行确认」改动拖累,先误成「问一堆问题」,再被我
过度修正成「不生成大纲」。现修正为——快捷模式 = 用默认选项、不逐项澄清提问
(make_lead_agent 在快捷模式下直接不挂 ask_clarification 工具,物理上问不了),
但**仍生成并确认大纲**再提交;普通模式不变。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-24 18:32:10 +08:00
fengxiangdebaozi and Claude Opus 4.8
e9c8d1cea2
feat(ai写作): 自带大纲/会商及研究模板等前后端改动
...
提交工作区中 AI 写作(表单/时间线/历史/上下文/流式 hook/类型)、
研究模板配置页、lead_agent、researcher/graph/state 及 gateway/config
的进行中改动。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-24 16:15:39 +08:00
吉鑫升 and Claude Opus 4.8
6aff165d09
fix(db): 路由跨 loop 的 DB 访问回引擎主 loop,消除 asyncmy "attached to a different loop"
...
会商/定时任务/沙箱工具等在 worker 线程的临时 loop 上用 asyncio.run 跑全局引擎连接池的
DB 操作,连接被绑定到随即关闭的临时 loop;池子回收/释放该连接时 asyncmy
_terminate_graceful_close 在错误的 loop 上触发 future,持续刷
"got Future attached to a different loop"。
- engine.py: 新增 run_db_blocking(fire_and_forget_db_write 的带返回值版本)。离开主 loop
时用 run_coroutine_threadsafe 把协程送回主 loop 执行、阻塞调用线程拿结果;仅在无主 loop
或正同步处于主 loop 内(送回会死锁)时退回临时 loop。
- thread_paths / prompt / skill_tools: 三处同步→异步阻塞读桥(任务owner解析/常驻技能/
技能可见性)改走 run_db_blocking,删除各自重复的 _run_coro_blocking。
- llm/tool metrics 中间件: fire-and-forget 写改走 fire_and_forget_db_write。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-24 15:57:04 +08:00
fengxiangdebaozi and Claude Opus 4.8
b8c78ba06e
feat(ai-writing): 大纲先行确认 + 新文章类型识别 + 参考文献 + 编辑器修复
...
- 写作配置 Q&A 改为「先流式生成大纲并多轮确认 → 再确认意图」,放宽轮数上限
- 意图识别出列表外的新文章类型时带上类型名+简介(仅本次写作临时使用)
- 成稿支持参考文献:正文 [n] 角标 + 文末按出现顺序的「参考文献」列表(表单开关,默认开)
- 流式接取未闭合 <think> 思考内容,首 token 前加「正在整理…」占位
- 修复右侧编辑器输入空格只出一次、光标跳字(避免自激回灌 setContent 重置光标)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-23 19:07:03 +08:00
吉鑫升 and Claude Opus 4.8
7c55a577ad
feat(open-chat): 开放问答接口回传生成文件 + 临时不留存
...
- /api/open/chat[/stream] 新增 include_files(默认开),把智能体在 outputs 目录
生成的文件(name/virtual_path/encoding(text|base64)/content)随结果回传,
解决"报告写进文件、answer 只回一段总结"导致拿不到完整内容的问题;
既无 answer 也无文件时返回 502。
- 无状态运行标记 ephemeral:lead agent 跳过记忆与知识库中间件(不召回/不留存/
不自动沉淀),取完文件后清理临时线程目录,做到"通过本接口的聊天记录不存储"。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-22 19:36:30 +08:00
吉鑫升 and Claude Opus 4.8
2b6424b3ff
feat(open-chat): 新增 /api/open/chat 开放问答接口
...
- 无需登录(/api/open/ 加入 auth 白名单 + CSRF 豁免),供外部系统直接调用本项目智能体做问答
- 可指定模型(model_name)与智能体(agent_name 中文名称,扫描 agents/*/config.yaml 解析为运行 id);GET /api/open/agents 列出可选名称
- 只返回最终结果(answer = 最后一段 markdown),不含中间过程/工具调用
- 可靠关闭思考:thinking_enabled=false 时下发 thinking_force_disabled,经 create_chat_model(force_disable_thinking=True) 强制注入 enable_thinking=false(及 GLM thinking.type=disabled),覆盖只声明 supports_thinking 的内网 vLLM/Qwen 模型(与生成标题关思考一致)
- 一次性问答设 is_scheduled_run 跳过自动起标题
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-22 11:21:56 +08:00
吉鑫升 and Claude Opus 4.8
342fa8265a
feat: 知识批量沉淀改为后台任务,避免 nginx 504
...
- /ingest/threads/batch 新增 background 参数(默认 true),立即返回 {queued:true}
- 抽取循环抽出 _run_batch_ingest,后台路径显式传入 created_by
- 前端知识库页与输入框、线程 hooks/types 配套调整
- config.yaml 上下文压缩测试值
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-16 21:07:17 +08:00
吉鑫升 and Claude Opus 4.8
5182ea5d11
feat: 技能收藏与常驻(always-on)支持
...
- 新增 skill_favorites / skill_always_on 迁移与持久化模型字段
- skills 路由、存储、前端设置页支持收藏与常驻
- 调整摘要中间件与 lead agent 提示词
- 同步岗位 position_sync 及相关配置清理
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-16 16:37:43 +08:00
吉鑫升 and Claude Opus 4.8
5ebbb82d66
feat: 知识库文件夹/模板、技能压缩设置与摘要窗口调优
...
- 知识库新增文件夹与模板支持(模型/仓储/服务/迁移),前端知识管理组件
- 岗位管理模型与接口完善
- 技能新增压缩设置页与相关存储/工具能力
- 系统设置扩展配置项
- 摘要中间件 keep 窗口改用 token 预算(16000),减少重复压缩
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-16 15:23:54 +08:00
吉鑫升
5daa4b3e20
Merge remote-tracking branch 'origin/master' into ji
2026-06-11 16:39:30 +08:00
吉鑫升
80e84de868
Merge remote-tracking branch 'origin/hlh' into ji
2026-06-11 16:35:18 +08:00
xuhd
1668c1da87
Merge remote-tracking branch 'origin/master' into xuhd
...
# Conflicts:
# frontend-web/.env.production
# frontend-web/.env.sit
# frontend-web/package.json
# offline-backend-20260512/backend/config.yaml
2026-06-11 14:19:01 +08:00
吉鑫升 and Claude Opus 4.8
f0aec4cd7f
feat(square): 新增发布广场功能,智能体/技能按广场分类展示
...
- 后端新增 PublishSquare/PublishSquaresSettings 配置与读写接口
- agents/skills 增加 square_id 字段及对应迁移脚本
- 前端新增发布广场设置页、技能转移选择器,画廊按广场分 Tab 展示
- lead_agent prompt 及若干持久化层适配调整
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-11 11:37:42 +08:00
xuhd
82d14351fc
修改名称 笔记本改为 空间
2026-06-11 11:19:26 +08:00
hlh
9e14c2e289
禁用了知识库技能,添加了知识库memory
2026-06-08 18:35:05 +08:00
Administrator and Claude Opus 4.8
683cc6d76e
feat(knowledge): 阶段二 向量 RAG 与召回注入
...
- embeddings.py:OpenAI 兼容 embedding 客户端,未配置时关键词兜底
- chunking.py + knowledge_embeddings 表:Markdown 分块与向量索引(Python 余弦)
- search.py:keyword/vector/hybrid 三种模式,向量不可用自动降级
- 笔记创建/更新自动重建向量索引;新增 /reindex 维护接口
- KnowledgeRagMiddleware:按对话级开关 knowledge_rag_enabled 注入 <knowledge-context>,接入 lead agent 中间件链(默认随 config.knowledge.rag_enabled)
- service.build_rag_context(wiki-query 风格分层召回)
- 笔记版本快照(knowledge_note_versions)+ GET /notes/{id}/versions
- 前端:聊天页「知识库」对话级 RAG 开关 + 类型字段
- 新增 entities/relations 表(阶段四预置)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-08 18:18:04 +08:00
xuhd and Claude Sonnet 4.6
c645142f82
feat(skill-evolution): register SkillReviewMiddleware in lead agent chain
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-05 13:32:19 +08:00
fengxiangdebaozi
8f6e08eb2f
Merge branch 'dhk-1' of http://192.168.0.200/knowledge-base-bj/deerflow-server into dhk-1
2026-06-03 18:54:26 +08:00
fengxiangdebaozi
56114562cb
fix: ²¹Æë Step3 ɳÏä²Ù×÷²¢Îȶ¨д×÷³ÎÇåÁ÷³Ì
...
Ϊ roundtable µÚÈý²½ɳÏ䲹»ØÐ´°¿ڴò¿ªÓëÏÂÔزÙ×÷£¬²¢ÐÞÕýд×÷ÅäÖóÎÇåµÄÌύÁ÷³ÌÓëĬÈÏËزÄÀ´Դ£¬±ÜÃâÓû§ÔڶƬ³¡¾°ÏÂÌáǰÌύ»ò½øÈ벻·ûºÏԤÆڵļìË÷·¾¶¡£
2026-06-03 17:36:52 +08:00
董宏凯
ba7834f222
Merge branch 'dhk-1' of http://192.168.0.200/knowledge-base-bj/deerflow-server into dhk-1
2026-06-03 17:27:18 +08:00
董宏凯 and Claude Opus 4.8
d49406d2f1
Merge branch 'master' into dhk-1
...
解决 8 处冲突:
- app.py:同时挂载 public_embed + html_page_favorites 两个 router
- .env:保留 dhk-1 的 CORS 配置(含 5174、ALLOW_ALL=0)
- message-list.tsx:并入双方新增(onSetupWriting* 解构 + contentClassName/fitMessageRowsToContent 类型)
- WorkspaceRoutes.tsx:采用 master 的路由结构(含 chats_iframe/IframeChatPage),补回 dhk-1 的 BusinessChainEditorPage 导入与 roundtable/chains 路由
- LoginPage.tsx:合并两套登录(master 的 token 换登录 + dhk-1 的 online-ticket),并集依赖数组
- ScheduledTasksPage.tsx:采用 master 的 HTML 定时任务表单(isHtmlTask 分支)
- AIWritingForm.tsx:保留 dhk-1 的 useWritingForm 重构,补回 master 的笔记来源 useState;WritingFormContext.materialSource 扩展支持 'notebook'
- useAIWritingStream.ts:保留 dhk-1 重构(仅 reducer/helpers,useAIWriting 已移至 AIWritingContext),不并入 master 在此文件的旧实现
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-03 17:26:52 +08:00
fengxiangdebaozi
3eae4a0f45
代码修改
2026-06-03 16:34:17 +08:00
fengxiangdebaozi
ad4b27b7ca
feat: 无界 ticket 登录、AI 写作配置确认与定时任务弹窗修复
...
无界 onlineTicket 对接 MaxKey 与 consumer 接口并用 sub 登录;新增 setup_writing 写作配置确认流;定时任务创建弹窗限制多行高度并支持滚动。
2026-06-03 16:20:45 +08:00
Administrator and Claude Opus 4.8
adcc5a358b
feat(scheduled-tasks): 新增 HTML 页面定时任务(生成/预览/收藏/技能)
...
后端:
- 新增 task_kind=html_page 任务类型,与普通定时任务并存,配置存 execution_context(无需迁移)
- 执行流水线:智能体检索数据 -> 选定模型渲染 HTML -> 清洗/校验 -> 失败自动修复 -> 完整性闸门(缺 doctype/html/head/body/title 或残留脚本即失败) -> 归档 index.html -> 落库
- 新增 scheduled_html_pages / html_page_favorites 表与 store;收藏去重(不可重复)、可删除、收藏时提取可复用风格
- HTML 预览接口(鉴权 + 公开)、收藏接口
- 渲染注入已启用的 HTML 技能(metadata.kind=html_page);全程使用用户所选模型,去除硬编码 GLM-5
- 定时任务跳过 TitleMiddleware,避免标题生成回退默认模型
前端:
- 创建/编辑弹窗增加任务类型与 HTML 配置(页面要求/限制/参考收藏页/模型下拉)
- 运行详情页与公开页 iframe 沙箱预览 HTML;收藏按钮(已收藏禁用)
- 参考收藏页可选可删
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-03 11:35:38 +08:00