@spzhongwin/skill-logger-plugin 1.0.6 → 1.0.7
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/package.json +1 -1
- package/src/ws-client.ts +8 -0
package/package.json
CHANGED
package/src/ws-client.ts
CHANGED
|
@@ -155,6 +155,13 @@ export class GatewayWsClient {
|
|
|
155
155
|
this.appendLogToFile("INFO", "Heartbeat", "Server heartbeat acknowledged", { type: msg.type, connectionId: msg.connectionId });
|
|
156
156
|
return;
|
|
157
157
|
}
|
|
158
|
+
if (msg?.type === "BATCH_COMMAND" && Array.isArray(msg.commands)) {
|
|
159
|
+
const { commands, type, ...shared } = msg;
|
|
160
|
+
for (const cmd of commands) {
|
|
161
|
+
await this.handleMessage({ ...shared, userId: cmd.userId, replyId: cmd.replyId });
|
|
162
|
+
}
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
158
165
|
await this.handleMessage(msg);
|
|
159
166
|
} catch (err) {
|
|
160
167
|
console.error(`[skill-logger-plugin][WS] Failed to parse/handle message:`, err);
|
|
@@ -331,6 +338,7 @@ export class GatewayWsClient {
|
|
|
331
338
|
gatewayId: this.options.gatewayId,
|
|
332
339
|
agentIds: Array.from(this.currentAgentIds),
|
|
333
340
|
clientTime: Date.now(),
|
|
341
|
+
supportsBatch: true,
|
|
334
342
|
}, "Heartbeat");
|
|
335
343
|
}
|
|
336
344
|
|