Class: HunkReviewChanges::Installer::DirectoryInstaller
- Defined in:
- lib/hunk_review_changes/installer/directory_installer.rb
Overview
Base for agents that have no install CLI (Codex, Cursor, OpenCode). They all scan
a skills directory for <name>/SKILL.md, so installing means copying the skill
out of the marketplace checkout into that directory. Subclasses supply the
directory and how the agent is detected.
Instance Method Summary collapse
- #install!(source) ⇒ Object
-
#skills_root ⇒ Object
Absolute path to the agent's user-level skills directory.
Methods inherited from Base
Instance Method Details
#install!(source) ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/hunk_review_changes/installer/directory_installer.rb', line 17 def install!(source) target = File.join(skills_root, SKILL_NAME) FileUtils.mkdir_p(target) FileUtils.cp_r(File.join(source.skill_dir, "."), target) ok("copied skill to #{pretty(target)} (restart #{label} to pick it up)") rescue SkillSource::Error => e failure(e.) rescue StandardError => e failure("could not copy skill: #{e.}") end |
#skills_root ⇒ Object
Absolute path to the agent's user-level skills directory.
15 |
# File 'lib/hunk_review_changes/installer/directory_installer.rb', line 15 def skills_root = raise NotImplementedError |