@upx-us/shield 0.7.12 → 0.7.13

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/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ---
6
6
 
7
+ ## [0.7.13] — 2026-03-16
8
+
9
+ ### Fixed
10
+
11
+ - **`openclaw shield` commands missing after auto-update** — the auto-updater was deleting the `integrity` field from `openclaw.json` without recomputing it. OpenClaw 2026.3.13+ requires this field to wire plugin CLI commands; without it the plugin loads but `openclaw shield status` and all shield commands fail with "unknown command". The updater now computes the correct SRI `sha512` integrity hash from the downloaded tarball and writes it to the install record.
12
+
13
+ ---
14
+
7
15
  ## [0.7.12] — 2026-03-16
8
16
 
9
17
  ### Fixed
@@ -342,7 +342,7 @@ function restoreFromBackup(backupPath) {
342
342
  return false;
343
343
  }
344
344
  }
345
- function updateOpenClawPluginMetadata(newVersion, shasum) {
345
+ function updateOpenClawPluginMetadata(newVersion, shasum, tarballBuffer) {
346
346
  const configPath = (0, path_1.join)((0, os_1.homedir)(), '.openclaw', 'openclaw.json');
347
347
  try {
348
348
  if (!(0, fs_1.existsSync)(configPath))
@@ -355,7 +355,13 @@ function updateOpenClawPluginMetadata(newVersion, shasum) {
355
355
  install.version = newVersion;
356
356
  install.resolvedVersion = newVersion;
357
357
  install.resolvedSpec = `${PACKAGE_NAME}@${newVersion}`;
358
- delete install.integrity;
358
+ if (tarballBuffer) {
359
+ const integrityHash = (0, crypto_1.createHash)('sha512').update(tarballBuffer).digest('base64');
360
+ install.integrity = `sha512-${integrityHash}`;
361
+ }
362
+ else {
363
+ delete install.integrity;
364
+ }
359
365
  if (shasum) {
360
366
  install.shasum = shasum;
361
367
  }
@@ -407,7 +413,8 @@ function downloadAndInstall(targetVersion) {
407
413
  return false;
408
414
  }
409
415
  const tarball = (0, path_1.join)(tmpDir, tarballs[0]);
410
- const tarballShasum = (0, crypto_1.createHash)('sha1').update((0, fs_1.readFileSync)(tarball)).digest('hex');
416
+ const tarballBuffer = (0, fs_1.readFileSync)(tarball);
417
+ const tarballShasum = (0, crypto_1.createHash)('sha1').update(tarballBuffer).digest('hex');
411
418
  const stagingDir = (0, path_1.join)(tmpDir, 'staging');
412
419
  (0, fs_1.mkdirSync)(stagingDir, { recursive: true });
413
420
  (0, child_process_1.execSync)(`tar xzf "${tarball}" -C "${stagingDir}" --strip-components=1`, {
@@ -442,7 +449,7 @@ function downloadAndInstall(targetVersion) {
442
449
  (0, fs_1.rmSync)((0, path_1.join)(PLUGIN_DIR, entry), { recursive: true, force: true });
443
450
  }
444
451
  copyRecursive(stagingDir, PLUGIN_DIR);
445
- updateOpenClawPluginMetadata(targetVersion, tarballShasum);
452
+ updateOpenClawPluginMetadata(targetVersion, tarballShasum, tarballBuffer);
446
453
  log.info('updater', `Installed ${PACKAGE_NAME}@${targetVersion} successfully`);
447
454
  return true;
448
455
  }
@@ -2,7 +2,7 @@
2
2
  "id": "shield",
3
3
  "name": "OpenClaw Shield",
4
4
  "description": "Real-time security monitoring — streams enriched, redacted security events to the Shield detection platform.",
5
- "version": "0.7.12",
5
+ "version": "0.7.13",
6
6
  "skills": [
7
7
  "./skills"
8
8
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@upx-us/shield",
3
- "version": "0.7.12",
3
+ "version": "0.7.13",
4
4
  "description": "Security monitoring plugin for OpenClaw agents — streams enriched security events to the Shield detection platform",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",