gm-skill 2.0.1847 → 2.0.1848
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/gm-plugkit/cli.js +10 -25
- package/gm-plugkit/package.json +1 -1
- package/gm.json +1 -1
- package/package.json +1 -1
- package/skills/gm/SKILL.md +1 -1
package/gm-plugkit/cli.js
CHANGED
|
@@ -151,20 +151,6 @@ function statusServing(st, freshMs) {
|
|
|
151
151
|
return Number.isFinite(st.ts) && (now - st.ts) < freshMs;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
function sleepSync(ms) {
|
|
155
|
-
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function waitForWatcherHeartbeat(dir, deadlineMs, freshMs) {
|
|
159
|
-
const t0 = Date.now();
|
|
160
|
-
while (Date.now() - t0 < deadlineMs) {
|
|
161
|
-
const st = readStatus(dir);
|
|
162
|
-
if (statusServing(st, freshMs)) return st;
|
|
163
|
-
sleepSync(300);
|
|
164
|
-
}
|
|
165
|
-
return null;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
154
|
function ensureSpoolDir() {
|
|
169
155
|
try { fs.mkdirSync(spoolDir(), { recursive: true }); } catch (_) {}
|
|
170
156
|
}
|
|
@@ -285,22 +271,21 @@ function writeCliError(phase, err) {
|
|
|
285
271
|
process.exit(1);
|
|
286
272
|
}
|
|
287
273
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
writeCliStatus({ phase: '
|
|
274
|
+
// Fire-and-forget: the daemon child is already detached+unref'd by
|
|
275
|
+
// startSpoolDaemon(), so the CLI process itself has nothing left to do.
|
|
276
|
+
// Waiting here for a heartbeat confirmation (removed) used to block the
|
|
277
|
+
// calling shell for the full bootstrap+first-heartbeat duration -- up to
|
|
278
|
+
// 30s on a healthy boot, worse on a slow/degraded one -- holding up every
|
|
279
|
+
// caller even though the daemon spawn itself is near-instant. A caller
|
|
280
|
+
// that needs serving-confirmation reads .gm/exec-spool/.status.json
|
|
281
|
+
// directly (ts freshness) rather than blocking this call on it.
|
|
282
|
+
writeCliStatus({ phase: 'daemon-spawned', version: bootstrapResult.version, daemon_pid: daemon.pid, log: daemon.logPath });
|
|
297
283
|
|
|
298
284
|
console.log(JSON.stringify({
|
|
299
285
|
ok: true,
|
|
300
286
|
binary: bootstrapResult.binaryPath,
|
|
301
287
|
daemon,
|
|
302
|
-
|
|
303
|
-
message: 'plugkit ready, spool watcher serving'
|
|
288
|
+
message: 'plugkit daemon spawned, not yet confirmed serving -- check .gm/exec-spool/.status.json for heartbeat freshness'
|
|
304
289
|
}));
|
|
305
290
|
process.exit(0);
|
|
306
291
|
})().catch((err) => {
|
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.1848",
|
|
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-skill",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1848",
|
|
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",
|
package/skills/gm/SKILL.md
CHANGED
|
@@ -52,7 +52,7 @@ cat .gm/exec-spool/.status.json 2>/dev/null; echo ---; cat .gm/exec-spool/.turn-
|
|
|
52
52
|
bun x gm-plugkit@latest spool
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
(`npx -y gm-plugkit@latest spool` if no `bun`.)
|
|
55
|
+
(`npx -y gm-plugkit@latest spool` if no `bun`.) Fire-and-forget: spawns the detached daemon and returns immediately (already-alive watcher also returns at once, unchanged) -- it does NOT wait for the watcher to confirm serving. No `&`, no `sleep`, no re-`cat`; write your first verb to `in/` right after it returns. A first-read "file does not exist" on that verb is normal (the just-spawned watcher hasn't noticed the file yet) -- re-Read next message, same as any dead-watcher-adjacent recheck. If you need to actively confirm serving before dispatching (rare), read `.gm/exec-spool/.status.json` yourself and check `ts` freshness.
|
|
56
56
|
|
|
57
57
|
**Dispatch shape: Write request + Read response, SAME tool-call block.** Never proceed/narrate/begin work before reading the response and following its `instruction` field. First-read "file does not exist" mid-verb = normal, re-Read next message. Never poll with `sleep && ls` -- plugkit is synchronous; missing response = dead watcher (recheck `ts`) or slow verb, never "still processing."
|
|
58
58
|
|