({ projectRoot, scope, dryRun })
| 175 | } |
| 176 | |
| 177 | function pluginInstallStep({ projectRoot, scope, dryRun }) { |
| 178 | const command = 'claude'; |
| 179 | const args = ['plugin', 'install', 'citadel@citadel-local', '--scope', scope]; |
| 180 | const name = 'Install Citadel Harness plugin'; |
| 181 | if (dryRun) return runStep({ name, command, args, cwd: projectRoot, dryRun, timeout: 30000 }); |
| 182 | |
| 183 | const plugins = listClaudePlugins(projectRoot); |
| 184 | const existing = Array.isArray(plugins) |
| 185 | ? plugins.find((plugin) => plugin.id === 'citadel@citadel-local' && plugin.scope === scope) |
| 186 | : null; |
| 187 | if (existing) { |
| 188 | return skippedStep({ |
| 189 | name, |
| 190 | command, |
| 191 | args, |
| 192 | cwd: projectRoot, |
| 193 | detail: `citadel@citadel-local already installed in ${scope} scope`, |
| 194 | }); |
| 195 | } |
| 196 | return runStep({ name, command, args, cwd: projectRoot, dryRun, timeout: 30000 }); |
| 197 | } |
| 198 | |
| 199 | function printHuman(report) { |
| 200 | console.log('Citadel Claude Code install'); |
no test coverage detected