@wu529778790/open-im 1.10.9-beta.13 → 1.10.9-beta.14

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.
@@ -37,20 +37,21 @@ export async function initClawbot(config, eventHandler, onStateChange) {
37
37
  stopped = false;
38
38
  reconnectAttempt = 0;
39
39
  lastUpdateId = 0;
40
- // Verify connectivity
40
+ // Verify connectivity — non-fatal, reconnect loop will retry
41
41
  try {
42
42
  const res = await fetchApi('/ilink/bot/getupdates?timeout=1');
43
43
  if (!res.ok) {
44
44
  throw new Error(`API check failed: ${res.error ?? 'unknown'}`);
45
45
  }
46
46
  log.info(`ClawBot API reachable at ${apiUrl}`);
47
+ updateState('connected');
48
+ startPolling();
47
49
  }
48
50
  catch (err) {
49
- log.error('ClawBot API connectivity check failed:', err);
50
- throw err;
51
+ log.warn('ClawBot API not reachable, will retry:', err);
52
+ updateState('connecting');
53
+ scheduleReconnect();
51
54
  }
52
- updateState('connected');
53
- startPolling();
54
55
  log.info('ClawBot client initialized');
55
56
  }
56
57
  function startPolling() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wu529778790/open-im",
3
- "version": "1.10.9-beta.13",
3
+ "version": "1.10.9-beta.14",
4
4
  "description": "Multi-platform IM bridge for AI CLI tools (Claude, Codex, CodeBuddy)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",