@eyeclaw/eyeclaw 2.2.0 → 2.2.2

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.
@@ -15,7 +15,6 @@
15
15
  "type": "string",
16
16
  "description": "EyeClaw Rails server URL (e.g., http://localhost:3000)"
17
17
  }
18
- },
19
- "required": ["sdkToken", "botId", "serverUrl"]
18
+ }
20
19
  }
21
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eyeclaw/eyeclaw",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "EyeClaw plugin for OpenClaw - HTTP SSE streaming + WebSocket client",
5
5
  "type": "module",
6
6
  "main": "./index.ts",
@@ -181,20 +181,11 @@ export function createHttpHandler(api: OpenClawPluginApi, getConfig: () => EyeCl
181
181
  */
182
182
  export const eyeclawConfigSchema = {
183
183
  safeParse: (value: unknown) => {
184
+ // 允许空配置
184
185
  if (!value || typeof value !== 'object') {
185
- return { success: false, errors: ['Expected config object'] }
186
+ return { success: true, data: {} }
186
187
  }
187
- const cfg = value as any
188
- if (!cfg.sdkToken) {
189
- return { success: false, errors: ['sdkToken is required'] }
190
- }
191
- if (!cfg.botId) {
192
- return { success: false, errors: ['botId is required'] }
193
- }
194
- if (!cfg.serverUrl) {
195
- return { success: false, errors: ['serverUrl is required'] }
196
- }
197
- return { success: true, data: cfg }
188
+ return { success: true, data: value }
198
189
  },
199
190
  jsonSchema: {
200
191
  type: 'object',
@@ -203,6 +194,5 @@ export const eyeclawConfigSchema = {
203
194
  botId: { type: 'string', description: 'Bot ID in EyeClaw Rails app' },
204
195
  serverUrl: { type: 'string', description: 'EyeClaw Rails server URL' },
205
196
  },
206
- required: ['sdkToken', 'botId', 'serverUrl'],
207
197
  },
208
198
  }
@@ -284,7 +284,7 @@ export class EyeClawWebSocketClient {
284
284
  private startPing() {
285
285
  this.pingInterval = setInterval(() => {
286
286
  this.send({ type: 'ping' })
287
- }, 30000)
287
+ }, 60000) // 60秒心跳一次
288
288
  }
289
289
 
290
290
  /**