董宏凯
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
吉鑫升
485a8fa9d9
feat: standardize Word export and Office conversion
2026-08-27 00:09:53 +08:00
吉鑫升
bc49df4561
feat: add public wiki embeds and ES query routing
2026-08-24 15:21:28 +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
董宏凯
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
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
吉鑫升 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
fengxiangdebaozi
56114562cb
fix: ²¹Æë Step3 ɳÏä²Ù×÷²¢Îȶ¨д×÷³ÎÇåÁ÷³Ì
...
Ϊ roundtable µÚÈý²½ɳÏ䲹»ØÐ´°¿ڴò¿ªÓëÏÂÔزÙ×÷£¬²¢ÐÞÕýд×÷ÅäÖóÎÇåµÄÌύÁ÷³ÌÓëĬÈÏËزÄÀ´Դ£¬±ÜÃâÓû§ÔڶƬ³¡¾°ÏÂÌáǰÌύ»ò½øÈ벻·ûºÏԤÆڵļìË÷·¾¶¡£
2026-06-03 17:36: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
吉鑫升 and Claude Opus 4.7
2c136c1fde
参考文献模式合并为单一 referenceBatch 并统一连续编号
...
将同一轮检索结果合并为一个 referenceBatch,由系统统一从 [1] 连续编号,避免每个检索词各自重新编号;提示词引导优先并行检索后再作答。智能体列表接口并发加载技能等轻量信息以渲染卡片徽章,并新增参考文献相关测试。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-29 11:31:31 +08:00
吉鑫升
6fd6d564eb
Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-server into ji
...
# Conflicts:
# frontend-web/src/components/workspace/messages/message-list-item.tsx
# frontend-web/src/components/workspace/messages/message-list.tsx
# offline-backend-20260512/backend/packages/harness/deerflow/agents/lead_agent/agent.py
# offline-backend-20260512/backend/packages/harness/deerflow/agents/lead_agent/prompt.py
2026-05-27 19:10:27 +08:00
xuhd and Claude Sonnet 4.6
ff8eb930f7
feat: 笔记本 Studio 模块 — RAG 聊天、引用弹窗、侧边栏工作室
...
- 新增 Studio 笔记本列表页与详情页(RAG 流式聊天、历史线程切换)
- 修复 streamSubgraphs: true 使 AI 流式消息正常展示
- 引用圆圈 [[cite:N]] 渲染 + 点击弹窗显示文档 chunk 内容
- 侧边栏「工作室」区域支持折叠/展开,笔记本过滤 is_owner=true
- 后端 lead_agent 支持 notebook_source_ids / notebook_token 参数
- 线程 metadata 改为 thread_type=notebook,侧边栏过滤同步
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-26 23:55:08 +08:00
吉鑫升
8892637b97
新增 RAG 引用展示模式:支持技能结果按编号引用/列表/表格渲染
...
- 前端新增 skill-display 适配层(runtime/display-adapter)与可视化适配面板,
支持从技能返回 JSON 自动识别字段并配置 citation/list/table/card 展示
- 正文 [[N]] 编号渲染为可点击徽章,点击不跳 URL 而是定位到右侧参考文献面板;
参考卡片样式重做(圆形编号、悬停高亮、过滤掉 "result" 占位类型)
- bash 工具调用按命令中的 skills/{public,custom}/<name>/ 路径反查展示适配,
解决调用名为 "bash" 时无法匹配到具体技能的问题
- 工具结果 JSON 解析放宽:能从 stderr/exit code 噪声尾巴里抢救出 JSON 主体
- 展示适配自动识别接入 LLM:读 SKILL.md 让模型推断真实返回结构,失败回退 mock
- 展示适配面板修复保存回显:保存后表单跟随服务端最新值刷新,样例文本不再被抹掉
- 设置页加 "RAG 引用模式" 开关(默认开),关联 lead-agent prompt 注入引用规则
2026-05-25 18:19:52 +08:00
吉鑫升
b6a2c9336e
Merge remote-tracking branch 'origin/master' into ji
2026-05-22 14:25:23 +08:00
吉鑫升 and Claude Opus 4.7
ba2bc46042
智能体对话选 Agent 直达、澄清问题批量提交、LLM 错误中文化等
...
- 前端:新会话选 Agent 后直接跳转并自动发送,智能体页输入框宽度与首页对齐
- 前端:澄清卡片支持多选+多问题合并提交,消除单题逐一发送的割裂感
- 前端:定时任务弹窗 Agent 下拉支持长描述截断,避免撑破布局
- 后端:ask_clarification 支持同回合多次调用以提多个独立问题
- 后端:LLM 错误处理与定时任务失败提示统一改为中文
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 14:24:29 +08:00
xuhd and Claude Sonnet 4.6
b3a39cbdf7
feat: V1记忆系统支持、管理员记忆编辑及对话记忆注入开关
...
- 新增 V1 记忆系统(memory.json)支持:提取结果强制中文、历史字段修复为增量累积日志
- 用户设置页面:V1 模式下新增 agent 选择器,可查看各 agent 的私有记忆
- 管理员记忆页面:区分 V1/V2 渲染,V1 支持完整 CRUD(用户画像/历史摘要/事实记录)
- 后端新增 V1 记忆 CRUD API(sections/facts),前端同步添加对应 hooks 和 API 调用
- 新建专家页面:标记 bootstrap 线程类型,跳过记忆保存,侧边栏过滤该类线程
- 输入框工具栏新增「记忆」开关:关闭时 V1/V2 均不注入,开启时按 config.yaml 版本正常注入
- 修复 agent 目录不存在时的 FileNotFoundError,回退至默认配置
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-22 12:32:47 +08:00
xuhd and Claude Sonnet 4.6
3748513996
feat: 智能体创建流程优化与管理员记忆页面
...
- 创建智能体页面:保存后自动跳转列表页、技能列表增加搜索过滤框
- Bootstrap 模式:开放全部技能可见性,注入专属提示词(skill_list 匹配意图、禁止 skill_manage)
- 管理员记忆页面:新增 AdminMemoryPage 及路由,支持查看/编辑用户记忆条目
- 内存配置与管理员用户接口同步更新
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-21 11:43:59 +08:00
xuhd
48ddbf0412
Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-server into xuhd
2026-05-16 15:51:49 +08:00
xuhd
be757b1f2f
@
...
feat(skills): skill_list 可见性过滤 + skill 只读工具常驻 + 进化面板对照展示
- skill_list:默认 lead agent 改为只暴露未归档、且内置或属于当前用户的技能;
自定义 agent 仍严格按白名单。SkillStore 不可用时降级放行全部自定义技能。
- prompt:注入系统提示词的技能列表剔除已归档(state=archived)技能。
- tools:skill_list/skill_view 只读工具改为常驻提供;skill_manage 写工具仍按
生效配置(含 per-user 覆盖)的 skill_evolution.enabled 门控。
- curator:should_run_now 解析异常时改为不运行;get_curator_status 返回上次
LLM 建议与实际工具调用两份记录,供前端对照。
- 前端:技能进化面板新增建议 vs 实际动作对照展示 + 配套 i18n。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
@
2026-05-15 20:39:13 +08:00
吉鑫升
33161c5bad
Merge remote-tracking branch 'origin/likun' into ji
...
# Conflicts:
# frontend-web/src/components/workspace/artifacts/artifact-file-detail.tsx
# frontend-web/src/components/workspace/code-editor.tsx
# frontend-web/src/components/workspace/input-box.tsx
# frontend-web/src/pages/ChatPage.tsx
# offline-backend-20260512/backend/app/gateway/routers/artifacts.py
2026-05-15 16:54:10 +08:00
likun
de9f6b6711
feat: 新增写作画布系统
2026-05-15 16:22:04 +08:00
xuhd and Claude Opus 4.7
f9d7610679
feat(memory): Memory V2 重写 - 可插拔 provider + Hindsight 集成
...
以 Hermes 的可插拔记忆架构为骨架重写 deerflow 记忆模块,兼容原有
结构化数据,并新增 Hindsight 作为外部记忆后端。
P1 - 抽象层 + builtin 本地记忆:
- MemoryProvider 抽象基类 + MemoryManager 编排层(builtin + ≤1 外部)
- BuiltinFileProvider:USER.md/MEMORY.md 二元存储、字符配额、文件锁、
原子写、frozen snapshot
- memory 工具(LangChain @tool):LLM 主动写入用户画像/工作笔记
- 记忆内容安全扫描(注入/外渗模式 + 不可见 unicode)
- memory_config 改为嵌套结构 + 旧扁平字段兼容 + per-user 三层覆盖
- 迁移脚本 migrate_memory_to_v2.py:旧 memory.json -> USER.md/MEMORY.md
- Gateway 新增 /api/memory/v2 与 v2/config 端点(用户可配置白名单字段)
P2 - Hindsight 外部 provider:
- HindsightProvider:双 bank 隔离(user bank 跨 agent 共享 + work bank
agent 私有)、并发召回合并、auto-retain、on_memory_write 镜像
- hindsight_recall/reflect/retain 三个 LangChain 工具
- MemoryMiddleware.before_model 注入 Hindsight 动态召回
- context/tools/hybrid 三种 memory_mode
- hindsight-client 作为可选依赖,未装时自动退回纯 builtin
注入走系统提示词(builtin frozen snapshot)+ before_model(Hindsight
动态召回)。后台抽取保留但默认关闭,P3 期重接入。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-15 12:15:55 +08:00
xuhd and Claude Opus 4.7
62d525dae7
feat(skills): 自我进化 - 软归档/恢复 + Agent 归属 + 状态分层 UI
...
后端:
- 新增 PUT /api/skills/custom/{name}/state 与 /pinned 软归档/恢复 + 钉选 API
- skill_manage 工具: agent 创建写 DB 归属; 删除清理 .usage.json + DB row + cascade 引用; 加 ownership 预校验
- curator 全部软归档(文件保留在 custom/), 加 reason 必填(中文), 修 user_context 跨线程传播 / 协程泄漏 / archive 文件不再移动
- LLM 评审接 ToolErrorHandlingMiddleware, 工具异常自动重试不中止本轮; 替换 create_react_agent 为 create_agent
- skill_list 按当前 agent config.yaml 的 skills 字段过滤(custom agent), lead agent 仍可见全部
- 自我进化提示词对齐 Hermes 风格: 主动询问保存, reason 强制中文且面向用户
- 控制台日志增强: 自动归档/标过时/LLM 合并/删减建议 都按条目输出原因
前端:
- 技能管理页 Tab 改「全部 / 我的」, 正确包含他人发布的 custom 技能(修复 isCustom 互斥 bug)
- 新增「过时 N / 归档 N」右侧抽屉(恢复/查看/立即归档 ⋯ 菜单)
- 新增徽章: 钉选 / 来源(Agent 创建 / 用户上传) / 使用次数展示
- 内置技能徽章修复(原 isBuiltin && isCustom 永远 false)
- 自我进化日志 run_started sentinel 在前端展示为中文分隔条
- 移除冗余 enabled 开关(归档已覆盖此能力, 减少术语)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-15 00:00:52 +08:00
吉鑫升
a27206c543
Update local frontend and backend changes
2026-05-13 17:17:42 +08:00
likun
b8926f00d7
新增用户意图确认功能
2026-05-13 14:36:44 +08:00
吉鑫升
cf2e4bdd9c
智能体分权
2026-05-13 11:36:17 +08:00
吉鑫升
e7a455f22e
Initial commit: deerflow-server (frontend-web + offline-backend-20260512)
2026-05-13 09:36:15 +08:00