gm-skill 2.0.2563 → 2.0.2564

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/bootstrap.js CHANGED
@@ -25,6 +25,7 @@ const {
25
25
  const {
26
26
  readVersionFile,
27
27
  readShaManifest,
28
+ failClosedMissingSha,
28
29
  resolveCacheWasmPath,
29
30
  extractNpmPackageWithRetry: extractNpmPackageWithRetryCore,
30
31
  writeBootstrapError,
@@ -215,7 +216,8 @@ async function bootstrap(opts) {
215
216
  throw extractErr;
216
217
  }
217
218
 
218
- if (wasmExpectedSha) {
219
+ if (!wasmExpectedSha) throw failClosedMissingSha(version, wasmName, wasmPartialPath);
220
+ {
219
221
  const got = await require('../gm-plugkit/gm-process').sha256OfFile(wasmPartialPath);
220
222
  if (got !== wasmExpectedSha) {
221
223
  try { fs.unlinkSync(wasmPartialPath); } catch (_) {}
@@ -228,8 +230,6 @@ async function bootstrap(opts) {
228
230
  throw new Error(`sha256 mismatch for ${wasmName}: expected ${wasmExpectedSha}, got ${got}`);
229
231
  }
230
232
  log('sha256 verified');
231
- } else {
232
- log('no sha256 manifest -- skipping verify');
233
233
  }
234
234
 
235
235
  try { fs.renameSync(wasmPartialPath, wasmFinalPath); }
@@ -52,6 +52,18 @@ function clearBootstrapError() {
52
52
  } catch (_) {}
53
53
  }
54
54
 
55
+ function failClosedMissingSha(version, artifactName, partialPath) {
56
+ try { fs.unlinkSync(partialPath); } catch (_) {}
57
+ const message = `no sha256 manifest entry for ${artifactName}: refusing to trust unverified download`;
58
+ writeBootstrapError({
59
+ expected_version: version,
60
+ cached_version: null,
61
+ error_phase: 'sha256-manifest-missing',
62
+ error_message: message,
63
+ });
64
+ return new Error(message);
65
+ }
66
+
55
67
  function readVersionFile(wrapperDir) {
56
68
  const p = path.join(wrapperDir, 'plugkit.version');
57
69
  if (!fs.existsSync(p)) throw new Error(`plugkit.version not found at ${p}`);
@@ -226,6 +238,7 @@ module.exports = {
226
238
  resolveProjectRoot,
227
239
  writeBootstrapError,
228
240
  clearBootstrapError,
241
+ failClosedMissingSha,
229
242
  readVersionFile,
230
243
  readShaManifest,
231
244
  copyWasmToGmTools,
@@ -31,6 +31,7 @@ const {
31
31
  writeBootstrapError,
32
32
  clearBootstrapError,
33
33
  resolveInstalledWasmPath,
34
+ failClosedMissingSha,
34
35
  } = core;
35
36
 
36
37
  const LOCK_STALE_MS = 30 * 60 * 1000;
@@ -416,7 +417,8 @@ async function bootstrap(opts) {
416
417
  }
417
418
  }
418
419
 
419
- if (expectedSha) {
420
+ if (!expectedSha) throw failClosedMissingSha(version, wasmName, partialPath);
421
+ {
420
422
  const got = await sha256OfFile(partialPath);
421
423
  if (got !== expectedSha) {
422
424
  try { fs.unlinkSync(partialPath); } catch (_) {}
@@ -428,8 +430,6 @@ async function bootstrap(opts) {
428
430
  throw new Error(`sha256 mismatch for ${wasmName}: expected ${expectedSha}, got ${got}`);
429
431
  }
430
432
  log('sha256 verified');
431
- } else {
432
- log('no sha256 manifest -- skipping verify');
433
433
  }
434
434
 
435
435
  try { fs.renameSync(partialPath, finalPath); }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-plugkit",
3
- "version": "2.0.2563",
3
+ "version": "2.0.2564",
4
4
  "description": "Bootstrap and daemon-spawn tool for gm plugkit binary. Downloads the correct platform wasm, verifies SHA256, and launches agentplug-runner (the native wasm host) as the spool watcher daemon.",
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.2563",
3
+ "version": "2.0.2564",
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.2563",
3
+ "version": "2.0.2564",
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",