gm-skill 2.0.1154 → 2.0.1155

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 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.1154` — auto-bumped from the canonical `gm` repo. Every push to `AnEntrypoint/gm` (or any cascading sibling crate) republishes this package.
38
+ `2.0.1155` — 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
 
@@ -871,6 +871,7 @@ async function runSpoolWatcher(instance, spoolDir) {
871
871
 
872
872
  const UPDATE_AVAILABLE_PATH = path.join(spoolDir, '.update-available.json');
873
873
  const UPDATE_CHECK_INTERVAL_MS = 5 * 60 * 1000;
874
+ let _lastKnownDrift = null;
874
875
  function checkForUpdate() {
875
876
  const installed = resolveVersion(instance);
876
877
  const req = https.get({
@@ -879,7 +880,11 @@ async function runSpoolWatcher(instance, spoolDir) {
879
880
  headers: { 'user-agent': 'plugkit-watcher', 'accept': 'application/json' },
880
881
  timeout: 5000,
881
882
  }, (res) => {
882
- if (res.statusCode !== 200) { res.resume(); return; }
883
+ if (res.statusCode !== 200) {
884
+ res.resume();
885
+ logEvent('plugkit', 'update.check.error', { installed, status: res.statusCode });
886
+ return;
887
+ }
883
888
  const chunks = [];
884
889
  res.on('data', c => chunks.push(c));
885
890
  res.on('end', () => {
@@ -890,21 +895,32 @@ async function runSpoolWatcher(instance, spoolDir) {
890
895
  const latest = tag.replace(/^v/, '');
891
896
  if (latest === installed) {
892
897
  try { fs.unlinkSync(UPDATE_AVAILABLE_PATH); } catch (_) {}
898
+ if (_lastKnownDrift) {
899
+ logEvent('plugkit', 'update.cleared', { installed, was: _lastKnownDrift });
900
+ _lastKnownDrift = null;
901
+ }
893
902
  return;
894
903
  }
904
+ const update_url = `https://github.com/AnEntrypoint/plugkit-bin/releases/tag/v${latest}`;
895
905
  fs.writeFileSync(UPDATE_AVAILABLE_PATH, JSON.stringify({
896
906
  installed,
897
907
  latest,
898
908
  checked_at_ms: Date.now(),
899
909
  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: `https://github.com/AnEntrypoint/plugkit-bin/releases/tag/v${latest}`,
910
+ update_url,
901
911
  }, null, 2));
902
912
  console.log(`[update] available: installed=${installed} latest=${latest} → wrote ${UPDATE_AVAILABLE_PATH}`);
903
- } catch (_) {}
913
+ if (_lastKnownDrift !== latest) {
914
+ logEvent('plugkit', 'update.available', { installed, latest, update_url });
915
+ _lastKnownDrift = latest;
916
+ }
917
+ } catch (e) {
918
+ logEvent('plugkit', 'update.check.error', { error: String(e && e.message || e) });
919
+ }
904
920
  });
905
921
  });
906
- req.on('timeout', () => req.destroy());
907
- req.on('error', () => {});
922
+ req.on('timeout', () => { req.destroy(); logEvent('plugkit', 'update.check.error', { error: 'timeout' }); });
923
+ req.on('error', (e) => logEvent('plugkit', 'update.check.error', { error: String(e && e.message || e) }));
908
924
  }
909
925
  setTimeout(checkForUpdate, 10_000);
910
926
  setInterval(checkForUpdate, UPDATE_CHECK_INTERVAL_MS);
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1154",
3
+ "version": "2.0.1155",
4
4
  "description": "Spool-dispatch orchestration engine with unified state machine, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-skill",
3
- "version": "2.0.1154",
3
+ "version": "2.0.1155",
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.1154"
42
+ "gm-plugkit": "^2.0.1155"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=16.0.0"
@@ -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)