feat(skills): add dry-run installer planning surface

This commit is contained in:
William Valentin
2026-02-12 17:56:51 -08:00
parent 81d04357a1
commit bd754d520e
6 changed files with 206 additions and 3 deletions
+18 -1
View File
@@ -2,7 +2,7 @@ import type { Command } from 'commander';
import { resolve } from 'path';
import { homedir } from 'os';
import type { Skill } from '../skills/index.js';
import { loadAllSkills, SkillInstaller } from '../skills/index.js';
import { loadAllSkills, SkillInstaller, buildInstallerPlan } from '../skills/index.js';
import { loadConfigSafe } from './shared.js';
export interface SkillListRow {
@@ -75,6 +75,23 @@ export function renderSkillInfo(skill: Skill): string {
lines.push(`Unavailable reasons: ${skill.unavailableReasons.join('; ')}`);
}
if (skill.manifest.installers && skill.manifest.installers.length > 0) {
const plan = buildInstallerPlan(skill.manifest.installers);
lines.push(`Installer plan mode: ${plan.mode}`);
if (plan.steps.length > 0) {
lines.push('Installer planned steps:');
for (const step of plan.steps) {
lines.push(`- [${step.installerType}] ${step.command}`);
}
}
if (plan.skipped.length > 0) {
lines.push('Installer skipped steps:');
for (const skip of plan.skipped) {
lines.push(`- [${skip.installerType}] ${skip.reason}`);
}
}
}
return lines.join('\n');
}