openclaw-elys 1.4.7 → 1.4.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/README.md +2 -5
- package/dist/src/mqtt-client.d.ts +1 -0
- package/dist/src/mqtt-client.js +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,12 +8,9 @@ Elys App 的 OpenClaw 频道插件 — 将本地 OpenClaw 智能体连接到 Ely
|
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
# 1. Install the plugin / 安装插件
|
|
11
|
-
openclaw plugins install openclaw-elys
|
|
11
|
+
openclaw plugins install openclaw-elys@latest
|
|
12
12
|
|
|
13
|
-
# 2.
|
|
14
|
-
openclaw gateway restart
|
|
15
|
-
|
|
16
|
-
# 3. Register device / 注册设备
|
|
13
|
+
# 2. Register device / 注册设备
|
|
17
14
|
npx openclaw-elys@latest setup <gateway_url> <register_token>
|
|
18
15
|
```
|
|
19
16
|
|
|
@@ -11,6 +11,7 @@ export declare class ElysDeviceMQTTClient {
|
|
|
11
11
|
private log;
|
|
12
12
|
private consecutiveFailures;
|
|
13
13
|
private static readonly MAX_FAILURES_BEFORE_REVOKE_WARNING;
|
|
14
|
+
private commandQueue;
|
|
14
15
|
constructor(credentials: DeviceCredentials, log?: (...args: unknown[]) => void);
|
|
15
16
|
setCommandHandler(handler: CommandHandler): void;
|
|
16
17
|
connect(abortSignal?: AbortSignal): Promise<void>;
|
package/dist/src/mqtt-client.js
CHANGED
|
@@ -10,6 +10,7 @@ export class ElysDeviceMQTTClient {
|
|
|
10
10
|
log;
|
|
11
11
|
consecutiveFailures = 0;
|
|
12
12
|
static MAX_FAILURES_BEFORE_REVOKE_WARNING = 3;
|
|
13
|
+
commandQueue = Promise.resolve();
|
|
13
14
|
constructor(credentials, log) {
|
|
14
15
|
this.credentials = credentials;
|
|
15
16
|
this.log = log ?? console.log;
|
|
@@ -42,7 +43,8 @@ export class ElysDeviceMQTTClient {
|
|
|
42
43
|
});
|
|
43
44
|
});
|
|
44
45
|
this.client.on("message", (_topic, payload) => {
|
|
45
|
-
|
|
46
|
+
// Serial queue: commands are processed one at a time in arrival order
|
|
47
|
+
this.commandQueue = this.commandQueue.then(() => this.handleMessage(payload), () => this.handleMessage(payload)).catch((err) => {
|
|
46
48
|
this.log("[elys] error handling message:", err);
|
|
47
49
|
});
|
|
48
50
|
});
|