gm-cc 2.0.275 → 2.0.277

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.275",
7
+ "version": "2.0.277",
8
8
  "metadata": {
9
9
  "description": "State machine agent with hooks, skills, and automated git enforcement"
10
10
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-cc",
3
- "version": "2.0.275",
3
+ "version": "2.0.277",
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.275",
3
+ "version": "2.0.277",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": {
6
6
  "name": "AnEntrypoint",
@@ -9,6 +9,26 @@ if (!pluginRoot) process.exit(0);
9
9
 
10
10
  const IS_WIN = process.platform === 'win32';
11
11
  const binPath = path.join(pluginRoot, 'bin', IS_WIN ? 'plugkit.exe' : 'plugkit');
12
+ const pendingPath = binPath + '.pending';
13
+
14
+ function getAssetName() {
15
+ const platform = process.platform;
16
+ const arch = process.arch;
17
+ const os = platform === 'win32' ? 'win32' : platform === 'darwin' ? 'darwin' : 'linux';
18
+ const cpu = arch === 'arm64' ? 'arm64' : 'x64';
19
+ const ext = platform === 'win32' ? '.exe' : '';
20
+ return `plugkit-${os}-${cpu}${ext}`;
21
+ }
22
+
23
+ function applyPending() {
24
+ if (!fs.existsSync(pendingPath)) return;
25
+ try {
26
+ if (fs.existsSync(binPath)) fs.unlinkSync(binPath);
27
+ fs.renameSync(pendingPath, binPath);
28
+ } catch {}
29
+ }
30
+
31
+ applyPending();
12
32
 
13
33
  function getVersion() {
14
34
  try {
@@ -26,24 +46,12 @@ function getCurrentVersion() {
26
46
  } catch { return null; }
27
47
  }
28
48
 
29
- const pendingPath = binPath + '.pending';
30
-
31
- function applyPending() {
32
- if (!fs.existsSync(pendingPath)) return;
33
- try {
34
- if (fs.existsSync(binPath)) fs.unlinkSync(binPath);
35
- fs.renameSync(pendingPath, binPath);
36
- } catch {}
37
- }
38
-
39
- applyPending();
40
-
41
49
  const required = getVersion();
42
50
  const current = getCurrentVersion();
43
51
  if (current && current === required) process.exit(0);
44
52
 
45
53
  function download(version, dest, cb) {
46
- const asset = IS_WIN ? 'plugkit.exe' : 'plugkit';
54
+ const asset = getAssetName();
47
55
  const urlPath = version
48
56
  ? `/AnEntrypoint/rs-plugkit/releases/download/v${version}/${asset}`
49
57
  : `/AnEntrypoint/rs-plugkit/releases/latest/download/${asset}`;