gm-skill 2.0.1174 → 2.0.1176
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/README.md +1 -1
- package/bin/plugkit.version +1 -1
- package/bin/plugkit.wasm +0 -0
- package/bin/plugkit.wasm.sha256 +1 -1
- package/gm-plugkit/plugkit-wasm-wrapper.js +26 -9
- package/gm.json +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ An earlier generation fanned out fifteen per-platform downstream repos (gm-cc, g
|
|
|
35
35
|
|
|
36
36
|
## Version
|
|
37
37
|
|
|
38
|
-
`2.0.
|
|
38
|
+
`2.0.1176` — auto-bumped from the canonical `gm` repo. Every push to `AnEntrypoint/gm` (or any cascading sibling crate) republishes this package.
|
|
39
39
|
|
|
40
40
|
## Source of truth
|
|
41
41
|
|
package/bin/plugkit.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.425
|
package/bin/plugkit.wasm
CHANGED
|
Binary file
|
package/bin/plugkit.wasm.sha256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
6e4d5f1dd88d74e7adf2058e4668a42548a74452a14c33e6561838c8bf9acbef plugkit.wasm
|
|
@@ -987,30 +987,47 @@ async function runSpoolWatcher(instance, spoolDir) {
|
|
|
987
987
|
fs.mkdirSync(outDir, { recursive: true });
|
|
988
988
|
|
|
989
989
|
const LOCK_PATH = path.join(spoolDir, '.watcher.lock');
|
|
990
|
+
let _ownWrapperSha12 = '';
|
|
991
|
+
try {
|
|
992
|
+
const _crypto = require('crypto');
|
|
993
|
+
const _wp = path.join(os.homedir(), '.claude', 'gm-tools', 'plugkit-wasm-wrapper.js');
|
|
994
|
+
_ownWrapperSha12 = _crypto.createHash('sha256').update(fs.readFileSync(_wp)).digest('hex').slice(0, 12);
|
|
995
|
+
} catch (_) {}
|
|
996
|
+
function lockBody() { return `${process.pid}|${Date.now()}|${_ownWrapperSha12}`; }
|
|
990
997
|
function acquireLock() {
|
|
991
998
|
try {
|
|
992
999
|
if (fs.existsSync(LOCK_PATH)) {
|
|
993
1000
|
const content = fs.readFileSync(LOCK_PATH, 'utf-8').trim();
|
|
994
|
-
const
|
|
1001
|
+
const parts = content.split('|');
|
|
1002
|
+
const pidStr = parts[0];
|
|
1003
|
+
const tsStr = parts[1];
|
|
1004
|
+
const holderSha = parts[2] || '';
|
|
995
1005
|
const lockTs = parseInt(tsStr, 10);
|
|
996
1006
|
const age = Date.now() - lockTs;
|
|
997
1007
|
if (age < 15000) {
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1008
|
+
if (_ownWrapperSha12 && holderSha && holderSha !== _ownWrapperSha12) {
|
|
1009
|
+
try { logEvent('plugkit', 'peer.stale-wrapper-takeover', { holder_pid: pidStr, holder_sha: holderSha, own_sha: _ownWrapperSha12, lock_age_ms: age }); } catch (_) {}
|
|
1010
|
+
console.error(`[plugkit-wasm] peer wrapper-sha mismatch (holder=${holderSha} own=${_ownWrapperSha12}); killing pid=${pidStr} and taking over`);
|
|
1011
|
+
try { process.kill(parseInt(pidStr, 10), 'SIGTERM'); } catch (_) {}
|
|
1012
|
+
} else {
|
|
1013
|
+
const msg = JSON.stringify({ ok: false, reason: 'another-watcher-active', pid: pidStr, age_ms: age });
|
|
1014
|
+
console.error(`[plugkit-wasm] ${msg}; refusing to start`);
|
|
1015
|
+
try { fs.writeFileSync(path.join(spoolDir, '.lock-rejection.json'), msg); } catch (_) {}
|
|
1016
|
+
try { logEvent('plugkit', 'watcher.lock-rejected', { holder_pid: pidStr, lock_age_ms: age }); } catch (_) {}
|
|
1017
|
+
process.exit(75);
|
|
1018
|
+
}
|
|
1019
|
+
} else {
|
|
1020
|
+
console.error(`[plugkit-wasm] stale lock (age=${age}ms); taking over`);
|
|
1003
1021
|
}
|
|
1004
|
-
console.error(`[plugkit-wasm] stale lock (age=${age}ms); taking over`);
|
|
1005
1022
|
}
|
|
1006
|
-
fs.writeFileSync(LOCK_PATH,
|
|
1023
|
+
fs.writeFileSync(LOCK_PATH, lockBody());
|
|
1007
1024
|
} catch (e) {
|
|
1008
1025
|
console.error(`[plugkit-wasm] lock acquire failed: ${e.message}`);
|
|
1009
1026
|
process.exit(1);
|
|
1010
1027
|
}
|
|
1011
1028
|
}
|
|
1012
1029
|
function refreshLock() {
|
|
1013
|
-
try { fs.writeFileSync(LOCK_PATH,
|
|
1030
|
+
try { fs.writeFileSync(LOCK_PATH, lockBody()); } catch (_) {}
|
|
1014
1031
|
}
|
|
1015
1032
|
function releaseLock() {
|
|
1016
1033
|
try {
|
package/gm.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1176",
|
|
4
4
|
"description": "Spool-dispatch orchestration engine with unified state machine, skills, and automated git enforcement",
|
|
5
5
|
"author": "AnEntrypoint",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
|
-
"plugkitVersion": "0.1.
|
|
20
|
+
"plugkitVersion": "0.1.425"
|
|
21
21
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-skill",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1176",
|
|
4
4
|
"description": "Canonical universal harness — AI-native software engineering via skill-driven orchestration; bootstraps plugkit for task execution and session isolation. Install in any AI coding agent host.",
|
|
5
5
|
"author": "AnEntrypoint",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"gm.json"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"gm-plugkit": "^2.0.
|
|
42
|
+
"gm-plugkit": "^2.0.1176"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=16.0.0"
|