 吉鑫升andClaude Opus 4.7
|
e3cde9be25
|
feat: 定时任务运行详情执行过程视图 + 管理员下载删除 + MySQL 迁移修复
定时任务:
- 运行详情页新增「执行过程」标签页,按 agent_run_id 拉取该次运行的
agent 消息(GET /scheduled-tasks/runs/{id}/messages),运行中每 4s
自动刷新,可观察卡住的任务停在哪一步
- 详情页「返回」按钮回到来源列表(普通/管理员)并重新选中原任务
- 管理员可下载、删除任意用户的执行记录(DELETE /runs/{id} 加管理员兜底)
MySQL 兼容修复:
- 合并迁移 20260518_06 汇合 ai-writing 与 thread-shares 两个 head
- 20260517_02 改用 SQLAlchemy Core 构造,规避保留字 key 的 1064 报错
- list_messages_by_run 各事件存储补 user_id 形参以保持接口一致
测试: 新增 test_scheduled_task_admin_run_delete.py
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-18 21:13:58 +08:00 |
|
吉鑫升
|
449703a6f0
|
Merge remote-tracking branch 'origin/master' into ji
# Conflicts:
# offline-backend-20260512/backend/app/gateway/deps.py
|
2026-05-18 19:35:16 +08:00 |
|
 吉鑫升andClaude Opus 4.7
|
358d5c72a6
|
feat: 业务库切换 MySQL + 修复定时任务运行详情递归与重名 500
- 业务 ORM 数据支持 MySQL 后端(asyncmy),新增 PortableJSON/
BeijingDateTime 可移植列类型、迁移脚本与切库脚本
- 修复 GET /api/scheduled-tasks/runs/{id} 的 _load_run 无限递归
(误调用自身,应委托 service.get_run)导致的 RecursionError 500
- 定时任务名按用户唯一:create/update/admin_update 主动校验,
冲突抛 DuplicateTaskNameError,路由转 409 而非裸 IntegrityError 500
- 补充回归测试 test_scheduled_task_run_lookup / _name_uniqueness
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-18 19:34:14 +08:00 |
|
董宏凯
|
abd2ced4b4
|
Merge branch 'dhk-1' into 'master'
ai写作
See merge request knowledge-base-bj/deerflow-server!19
|
2026-05-18 09:55:50 +00:00 |
|
董宏凯
|
49e5aaea6b
|
Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-server into dhk-1
|
2026-05-18 17:47:33 +08:00 |
|
董宏凯
|
d1f431d121
|
Merge branch 'dhk-1' of http://192.168.0.200/knowledge-base-bj/deerflow-server into dhk-1
|
2026-05-18 17:45:10 +08:00 |
|
fengxiangdebaozi
|
fd759d6845
|
依赖更新
|
2026-05-18 17:44:08 +08:00 |
|
董宏凯
|
5be5531722
|
容错显示
|
2026-05-18 17:41:51 +08:00 |
|
吉鑫升
|
2a4fccde70
|
Merge remote-tracking branch 'origin/likun'
|
2026-05-18 15:41:36 +08:00 |
|
吉鑫升
|
d6f018e581
|
Merge branch 'master' into ji
|
2026-05-18 15:39:57 +08:00 |
|
 吉鑫升andClaude Opus 4.7
