rol-websocket-channel 1.7.5 → 1.7.8

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/dist/index.js CHANGED
@@ -492,7 +492,7 @@ async function handleIncomingMessage(payload, account, cfg, runtime, log, mqttTo
492
492
  publishCustomMessageResponse({
493
493
  type: "receiver",
494
494
  trace_id: traceId,
495
- source: "system",
495
+ source: "system-pre",
496
496
  timestamp: Date.now(),
497
497
  success: true,
498
498
  data: {
@@ -101,6 +101,13 @@ export const pluginSelfUpdate = async (_params, context) => {
101
101
  ...result
102
102
  };
103
103
  }
104
+ // Trigger restart in background after a short delay (e.g. 2 seconds) to allow the MQTT response to be sent
105
+ setTimeout(() => {
106
+ console.log('[system] Triggering automatic restart after plugin update...');
107
+ runOpenClawCommand(['gateway', 'restart'], context, 'pluginSelfUpdate.restart').catch((error) => {
108
+ console.error('[system] Auto-restart after update failed:', error);
109
+ });
110
+ }, 2000);
104
111
  return {
105
112
  ok: true,
106
113
  action: 'pluginSelfUpdate',
package/index.ts CHANGED
@@ -632,7 +632,7 @@ async function handleIncomingMessage(
632
632
  publishCustomMessageResponse({
633
633
  type: "receiver",
634
634
  trace_id: traceId,
635
- source: "system",
635
+ source: "system-pre",
636
636
  timestamp: Date.now(),
637
637
  success: true,
638
638
  data: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rol-websocket-channel",
3
- "version": "1.7.5",
3
+ "version": "1.7.8",
4
4
  "description": "Unified OpenClaw plugin: MQTT Channel + Admin Bridge for remote management",
5
5
  "license": "MIT",
6
6
  "author": "nixgnehc",
@@ -115,6 +115,14 @@ export const pluginSelfUpdate: MethodHandler = async (_params, context: MethodCo
115
115
  };
116
116
  }
117
117
 
118
+ // Trigger restart in background after a short delay (e.g. 2 seconds) to allow the MQTT response to be sent
119
+ setTimeout(() => {
120
+ console.log('[system] Triggering automatic restart after plugin update...');
121
+ runOpenClawCommand(['gateway', 'restart'], context, 'pluginSelfUpdate.restart').catch((error) => {
122
+ console.error('[system] Auto-restart after update failed:', error);
123
+ });
124
+ }, 2000);
125
+
118
126
  return {
119
127
  ok: true,
120
128
  action: 'pluginSelfUpdate',