feat: ExtensionConfig — models, Conversation wiring, and server integration#2858
Draft
csmith49 wants to merge 4 commits intorefactor/mcp-merge-to-mcp-modulefrom
Draft
feat: ExtensionConfig — models, Conversation wiring, and server integration#2858csmith49 wants to merge 4 commits intorefactor/mcp-merge-to-mcp-modulefrom
csmith49 wants to merge 4 commits intorefactor/mcp-merge-to-mcp-modulefrom
Conversation
Exploratory draft of the declarative extension config and resolution workflow. ExtensionConfig holds the specification (skills, plugins, hooks, auto-loading flags); resolve() loads, merges, and returns a ResolvedExtensions with the materialized result. Not wired into Conversation yet -- just the data models and merge logic. Co-authored-by: openhands <openhands@all-hands.dev>
- Rename load_user_skills → load_user_extensions and load_public_skills → load_public_extensions on ExtensionConfig since the config handles plugins, hooks, and agents — not just skills. - Replace deprecated plugin.add_mcp_config_to() with merge_mcp_configs() in ExtensionConfig.resolve(). - Fix test_config.py: add required 'content' field to Skill helper, use correct HookConfig/HookMatcher/HookDefinition API. Co-authored-by: openhands <openhands@all-hands.dev>
…n loading Conversation (local and remote) now accepts an ExtensionConfig parameter that replaces the separate plugins, hook_config, and skills parameters. ExtensionConfig.resolve() centralizes all extension loading logic. LocalConversation changes: - New _extension_config field replaces _plugin_specs/_pending_hook_config - _ensure_plugins_loaded() renamed to _ensure_extensions_loaded() - Delegates to ExtensionConfig.resolve(work_dir) then merges skills/mcp/hooks - Backward-compatible: builds ExtensionConfig from legacy params when not provided Conversation factory: - All overloads accept extension_config kwarg and forward it RemoteConversation: - Accepts extension_config and serializes it into the server payload - Falls back to legacy plugins/hook_config fields for server compatibility Public API: - ExtensionConfig exported from openhands.sdk Closes #2767 (wiring phase) Co-authored-by: openhands <openhands@all-hands.dev>
…ding fields Server request model: - Add extension_config field to _StartConversationRequestBase - Flows through StoredConversation automatically via inheritance Event service: - Forward extension_config from StoredConversation to LocalConversation - Legacy plugins/hook_config still passed for backward compat AgentContext deprecation: - load_user_skills, load_public_skills, marketplace_path now carry deprecated Field metadata (deprecated_in=1.18.0, removed_in=1.23.0) - _load_auto_skills model_validator emits warn_deprecated() when these fields are set to non-default values - Fields still function for backward compatibility during the deprecation window Examples: - 03_activate_skill: move load_public_skills to ExtensionConfig on Conversation - 01_loading_agentskills: remove redundant load_public_skills=False Tests: - 3 new server tests: extension_config field exists, flows through StoredConversation, defaults to None Co-authored-by: openhands <openhands@all-hands.dev>
This was referenced Apr 16, 2026
Contributor
Coverage Report •
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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
Consolidated PR (previously #2858, #2859, #2860) introducing
ExtensionConfigfor centralized extension loading across the SDK and server.1. ExtensionConfig and ResolvedExtensions models
ExtensionConfigholds the specification (skills, plugins, hooks, auto-loading flags);resolve()loads, merges, and returns aResolvedExtensionswith the materialized result.2. Wire ExtensionConfig into Conversation
LocalConversation:
_extension_configfield replaces_plugin_specs/_pending_hook_config_ensure_plugins_loaded()renamed to_ensure_extensions_loaded()ExtensionConfig.resolve(work_dir)then merges skills/mcp/hooksExtensionConfigfrom legacy params when not providedConversation factory & RemoteConversation:
extension_configkwargExtensionConfigexported fromopenhands.sdk3. Server-side integration and deprecations
Server request model:
extension_configfield to_StartConversationRequestBaseStoredConversationautomatically via inheritanceEvent service:
extension_configfromStoredConversationtoLocalConversationAgentContext deprecation:
load_user_skills,load_public_skills,marketplace_pathdeprecated (1.18.0 → 1.23.0)Examples:
03_activate_skill: moveload_public_skillstoExtensionConfig01_loading_agentskills: remove redundantload_public_skills=FalseChanges
extensions/config.py:ExtensionConfigmodel withresolve(work_dir)method andResolvedExtensionsdataclasstests/sdk/extensions/test_config.pyStack
Part of a
gh stack— review bottom-up:feat/installed-extensions→mainopenhands.sdk.mcp#2848refactor/mcp-merge-to-mcp-module→feat/installed-extensionsThis PR was updated by an AI assistant (OpenHands) on behalf of the user.