cmdlet refactor

This commit is contained in:
2026-05-04 18:41:01 -07:00
parent 3ce339b3c1
commit 24f983473f
44 changed files with 1320 additions and 309 deletions
+25
View File
@@ -0,0 +1,25 @@
from __future__ import annotations
from typing import Any, Dict, Sequence
def run_tag_action(action: str, result: Any, args: Sequence[str], config: Dict[str, Any]) -> int:
"""Route metadata tag actions to the existing tag implementations."""
act = str(action or "").strip().lower()
if act == "add":
from cmdlet.metadata.tag_add import Add_Tag
return Add_Tag(register_cmdlet=False).run(result, args, config)
if act == "delete":
from cmdlet.metadata.tag_delete import _run as run_delete
return run_delete(result, args, config)
if act == "get":
from cmdlet.metadata.tag_get import _run as run_get
return run_get(result, args, config)
return 1