sync: 鍚屾灞€鍩熺綉鏈€鏂颁唬鐮?(source master @ b69568e4)

This commit is contained in:
gozeros committed 2026-10-21 14:51:31 +08:00
1 parent 4f7f07504a
commit 8bc8b0e082
1651 files changed
+278599 -11416

No files matched your search

@@ -359,6 +359,29 @@ class WorkflowRunExecutor:
headers = payload.get("headers") if isinstance(payload, dict) else None
return {"headers": headers} if isinstance(headers, dict) else None
async def resolve_enabled_skills() -> set[str]:
"""Read the live catalog for the skill-node execution preflight."""
from deerflow.config.extensions_config import ExtensionsConfig
from deerflow.skills import get_or_new_skill_storage
def _load() -> set[str]:
# Load the switch document separately because SkillStorage
# deliberately degrades open on config errors for ordinary
# discovery. Workflow execution must instead fail closed.
extensions = ExtensionsConfig.from_file()
skills = get_or_new_skill_storage().load_skills(enabled_only=False)
return {
str(skill.name)
for skill in skills
if getattr(skill, "name", None)
and extensions.is_skill_enabled(
str(skill.name),
skill.category.value if hasattr(skill.category, "value") else str(skill.category),
)
}
return await asyncio.to_thread(_load)
async def run_subworkflow(**kwargs: Any) -> dict[str, Any]:
if depth + 1 > _MAX_SUBWORKFLOW_DEPTH:
raise WorkflowError(
@@ -373,6 +396,7 @@ class WorkflowRunExecutor:
save_artifact=save_artifact,
resolve_data_source=resolve_data_source,
resolve_credential=resolve_credential,
resolve_enabled_skills=resolve_enabled_skills,
run_subworkflow=run_subworkflow,
run_deep_research=deep_research_adapter.run,
)