Skip to content

Consider using 'soliplex_skills.install.install_skill' in installer #72

Description

@tseaver

apply.py currently uses the library's download_skill + defang_skill
separately. Could it instead call soliplex_skills.install.install_skill
(resolve/download -> install -> defang in one call) to cut duplication?

Analysis: not a net simplification

install_skill(spec, version, dest, *, installed_by, defang, force, dry_run)
bakes in four policies apply.py deliberately does not share:

  1. No local-directory path. It always downloads from a spec, so
    --room-skill-dir / --docs-skill-dir (offline/dev installs) still need
    the copytree + install.defang_skill path that is today's
    install_skill. So it adds a second install path rather than removing one.
  2. Always hits the network -- even for --dry-run, and to decide
    idempotency (downloads to a temp dir before the dry-run check). Today
    resolve_published_skill returns early (no network, no temp dir) on a dry
    run or when the skill is already present without --force.
  3. Commit-based UPGRADED semantics the installer's ADDED/UNCHANGED
    summary and --force model don't use.
  4. Breaks fail-fast ordering. main() resolves/downloads both skills up
    front, then apply() mutates the stack; a download failure leaves the
    stack untouched. install_skill fuses download with the write, so a
    late failure could leave the stack half-edited.

The genuinely-duplicated pieces (download, defang) already come from the
library; what remains is installer-specific orchestration.

Recommendation

Keep the download_skill + defang_skill split. Revisit only if we decide to
drop --*-skill-dir, accept downloading on --dry-run, and adopt commit-based
UPGRADED semantics -- then install_skill becomes a clean fit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions