gm-cc 2.0.527 → 2.0.529

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.527",
7
+ "version": "2.0.529",
8
8
  "metadata": {
9
9
  "description": "State machine agent with hooks, skills, and automated git enforcement"
10
10
  },
package/cli.js CHANGED
@@ -29,7 +29,9 @@ try {
29
29
  filesToCopy.forEach(([src, dst]) => copyRecursive(path.join(srcDir, src), path.join(destDir, dst)));
30
30
 
31
31
  const { execSync: exec } = require('child_process');
32
- const run = (cmd) => { try { return exec(cmd, { stdio: 'inherit', env: { ...process.env, CLAUDECODE: '' } }); } catch (e) { console.warn('Warning:', e.message); } };
32
+ const sep = process.platform === 'win32' ? ';' : ':';
33
+ const sanitizedPath = (process.env.PATH || '').split(sep).filter(p => !/[\\/]node_modules[\\/]\.bin$/.test(p.replace(/[\\/]+$/, ''))).join(sep);
34
+ const run = (cmd) => { try { return exec(cmd, { stdio: 'inherit', env: { ...process.env, PATH: sanitizedPath, CLAUDECODE: '' } }); } catch (e) { console.warn('Warning:', e.message); } };
33
35
 
34
36
  const gmccHookFiles = ['post-tool-use-hook.js','pre-tool-use-hook.js','prompt-submit-hook.js','session-start-hook.js','stop-hook-git.js','stop-hook.js'];
35
37
  const gmccAgentFiles = ['gm.md'];
@@ -55,13 +57,12 @@ try {
55
57
  run('claude plugin install gm@gm-cc --scope user');
56
58
  const knownMarketplacesPath = path.join(homeDir, '.claude', 'plugins', 'known_marketplaces.json');
57
59
  try {
58
- let km = {};
59
- try { km = JSON.parse(fs.readFileSync(knownMarketplacesPath, 'utf-8')); } catch (e) {}
60
- if (!km['gm-cc']) km['gm-cc'] = {};
61
- km['gm-cc'].autoUpdate = true;
62
- km['gm-cc'].lastUpdated = new Date().toISOString();
63
- fs.mkdirSync(path.dirname(knownMarketplacesPath), { recursive: true });
64
- fs.writeFileSync(knownMarketplacesPath, JSON.stringify(km, null, 2) + '\n');
60
+ const km = JSON.parse(fs.readFileSync(knownMarketplacesPath, 'utf-8'));
61
+ if (km && km['gm-cc'] && km['gm-cc'].source && km['gm-cc'].installLocation) {
62
+ km['gm-cc'].autoUpdate = true;
63
+ km['gm-cc'].lastUpdated = new Date().toISOString();
64
+ fs.writeFileSync(knownMarketplacesPath, JSON.stringify(km, null, 2) + '\n');
65
+ }
65
66
  } catch (e) {}
66
67
 
67
68
  const destPath = process.platform === 'win32' ? destDir.replace(/\\/g, '/') : destDir;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-cc",
3
- "version": "2.0.527",
3
+ "version": "2.0.529",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
@@ -52,5 +52,10 @@
52
52
  ],
53
53
  "peerDependencies": {
54
54
  "@anthropic-ai/claude-code": "*"
55
+ },
56
+ "peerDependenciesMeta": {
57
+ "@anthropic-ai/claude-code": {
58
+ "optional": true
59
+ }
55
60
  }
56
61
  }
package/plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.527",
3
+ "version": "2.0.529",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": {
6
6
  "name": "AnEntrypoint",