Commit Graph

315 Commits

Author SHA1 Message Date
朱潮
8bb8c3fbc8 add scripts/ 2026-01-04 17:19:03 +08:00
朱潮
e7f6378f6b system_prompt_deep_agent 2026-01-04 16:45:24 +08:00
朱潮
96f5079bf9 📝 docs(deep-agent): remove directory access restriction from system prompt
Remove the CRITICAL section about directory access restrictions.
Path handling guidance is still maintained.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 21:02:34 +08:00
朱潮
8c67630bbd ♻️ refactor(deep-agent): customize agent memory middleware path display
Override AgentMemoryMiddleware to simplify agent directory display.
The CustomAgentMemoryMiddleware shows "." instead of full path.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 21:00:49 +08:00
朱潮
a6f166d51e refactor: simplify path displays and remove sensitive config data
- Add CustomSkillsMiddleware to show ./skills instead of full paths
- Enable virtual_mode for FilesystemBackend in local mode
- Display "." instead of ~/.deepagents/{bot_id} in system prompt
- Remove backend_host and masterkey from robot project config

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 20:30:44 +08:00
朱潮
7c9e270a66 feat(deep-agent): add custom workspace_root support for shell commands
- Add create_custom_cli_agent function to support custom workspace_root
- Set shell workspace to ~/.deepagents/{bot_id} for deep_agent type
- Pass system_prompt to create_custom_cli_agent for proper context
- Fix duplicate <env> tag in system_prompt_deep_agent.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 18:18:38 +08:00
朱潮
49a0447f9f 🔧 chore(deep-agent): disable shell feature by default
Set enable_shell=False to disable shell command execution capabilities
in the deep agent for security reasons.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 16:59:33 +08:00
朱潮
fbbf0c0653 fix(file-manager): fix create-folder API to accept JSON request body
The create_folder endpoint was incorrectly defined to accept query
parameters instead of JSON request body, causing 400 errors when
called from the frontend.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 16:52:07 +08:00
朱潮
306cebd8f1 refactor(project-manager): simplify project path resolution logic
- Remove complex symlink resolution in _get_robot_dir
- Simplify skills source directory path calculation
- Remove project_path parameter from create_project_directory call

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 16:27:46 +08:00
朱潮
78c413f4ea feat(robot): add default rag-retrieve skill for catalog/deep agents
When skills parameter is empty or None and robot_type is
catalog_agent or deep_agent, automatically load rag-retrieve skill.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 13:42:24 +08:00
朱潮
766b9becda feat(deep-agent): add skills support and improve project structure
- Add skills parameter to ChatRequest for skill file processing
- Extract and unzip skill files to robot project skills directory
- Add robot_config.json with bot_id and environment variables
- Update symlink setup to skip if ~/.deepagents already exists
- Enhance system prompt with directory access restrictions
- Refactor _get_robot_dir to handle symlink paths correctly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 13:21:58 +08:00
朱潮
c808517f02 fix(file-manager): preserve project/prompt prefix in nested directories
修复文件管理 API 中路径计算问题。当点击第三级目录时,由于
PROJECTS_DIR 是相对路径而 item 是绝对路径,导致 relative_to()
失败返回绝对路径,从而使前端丢失前缀。