|
e0c1cb6581
|
feat: 定时任务管理 + 会话只读分享
定时任务:
- 管理员可查看/编辑/删除/触发全部用户的定时任务(新增 /api/scheduled-tasks/admin/* 接口与管理页)
- 卡死任务恢复:单次执行超 30 分钟超时重试(最多 3 次),耗尽后标记 failed;看门狗回收服务重启遗留的「执行中」任务
会话分享:
- 新增「只读链接」分享模式,生成公开免登录的只读对话快照页(/share/:code)
- 公开接口 /api/public/shares/* 提供对话快照与图片附件
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-18 15:39:40 +08:00 |
|
 xuhdandClaude Opus 4.7
|
f80a00e211
|
feat(skills): curator 面板加 pinned 计数 + 运行时输出技能名日志
- get_curator_status 的 agent_created_skills 增加 pinned 计数,与
active/stale/archived 正交;前端技能进化面板同步展示「被钉住」一项
(curator/types.ts、skill-evolution-panel.tsx、zh-CN/en-US/types i18n)。
- run_curator_review 每次运行时把涉及的技能名输出到日志:新增
_log_scanned_skills(扫描到的技能名)与 _candidate_skill_names
(候选技能名),logger 与 curator_log 双写。
新增 test_curator_status_counts.py、test_curator_skill_logging.py。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-18 15:25:13 +08:00 |
|
 xuhdandClaude Opus 4.7
|
4aee413680
|
revert(memory): Hindsight document_id 改回每轮独立文档
commit dba821a 把 document_id 从带时间戳改成按 thread_id 确定性派生
(同一 thread 累积成一个文档)。经复核,改回原来的带微秒时间戳写法 ——
每轮对话的 retain 重新落到各自独立的 Hindsight 文档。
retain_every_n_turns 轮次节流(turn_index)与 aiohttp 客户端泄漏修复
保持不动,仅回退 document_id 这一处。
test_hindsight_provider.py 的 TestDocumentId 按"每轮独立文档"重写。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-18 15:24:13 +08:00 |
|
likun
|
2a91e2e7ad
|
知识库补充到p6
|
2026-05-18 15:18:22 +08:00 |
|
xuhd
|
dba821a70e
|
@
fix(memory): 修复 Hindsight provider 生命周期的三处缺陷
HindsightProvider 被 build_memory_manager 每轮重新构造,以下三个问题
都源于这个无状态特性未被正确处理:
1. document_id 每轮漂移 —— 原 _reset_retain_batch 用微秒时间戳拼接,
导致同一 thread 的每轮 retain 落到不同文档,文档数随对话轮数线性膨胀。
改为按 thread_id 确定性派生 (thread-{thread_id}),同一 thread 累积成一份。
2. retain_every_n_turns 失效 —— 进程内 _turn_counter 每轮被 initialize
重置,retain_every_n_turns > 1 时永不触发。新增 turn_index 参数贯穿
sync_turn/sync_all,由 MemoryMiddleware 按对话历史 (count_user_turns)
算出并传入;_turn_counter 仅作缺省退路。
3. aiohttp ClientSession 泄漏 —— 缓存的客户端从不 shutdown,且 _run_coro
每次新建事件循环使缓存客户端失效,触发 "Unclosed client session"。
改为客户端即开即关:_run_with_client 在 finally 保证关闭,_client_factory
作为可覆盖的测试注入点。
测试:test_hindsight_provider.py 全量重写 (含 TestDocumentId /
TestRetainEveryNTurnsAcrossRecreation / TestClientLifecycle),
新增 test_memory_message_processing.py,test_memory_manager.py 补
turn_index 透传用例。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@
|
2026-05-18 14:34:22 +08:00 |
|
董宏凯
|
836dd73446
|
容错处理
|
2026-05-18 11:29:40 +08:00 |
|
xuhd
|
8f88427d4e
|
Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-server into xuhd
|
2026-05-18 10:25:51 +08:00 |
|
xuhd
|
817585a4ce
|
Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-server into xuhd-v2
|
2026-05-18 10:22:23 +08:00 |
|
 xuhdandClaude Opus 4.7
|
0386f54449
|
feat(skills): 接入技能使用埋点,修复活跃技能被 curator 误归档
技能正文不进 system prompt,Agent 按 Progressive Loading 用 read_file
加载 SKILL.md 才算真正用到该技能。此前 read_file 与 skill_manage 的
patch/edit 都不更新 .usage.json,curator 的年龄流转据 latest_activity_at
判断闲置,导致每天都在用的 agent 创建技能在 30/90 天后被误标陈旧并归档。
- sandbox/tools.py: 新增 _custom_skill_name_from_path / _record_skill_read,
read_file 读取 custom 技能目录下文件时 bump_use(best-effort,失败不影响主流程)
- skill_manage_tool.py: patch/edit 经 _bump_patch_best_effort 记 patch_count
- tests/test_skill_usage_signals.py: 12 项,覆盖路径解析、埋点与异常兜底
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-18 10:22:15 +08:00 |
|
吉鑫升
|
4761677676
|
Merge remote-tracking branch 'origin/master' into ji
|
2026-05-18 10:03:49 +08:00 |
|
 吉鑫升andClaude Opus 4.7
|
f61d053010
|
feat(skills): 新增技能详情字段并统一发布图标
- 技能新增 detail 字段(skills 表新增列 + Alembic 迁移),
由管理员或技能发布者编辑,内置/公开技能仅管理员可编辑
- 新增 PUT /api/skills/{name}/detail 接口,GET/列表接口返回 detail
- 新增可复用的技能详情弹窗组件,支持 Markdown 渲染与内联编辑
- 智能体创建/编辑选技能、智能体卡片技能徽章均可查看技能详情
- 将定时任务/智能体/技能的发布图标统一为 Globe/Lock
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-18 10:03:37 +08:00 |
|
fengxiangdebaozi
|
8440d02198
|
Merge branch 'dhk-1' of http://192.168.0.200/knowledge-base-bj/deerflow-server into dhk-1
|
2026-05-18 10:03:06 +08:00 |
|
xuhd
|
ebcdf847d2
|
222
|
2026-05-18 10:02:00 +08:00 |
|
fengxiangdebaozi
|
5c553aae19
|
文档更新
|
2026-05-18 09:58:34 +08:00 |
|
董宏凯
|
0af8ca5f78
|
历史记录回显
|
2026-05-17 22:55:01 +08:00 |
|
董宏凯
|
52ba178c4e
|
字数要求修改
|
2026-05-17 22:33:43 +08:00 |
|
董宏凯
|
166016a741
|
检索结果过程添加
|
2026-05-17 22:01:29 +08:00 |
|
董宏凯
|
20786e690d
|
自动下滑
|
2026-05-17 21:33:24 +08:00 |
|
董宏凯
|
c19417a706
|
暂停继续
|
2026-05-17 21:19:12 +08:00 |
|
董宏凯
|
b768e0affb
|
改写弹窗出现的位置
|
2026-05-17 20:38:35 +08:00 |
|
董宏凯
|
05ff10df1b
|
ai改写调用
|
2026-05-17 20:18:11 +08:00 |
|
董宏凯
|
a0a6227368
|
文章类型添加
|
2026-05-17 19:50:52 +08:00 |
|
董宏凯
|
918e65d8d3
|
ai写作
|
2026-05-17 19:29:10 +08:00 |
|
董宏凯
|
6cab62d140
|
作家大纲拖拽调整顺序
|
2026-05-17 18:00:07 +08:00 |
|
董宏凯
|
9526268f1f
|
加载框顺序调整
|
2026-05-17 17:55:42 +08:00 |
|
董宏凯
|
016ec1877a
|
ai写作
|
2026-05-17 17:39:41 +08:00 |
|
董宏凯
|
772e75f04d
|
ai写作
|
2026-05-17 17:25:18 +08:00 |
|
董宏凯
|
10d7190ea4
|
ai写作
|
2026-05-17 14:22:25 +08:00 |
|
董宏凯
|
cc8703577d
|
ai写作
|
2026-05-17 13:08:45 +08:00 |
|
董宏凯
|
4533755704
|
Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-server into dhk-1
|
2026-05-16 22:03:41 +08:00 |
|
董宏凯
|
da4a08dfe1
|
智能选中文字
|
2026-05-16 22:00:34 +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 |
|
 xuhdandClaude Opus 4.7
|
39def1c20b
|
feat(skills): curator 健壮性加固 + 评审模型可配置 + 手动触发体验
调度健壮性:
- 技能进化总开关 skill_evolution.enabled 真正生效;CuratorConfig
与 CuratorSubConfig 默认 enabled 改为 false(显式 opt-in)
- 新增 per-user 运行锁(.curator_state 的 running/started_at),
防定时器与手动触发并发重复运行;6h stale 检测防进程残留死锁
- maybe_run_curator 改用 ThreadPoolExecutor 限并发(上限 5),
防首次部署所有用户同时到期的惊群
- 首次运行持续失败时按 6h 退避重试,不再每个 tick 烧 LLM 配额
- should_run_now 时间解析容忍 naive 时间串;损坏的 last_run_at
触发重跑而非永久死锁
- SkillStore 新增 list_published_names 批量接口,curator 一轮
只查一次 published,取代逐技能查库
LLM 评审超时:
- _run_llm_review 给 agent.invoke 套整体超时
(curator.review_timeout_seconds,默认 600s),超时中止本次评审
并在 curator 日志输出,curator 正常收尾、释放运行锁
- copy_context 把 user 上下文传入工作线程
模型可配置:
- 新增 curator.model_name;curator 评审与技能安全审核共用该模型,
未配置则回退主模型
- 移除独立的 moderation_model_name 配置
- 前端进化面板新增模型下拉选择器
手动触发体验:
- /api/curator/run 派发后台线程前先预检,返回 {triggered, reason},
不再无论开关状态都提示"已开始"
- 前端:总开关/curator 开关未开时禁用"立即执行"按钮,
被预检拦下时按原因(开关未开 / 已有任务在跑)给出准确提示
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-16 15:50:15 +08:00 |
|
董宏凯
|
e8a31b5d37
|
代码修改
|
2026-05-16 14:24:44 +08:00 |
|
董宏凯
|
5a25dd08f6
|
Merge branch 'dhk-2' into 'master'
文档修改
See merge request knowledge-base-bj/deerflow-server!18
|
2026-05-16 01:07:56 +00:00 |
|
fengxiangdebaozi
|
b34219ce86
|
文档修改
|
2026-05-16 09:07:18 +08:00 |
|
董宏凯
|
05548b0fa6
|
Merge branch 'dhk-1' into 'master'
Dhk 1
See merge request knowledge-base-bj/deerflow-server!17
|
2026-05-15 15:28:24 +00:00 |
|
董宏凯
|
e08e7be24c
|
Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-server into dhk-1
|
2026-05-15 23:27:48 +08:00 |
|
董宏凯
|
1be600155b
|
openCanvas
|
2026-05-15 23:27:34 +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 |
|