openclaw-elys 1.7.2 → 1.7.3

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.
@@ -63,7 +63,7 @@ export async function monitorElysProvider(opts) {
63
63
  fullText += payload.text;
64
64
  seq++;
65
65
  const done = info.kind === "final";
66
- mqttClient.publishStreamChunk(cmd.id, payload.text, seq, done, cmd.reply_to);
66
+ mqttClient.publishStreamChunk(cmd.id, payload.text, seq, done);
67
67
  if (info.kind === "block") {
68
68
  log(`[elys] stream chunk #${seq}: ${payload.text.slice(0, 80)}...`);
69
69
  }
@@ -73,7 +73,7 @@ export async function monitorElysProvider(opts) {
73
73
  }
74
74
  else if (info.kind === "final") {
75
75
  seq++;
76
- mqttClient.publishStreamChunk(cmd.id, "", seq, true, cmd.reply_to);
76
+ mqttClient.publishStreamChunk(cmd.id, "", seq, true);
77
77
  log(`[elys] final reply delivered (empty)`);
78
78
  }
79
79
  };
@@ -35,7 +35,7 @@ export declare class ElysDeviceMQTTClient {
35
35
  connect(abortSignal?: AbortSignal): Promise<void>;
36
36
  disconnect(): void;
37
37
  /** Send a stream chunk (for streaming AI responses) */
38
- publishStreamChunk(commandId: string, chunk: string, seq: number, done: boolean, replyTo?: string): void;
38
+ publishStreamChunk(commandId: string, chunk: string, seq: number, done: boolean): void;
39
39
  private onMessage;
40
40
  private flushDebounce;
41
41
  /** Merge multiple buffered commands into one. Joins text args with newline. */
@@ -120,7 +120,7 @@ export class ElysDeviceMQTTClient {
120
120
  }
121
121
  }
122
122
  /** Send a stream chunk (for streaming AI responses) */
123
- publishStreamChunk(commandId, chunk, seq, done, replyTo) {
123
+ publishStreamChunk(commandId, chunk, seq, done) {
124
124
  const msg = {
125
125
  id: commandId,
126
126
  type: "stream",
@@ -129,7 +129,7 @@ export class ElysDeviceMQTTClient {
129
129
  seq,
130
130
  done,
131
131
  };
132
- this.publish(msg, replyTo);
132
+ this.publish(msg);
133
133
  }
134
134
  // ─── Inbound message pipeline: dedup → ack → debounce → abort → execute ───
135
135
  onMessage(payload) {
@@ -201,7 +201,6 @@ export class ElysDeviceMQTTClient {
201
201
  async executeCommand(cmd, signal) {
202
202
  if (!this.commandHandler)
203
203
  return;
204
- const replyTo = cmd.reply_to;
205
204
  try {
206
205
  const result = await Promise.race([
207
206
  this.commandHandler(cmd, signal),
@@ -209,12 +208,11 @@ export class ElysDeviceMQTTClient {
209
208
  const timer = setTimeout(() => {
210
209
  reject(new Error(`command timed out after ${this.commandTimeoutMs / 1000}s`));
211
210
  }, this.commandTimeoutMs);
212
- // Clean up timer if command completes or is aborted
213
211
  signal.addEventListener("abort", () => clearTimeout(timer), { once: true });
214
212
  }),
215
213
  ]);
216
214
  if (!signal.aborted) {
217
- this.publish(result, replyTo);
215
+ this.publish(result);
218
216
  }
219
217
  }
220
218
  catch (err) {
@@ -229,7 +227,7 @@ export class ElysDeviceMQTTClient {
229
227
  timestamp: Math.floor(Date.now() / 1000),
230
228
  status: "error",
231
229
  error: errMsg,
232
- }, replyTo);
230
+ });
233
231
  }
234
232
  }
235
233
  cleanupDedup() {
@@ -249,10 +247,10 @@ export class ElysDeviceMQTTClient {
249
247
  };
250
248
  this.publish(msg);
251
249
  }
252
- publish(msg, replyTo) {
250
+ publish(msg) {
253
251
  if (!this.client)
254
252
  return;
255
- const topic = replyTo || `elys/up/${this.credentials.deviceId}`;
253
+ const topic = `elys/up/${this.credentials.deviceId}`;
256
254
  this.client.publish(topic, JSON.stringify(msg), { qos: 1 }, (err) => {
257
255
  if (err) {
258
256
  this.log(`[elys] failed to publish to ${topic}:`, err);
@@ -24,8 +24,6 @@ export interface CommandMessage extends MQTTBaseMessage {
24
24
  type: "command";
25
25
  command: string;
26
26
  args?: Record<string, unknown>;
27
- /** If set, device should publish result/stream to this topic instead of elys/up/{device_id} */
28
- reply_to?: string;
29
27
  }
30
28
  export interface AckMessage extends MQTTBaseMessage {
31
29
  type: "ack";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-elys",
3
- "version": "1.7.2",
3
+ "version": "1.7.3",
4
4
  "description": "OpenClaw Elys channel plugin — connects to Elys App",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",