董宏凯 and Cursor
a4a9a4d26e
AI 写作四阶段内置智能体 Phase 1-4 落地
...
新增 ai-writing-researcher/outliner/writer/editor 种子 agent、_agent_runner 与 use_builtin_agents 灰度开关;四节点可按 flag 切换 SOUL 模式;时间线补大纲规划师配色并更新改造文档。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-06-11 22:58:38 +08:00
fengxiangdebaozi
2d74f8883e
Step3 总结报告与顶栏主题背景图
...
新增 roundtable-summary 智能体及前后端 Step3 Markdown 总结流程;顶栏在浅/深主题下分别使用红/深蓝横幅背景。
2026-06-11 21:51:59 +08:00
吉鑫升
10047de745
Merge remote-tracking branch 'origin/master'
2026-06-11 20:00:26 +08:00
吉鑫升
82600a3404
Merge branch 'ji'
2026-06-11 19:59:58 +08:00
董宏凯
1fca24765a
代码修改
2026-06-11 19:59:23 +08:00
吉鑫升 and Claude Opus 4.8
f107ebc46d
feat: 完善知识图谱交互与 Agent/线程持久化
...
- 知识图谱画布、侧边栏、详情面板交互优化,新增图谱相关 API 与 hooks
- Agent 卡片与详情面板调整,对话页面重构
- 线程元数据持久化增强(base/memory/sql),knowledge 仓储与导出补充
- 网关路由 agents/knowledge/threads 同步更新
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-11 19:58:34 +08:00
吉鑫升
f2ffae8a22
Merge remote-tracking branch 'origin/master' into master
2026-06-11 18:59:15 +08:00
吉鑫升 and Claude Opus 4.8
ea78fe9726
fix(checkpointer): use_postgres 回退为 false 恢复本地 SQLite 聊天历史
...
- 发版 40206dc9 将 checkpointer 切到空的远程 Postgres 导致历史不可见,
且迁移/dual-read 未生效;翻回 SQLite 恢复历史
- config.yaml(backend): 注释掉暂不使用的模型条目
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-11 18:58:28 +08:00
董宏凯 and Cursor
bcc3d617a0
Merge branch 'ji' into dhk-1
...
Resolve column_additions_mysql.sql conflict: keep square_id columns from master and roundtable_drafts.task_id from dhk-1.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-06-11 17:40:08 +08:00
董宏凯
f3ca996116
wujie应用联调
2026-06-11 17:11:28 +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 Fable 5
bebe4feccf
chore(leaderboard): 用户排行榜当天快照刷新间隔默认调整为半天
...
ADMIN_LEADERBOARD_TODAY_TTL_SECONDS 默认值 300s -> 43200s,
当天数据约每半天重算一次;调度器 tick、凌晨定稿与手动“刷新当天”不变。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-06-11 14:57:27 +08:00
吉鑫升 and Claude Opus 4.8
e684de30bd
feat(knowledge): 知识库 wiki/知识图谱重构,新增发布广场选择弹窗
...
- 知识库页拆分出 wiki 组件(侧边栏/目录树/Markdown 阅读器等)
- 知识图谱页拆分出 knowledge-graph 组件并增强交互
- 新增发布广场选择弹窗 publish-square-picker-dialog
- config.yaml 新增 MiniMax-M2.5 / Ling-flash-2.0 / DeepSeek-V4-Pro 模型
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-11 14:52:25 +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
xuhd and Claude Opus 4.8
33276dae76
docs(knowledge): 经济交往时间线 markdown 排版规范化
...
在加粗事件标题后补空行,统一列表前的空白。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-11 11:45:47 +08:00
xuhd and Claude Opus 4.8
b0e48b6bda
refactor(studio): 文案“我的笔记/笔记本”统一改为“我的空间”
...
涉及空间详情页、AI 写作表单/上下文/类型、researcher 注释及 env 注释。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-11 11:45:35 +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
董宏凯
93ca273312
Merge branch 'tjl' into 'master'
...
tjl
See merge request knowledge-base-bj/deerflow-server!110
2026-06-11 03:21:02 +00:00
xuhd
82d14351fc
修改名称 笔记本改为 空间
2026-06-11 11:19:26 +08:00
吉鑫升 and Claude Opus 4.8
3845d5090b
feat(knowledge): 支持文件导入沉淀知识,知识图谱可视化随主题切换
...
- 后端新增 /api/knowledge/ingest/file:上传 md/txt/pdf/word/ppt/excel,
转 Markdown 后走 wiki-capture LLM 蒸馏为陈述式知识笔记,失败回退逐字草稿
- service.capture_file + 文档专用蒸馏提示词,按主题拆分 1~4 页
- 知识图谱导出 HTML 支持 ?theme=light|dark,布局稳定后冻结,
按度数缩放节点,悬停/点击聚焦邻居
- 前端知识库页新增「导入文件」对话框与 ingestKnowledgeFile API
- 智能体问答页与简介侧边栏 UI 优化;批量人物蒸馏脚本提取正文逻辑修正
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-11 10:25:27 +08:00
吉鑫升
6efe1b80c5
Merge branch 'ji' of http://192.168.0.200/knowledge-base-bj/deerflow-server into ji
2026-06-11 09:34:45 +08:00
吉鑫升 and Claude Opus 4.8
01696f75e9
新增批量人物蒸馏脚本,精简排行榜相关接口
...
- batch-distill: 独立单文件脚本,按时间窗调用线上服务批量蒸馏人物档案
- 精简 admin_users / public_leaderboard 路由及前端排行榜页面
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-11 09:34:34 +08:00
Administrator and Claude Opus 4.8
e97017b297
feat(agents): 智能体常用问题——侧边栏展示并一键提问
...
新增 common_questions(常用问题)字段:后端贯通 agents_config、
config.yaml 读写与 create/update API,前端 Agent 类型补充字段并在
AgentChatPage 新增 AgentInfoSidebar 组件展示常用问题,点击即填充并提交。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-11 08:34:39 +08:00
Administrator and Claude Opus 4.8
22222308a1
feat(summarization): 非破坏性上下文压缩——保留原始对话仅在请求时瞬态压缩
...
重写 DeerFlowSummarizationMiddleware:将 stock before_model 的
RemoveMessage(REMOVE_ALL_MESSAGES) 改为 no-op,改在 wrap_model_call 中
瞬态压缩为 [summary, *recent],完整原始对话仍保留在 state 中,前端继续
渲染用户真实问答。summary 消息标记 hide_from_ui 且永不持久化,按 thread
缓存以避免每次模型调用都触发 LLM。前端 isHiddenFromUIMessage 额外隐藏旧
版本持久化的 name="summary" 消息。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-11 08:34:28 +08:00
Administrator
7fb3870247
@
...
feat(summarization): 非破坏性上下文压缩——保留原始对话仅在请求时瞬态压缩
重写 DeerFlowSummarizationMiddleware:将 stock before_model 的
RemoveMessage(REMOVE_ALL_MESSAGES) 改为 no-op,改在 wrap_model_call 中
瞬态压缩为 [summary, *recent],完整原始对话仍保留在 state 中,前端继续
渲染用户真实问答。summary 消息标记 hide_from_ui 且永不持久化,按 thread
缓存以避免每次模型调用都触发 LLM。前端 isHiddenFromUIMessage 额外隐藏旧
版本持久化的 name="summary" 消息。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
@
2026-06-11 08:34:09 +08:00
fengxiangdebaozi
d9e3a87911
Merge branch 'dhk-1' of http://192.168.0.200/knowledge-base-bj/deerflow-server into dhk-1
2026-06-10 19:39:06 +08:00
fengxiangdebaozi
f01789a17e
多智能体会商上传文件
2026-06-10 19:38:58 +08:00
吉鑫升
3a04ba5726
Merge remote-tracking branch 'origin/master' into ji
2026-06-10 19:01:16 +08:00
董宏凯
d9afd8d887
代码提交
2026-06-10 17:44:44 +08:00
hkdong
7422f083b4
tjl
2026-06-10 17:19:27 +08:00
xuhd
06508cfb7c
Merge remote-tracking branch 'origin/master' into xuhd
2026-06-10 17:15:51 +08:00
吉鑫升 and Claude Opus 4.8
d658b05ee9
feat(skills): 安装成功后引导填写/AI生成中文名 + 生成超时提至60s
...
- 上传安装技能成功后,弹窗进入「设置中文名」步骤:用户可手动填写,或用所选大模型自动生成默认值,亦可跳过(回退英文名)
- 技能中文名生成超时由 30s 提高到 60s(思考模式构建时已关闭)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-10 17:14:42 +08:00
吉鑫升 and Claude Opus 4.8
3178b4c45e
fix(auth): CSRF/鉴权中间件兼容反向代理路径前缀 + 无会话请求豁免
...
清空浏览器缓存后(尤其 token 换登录)报「CSRF token missing」。根因:
反向代理把请求转发到带前缀的路径(如 /xxx/api/v1/auth/login/token),
FastAPI 用 root_path 剥前缀做路由,但 Starlette 中间件跑在路由之前,
看到的仍是带前缀的 path,导致 CSRF 豁免名单与公开路径白名单(精确/前缀
匹配)全部失配。清缓存前靠 localStorage 残留 token 当 Bearer 绕过 CSRF,
清掉后裸奔才暴露。
- 新增 proxy_path.app_relative_path:匹配前按 root_path / X-Forwarded-Prefix
剥掉代理前缀(无前缀时 no-op)。
- csrf_middleware:should_check_csrf / is_auth_endpoint 改用应用相对路径;
补上漏收的 /api/v1/auth/login/token 豁免;新增「无 access_token 会话
cookie 则跳过 CSRF」兜底(无会话请求不存在可被跨站伪造利用的会话)。
- auth_middleware:公开路径判断改用应用相对路径,避免 /xxx/api/public/*
分享页被误判 401。
- langgraph_auth:无 access_token cookie 时跳过 CSRF,与网关链路一致。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-10 15:51:01 +08:00
吉鑫升 and Claude Opus 4.8
413f92e270
fix(migrations): 合并 alembic 多头(skill_name_zh 与 chain-stages 分支)
...
20260609_01(skills.name_zh)直接挂在 20260608_01 之下,与
20260608_02..06(chain-stages/parallel-agent 分支)形成两个 head,导致
`alembic upgrade head` 报 Multiple head revisions。新增空 merge 版本
20260609_02 同时指向 20260608_06 与 20260609_01,使 head 归一。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-10 14:39:37 +08:00
董宏凯
bd426ed1d3
da
2026-06-10 12:51:13 +08:00
xuhd
b8d3a549df
buggggg
2026-06-10 11:27:48 +08:00
吉鑫升 and Claude Opus 4.8
d61aa853f1
feat(admin): 用户排行榜每日快照——手动刷新当天 + 凌晨自动定稿前一天
...
- 新增 POST /api/admin/users/leaderboard/refresh-today:同步强制重建当天快照
并返回合并区间;前端 useRefreshTodayLeaderboard + AdminUserLeaderboardPage
「刷新当天」按钮
- Gateway 调度循环在每日 ADMIN_LEADERBOARD_FINALIZE_HOUR(默认凌晨1点)对前一天
强制重算一次,避免临近午夜落库的 runs/tool-calls 漏统计;判定逻辑下沉为纯函数
deerflow.persistence.admin_stats.finalize.should_finalize_previous_day
- 新增 scripts/sql/column_additions_mysql.sql:既有 MySQL 库手动补列的幂等脚本
(Alembic 自动迁移已禁用,create_all 不改既有表)
- CLAUDE.md 补充排行榜快照、Schema 迁移约定,并补齐技能/知识库选模型的文档
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-10 11:24:21 +08:00
吉鑫升 and Claude Opus 4.8
96e0d695c0
feat(skills,knowledge): 中文名补全与知识库沉淀支持可选大模型并明确大模型报错
...
技能中文名:
- 单个「AI 生成」与「一键补充中文名」均可在请求体 model_name 选择大模型
- 一键补充改为仅管理员开放
- _generate_skill_name_zh 在模型自身失败(构建/超时/API 报错)时抛
SkillNameZhModelError,与模型返回无效名称区分;单个接口返回
502「大模型报错,无法补全技能中文名」,批量在 model_error 中带回代表性报错
知识库沉淀:
- 对话保存到知识库 / 批量导入均新增可选 model_name(透传至 capture_thread
→ extract_thread_llm_multi)
- 批量返回 llm_fallback 计数;模型异常时仍按既有逻辑回退规则抽取并落草稿,
前端明确提示「已改用规则抽取」(保存按钮保持后台异步)
前端新增 components/workspace/model-name-select.tsx 复用下拉(默认=系统配置模型)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-10 11:23:01 +08:00
Administrator
87e0ae683e
Merge remote-tracking branch 'origin/master' into ji
...
# Conflicts:
# offline-backend-20260512/backend/app/gateway/app.py
# offline-backend-20260512/backend/config.yaml
# offline-backend-20260512/backend/packages/harness/deerflow/persistence/models/__init__.py
# offline-backend-20260512/backend/packages/harness/deerflow/runtime/checkpointer/async_provider.py
2026-06-10 09:09:26 +08:00
Administrator and Claude Opus 4.8
44c0f6189b
wip: 合并 master 前暂存本地改动
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-10 08:36:47 +08:00
Administrator and Claude Opus 4.8
1ce15fbb15
style(knowledge): 实体改回纯展示(不可点击),chip 精致化
...
按需求去掉点击筛选,实体为静态彩色 chip:色点 + 名称 + 胶囊型类型标签。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-09 20:34:59 +08:00
Administrator and Claude Opus 4.8
f6af9379b7
feat(knowledge): 笔记页实体可点击筛选 + chip 美化
...
- 实体改为按钮:点击即在左侧列表筛出提及该实体的知识(清空来源/状态筛选)
- chip 加阴影/hover 上浮/类型 ring 标签/实体区 Sparkles 图标,更精致
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-09 19:48:20 +08:00
董宏凯
946799d19d
Merge branch 'dhk-1' of http://192.168.0.200/knowledge-base-bj/deerflow-server into dhk-1
2026-06-09 19:41:08 +08:00
董宏凯
7282a32859
提交代码
2026-06-09 19:41:01 +08:00
fengxiangdebaozi
cba165933c
提交代码
2026-06-09 17:18:40 +08:00
xuhd and Claude Opus 4.7
e54f42c0eb
fix(skill_manage): refuse agent writes to human-authored skills
...
Even after the previous owner check, the agent could still patch/edit
a UI-uploaded skill (source=upload) it happened to own. Uploaded skills
represent human-reviewed content; letting the agent rewrite them risks
silent drift from what the user approved.
Add _assert_skill_is_agent_authored which reads usage.json and refuses
unless source==agent. Wired into all five write actions
(create/edit/patch/delete/write_file/remove_file). Skills with no usage
entry default to source=upload, so legacy and adopted-orphan skills are
also refused — only skills the agent created via mark_agent_created in
the create flow stay editable.
Note: this check is independent of skill_store availability (it reads
the usage file, not the DB), so it runs even when skill_store is None.
Tests that exercise non-create paths against pre-existing skills will
need to call mark_agent_created first or mock get_entry.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-06-09 16:00:44 +08:00
xuhd and Claude Opus 4.7
c493639119
feat(skill-review): strict-mode prompt + raise min_tool_calls 3 to 5
...
The review agent was creating too many low-value skills. Three changes
tighten the funnel:
- review_worker prompt: rewritten in "保守模式". Default decision is
do-nothing. To create, all five AND conditions must hold (>=5 tool
calls with step dependencies, an explicit fail->fix->success episode,
cross-scenario reusability, no >=70% overlap with skill_list, can
produce >=300 chars of substance). Adds 7 explicit NO categories
(single-tool loops, one-off queries, LLM common knowledge, etc.)
and a 4-question self-check before any create. Hard cap of 1 new
skill per review, with patch preferred over create.
- min_tool_calls: 3 -> 5. Matches the prompt's ">=5 steps" hard
condition so trivial turns never reach the LLM reviewer.
- Updated config.yaml, the default-value assertion in
test_skill_review_worker, and the middleware docstring's "(default
3)" annotation to keep all three references in sync.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-06-09 16:00:29 +08:00
xuhd and Claude Opus 4.7
539a8bcec8
fix(skill_manage): block cross-user writes on patch/edit/write_file/remove_file
...
Only delete had a DB owner check via _assert_agent_may_delete. The other
four write actions only called ensure_custom_skill_is_editable, which
just verifies the directory exists under skills/custom/ — it does not
check owner_user_id. Any agent that knew a skill's name could overwrite
or strip support files from another user's UI-uploaded skill.
Generalise the helper to _assert_agent_may_modify (same three rules:
no DB row / built-in owner=None / owner mismatch) and call it from
edit, patch, delete, write_file, and remove_file. Hoist user_id +
skill_store to the top of the lock block so the four newly-guarded
branches stay one-liners and create/delete reuse the same handles.
Behaviour preserved when skill_store is None (no DB) — matches the
existing delete fallback.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-06-09 15:49:26 +08:00
xuhd
bd0eceda61
Merge remote-tracking branch 'origin/master' into xuhd
...
# Conflicts:
# offline-backend-20260512/backend/config.yaml
2026-06-09 15:43:40 +08:00