claude-prism 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/installer.mjs +16 -0
  2. package/package.json +1 -1
package/lib/installer.mjs CHANGED
@@ -232,6 +232,22 @@ export async function update(projectDir) {
232
232
  if (existsSync(p)) rmSync(p);
233
233
  }
234
234
 
235
+ // Migration: remove legacy individual hook entries from settings.json
236
+ const settingsPath = join(claudeDir, 'settings.json');
237
+ if (existsSync(settingsPath)) {
238
+ const settings = JSON.parse(readFileSync(settingsPath, 'utf8'));
239
+ if (settings.hooks) {
240
+ const legacyCommands = ['commit-guard', 'debug-loop', 'test-tracker', 'scope-guard'];
241
+ for (const [event, hookList] of Object.entries(settings.hooks)) {
242
+ settings.hooks[event] = hookList.filter(
243
+ h => !h.hooks?.some(hh => legacyCommands.some(lc => hh.command?.includes(lc)))
244
+ );
245
+ if (settings.hooks[event].length === 0) delete settings.hooks[event];
246
+ }
247
+ writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
248
+ }
249
+ }
250
+
235
251
  // Remove old config so init creates a fresh one
236
252
  if (existsSync(configPath)) rmSync(configPath);
237
253
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-prism",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "AI coding problem decomposition tool — Understand, Decompose, Execute, Checkpoint.",
5
5
  "type": "module",
6
6
  "bin": {