@eyeclaw/eyeclaw 2.3.10 → 2.3.11

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eyeclaw/eyeclaw",
3
- "version": "2.3.10",
3
+ "version": "2.3.11",
4
4
  "description": "EyeClaw plugin for OpenClaw - HTTP SSE streaming + WebSocket client",
5
5
  "type": "module",
6
6
  "main": "./index.ts",
@@ -104,9 +104,9 @@ export class EyeClawWebSocketClient {
104
104
  return
105
105
  }
106
106
 
107
- // Ping/pong (协议级别的 ping,直接响应 pong)
107
+ // Ping/pong (WebSocket 协议级别的 ping 由浏览器自动响应,无需手动处理)
108
108
  if (message.type === 'ping') {
109
- this.send({ type: 'pong' })
109
+ this.api.logger.debug('[EyeClaw] Received protocol-level ping (auto-handled by WebSocket)')
110
110
  return
111
111
  }
112
112
 
@@ -351,7 +351,7 @@ export class EyeClawWebSocketClient {
351
351
  */
352
352
  private startPing() {
353
353
  this.pingInterval = setInterval(() => {
354
- // 调用 Rails BotChannel 的 ping action
354
+ // 调用 Rails BotChannel 的 ping 方法(使用 ActionCable 标准协议)
355
355
  const channelIdentifier = JSON.stringify({
356
356
  channel: 'BotChannel',
357
357
  bot_id: this.config.botId,
@@ -362,6 +362,7 @@ export class EyeClawWebSocketClient {
362
362
  identifier: channelIdentifier,
363
363
  data: JSON.stringify({
364
364
  action: 'ping',
365
+ timestamp: new Date().toISOString(),
365
366
  }),
366
367
  })
367
368
  }, 60000) // 60秒心跳一次