@upx-us/shield 0.7.11 → 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 +16 -0
- package/dist/index.js +6 -1
- package/dist/src/updater.js +11 -4
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@ 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
|
+
|
|
15
|
+
## [0.7.12] — 2026-03-16
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- **Plugin showing permanently "Disconnected" after gateway hot-reload** — when the OpenClaw gateway reloaded the plugin module, a race condition between teardown and startup caused new startup attempts to silently abort. The previous instance's timers kept running but were invisible to the status command, resulting in permanent "Disconnected" status and missed telemetry cycles. The teardown is now properly awaited before startup proceeds.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
7
23
|
## [0.7.11] — 2026-03-16
|
|
8
24
|
|
|
9
25
|
### Added
|
package/dist/index.js
CHANGED
|
@@ -319,6 +319,7 @@ const state = {
|
|
|
319
319
|
};
|
|
320
320
|
let firstEventDelivered = false;
|
|
321
321
|
let teardownPreviousRuntime = null;
|
|
322
|
+
let pendingTeardown = null;
|
|
322
323
|
let serviceStartFn = null;
|
|
323
324
|
const MAX_BACKOFF_MS = 5 * 60 * 1000;
|
|
324
325
|
const TELEMETRY_INTERVAL_MS = 5 * 60 * 1000;
|
|
@@ -575,13 +576,17 @@ exports.default = {
|
|
|
575
576
|
}
|
|
576
577
|
};
|
|
577
578
|
if (teardownPreviousRuntime) {
|
|
578
|
-
|
|
579
|
+
pendingTeardown = teardownPreviousRuntime()
|
|
579
580
|
.catch((err) => log.warn('shield', `Runtime cleanup before re-register failed: ${err instanceof Error ? err.message : String(err)}`));
|
|
580
581
|
}
|
|
581
582
|
teardownPreviousRuntime = () => cleanupRuntime({ markStopped: true, resetGuard: true, flushRedactor: false });
|
|
582
583
|
const serviceDefinition = {
|
|
583
584
|
id: 'shield-monitor',
|
|
584
585
|
async start() {
|
|
586
|
+
if (pendingTeardown) {
|
|
587
|
+
await pendingTeardown.catch(() => { });
|
|
588
|
+
pendingTeardown = null;
|
|
589
|
+
}
|
|
585
590
|
if (!startGuard.begin()) {
|
|
586
591
|
log.debug('shield', 'Start requested while service is already started or in progress');
|
|
587
592
|
return;
|
package/dist/src/updater.js
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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
|
}
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED