INNER CODE UNIT · Python
build_plugin
softaworks/agent-toolkit · scripts/build_plugins.py:68
def build_plugin(root: Path, dist_dir: Path, plugin: dict,
dry_run: bool = False, verbose: bool = False) -> int:
"""Build a single plugin's distribution directory.
Returns the number of files copied.
"""
name = plugin["name"]
plugin_dir = dist_dir / name
paths = extract_paths(plugin)
file_count = 0
if not paths:
if verbose:
print(f" skip {name}: no skills/agents/commands defined")
return 0
if not dry_run:
plugin_dir.mkdir(parents=True, exist_ok=True)