INNER CODE UNIT · Python
src
softaworks/agent-toolkit · scripts/build_plugins.py:88
src = root / rel_path
dst = plugin_dir / rel_path
if path_type == "skill_dir":
if not src.is_dir():
print(f" ERROR: skill directory not found: {src}", file=sys.stderr)
sys.exit(1)
if not dry_run:
dst.parent.mkdir(parents=True, exist_ok=True)
shutil.copytree(src, dst, dirs_exist_ok=True)
copied = sum(1 for _ in src.rglob("*") if _.is_file())
file_count += copied
if verbose:
print(f" {name}: copied {rel_path}/ ({copied} files)")
elif path_type in ("agent_file", "command_file"):
if not src.is_file():
print(f" ERROR: file not found: {src}", file=sys.stderr)