gm-skill 2.0.1369 → 2.0.1371
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/bin/plugkit.version +1 -1
- package/bin/plugkit.wasm.sha256 +1 -1
- package/gm-plugkit/cli.js +36 -4
- package/gm-plugkit/package.json +1 -1
- package/gm.json +2 -2
- package/package.json +1 -1
package/bin/plugkit.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.517
|
package/bin/plugkit.wasm.sha256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
0134a7e7d6d35b7dcc35a0a02aef8c0db4e4ceb1f1b4cf7f5e8e38aca581c802 plugkit.wasm
|
package/gm-plugkit/cli.js
CHANGED
|
@@ -22,6 +22,29 @@ Usage:
|
|
|
22
22
|
bun x gm-plugkit@latest --help Show this help
|
|
23
23
|
`;
|
|
24
24
|
|
|
25
|
+
function readDiskWasmVersion() {
|
|
26
|
+
try {
|
|
27
|
+
const versionFile = path.join(os.homedir(), '.gm-tools', 'plugkit.version');
|
|
28
|
+
return fs.readFileSync(versionFile, 'utf-8').trim() || null;
|
|
29
|
+
} catch (_) { return null; }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function readWatcherInstanceVersion(pid) {
|
|
33
|
+
try {
|
|
34
|
+
const ps = process.platform === 'win32'
|
|
35
|
+
? `(Get-WmiObject Win32_Process -Filter "ProcessId=${pid}").CommandLine`
|
|
36
|
+
: null;
|
|
37
|
+
if (!ps) return null;
|
|
38
|
+
const out = cp.execFileSync('powershell.exe', ['-NoProfile', '-NonInteractive', '-Command', ps], { encoding: 'utf-8', windowsHide: true });
|
|
39
|
+
const m = out.match(/([A-Z]:\\[^"\s]+\.gm[\\/]exec-spool)/i);
|
|
40
|
+
if (!m) return null;
|
|
41
|
+
const statusPath = path.join(m[1].replace(/[\\/]exec-spool.*$/, ''), 'exec-spool', '.status.json');
|
|
42
|
+
if (!fs.existsSync(statusPath)) return null;
|
|
43
|
+
const status = JSON.parse(fs.readFileSync(statusPath, 'utf-8'));
|
|
44
|
+
return status && status.instance_version ? status.instance_version : null;
|
|
45
|
+
} catch (_) { return null; }
|
|
46
|
+
}
|
|
47
|
+
|
|
25
48
|
function killStaleWatchers() {
|
|
26
49
|
try {
|
|
27
50
|
const wrapperPath = path.join(os.homedir(), '.gm-tools', 'plugkit-wasm-wrapper.js');
|
|
@@ -30,8 +53,17 @@ function killStaleWatchers() {
|
|
|
30
53
|
return 1;
|
|
31
54
|
}
|
|
32
55
|
const diskMtime = fs.statSync(wrapperPath).mtimeMs;
|
|
56
|
+
const diskWasmVersion = readDiskWasmVersion();
|
|
33
57
|
const stale = [];
|
|
34
58
|
const fresh = [];
|
|
59
|
+
function consider(pid, startedMs) {
|
|
60
|
+
const reasons = [];
|
|
61
|
+
if (startedMs < diskMtime) reasons.push('wrapper-mtime');
|
|
62
|
+
const instV = readWatcherInstanceVersion(pid);
|
|
63
|
+
if (diskWasmVersion && instV && instV !== diskWasmVersion) reasons.push(`wasm-drift:${instV}->${diskWasmVersion}`);
|
|
64
|
+
if (reasons.length > 0) stale.push({ pid, started_ms: startedMs, instance_version: instV, reasons });
|
|
65
|
+
else fresh.push({ pid, started_ms: startedMs, instance_version: instV });
|
|
66
|
+
}
|
|
35
67
|
if (process.platform === 'win32') {
|
|
36
68
|
const ps = `Get-WmiObject Win32_Process -Filter "name='node.exe'" | Where-Object { $_.CommandLine -match 'plugkit-wasm-wrapper' } | ForEach-Object { $_.ProcessId.ToString() + '|' + $_.CreationDate }`;
|
|
37
69
|
const out = cp.execFileSync('powershell.exe', ['-NoProfile', '-NonInteractive', '-Command', ps], { encoding: 'utf-8', windowsHide: true });
|
|
@@ -42,8 +74,7 @@ function killStaleWatchers() {
|
|
|
42
74
|
const m = creation && creation.match(/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(?:\.(\d+))?(?:([+-])(\d+))?/);
|
|
43
75
|
if (!m) continue;
|
|
44
76
|
const localMs = new Date(+m[1], +m[2] - 1, +m[3], +m[4], +m[5], +m[6], m[7] ? Math.round(+('0.' + m[7]) * 1000) : 0).getTime();
|
|
45
|
-
|
|
46
|
-
else fresh.push({ pid, started_ms: localMs });
|
|
77
|
+
consider(pid, localMs);
|
|
47
78
|
}
|
|
48
79
|
} else {
|
|
49
80
|
const out = cp.execFileSync('ps', ['-eo', 'pid,lstart,command'], { encoding: 'utf-8' });
|
|
@@ -54,8 +85,7 @@ function killStaleWatchers() {
|
|
|
54
85
|
const pid = parseInt(m[1], 10);
|
|
55
86
|
const start = Date.parse(m[2]);
|
|
56
87
|
if (!Number.isFinite(pid) || !Number.isFinite(start)) continue;
|
|
57
|
-
|
|
58
|
-
else fresh.push({ pid, started_ms: start });
|
|
88
|
+
consider(pid, start);
|
|
59
89
|
}
|
|
60
90
|
}
|
|
61
91
|
const killed = [];
|
|
@@ -75,8 +105,10 @@ function killStaleWatchers() {
|
|
|
75
105
|
console.log(JSON.stringify({
|
|
76
106
|
ok: true,
|
|
77
107
|
disk_wrapper_mtime_ms: diskMtime,
|
|
108
|
+
disk_wasm_version: diskWasmVersion,
|
|
78
109
|
stale_found: stale.length,
|
|
79
110
|
fresh_found: fresh.length,
|
|
111
|
+
stale_detail: stale,
|
|
80
112
|
killed,
|
|
81
113
|
failed,
|
|
82
114
|
}, null, 2));
|
package/gm-plugkit/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-plugkit",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1371",
|
|
4
4
|
"description": "Bootstrap and daemon-spawn tool for gm plugkit binary. Downloads the correct platform binary, verifies SHA256, and starts the spool watcher daemon. Includes plugkit-wasm-wrapper for WASM-based spool watching.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
package/gm.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1371",
|
|
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.517"
|
|
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.1371",
|
|
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",
|