gm-skill 2.0.1146 → 2.0.1148
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/cli.js +86 -26
- package/gm.json +2 -2
- package/package.json +2 -2
- package/skills/gm-skill/SKILL.md +5 -1
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.1148` — 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.413
|
package/bin/plugkit.wasm
CHANGED
|
Binary file
|
package/bin/plugkit.wasm.sha256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4032ac9258c6fb79106ef9e02a40c9cba7a509a6e0507d4d0c062645b25799a6 plugkit.wasm
|
package/gm-plugkit/cli.js
CHANGED
|
@@ -1,18 +1,52 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const { ensureReady, startSpoolDaemon } = require('./bootstrap');
|
|
5
7
|
|
|
6
8
|
const usage = `gm-plugkit — Bootstrap and daemon-spawn for gm plugkit binary.
|
|
7
9
|
|
|
8
10
|
Usage:
|
|
9
11
|
bun x gm-plugkit@latest Bootstrap + start spool daemon
|
|
10
|
-
bun x gm-plugkit@latest
|
|
11
|
-
bun x gm-plugkit@latest --
|
|
12
|
-
bun x gm-plugkit@latest --
|
|
13
|
-
bun x gm-plugkit@latest --
|
|
12
|
+
bun x gm-plugkit@latest spool Same as default (explicit)
|
|
13
|
+
bun x gm-plugkit@latest --daemon Same as default
|
|
14
|
+
bun x gm-plugkit@latest --binary Print binary path only
|
|
15
|
+
bun x gm-plugkit@latest --status JSON status check
|
|
16
|
+
bun x gm-plugkit@latest --help Show this help
|
|
14
17
|
`;
|
|
15
18
|
|
|
19
|
+
function spoolDir() {
|
|
20
|
+
const projectDir = process.env.CLAUDE_PROJECT_DIR || process.cwd();
|
|
21
|
+
return path.join(projectDir, '.gm', 'exec-spool');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function ensureSpoolDir() {
|
|
25
|
+
try { fs.mkdirSync(spoolDir(), { recursive: true }); } catch (_) {}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function writeCliStatus(spec) {
|
|
29
|
+
try {
|
|
30
|
+
ensureSpoolDir();
|
|
31
|
+
fs.writeFileSync(
|
|
32
|
+
path.join(spoolDir(), '.cli-status.json'),
|
|
33
|
+
JSON.stringify({ ts: new Date().toISOString(), pid: process.pid, ...spec }, null, 2)
|
|
34
|
+
);
|
|
35
|
+
} catch (_) {}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function writeCliError(phase, err) {
|
|
39
|
+
try {
|
|
40
|
+
ensureSpoolDir();
|
|
41
|
+
const msg = err && err.message ? err.message : String(err);
|
|
42
|
+
const stack = err && err.stack ? err.stack : null;
|
|
43
|
+
fs.writeFileSync(
|
|
44
|
+
path.join(spoolDir(), '.bootstrap-error.json'),
|
|
45
|
+
JSON.stringify({ ts: new Date().toISOString(), pid: process.pid, error_phase: phase, error_message: msg, stack }, null, 2)
|
|
46
|
+
);
|
|
47
|
+
} catch (_) {}
|
|
48
|
+
}
|
|
49
|
+
|
|
16
50
|
(async () => {
|
|
17
51
|
const args = process.argv.slice(2);
|
|
18
52
|
|
|
@@ -21,28 +55,54 @@ Usage:
|
|
|
21
55
|
process.exit(0);
|
|
22
56
|
}
|
|
23
57
|
|
|
58
|
+
ensureSpoolDir();
|
|
59
|
+
writeCliStatus({ phase: 'starting', args });
|
|
60
|
+
|
|
61
|
+
let bootstrapResult;
|
|
24
62
|
try {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
63
|
+
bootstrapResult = await ensureReady();
|
|
64
|
+
} catch (err) {
|
|
65
|
+
writeCliError('ensure-ready', err);
|
|
66
|
+
console.error('Bootstrap failed:', err.message);
|
|
67
|
+
process.exit(1);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (!bootstrapResult || !bootstrapResult.ok) {
|
|
71
|
+
const errMsg = (bootstrapResult && bootstrapResult.error) || 'ensureReady returned non-ok';
|
|
72
|
+
writeCliError('ensure-ready', new Error(errMsg));
|
|
73
|
+
console.error('Bootstrap failed:', errMsg);
|
|
74
|
+
process.exit(1);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
writeCliStatus({ phase: 'bootstrapped', version: bootstrapResult.version, binary: bootstrapResult.binaryPath });
|
|
78
|
+
|
|
79
|
+
let daemon;
|
|
80
|
+
try {
|
|
81
|
+
daemon = startSpoolDaemon();
|
|
44
82
|
} catch (err) {
|
|
45
|
-
|
|
83
|
+
writeCliError('start-daemon', err);
|
|
84
|
+
console.error('Daemon start failed:', err.message);
|
|
46
85
|
process.exit(1);
|
|
47
86
|
}
|
|
48
|
-
|
|
87
|
+
|
|
88
|
+
if (!daemon || !daemon.ok) {
|
|
89
|
+
const errMsg = (daemon && daemon.error) || 'startSpoolDaemon returned non-ok';
|
|
90
|
+
writeCliError('start-daemon', new Error(errMsg));
|
|
91
|
+
console.error('Daemon start failed:', errMsg);
|
|
92
|
+
process.exit(1);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
writeCliStatus({ phase: 'ready', version: bootstrapResult.version, daemon_pid: daemon.pid, log: daemon.logPath });
|
|
96
|
+
|
|
97
|
+
console.log(JSON.stringify({
|
|
98
|
+
ok: true,
|
|
99
|
+
binary: bootstrapResult.binaryPath,
|
|
100
|
+
daemon,
|
|
101
|
+
message: 'plugkit ready, spool watcher running'
|
|
102
|
+
}));
|
|
103
|
+
process.exit(0);
|
|
104
|
+
})().catch((err) => {
|
|
105
|
+
writeCliError('uncaught', err);
|
|
106
|
+
console.error('gm-plugkit failed:', err && err.message ? err.message : err);
|
|
107
|
+
process.exit(1);
|
|
108
|
+
});
|
package/gm.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1148",
|
|
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.413"
|
|
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.1148",
|
|
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.1148"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=16.0.0"
|
package/skills/gm-skill/SKILL.md
CHANGED
|
@@ -18,7 +18,11 @@ bun x gm-plugkit@latest spool > /dev/null 2>&1 &
|
|
|
18
18
|
|
|
19
19
|
If `bun` is not available, fall back to `npx -y gm-plugkit@latest spool > /dev/null 2>&1 &` or to the local wrapper if it's already installed: `node ~/.claude/gm-tools/plugkit-wasm-wrapper.js spool > /dev/null 2>&1 &`. The wrapper has a self-heal: if it detects a `LinkError` or missing wasm at instantiation, it re-runs bootstrap automatically and retries.
|
|
20
20
|
|
|
21
|
-
Wait 2 seconds, verify
|
|
21
|
+
Wait 2 seconds, then verify boot:
|
|
22
|
+
|
|
23
|
+
- Read `.gm/exec-spool/.cli-status.json` — the launcher writes its phase here (`starting` → `bootstrapped` → `ready`). Present with `phase: "ready"` = good.
|
|
24
|
+
- Read `.gm/exec-spool/.status.json` — the watcher writes its heartbeat here every 5s. Fresh `ts` (within 15s) = watcher alive.
|
|
25
|
+
- If neither file exists or `.cli-status.json` is stuck at an earlier phase, read `.gm/exec-spool/.bootstrap-error.json` — the launcher writes `{error_phase, error_message, stack}` on any failure even when stdout/stderr were redirected to `/dev/null`. Also read `.gm/exec-spool/.watcher.log` for the post-spawn trace. Surface the error to the user; do not retry blindly.
|
|
22
26
|
|
|
23
27
|
## Plugkit version updates
|
|
24
28
|
|