squidclaw 0.5.5 → 0.5.6

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.
@@ -107,7 +107,12 @@ export class TelegramManager {
107
107
  });
108
108
 
109
109
  bot.catch((err) => {
110
- logger.error('telegram', `Bot error for ${agentId}: ${err.message}`);
110
+ if (err.message?.includes('terminated by other')) {
111
+ logger.warn('telegram', 'Another bot instance running — retrying in 5s...');
112
+ setTimeout(() => { try { bot.start(); } catch {} }, 5000);
113
+ } else {
114
+ logger.error('telegram', `Bot error for ${agentId}: ${err.message}`);
115
+ }
111
116
  });
112
117
 
113
118
  return botInfo;
package/lib/engine.js CHANGED
@@ -105,10 +105,14 @@ export class SquidclawEngine {
105
105
  };
106
106
 
107
107
  // Start bot for all agents with telegram config
108
- for (const agent of agents) {
109
- try {
110
- await this.telegramManager.startBot(agent.id, this.config.channels.telegram.token);
111
- } catch (err) {}
108
+ // Only start ONE bot instance (shared token = shared bot)
109
+ try {
110
+ const firstAgent = agents[0];
111
+ if (firstAgent) {
112
+ await this.telegramManager.startBot(firstAgent.id, this.config.channels.telegram.token);
113
+ }
114
+ } catch (err) {
115
+ console.log(' ✈️ Telegram: ' + err.message);
112
116
  }
113
117
  console.log(' ✈️ Telegram: connected');
114
118
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squidclaw",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "description": "\ud83e\udd91 AI agent platform \u2014 human-like agents for WhatsApp, Telegram & more",
5
5
  "main": "lib/engine.js",
6
6
  "bin": {