@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.
- package/openclaw.plugin.json +1 -2
- package/package.json +1 -1
- package/src/http-handler.ts +3 -13
- package/src/websocket-client.ts +1 -1
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
package/src/http-handler.ts
CHANGED
|
@@ -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:
|
|
186
|
+
return { success: true, data: {} }
|
|
186
187
|
}
|
|
187
|
-
|
|
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
|
}
|