gm-gc 2.0.373 → 2.0.375

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/cli.js CHANGED
@@ -4,9 +4,7 @@ const path = require('path');
4
4
  const os = require('os');
5
5
 
6
6
  const homeDir = process.env.HOME || process.env.USERPROFILE || os.homedir();
7
- const destDir = process.platform === 'win32'
8
- ? path.join(homeDir, 'AppData', 'Roaming', 'gemini', 'extensions', 'gm')
9
- : path.join(homeDir, '.gemini', 'extensions', 'gm');
7
+ const destDir = path.join(homeDir, '.gemini', 'extensions', 'gm');
10
8
 
11
9
  const srcDir = __dirname;
12
10
  const isUpgrade = fs.existsSync(destDir);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.373",
3
+ "version": "2.0.375",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "homepage": "https://github.com/AnEntrypoint/gm",
@@ -32,7 +32,7 @@ const run = () => {
32
32
  const isExec = command.startsWith('exec:');
33
33
  const isGit = /^(git |gh )/.test(command);
34
34
  if (!isExec && !isGit) {
35
- return { deny: true, reason: 'run_shell_command only allows exec:<lang> syntax or git/gh. Use exec:nodejs, exec:bash, exec:python etc. for code execution.' };
35
+ return { deny: true, reason: 'run_shell_command requires exec:<lang> format with a NEWLINE between the lang and code. Example: exec:bash\nnpm --version\n(newline after exec:bash, not a space). Allowed: exec:nodejs, exec:bash, exec:python, exec:typescript, git, gh.' };
36
36
  }
37
37
  }
38
38
  return { allow: true };
@@ -13,10 +13,9 @@ const readGmAgent = () => {
13
13
  const runMcpThorns = () => {
14
14
  if (!projectDir || !fs.existsSync(projectDir)) return '';
15
15
  try {
16
- let out;
17
- try { out = execSync('bun x mcp-thorns', { encoding: 'utf-8', stdio: 'pipe', cwd: projectDir, timeout: 180000 }); }
18
- catch (e) { out = execSync('npx -y mcp-thorns', { encoding: 'utf-8', stdio: 'pipe', cwd: projectDir, timeout: 180000 }); }
19
- return '=== Repository analysis ===\n' + out;
16
+ const out = execSync('plugkit codeinsight ' + JSON.stringify(projectDir), { encoding: 'utf-8', stdio: 'pipe', cwd: projectDir, timeout: 55000 });
17
+ if (!out || out.startsWith('Error')) return '';
18
+ return '=== This is your initial insight of the repository, look at every possible aspect of this for initial opinionation and to offset the need for code exploration ===\n' + out;
20
19
  } catch (e) { return ''; }
21
20
  };
22
21
  const runCodeSearch = (query) => {
@@ -36,13 +35,7 @@ try {
36
35
  const parts = [];
37
36
  const gm = readGmAgent();
38
37
  if (gm) parts.push(gm);
39
- const thorns = runMcpThorns();
40
- if (thorns) parts.push(thorns);
41
38
  parts.push('use gm agent | ref: TOOL_INVARIANTS | codesearch for exploration | exec: for execution');
42
- if (prompt) {
43
- const sr = runCodeSearch(prompt);
44
- if (sr) parts.push('=== Semantic code search results ===\n' + sr);
45
- }
46
39
  console.log(JSON.stringify({ systemMessage: parts.join('\n\n') }, null, 2));
47
40
  } catch (e) {
48
41
  console.log(JSON.stringify({ systemMessage: 'use gm agent' }, null, 2));
@@ -9,10 +9,8 @@ try {
9
9
  try { parts.push(fs.readFileSync(path.join(pluginRoot, 'agents/gm.md'), 'utf-8')); } catch (e) {}
10
10
  if (projectDir && fs.existsSync(projectDir)) {
11
11
  try {
12
- let out;
13
- try { out = execSync('bun x mcp-thorns@latest', { encoding: 'utf-8', stdio: 'pipe', cwd: projectDir, timeout: 180000 }); }
14
- catch (e) { out = execSync('npx -y mcp-thorns@latest', { encoding: 'utf-8', stdio: 'pipe', cwd: projectDir, timeout: 180000 }); }
15
- parts.push('=== This is your initial insight of the repository ===\n' + out);
12
+ const out = execSync('plugkit codeinsight ' + JSON.stringify(projectDir), { encoding: 'utf-8', stdio: 'pipe', cwd: projectDir, timeout: 55000 });
13
+ if (out && !out.startsWith('Error')) parts.push('=== This is your initial insight of the repository, look at every possible aspect of this for initial opinionation and to offset the need for code exploration ===\n' + out);
16
14
  } catch (e) {}
17
15
  }
18
16
  parts.push('Use gm as a philosophy to coordinate all plans and the gm subagent to create and execute all plans');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-gc",
3
- "version": "2.0.373",
3
+ "version": "2.0.375",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",