gm-cc 2.0.725 → 2.0.727

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.725",
7
+ "version": "2.0.727",
8
8
  "metadata": {
9
9
  "description": "State machine agent with hooks, skills, and automated git enforcement"
10
10
  },
package/bin/plugkit.js CHANGED
@@ -14,6 +14,8 @@ async function resolveBinary() {
14
14
  }
15
15
 
16
16
  async function main() {
17
+ const args = process.argv.slice(2);
18
+ const isHook = args[0] === 'hook';
17
19
  let bin;
18
20
  try {
19
21
  bin = await resolveBinary();
@@ -21,12 +23,10 @@ async function main() {
21
23
  process.stderr.write(`[plugkit] bootstrap failed: ${err.message}\n`);
22
24
  const legacy = legacyFallback();
23
25
  if (legacy) { bin = legacy; }
26
+ else if (isHook) { process.exit(0); }
24
27
  else process.exit(1);
25
28
  }
26
29
 
27
- const args = process.argv.slice(2);
28
- const isHook = args[0] === 'hook';
29
-
30
30
  if (isHook && !process.stdin.isTTY) {
31
31
  const chunks = [];
32
32
  process.stdin.on('data', c => chunks.push(c));
package/hooks/hooks.json CHANGED
@@ -38,6 +38,11 @@
38
38
  "type": "command",
39
39
  "command": "node ${CLAUDE_PLUGIN_ROOT}/bin/plugkit.js hook session-start",
40
40
  "timeout": 180000
41
+ },
42
+ {
43
+ "type": "command",
44
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/session-start-hook.js",
45
+ "timeout": 3000
41
46
  }
42
47
  ]
43
48
  }
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+ const fs = require('fs');
3
+ const path = require('path');
4
+ const os = require('os');
5
+ const { spawn } = require('child_process');
6
+ try {
7
+ const bootstrapPath = path.join(__dirname, '..', 'bin', 'bootstrap.js');
8
+ if (fs.existsSync(bootstrapPath)) {
9
+ const child = spawn(process.execPath, [bootstrapPath], { stdio: ['ignore', 'ignore', 'inherit'], detached: true, windowsHide: true });
10
+ child.unref();
11
+ }
12
+ } catch (_) {}
13
+ try {
14
+ const plugkitJs = path.join(__dirname, '..', 'bin', 'plugkit.js');
15
+ const gmToolsWrapper = path.join(os.homedir(), '.claude', 'gm-tools', 'plugkit');
16
+ if (fs.existsSync(gmToolsWrapper)) {
17
+ const current = fs.readFileSync(gmToolsWrapper, 'utf8');
18
+ if (!current.includes('plugkit.js')) {
19
+ fs.writeFileSync(gmToolsWrapper, '#!/bin/sh\nexec node "' + plugkitJs + '" "$@"\n', { mode: 0o755 });
20
+ }
21
+ }
22
+ } catch (_) {}
23
+ process.exit(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-cc",
3
- "version": "2.0.725",
3
+ "version": "2.0.727",
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.725",
3
+ "version": "2.0.727",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": {
6
6
  "name": "AnEntrypoint",