使用 PROJECTS_DIR.resolve() 作为基准确保正确计算相对路径。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 09:37:54 +08:00
朱潮
e00f99c5c5 catalog_agent 转换为deep_agent 2025-12-30 19:35:31 +08:00
朱潮
0ea3009910 add libpq-dev 2025-12-24 21:26:34 +08:00
朱潮
03925bb075 add requirements 2025-12-24 20:58:37 +08:00
朱潮
0e6b2f1511 add CHECKPOINT_DB_URL 2025-12-24 20:43:10 +08:00
朱潮
7a21df05a3 add PROFILE env 2025-12-24 12:51:12 +08:00
朱潮
b86a8364e9 db 2025-12-24 11:05:10 +08:00
朱潮
e117f1ee07 新增checkpoint清理机制 2025-12-24 00:12:01 +08:00
朱潮
bf11975183 修改balance资源配置 2025-12-23 23:11:24 +08:00
朱潮
06102559ef add SUMMARIZATION_MESSAGES_TO_KEEP 2025-12-23 22:31:26 +08:00
朱潮
9162b4258d update init agent 2025-12-23 22:26:59 +08:00
朱潮
d8dc973b95 sqlite pool and change agent cache to tools cache 2025-12-23 22:18:18 +08:00
朱潮
09a9c8be93 add MCP_HTTP_TIMEOUT and try catch 2025-12-23 20:13:46 +08:00
朱潮
06c7db26d4 set default profile low_memory 2025-12-23 19:20:43 +08:00
朱潮
b8e00d403c 修复完成。主要改动: 1. 新增 _clean_content_blocks 方法:专门处理 content 字段的清理 - 当 content 是列表格式时,过滤掉 type: 'tool_use' 的块(如果 id 不在 valid_tool_call_ids 中) - 返回清理后的 content 和是否有文本内容的标志 2. 更新 _cleanup_tool_use_messages 方法: - 调用 _clean_content_blocks 来清理 content - 使用清理后的 cleaned_content 创建新的 AIMessage 问题根源:之前的代码只清空了 tool_calls=[],但没有从 content 列表中移除 type: 'tool_use' 的块。Anthropic API 会检查这两个地方,导致报错。 2025-12-23 19:11:27 +08:00
朱潮
584f10b5e4 Merge branch 'deep_agent' into prod 2025-12-23 17:37:19 +08:00
朱潮
d3465d418e add symlink 2025-12-23 17:36:45 +08:00
朱潮
41dfa074e1 add deep agent cli deps 2025-12-23 12:19:15 +08:00
朱潮
61c6b69aa5 add agent/tool_use_cleanup_middleware.py 2025-12-23 12:04:26 +08:00
朱潮
aaad9df20a add skills 2025-12-22 23:47:12 +08:00
朱潮
95786d559e sqlite dir check exists 2025-12-18 11:32:43 +08:00
朱潮
881845f284 use sqlite 2025-12-18 11:12:05 +08:00
朱潮
a92bea5b58 删除一些环境变量 2025-12-18 09:41:43 +08:00
朱潮
6bad1743b3 warm_up 2025-12-18 00:38:04 +08:00
朱潮
96d9ee5af7 guildline messages 2025-12-17 23:32:50 +08:00
朱潮
d6504c49c7 guildline messages 2025-12-17 23:31:38 +08:00
朱潮
a7dbacf70f add cache tools 2025-12-17 23:29:41 +08:00
朱潮
59c58a9691 guildline messages 2025-12-17 23:25:40 +08:00
朱潮
c1c51da77e guildline messages 2025-12-17 23:21:15 +08:00
朱潮
47f1d1c7eb cache 2025-12-17 23:05:42 +08:00
朱潮
436dab1a2f memory saver全局 2025-12-17 21:58:59 +08:00
朱潮
b78b178c03 删除agent manager 2025-12-17 20:27:06 +08:00
shuirong
23bc62a2b8
Merge pull request #6 from sparticleinc/master
ci: fix checkout step
2025-12-17 15:53:00 +09:00
shuirong
40e5e1e7aa ci: fix checkout step 2025-12-17 15:52:30 +09:00
shuirong
667294f49f
Merge pull request #5 from sparticleinc/master
ci: add checkout step
2025-12-17 15:50:38 +09:00
shuirong
409e3ba2c1 ci: add checkout step 2025-12-17 15:50:07 +09:00
shuirong
0f01fbad3b
Merge pull request #4 from sparticleinc/master
ci: push to dockerhub, support arm
2025-12-17 15:48:30 +09:00
shuirong
500d3aa316 ci: push to dockerhub, support arm 2025-12-17 15:47:28 +09:00
朱潮
c9a91f8f4d add DEFAULT_THINKING_ENABLE 2025-12-17 12:33:58 +08:00