fix(install): bundle skillgrade via bundledDependencies (#172)#175
Merged
fix(install): bundle skillgrade via bundledDependencies (#172)#175
Conversation
Skillgrade was declared as a regular `dependencies` entry, so in the normal case npm would fetch it from the registry on install. That leaves a reinstall silently broken whenever the registry, the local npm cache, or the network path is unhealthy — the exact scenario the reporter hit: `asm eval --runtime init` keeps failing with "skillgrade not installed" after `npm install -g agent-skill-manager`. Adding `bundledDependencies: ["skillgrade"]` ships skillgrade inside the packed tarball (package size grows from ~960kB to ~5.3MB), so `npm install -g` always has a local copy to unpack — offline, air- gapped, or registry-flaky installs all succeed. Also adds three e2e smoke tests to `npm-install-e2e.test.ts`: - `skillgrade/ bin is reachable after install` — guards post-install reachability of the bundled skillgrade entry point. - `tarball embeds skillgrade via bundledDependencies` — the discriminating test: inspects the actual tarball listing so a future drop of `bundledDependencies` is caught immediately. - `eval --runtime init scaffolds eval.yaml via bundled skillgrade` — exercises the end-to-end `asm eval <skill> --runtime init` flow, covering acceptance criterion 4 (CI-visible smoke test of the runtime-eval path after a clean global install). Tarball growth is a deliberate trade-off: skillgrade drives the `asm eval --runtime` contract, so it must ship with asm by default. Users who want a leaner install can still override via `ASM_SKILLGRADE_BIN` to point at a system skillgrade.
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.
Closes #172
Summary
Reinstalling
agent-skill-managervianpm install -gwas leaving the bundled skillgrade dependency unreachable whenever the registry or local npm cache was unhealthy, which breaks the transparent-install contract promised by #165 —asm eval --runtime initkeeps failing with "skillgrade not installed" after a reinstall.Switches skillgrade from a plain
dependenciesentry to abundledDependenciesentry so it ships inside the packed tarball. Reinstalls (and offline / air-gapped / registry-flaky installs) now always land a working skillgrade copy.Approach
bundledDependencies: ["skillgrade"]topackage.json. npm now packs the resolvednode_modules/skillgrade/tree into the tarball.tests/e2e/npm-install-e2e.test.tsthat guard the fix at different layers — post-install reachability, tarball contents (the discriminating test), and theasm eval --runtime initend-to-end flow.Tarball size trade-off: packed size grows from 962kB -> 5.3MB (45 -> 2129 files). Intentional — skillgrade drives the
asm eval --runtimecontract, so it must ship withasmby default.ASM_SKILLGRADE_BINstill lets power users point at a system skillgrade.Changes
package.jsonbundledDependencies: ["skillgrade"]so npm pack embeds the skillgrade tree.tests/e2e/npm-install-e2e.test.tsTest Results
bun test tests/e2e/npm-install-e2e.test.ts-> 18 pass, 0 fail (15 existing + 3 new).bun test src/-> 1576 pass, 0 fail.src/eval/providers/skillgrade/) -> 87 pass, 0 fail.tarball embeds skillgrade via bundledDependenciestest fails without thebundledDependencieschange and passes with it, confirming it actually guards the fix.npm install --global --prefix <tmp> --offline <tarball>succeeds andasm eval <skill> --runtime initscaffoldseval.yamlwithout a separate skillgrade install.Acceptance Criteria
npm install -g agent-skill-manager,asm eval <skill> --runtime initworks without a separate skillgrade install step (high) — confirmed offline.bundledDependenciesguarantees the nested copy is always restored from the tarball.asm eval --runtimeflow (medium) — new e2e testeval --runtime init scaffolds eval.yaml via bundled skillgradeintests/e2e/npm-install-e2e.test.ts.