Repository navigation
Feat/issue 12 agents skills installer - #26
Merged
egdev6 merged 4 commits intoOct 7, 2026
Merged
Conversation
Add a bin entry exposing 'mobile-agent-orchestrator install' with repeatable --target (codex, opencode, gemini; shared destination deduplicated), required --scope user|project, and --dry-run. The pure plan/execute engine copies the canonical skill and every bundled reference (recursive discovery matching the validator inventory), records installer version and sha256 checksums in a manifest beside the skill directory, is an idempotent no-op on identical content, and aborts with zero writes when the destination holds modified, unmanaged, symlinked, corrupt-manifest, or non-directory content. Extend the package validator allowlist to bin/ and lib/. Pi package discovery is unchanged. Refs egdev6#12
Owner
|
Thanks @aam9063 for the installer and the thorough test coverage! The plan/execute split provides a solid foundation for safe, repeatable installs. Really appreciate the contribution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
Closes #12
Summary
Add a deterministic installer that copies the canonical skill into the shared
.agents/skillslocations used by Codex, OpenCode, and Gemini CLI.binentry (mobile-agent-orchestrator) with aninstallcommand: repeatable--target codex|opencode|gemini(shared destination deduplicated into one copy and one manifest), required--scope user|project, and--dry-runthat prints the exact plan and writes nothing.lib/hosts.mjs,lib/installer.mjs, zero dependencies): copies the canonicalSKILL.mdand every bundled reference (recursive discovery matching the validator's published inventory), records installer version and sha256 checksums in.mobile-agent-orchestrator.manifest.jsonbeside the skill directory, and is an idempotent no-op when managed content already matches.replaceis only granted to content backed by a recorded manifest checksum. I/O failures mid-install report clearly that the destination may be inconsistent and that re-running repairs it.scripts/validate-package.mjs: allowlist and tarball inventory extended tobin/andlib/; all other validation rules unchanged.pi.skillsand Pi package discovery are untouched.Intentionally out of scope (issue non-goals): Claude Code target, interactive detection,
status/uninstall, npm publication.Review boundary note: current PR diff is 1231 lines (1223 additions, 8 deletions). The follow-up review fix commit adds 490 diff lines; the maintainer explicitly authorized keeping the four fixes together and retaining all regression coverage. The plan/execute module seam remains
buildPlan/executePlan; no unrelated P3 work was added.Follow-up review fixes (
e15dc4e).binsymlink, including nonzero exit codes for invalid commands.Review the installer safety/reconciliation changes and regression tests first. Pi discovery, targets/scopes, dependencies, and the original non-goals are unchanged.
Verification
Latest verification —
e15dc4ePlatform: Linux/WSL2, Node v24.20.0, npm 12.0.2.
npm test: 44 passed, 0 failed, 0 skipped, including package validation.npm run pack:check: exit 0, the same 11-entry publication inventory.node --checkon all four changed.mjsfiles: passed.npm pack+ installation in a temporary prefix: npm shim help/invalid-command exit codes, installation for three deduplicated targets, and idempotent reinstall passed; installer destinations and HOME were isolated in temporary directories.EFBIGfailure preserving the old manifest with successful retry. Crafted manifest paths cannot delete files outside the skill directory.Limitations: Windows/macOS were not rerun for these fixes. The case-insensitive and unavailable-inode fallback branches were not executed on this Linux filesystem; the case-sensitive rename branch was exercised.
Original Windows verification — before the follow-up fixes
The author's original platform evidence is retained below; it is not a rerun against the updated head.
Platform: Windows 11, Git Bash, Node v24.18.0 (CI verifies on Linux/Node 22).
npm run pack:check: exit 0; tarball contains the expected 11 entries (skill +bin/+lib/).node --test: 30 tests — 27 pass, 1 skipped, 2 fail. The skip is the broken-symlink test (symlinkSyncrequires privileges on Windows; by design, Linux CI exercises it). The 2 failures are the pre-existing Windows-onlydetect-releasespawn failures documented inodd/tasks/issue-12-installer.md; they reproduce on unmodifiedmain.node --test tests/installer.test.mjs: 15 tests — 14 pass, 1 skipped (symlink), 0 fail.node scripts/validate-package.mjs: every check passes except the tarball-comparison spawn, which fails withspawnSync npm ENOENT, the pre-existing Windows limitation also documented in the task file.node bin/mobile-agent-orchestrator.mjs install --target codex --scope user --dry-runnode bin/mobile-agent-orchestrator.mjs install --target opencode --scope project --dry-runnode bin/mobile-agent-orchestrator.mjs install --target gemini --scope user --dry-run--targetdeduplicates to one destination; modified destination content aborts with exit 1 and no writes; corrupt manifest and file-as-destination abort cleanly.Task/evidence document (decisions, review rounds, rejected findings):
odd/tasks/issue-12-installer.md.Checklist
Closes #12(completed work).