Preserve registry fields on tool save and store owner in all publish paths
- save_tool() now preserves registry_hash, registry_status, registry_owner, and registry_feedback from existing config when writing Tool.to_dict(), preventing edits from erasing registry metadata. - CLI publish (registry_commands.py) and collection publish (collections_commands.py) now save registry_owner from the publish response, matching the GUI publish dialog behavior. Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
@@ -731,6 +731,9 @@ def _publish_single_tool(tool_name: str, client) -> dict:
|
||||
config_data = yaml.safe_load(config_path.read_text()) or {}
|
||||
config_data["registry_hash"] = config_hash
|
||||
config_data["registry_status"] = moderation_status
|
||||
registry_owner = result.get("owner")
|
||||
if registry_owner:
|
||||
config_data["registry_owner"] = registry_owner
|
||||
# Clear any old feedback when republishing
|
||||
if "registry_feedback" in config_data:
|
||||
del config_data["registry_feedback"]
|
||||
|
||||
Reference in New Issue
Block a user