Merge branch 'main' into release/2.0-rc

This commit is contained in:
jiangfeng.11
2026-04-11 10:34:31 +08:00
152 changed files with 16060 additions and 499 deletions
@@ -11,7 +11,11 @@ from weakref import WeakValueDictionary
from langchain.tools import ToolRuntime, tool
from langgraph.typing import ContextT
<<<<<<< HEAD
from deerflow.agents.lead_agent.prompt import clear_skills_system_prompt_cache
=======
from deerflow.agents.lead_agent.prompt import refresh_skills_system_prompt_cache_async
>>>>>>> main
from deerflow.agents.thread_state import ThreadState
from deerflow.mcp.tools import _make_sync_tool_wrapper
from deerflow.skills.manager import (
@@ -115,7 +119,11 @@ async def _skill_manage_impl(
name,
_history_record(action="create", file_path="SKILL.md", prev_content=None, new_content=content, thread_id=thread_id, scanner=scan),
)
<<<<<<< HEAD
clear_skills_system_prompt_cache()
=======
await refresh_skills_system_prompt_cache_async()
>>>>>>> main
return f"Created custom skill '{name}'."
if action == "edit":
@@ -132,7 +140,11 @@ async def _skill_manage_impl(
name,
_history_record(action="edit", file_path="SKILL.md", prev_content=prev_content, new_content=content, thread_id=thread_id, scanner=scan),
)
<<<<<<< HEAD
clear_skills_system_prompt_cache()
=======
await refresh_skills_system_prompt_cache_async()
>>>>>>> main
return f"Updated custom skill '{name}'."
if action == "patch":
@@ -156,7 +168,11 @@ async def _skill_manage_impl(
name,
_history_record(action="patch", file_path="SKILL.md", prev_content=prev_content, new_content=new_content, thread_id=thread_id, scanner=scan),
)
<<<<<<< HEAD
clear_skills_system_prompt_cache()
=======
await refresh_skills_system_prompt_cache_async()
>>>>>>> main
return f"Patched custom skill '{name}' ({replacement_count} replacement(s) applied, {occurrences} match(es) found)."
if action == "delete":
@@ -169,7 +185,11 @@ async def _skill_manage_impl(
_history_record(action="delete", file_path="SKILL.md", prev_content=prev_content, new_content=None, thread_id=thread_id, scanner={"decision": "allow", "reason": "Deletion requested."}),
)
await _to_thread(shutil.rmtree, skill_dir)
<<<<<<< HEAD
clear_skills_system_prompt_cache()
=======
await refresh_skills_system_prompt_cache_async()
>>>>>>> main
return f"Deleted custom skill '{name}'."
if action == "write_file":