mirror of
https://github.com/affaan-m/ECC.git
synced 2026-10-15 04:35:29 +02:00
fix(install): ship standalone skill-health command runtime
This commit is contained in:
@@ -67,6 +67,10 @@
|
||||
"scripts/astra-review.js",
|
||||
"scripts/harness-audit.js",
|
||||
"scripts/skills-health.js",
|
||||
"scripts/lib/skill-evolution",
|
||||
"scripts/lib/utils.js",
|
||||
"scripts/lib/agent-data-home.js",
|
||||
"scripts/lib/path-safety.js",
|
||||
"scripts/lib/astra-review",
|
||||
"scripts/ci/validate-skill-host-compat.js",
|
||||
"scripts/ci/validate-skills.js"
|
||||
|
||||
@@ -803,6 +803,31 @@ function runTests() {
|
||||
}
|
||||
})) passed++; else failed++;
|
||||
|
||||
if (test('commands-only install can execute skill health without hook automation', () => {
|
||||
const homeDir = createTempDir('install-health-home-');
|
||||
const projectDir = createTempDir('install-health-project-');
|
||||
try {
|
||||
const env = { CLAUDE_CONFIG_DIR: path.join(homeDir, '.claude') };
|
||||
const installed = run(['--target', 'claude', '--modules', 'commands-core', '--no-hooks', '--json'], {
|
||||
cwd: projectDir, homeDir, env,
|
||||
});
|
||||
assert.strictEqual(installed.code, 0, installed.stderr);
|
||||
const health = spawnSync(process.execPath, [
|
||||
path.join(homeDir, '.claude', 'scripts', 'skills-health.js'), '--json',
|
||||
'--home', homeDir, '--skills-root', path.join(homeDir, 'empty-curated'),
|
||||
'--learned-root', path.join(homeDir, 'empty-learned'),
|
||||
'--imported-root', path.join(homeDir, 'empty-imported'),
|
||||
], { cwd: projectDir, env: { ...process.env, HOME: homeDir, USERPROFILE: homeDir, ...env }, encoding: 'utf8' });
|
||||
assert.strictEqual(health.status, 0, health.stderr);
|
||||
assert.deepStrictEqual(JSON.parse(health.stdout).skills, []);
|
||||
const state = readJson(path.join(homeDir, '.claude', 'ecc', 'install-state.json'));
|
||||
assert.ok(!state.operations.some(operation => operation.sourceRelativePath.startsWith('scripts/hooks/')));
|
||||
} finally {
|
||||
cleanup(homeDir);
|
||||
cleanup(projectDir);
|
||||
}
|
||||
})) passed++; else failed++;
|
||||
|
||||
if (test('preserves existing top-level Claude rules and skills during managed install', () => {
|
||||
const homeDir = createTempDir('install-apply-home-');
|
||||
const projectDir = createTempDir('install-apply-project-');
|
||||
|
||||
Reference in New Issue
Block a user