"""Install bundled seed skills into ~/.alive/skills/ on first run."""

import shutil
from pathlib import Path

_SEED_NAMES = ["web_fetch", "file_reader", "shell_run"]
_SEEDS_DIR = Path(__file__).parent


def ensure_seeds(skills_dir: Path) -> None:
    """Copy any missing seed skills into the user's skills directory."""
    skills_dir.mkdir(parents=True, exist_ok=True)
    for name in _SEED_NAMES:
        dest = skills_dir / name
        if dest.exists():
            continue
        src = _SEEDS_DIR / name
        if not src.exists():
            continue
        shutil.copytree(src, dest)
