gm-cc 2.0.56 → 2.0.58

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.
@@ -1,10 +1,10 @@
1
1
  {
2
- "name": "gm",
2
+ "name": "gm-cc",
3
3
  "owner": {
4
4
  "name": "AnEntrypoint"
5
5
  },
6
6
  "description": "State machine agent with hooks, skills, and automated git enforcement",
7
- "version": "2.0.56",
7
+ "version": "2.0.58",
8
8
  "metadata": {
9
9
  "description": "State machine agent with hooks, skills, and automated git enforcement"
10
10
  },
package/cli.js CHANGED
@@ -46,13 +46,16 @@ try {
46
46
  }
47
47
  if (!settings.enabledPlugins) settings.enabledPlugins = {};
48
48
  settings.enabledPlugins['gm@gm-cc'] = true;
49
- // Remove stale hook entries that pointed to ~/.claude/hooks/ (now handled by plugin's hooks.json)
49
+ // Remove stale hook entries (handled by plugin hooks.json)
50
50
  if (settings.hooks) delete settings.hooks;
51
+ // Register marketplace so Claude Code resolves gm@gm-cc locally
52
+ if (!settings.extraKnownMarketplaces) settings.extraKnownMarketplaces = {};
53
+ settings.extraKnownMarketplaces['gm-cc'] = { source: { source: 'directory', path: destDir } };
51
54
  fs.mkdirSync(claudeDir, { recursive: true });
52
55
  fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2), 'utf-8');
53
56
  console.log('✓ Plugin registered in ~/.claude/settings.json');
54
57
 
55
- // Register in installed_plugins.json so Claude Code loads plugin from local filesystem
58
+ // Write installed_plugins.json so Claude Code loads from local cache
56
59
  const pluginVersion = require('./package.json').version;
57
60
  const installedPluginsPath = path.join(pluginsDir, 'installed_plugins.json');
58
61
  let installedPlugins = { version: 2, plugins: {} };
@@ -61,11 +64,22 @@ try {
61
64
  }
62
65
  if (!installedPlugins.plugins || Array.isArray(installedPlugins.plugins)) installedPlugins.plugins = {};
63
66
  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
+ const existing = Array.isArray(installedPlugins.plugins['gm@gm-cc']) ? installedPlugins.plugins['gm@gm-cc'][0] : null;
68
+ // Also write cache dir so Claude Code finds it without network fetch
69
+ const cacheDir = path.join(pluginsDir, 'cache', 'gm-cc', 'gm', pluginVersion);
70
+ const filesToCache = ['agents', 'hooks', '.mcp.json', '.claude-plugin', 'plugin.json', 'README.md', 'CLAUDE.md'];
71
+ function copyRecursiveCache(src, dst) {
72
+ if (!fs.existsSync(src)) return;
73
+ if (fs.statSync(src).isDirectory()) {
74
+ fs.mkdirSync(dst, { recursive: true });
75
+ fs.readdirSync(src).forEach(f => copyRecursiveCache(path.join(src, f), path.join(dst, f)));
76
+ } else { fs.copyFileSync(src, dst); }
77
+ }
78
+ fs.mkdirSync(cacheDir, { recursive: true });
79
+ filesToCache.forEach(name => copyRecursiveCache(path.join(destDir, name), path.join(cacheDir, name)));
80
+ installedPlugins.plugins['gm@gm-cc'] = [{
67
81
  scope: 'user',
68
- installPath: destDir,
82
+ installPath: cacheDir,
69
83
  version: pluginVersion,
70
84
  installedAt: existing?.installedAt || now,
71
85
  lastUpdated: now
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-cc",
3
- "version": "2.0.56",
3
+ "version": "2.0.58",
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.56",
3
+ "version": "2.0.58",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": {
6
6
  "name": "AnEntrypoint",