2ndbrain 2026.1.36 → 2026.2.1

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": "2ndbrain",
3
- "version": "2026.1.36",
3
+ "version": "2026.2.1",
4
4
  "description": "Always-on Node.js service bridging Telegram messaging to Claude AI with knowledge graph, journal, project management, and semantic search.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -56,6 +56,7 @@ class EmbeddingWorker {
56
56
 
57
57
  /** Whether the embeddings table has been verified to exist. */
58
58
  this._tableVerified = false;
59
+ }
59
60
 
60
61
  /**
61
62
  * Start the periodic embedding worker loop.
package/src/index.js CHANGED
@@ -504,6 +504,11 @@ async function main() {
504
504
  embeddingsEngine,
505
505
  };
506
506
 
507
+ // Catch emitted errors so they don't throw (Node.js EventEmitter behaviour)
508
+ bot.on('error', (err) => {
509
+ logger.error('telegram', `Bot error: ${err.message}`);
510
+ });
511
+
507
512
  // Wire message handler
508
513
  bot.on('message', (msg) => {
509
514
  handleMessage(msg, deps).catch((err) => {
@@ -261,7 +261,7 @@ class TelegramBot extends EventEmitter {
261
261
  * @returns {Promise<object[]>} Array of sent message results
262
262
  */
263
263
  async sendMessage(chatId, text, options = {}) {
264
- const parseMode = options.parse_mode ?? 'MarkdownV2';
264
+ const parseMode = 'parse_mode' in options ? options.parse_mode : 'MarkdownV2';
265
265
  const chunks = this._chunkText(text, MAX_MESSAGE_LENGTH);
266
266
  const results = [];
267
267