Save registry_hash and status after CLI publish
The GUI was saving tracking fields but CLI wasn't. Now both save registry_hash, registry_status, and clear feedback on republish. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
64b9e8e70d
commit
19c1cf086f
|
|
@ -440,6 +440,21 @@ def _cmd_registry_publish(args):
|
||||||
similarity = tool.get("similarity", 0)
|
similarity = tool.get("similarity", 0)
|
||||||
print(f" - {tool.get('name', 'unknown')} ({similarity:.0%} similar)")
|
print(f" - {tool.get('name', 'unknown')} ({similarity:.0%} similar)")
|
||||||
|
|
||||||
|
# Save registry_hash and status to local config for tracking
|
||||||
|
config_hash = result.get("config_hash")
|
||||||
|
moderation_status = result.get("status", "pending")
|
||||||
|
if config_hash:
|
||||||
|
try:
|
||||||
|
config_data = yaml.safe_load(config_path.read_text()) or {}
|
||||||
|
config_data["registry_hash"] = config_hash
|
||||||
|
config_data["registry_status"] = moderation_status
|
||||||
|
# Clear any old feedback when republishing
|
||||||
|
if "registry_feedback" in config_data:
|
||||||
|
del config_data["registry_feedback"]
|
||||||
|
config_path.write_text(yaml.dump(config_data, default_flow_style=False, sort_keys=False))
|
||||||
|
except Exception:
|
||||||
|
pass # Non-critical
|
||||||
|
|
||||||
except RegistryError as e:
|
except RegistryError as e:
|
||||||
if e.code == "UNAUTHORIZED":
|
if e.code == "UNAUTHORIZED":
|
||||||
print("Authentication failed.", file=sys.stderr)
|
print("Authentication failed.", file=sys.stderr)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue