Commit Graph

90 Commits

Author SHA1 Message Date
朱潮
2898c9c42d Merge branch 'feature/tool-error-recovery' into bot_manager 2026-06-20 13:10:29 +08:00
朱潮
06974e9744 feat: recover tool exceptions into ToolMessage so SSE stream keeps flowing
Add ToolErrorRecoveryMiddleware as the outermost agent middleware so any
tool-call exception (notably MCP ToolException) is converted into a
ToolMessage with status="error" carrying the raw error text. The agent
can then loop once more and reply to the user in natural language about
what failed, instead of bubbling the exception up through agent.astream
and breaking the SSE response in routes/chat.py.

The recovery layer extracts the inner `text="..."` payload out of the MCP
TextContent repr when present, falling back to str(error) otherwise. It
deliberately re-raises asyncio.CancelledError so task cancellation still
propagates, and sits *outside* ToolMetricsMiddleware so the existing
status=error metric is still emitted before recovery kicks in.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-20 13:07:19 +08:00
朱潮
01fb63c955 add EMBEDDING_BASE_URL 2026-06-18 14:56:27 +08:00
朱潮
f85ddaf127 fix: remove stray sympy import causing startup failure
The unused 'from sympy.printing.cxx import none' was accidentally added
by IDE autocomplete. sympy is not installed in the image, so importing
agent/deep_assistant.py raised ModuleNotFoundError and the API server
crash-looped on startup.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 15:47:52 +08:00
朱潮
195bd49236 Merge branch 'developing' into bot_manager 2026-06-13 19:28:37 +08:00
朱潮
e2827c6a47 add mainAgentHiddenTools 2026-06-12 11:03:30 +08:00
朱潮
cb649d83ee Merge branch 'developing' into bot_manager
# Conflicts:
#	.features/skill/MEMORY.md
#	poetry.lock
#	requirements.txt
2026-06-08 20:07:30 +08:00
朱潮
66cde77117 Merge branch 'feature/fix_large_results_backend' into dev 2026-06-02 20:57:18 +08:00
朱潮
6bccd89e9a 在 agent/deep_assistant.py 把两个落盘 backend 改为 virtual_mode=True 修复 2026-06-02 20:56:43 +08:00
csh28
ecc2687f7b Add tool call metrics middleware 2026-05-29 11:10:31 +08:00
朱潮
4b50a75a3d Merge branch 'feature/mcp-ui' into bot_manager 2026-05-23 13:53:24 +08:00
朱潮
776acc2373 DaytonaSandbox support shell env 2026-05-21 19:46:22 +08:00
朱潮
718ec5302e Merge branch 'developing' into bot_manager 2026-05-12 12:44:19 +08:00
朱潮
5b634bc2ab 增加子agent支持 2026-05-11 18:55:25 +08:00
csh28
1f06450402 Propagate trace id through MCP metadata 2026-05-08 18:59:42 +08:00
朱潮
f5bb23a2d1 merge 2026-05-07 19:36:27 +08:00
朱潮
425f3c5bb4 chore: replace Chinese comments and log messages with English
Convert all Chinese comments, docstrings, logger/print output,
HTTPException detail messages, and API response messages to English
across the entire codebase. Functional zh/ja localized strings
(e.g. prompt templates, timezone display names, date formats) are
preserved as-is.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 19:45:35 +08:00
朱潮
45a94942b8 异步执行 _execute_post_agent_hooks 2026-04-24 13:07:44 +08:00
朱潮
8446dab1e4 daytona support 2026-04-23 15:09:09 +08:00
朱潮
c9e07898fc daytona support 2026-04-23 11:42:50 +08:00
朱潮
8e35d860a5 merge 2026-04-20 22:42:53 +08:00
朱潮
f13f208900 add ENABLE_SELF_KNOWLEDGE 2026-04-20 19:24:30 +08:00
朱潮
dfc1c003c6 sanitize_model_kwargs 2026-04-20 19:00:15 +08:00
朱潮
2fa779e61e disable for autoload 2026-04-18 23:08:28 +08:00
朱潮
9f12a633bc 优化mcp配置 2026-04-17 11:05:16 +08:00
朱潮
d4bdff64f7 Merge branch 'feature/moshui20260410-file-path-fix' into developing 2026-04-13 18:54:09 +08:00
朱潮
9825a43cad Merge branch 'feature/moshui20260410-file-path-fix' into bot_manager 2026-04-13 18:53:26 +08:00
朱潮
ccff7be046 Merge branch 'developing' into bot_manager 2026-04-11 21:02:18 +08:00
朱潮
4591163282 修复空内容重试 2026-04-11 19:15:53 +08:00
朱潮
3da3cc90e1 virtual_mode=False 2026-04-11 17:52:48 +08:00
朱潮
2964326cb8 update to deepagents 0.5.2 2026-04-11 16:23:59 +08:00
朱潮
7d22f0b34d 禁止路径穿越 2026-04-11 11:48:18 +08:00
朱潮
788bb0089f upgrade to deepagents-0_5_2 2026-04-11 11:40:43 +08:00
朱潮
d2bba9e095 update path fix 2026-04-10 17:17:03 +08:00
朱潮
30dc697071 realtime接口支持16khz输出 2026-03-23 10:37:17 +08:00
朱潮
4b70da5bb0 语音 2026-03-21 02:41:10 +08:00
朱潮
32fd8c8656 shell_env支持 2026-03-16 13:31:59 +08:00
朱潮
f7773a93e1 Merge branch 'upgrade/deepagents-0.4.4' 2026-03-04 14:08:51 +08:00
朱潮
52d8161b0e 修改确保 max_length 永远不会是 None 2026-03-04 14:08:26 +08:00
朱潮
9215f8236d 🐛 fix: 修复 Mem0 连接池耗尽和 LLM 参数透传问题
- mem0_manager: 添加 _cleanup_mem0_instance 方法,在缓存移除实例时显式释放数据库连接,避免等待 GC 导致连接池耗尽
- deep_assistant: 根据 model_provider 过滤不支持的参数,Anthropic 不支持 OpenAI 特有参数如 n、presence_penalty 等

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-04 10:11:44 +08:00
朱潮
4a534163d5 skill.md文件长度限制解除 2026-03-02 12:55:39 +08:00
朱潮
03078a2077 移除虚拟文件夹 2026-03-02 12:17:19 +08:00
朱潮
61c8186b55 upgrade/deepagents-0.4.4 2026-03-02 02:27:42 +08:00
朱潮
3ce0b6a9f8 fix: update CustomSkillsMiddleware.before_agent signature
Add missing 'config' parameter to match new SkillsMiddleware API.
2026-03-02 01:37:30 +08:00
朱潮
a0b6e4cc7f feat: upgrade deepagents 0.4.3 and deepagents-cli 0.0.25
- Replace ShellMiddleware with LocalShellBackend
- Update AgentMemoryMiddleware to MemoryMiddleware with new signature
- Update CustomSkillsMiddleware to use new SkillsMiddleware signature
- Add LocalContextMiddleware for local context
- Update CompositeBackend to use routing
- Update dependencies: langgraph-checkpoint-postgres to 3.0.4

Breaking Changes:
- agent/deep_assistant.py: Major refactoring to adapt to new deepagents API
  - pyproject.toml: Version bump
    - deepagents: 0.2.8 -> 0.4.3
    - deepagents-cli: 0.0.11 -> 0.0.25
  - langgraph-checkpoint-postgres: 2.0.25 -> 3.0.4 (for compatibility with langgraph-checkpoint 3.x)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-02 01:29:58 +08:00
朱潮
805bd6f5d4 modify skill middleware 2026-02-10 11:53:14 +08:00
朱潮
3ec992436c add USER_IDENTIFIER 2026-02-07 15:39:20 +08:00
朱潮
e67d50b4fc rename general agent 2026-02-06 17:05:17 +08:00
朱潮
525801d7f5 update summary 2026-02-04 15:31:41 +08:00
朱潮
f1107ea35a 增加enable_thinking和enable_memory 2026-01-28 17:13:41 +08:00