gm-cc 2.0.121 → 2.0.123
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.
- package/.claude-plugin/marketplace.json +1 -1
- package/cli.js +0 -13
- package/hooks/pre-tool-use-hook.js +5 -2
- package/package.json +1 -1
- package/plugin.json +1 -1
|
@@ -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.
|
|
7
|
+
"version": "2.0.123",
|
|
8
8
|
"metadata": {
|
|
9
9
|
"description": "State machine agent with hooks, skills, and automated git enforcement"
|
|
10
10
|
},
|
package/cli.js
CHANGED
|
@@ -34,19 +34,6 @@ try {
|
|
|
34
34
|
run('claude plugin marketplace add AnEntrypoint/gm-cc');
|
|
35
35
|
run('claude plugin install gm@gm-cc --scope user');
|
|
36
36
|
|
|
37
|
-
function overwritePluginHooks(dir) {
|
|
38
|
-
if (!fs.existsSync(dir)) return;
|
|
39
|
-
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
40
|
-
entries.forEach(entry => {
|
|
41
|
-
if (!entry.isDirectory()) return;
|
|
42
|
-
const sub = path.join(dir, entry.name);
|
|
43
|
-
const hooksTarget = path.join(sub, 'hooks');
|
|
44
|
-
if (fs.existsSync(hooksTarget)) copyRecursive(path.join(srcDir, 'hooks'), hooksTarget);
|
|
45
|
-
overwritePluginHooks(sub);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
overwritePluginHooks(path.join(destDir, 'plugins'));
|
|
49
|
-
|
|
50
37
|
|
|
51
38
|
|
|
52
39
|
const destPath = process.platform === 'win32' ? destDir.replace(/\\/g, '/') : destDir;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const path = require('path');
|
|
5
|
+
const { execSync } = require('child_process');
|
|
5
6
|
|
|
6
7
|
const isGemini = process.env.GEMINI_PROJECT_DIR !== undefined;
|
|
7
8
|
|
|
@@ -64,8 +65,10 @@ const run = () => {
|
|
|
64
65
|
|
|
65
66
|
if (tool_name === 'Bash') {
|
|
66
67
|
const command = (tool_input?.command || '').trim();
|
|
67
|
-
if (!/^
|
|
68
|
-
|
|
68
|
+
if (!/^bun x mcp-gm(@[^\s]*)?(\s|$)/.test(command) && !/^git /.test(command)) {
|
|
69
|
+
let helpText = '';
|
|
70
|
+
try { helpText = '\n\n' + execSync('bun x mcp-gm --help', { timeout: 10000 }).toString().trim(); } catch (e) {}
|
|
71
|
+
return { block: true, reason: `Bash is restricted to: bun x mcp-gm (and git)\n\nUsage: bun x mcp-gm${helpText}\n\nDocs: https://www.npmjs.com/package/mcp-gm\n\nAll other Bash commands are blocked.` };
|
|
69
72
|
}
|
|
70
73
|
}
|
|
71
74
|
|
package/package.json
CHANGED