refactor(config): remove ACP singleton, expose acp_agents on AppConfig#2778
Open
ShenAC-SAC wants to merge 1 commit intobytedance:mainfrom
Open
refactor(config): remove ACP singleton, expose acp_agents on AppConfig#2778ShenAC-SAC wants to merge 1 commit intobytedance:mainfrom
ShenAC-SAC wants to merge 1 commit intobytedance:mainfrom
Conversation
Drops the legacy load_acp_config_from_dict / get_acp_agents singleton API. acp_agents is now sourced exclusively from AppConfig.acp_agents, eliminating the dual source-of-truth between the global singleton and the validated config. - acp_config.py keeps only ACPAgentConfig pydantic model - app_config.py removes _validate_acp_agents (handled by pydantic) - tools.py reads config.acp_agents directly - lead_agent/prompt._build_acp_section drops singleton fallback - tests migrated to construct AppConfig with acp_agents addresses bytedance#2687 item 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the legacy
deerflow.config.acp_configglobal singleton API (load_acp_config_from_dict/get_acp_agents). ACP agent configuration is now sourced exclusively fromAppConfig.acp_agents, eliminating the dual source-of-truth between the singleton and the pydantic-validated config.addresses #2687 item 2
Changes
acp_config.py: keep onlyACPAgentConfigpydantic model; drop module-level singleton + loader/getterapp_config.py: remove_validate_acp_agents(pydantic already validatesdict[str, ACPAgentConfig]); stop loading the singleton from YAMLtools/tools.py: readconfig.acp_agentsdirectly viagetattragents/lead_agent/prompt.py::_build_acp_section: drop singleton fallback, rely onapp_config.acp_agentstools/builtins/invoke_acp_agent_tool.py: unchanged (already usesACPAgentConfigonly)AppConfigwithacp_agentsdirectly; monkeypatches againstget_acp_agentsremovedVerification
make lintpassesmake test— 3051 passed, 18 skipped