gm-skill 2.0.1154 → 2.0.1156
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/gm-plugkit/plugkit-wasm-wrapper.js +29 -6
- package/gm.json +1 -1
- package/package.json +2 -2
- package/skills/gm-skill/SKILL.md +2 -0
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.1156` — 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
|
|
|
@@ -4,10 +4,17 @@ import os from 'os';
|
|
|
4
4
|
import crypto from 'crypto';
|
|
5
5
|
import https from 'https';
|
|
6
6
|
import { watch } from 'fs';
|
|
7
|
-
import { spawn, spawnSync } from 'child_process';
|
|
7
|
+
import { spawn as _rawSpawn, spawnSync as _rawSpawnSync } from 'child_process';
|
|
8
8
|
import net from 'net';
|
|
9
9
|
import { fileURLToPath } from 'url';
|
|
10
10
|
|
|
11
|
+
function spawnSync(cmd, args, opts) {
|
|
12
|
+
return _rawSpawnSync(cmd, args, { windowsHide: true, ...(opts || {}) });
|
|
13
|
+
}
|
|
14
|
+
function spawn(cmd, args, opts) {
|
|
15
|
+
return _rawSpawn(cmd, args, { windowsHide: true, ...(opts || {}) });
|
|
16
|
+
}
|
|
17
|
+
|
|
11
18
|
const __filename = fileURLToPath(import.meta.url);
|
|
12
19
|
const __dirname = path.dirname(__filename);
|
|
13
20
|
|
|
@@ -871,6 +878,7 @@ async function runSpoolWatcher(instance, spoolDir) {
|
|
|
871
878
|
|
|
872
879
|
const UPDATE_AVAILABLE_PATH = path.join(spoolDir, '.update-available.json');
|
|
873
880
|
const UPDATE_CHECK_INTERVAL_MS = 5 * 60 * 1000;
|
|
881
|
+
let _lastKnownDrift = null;
|
|
874
882
|
function checkForUpdate() {
|
|
875
883
|
const installed = resolveVersion(instance);
|
|
876
884
|
const req = https.get({
|
|
@@ -879,7 +887,11 @@ async function runSpoolWatcher(instance, spoolDir) {
|
|
|
879
887
|
headers: { 'user-agent': 'plugkit-watcher', 'accept': 'application/json' },
|
|
880
888
|
timeout: 5000,
|
|
881
889
|
}, (res) => {
|
|
882
|
-
if (res.statusCode !== 200) {
|
|
890
|
+
if (res.statusCode !== 200) {
|
|
891
|
+
res.resume();
|
|
892
|
+
logEvent('plugkit', 'update.check.error', { installed, status: res.statusCode });
|
|
893
|
+
return;
|
|
894
|
+
}
|
|
883
895
|
const chunks = [];
|
|
884
896
|
res.on('data', c => chunks.push(c));
|
|
885
897
|
res.on('end', () => {
|
|
@@ -890,21 +902,32 @@ async function runSpoolWatcher(instance, spoolDir) {
|
|
|
890
902
|
const latest = tag.replace(/^v/, '');
|
|
891
903
|
if (latest === installed) {
|
|
892
904
|
try { fs.unlinkSync(UPDATE_AVAILABLE_PATH); } catch (_) {}
|
|
905
|
+
if (_lastKnownDrift) {
|
|
906
|
+
logEvent('plugkit', 'update.cleared', { installed, was: _lastKnownDrift });
|
|
907
|
+
_lastKnownDrift = null;
|
|
908
|
+
}
|
|
893
909
|
return;
|
|
894
910
|
}
|
|
911
|
+
const update_url = `https://github.com/AnEntrypoint/plugkit-bin/releases/tag/v${latest}`;
|
|
895
912
|
fs.writeFileSync(UPDATE_AVAILABLE_PATH, JSON.stringify({
|
|
896
913
|
installed,
|
|
897
914
|
latest,
|
|
898
915
|
checked_at_ms: Date.now(),
|
|
899
916
|
instruction: 'plugkit is out of date. To update, close the running watcher and re-bootstrap with the @latest flag, e.g. node ~/.claude/gm-tools/plugkit-wasm-wrapper.js spool & after running bootstrap with {latest: true}.',
|
|
900
|
-
update_url
|
|
917
|
+
update_url,
|
|
901
918
|
}, null, 2));
|
|
902
919
|
console.log(`[update] available: installed=${installed} latest=${latest} → wrote ${UPDATE_AVAILABLE_PATH}`);
|
|
903
|
-
|
|
920
|
+
if (_lastKnownDrift !== latest) {
|
|
921
|
+
logEvent('plugkit', 'update.available', { installed, latest, update_url });
|
|
922
|
+
_lastKnownDrift = latest;
|
|
923
|
+
}
|
|
924
|
+
} catch (e) {
|
|
925
|
+
logEvent('plugkit', 'update.check.error', { error: String(e && e.message || e) });
|
|
926
|
+
}
|
|
904
927
|
});
|
|
905
928
|
});
|
|
906
|
-
req.on('timeout', () => req.destroy());
|
|
907
|
-
req.on('error', () => {});
|
|
929
|
+
req.on('timeout', () => { req.destroy(); logEvent('plugkit', 'update.check.error', { error: 'timeout' }); });
|
|
930
|
+
req.on('error', (e) => logEvent('plugkit', 'update.check.error', { error: String(e && e.message || e) }));
|
|
908
931
|
}
|
|
909
932
|
setTimeout(checkForUpdate, 10_000);
|
|
910
933
|
setInterval(checkForUpdate, UPDATE_CHECK_INTERVAL_MS);
|
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.1156",
|
|
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.1156"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=16.0.0"
|
package/skills/gm-skill/SKILL.md
CHANGED
|
@@ -16,6 +16,8 @@ Do not create documentation files the user did not ask for. No COMPLETED.md, no
|
|
|
16
16
|
|
|
17
17
|
Before any apparent stop, dispatch `residual-scan`. If it returns work that fits the spirit of the original ask and is reachable from this session, expand the PRD and execute; only residuals genuinely out-of-spirit or out-of-reach are name-and-stop. A turn that ends with uncommitted changes, an open PRD slice, or unresolved mutables has not actually stopped — it has stalled the chain.
|
|
18
18
|
|
|
19
|
+
If the `instruction` response carries a non-null `update_available`, plugkit drift has been detected on disk and the running watcher is behind. Rebootstrap before continuing — newer fixes are sitting on disk unused, and every dispatch is wasted on stale code. `bun x gm-plugkit@latest` (or `npx -y gm-plugkit@latest`) is the one-shot: it fetches the new wasm, replaces the artifact, and the watcher reloads. Drift past one version is a deviation.
|
|
20
|
+
|
|
19
21
|
The wasm artifact lives at `~/.claude/gm-tools/plugkit.wasm`; the spool watcher runs it. The watcher's own stdout/stderr is appended to `.gm/exec-spool/.watcher.log` — Read it to see plugkit's internal trace, dispatch timings, sweep actions, errors.
|
|
20
22
|
|
|
21
23
|
## Boot the spool watcher (first turn only)
|