@ducci/jarvis 1.0.100 → 1.0.101

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": "@ducci/jarvis",
3
- "version": "1.0.100",
3
+ "version": "1.0.101",
4
4
  "description": "A fully automated agent system that lives on a server.",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -775,7 +775,7 @@ export async function startTelegramChannel(config) {
775
775
 
776
776
  isRunning.add(key);
777
777
  runStartTimes.set(key, new Date());
778
- await ctx.api.sendChatAction(chatId, 'typing');
778
+ await ctx.api.sendChatAction(chatId, 'typing').catch(() => {});
779
779
  const typingInterval = setInterval(() => {
780
780
  ctx.api.sendChatAction(chatId, 'typing').catch(() => {});
781
781
  }, 4000);
@@ -802,7 +802,7 @@ export async function startTelegramChannel(config) {
802
802
  }
803
803
 
804
804
  console.log(`[telegram] incoming voice chat_id=${chatId}`);
805
- await ctx.api.sendChatAction(chatId, 'typing');
805
+ await ctx.api.sendChatAction(chatId, 'typing').catch(() => {});
806
806
 
807
807
  // Download voice file (OGG/Opus from Telegram)
808
808
  let transcription;
@@ -904,7 +904,7 @@ export async function startTelegramChannel(config) {
904
904
 
905
905
  isRunning.add(key);
906
906
  runStartTimes.set(key, new Date());
907
- await ctx.api.sendChatAction(chatId, 'typing');
907
+ await ctx.api.sendChatAction(chatId, 'typing').catch(() => {});
908
908
  const typingInterval = setInterval(() => {
909
909
  ctx.api.sendChatAction(chatId, 'typing').catch(() => {});
910
910
  }, 4000);
@@ -952,7 +952,7 @@ export async function startTelegramChannel(config) {
952
952
  isRunning.add(key);
953
953
  runStartTimes.set(key, new Date());
954
954
  console.log(`[telegram] incoming chat_id=${chatId} slot=${slot}`);
955
- await ctx.api.sendChatAction(chatId, 'typing');
955
+ await ctx.api.sendChatAction(chatId, 'typing').catch(() => {});
956
956
  const typingInterval = setInterval(() => {
957
957
  ctx.api.sendChatAction(chatId, 'typing').catch(() => {});
958
958
  }, 4000);
@@ -966,6 +966,9 @@ export async function startTelegramChannel(config) {
966
966
  }
967
967
  });
968
968
 
969
+ bot.catch((err) => {
970
+ console.error(`[telegram] grammy error: ${err.message}`, err.error);
971
+ });
969
972
  run(bot);
970
973
  console.log('[telegram] channel started');
971
974
  }
package/src/server/app.js CHANGED
@@ -187,6 +187,13 @@ function startServer() {
187
187
  process.exit(1);
188
188
  }
189
189
 
190
+ process.on('uncaughtException', (err) => {
191
+ console.error('[jarvis] uncaughtException:', err.message, err.stack);
192
+ });
193
+ process.on('unhandledRejection', (reason) => {
194
+ console.error('[jarvis] unhandledRejection:', reason instanceof Error ? reason.stack : reason);
195
+ });
196
+
190
197
  ensureDirectories();
191
198
  seedTools();
192
199
  seedIdentity();