gm-cc 2.0.55 → 2.0.56

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.
@@ -4,7 +4,7 @@
4
4
  "name": "AnEntrypoint"
5
5
  },
6
6
  "description": "State machine agent with hooks, skills, and automated git enforcement",
7
- "version": "2.0.55",
7
+ "version": "2.0.56",
8
8
  "metadata": {
9
9
  "description": "State machine agent with hooks, skills, and automated git enforcement"
10
10
  },
package/cli.js CHANGED
@@ -38,6 +38,7 @@ try {
38
38
 
39
39
  filesToCopy.forEach(name => copyRecursive(path.join(srcDir, name), path.join(destDir, name)));
40
40
 
41
+ // Register in settings.json (enabledPlugins only, no hook injection)
41
42
  const settingsPath = path.join(claudeDir, 'settings.json');
42
43
  let settings = {};
43
44
  if (fs.existsSync(settingsPath)) {
@@ -45,10 +46,33 @@ try {
45
46
  }
46
47
  if (!settings.enabledPlugins) settings.enabledPlugins = {};
47
48
  settings.enabledPlugins['gm@gm-cc'] = true;
49
+ // Remove stale hook entries that pointed to ~/.claude/hooks/ (now handled by plugin's hooks.json)
50
+ if (settings.hooks) delete settings.hooks;
48
51
  fs.mkdirSync(claudeDir, { recursive: true });
49
52
  fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2), 'utf-8');
50
53
  console.log('✓ Plugin registered in ~/.claude/settings.json');
51
54
 
55
+ // Register in installed_plugins.json so Claude Code loads plugin from local filesystem
56
+ const pluginVersion = require('./package.json').version;
57
+ const installedPluginsPath = path.join(pluginsDir, 'installed_plugins.json');
58
+ let installedPlugins = { version: 2, plugins: {} };
59
+ if (fs.existsSync(installedPluginsPath)) {
60
+ try { installedPlugins = JSON.parse(fs.readFileSync(installedPluginsPath, 'utf-8')); } catch (e) {}
61
+ }
62
+ if (!installedPlugins.plugins || Array.isArray(installedPlugins.plugins)) installedPlugins.plugins = {};
63
+ const now = new Date().toISOString();
64
+ const existing = Array.isArray(installedPlugins.plugins['gm-cc']) ? installedPlugins.plugins['gm-cc'].find(p => p.name === 'gm') : null;
65
+ installedPlugins.plugins['gm-cc'] = [{
66
+ name: 'gm',
67
+ scope: 'user',
68
+ installPath: destDir,
69
+ version: pluginVersion,
70
+ installedAt: existing?.installedAt || now,
71
+ lastUpdated: now
72
+ }];
73
+ fs.writeFileSync(installedPluginsPath, JSON.stringify(installedPlugins, null, 2), 'utf-8');
74
+ console.log('✓ Plugin registered in installed_plugins.json');
75
+
52
76
  console.log(`✓ gm-cc ${isUpgrade ? 'upgraded' : 'installed'} to ${destDir}`);
53
77
  console.log('Restart Claude Code to activate the gm plugin.');
54
78
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-cc",
3
- "version": "2.0.55",
3
+ "version": "2.0.56",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
package/plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.55",
3
+ "version": "2.0.56",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": {
6
6
  "name": "AnEntrypoint",