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:
rob
2026-01-30 03:07:00 -04:00
co-authored by Claude Opus 4.5
parent 5ff108cdb3
commit fe5b2047a9
3 changed files with 25 additions and 2 deletions
+3
View File
@@ -600,6 +600,9 @@ def _cmd_registry_publish(args):
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"]