morpheus-cli 0.4.12 → 0.4.13

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.
@@ -264,7 +264,7 @@ export class TelegramAdapter {
264
264
  const data = ctx.callbackQuery.data;
265
265
  const sessionId = data.replace('ask_archive_session_', '');
266
266
  // Fetch session title for better UX (optional, but nice) - for now just use ID
267
- await ctx.reply(`⚠️ **ARCHIVE SESSION?**\n\nAre you sure you want to archive session \`${sessionId}\`?\n\nIt will be moved to long-term memory (SATI) and removed from the active list. This action cannot be easily undone via Telegram.`, {
267
+ await ctx.reply(`⚠️ *ARCHIVE SESSION?*\n\nAre you sure you want to archive session \`${escMd(sessionId)}\`?\n\nIt will be moved to long\\-term memory \\(SATI\\) and removed from the active list\\. This action cannot be easily undone via Telegram\\.`, {
268
268
  parse_mode: 'MarkdownV2',
269
269
  reply_markup: {
270
270
  inline_keyboard: [
@@ -287,7 +287,7 @@ export class TelegramAdapter {
287
287
  if (ctx.updateType === 'callback_query') {
288
288
  ctx.deleteMessage().catch(() => { });
289
289
  }
290
- await ctx.reply(`✅ Session \`${sessionId}\` has been archived and moved to long-term memory.`, { parse_mode: 'MarkdownV2' });
290
+ await ctx.reply(`✅ Session \`${escMd(sessionId)}\` has been archived and moved to long\\-term memory\\.`, { parse_mode: 'MarkdownV2' });
291
291
  }
292
292
  catch (error) {
293
293
  await ctx.answerCbQuery(`Error archiving: ${error.message}`, { show_alert: true });
@@ -297,7 +297,7 @@ export class TelegramAdapter {
297
297
  this.bot.action(/^ask_delete_session_/, async (ctx) => {
298
298
  const data = ctx.callbackQuery.data;
299
299
  const sessionId = data.replace('ask_delete_session_', '');
300
- await ctx.reply(`🚫 **DELETE SESSION?**\n\nAre you sure you want to PERMANENTLY DELETE session \`${sessionId}\`?\n\nThis action is **IRREVERSIBLE**. All data will be lost.`, {
300
+ await ctx.reply(`🚫 *DELETE SESSION?*\n\nAre you sure you want to PERMANENTLY DELETE session \`${escMd(sessionId)}\`?\n\nThis action is *IRREVERSIBLE*\\. All data will be lost\\.`, {
301
301
  parse_mode: 'MarkdownV2',
302
302
  reply_markup: {
303
303
  inline_keyboard: [
@@ -320,7 +320,7 @@ export class TelegramAdapter {
320
320
  if (ctx.updateType === 'callback_query') {
321
321
  ctx.deleteMessage().catch(() => { });
322
322
  }
323
- await ctx.reply(`🗑️ Session \`${sessionId}\` has been permanently deleted.`, { parse_mode: 'MarkdownV2' });
323
+ await ctx.reply(`🗑️ Session \`${escMd(sessionId)}\` has been permanently deleted\\.`, { parse_mode: 'MarkdownV2' });
324
324
  }
325
325
  catch (error) {
326
326
  await ctx.answerCbQuery(`Error deleting: ${error.message}`, { show_alert: true });
@@ -506,7 +506,7 @@ export class TelegramAdapter {
506
506
  }
507
507
  async handleNewSessionCommand(ctx, user) {
508
508
  try {
509
- await ctx.reply("Are you ready to start a new session? Please confirm.", {
509
+ await ctx.reply("Are you ready to start a new session\\? Please confirm\\.", {
510
510
  parse_mode: 'MarkdownV2', reply_markup: {
511
511
  inline_keyboard: [
512
512
  [{ text: 'Yes, start new session', callback_data: 'confirm_new_session' }, { text: 'No, cancel', callback_data: 'cancel_new_session' }]
@@ -533,7 +533,7 @@ export class TelegramAdapter {
533
533
  const history = new SQLiteChatMessageHistory({ sessionId: "" });
534
534
  const sessions = await history.listSessions();
535
535
  if (sessions.length === 0) {
536
- await ctx.reply('No active or paused sessions found.', { parse_mode: 'MarkdownV2' });
536
+ await ctx.reply('No active or paused sessions found\\.', { parse_mode: 'MarkdownV2' });
537
537
  return;
538
538
  }
539
539
  let response = '*Sessions:*\n\n';
@@ -608,10 +608,10 @@ How can I assist you today?`;
608
608
  const nodeVersion = process.version;
609
609
  const majorVersion = parseInt(nodeVersion.replace('v', '').split('.')[0], 10);
610
610
  if (majorVersion >= 18) {
611
- response += '✅ Node.js: ' + nodeVersion + '\n';
611
+ response += `✅ Node\\.js: ${escMd(nodeVersion)}\n`;
612
612
  }
613
613
  else {
614
- response += '❌ Node.js: ' + nodeVersion + ' (Required: >=18)\n';
614
+ response += `❌ Node\\.js: ${escMd(nodeVersion)} \\(Required: >=18\\)\n`;
615
615
  }
616
616
  if (config) {
617
617
  response += '✅ Configuration: Valid\n';
@@ -633,10 +633,10 @@ How can I assist you today?`;
633
633
  const llmProvider = config.llm?.provider;
634
634
  if (llmProvider && llmProvider !== 'ollama') {
635
635
  if (hasApiKey(llmProvider, config.llm?.api_key)) {
636
- response += `✅ Oracle API key (${llmProvider})\n`;
636
+ response += `✅ Oracle API key \\(${escMd(llmProvider)}\\)\n`;
637
637
  }
638
638
  else {
639
- response += `❌ Oracle API key missing (${llmProvider})\n`;
639
+ response += `❌ Oracle API key missing \\(${escMd(llmProvider)}\\)\n`;
640
640
  }
641
641
  }
642
642
  // Sati
@@ -644,10 +644,10 @@ How can I assist you today?`;
644
644
  const satiProvider = sati?.provider || llmProvider;
645
645
  if (satiProvider && satiProvider !== 'ollama') {
646
646
  if (hasApiKey(satiProvider, sati?.api_key ?? config.llm?.api_key)) {
647
- response += `✅ Sati API key (${satiProvider})\n`;
647
+ response += `✅ Sati API key \\(${escMd(satiProvider)}\\)\n`;
648
648
  }
649
649
  else {
650
- response += `❌ Sati API key missing (${satiProvider})\n`;
650
+ response += `❌ Sati API key missing \\(${escMd(satiProvider)}\\)\n`;
651
651
  }
652
652
  }
653
653
  // Apoc
@@ -655,10 +655,10 @@ How can I assist you today?`;
655
655
  const apocProvider = apoc?.provider || llmProvider;
656
656
  if (apocProvider && apocProvider !== 'ollama') {
657
657
  if (hasApiKey(apocProvider, apoc?.api_key ?? config.llm?.api_key)) {
658
- response += `✅ Apoc API key (${apocProvider})\n`;
658
+ response += `✅ Apoc API key \\(${escMd(apocProvider)}\\)\n`;
659
659
  }
660
660
  else {
661
- response += `❌ Apoc API key missing (${apocProvider})\n`;
661
+ response += `❌ Apoc API key missing \\(${escMd(apocProvider)}\\)\n`;
662
662
  }
663
663
  }
664
664
  // Telegram token
@@ -754,12 +754,7 @@ How can I assist you today?`;
754
754
  // await ctx.reply(`Command not recognized. Type /help to see available commands.`);
755
755
  }
756
756
  async handleHelpCommand(ctx, user) {
757
- const helpMessage = `
758
- *Available Commands:*
759
-
760
- ${this.HELP_MESSAGE}
761
-
762
- How can I assist you today?`;
757
+ const helpMessage = `*Available Commands:*\n\n${this.HELP_MESSAGE}\n\nHow can I assist you today\\?`;
763
758
  await ctx.reply(helpMessage, { parse_mode: 'MarkdownV2' });
764
759
  }
765
760
  async handleZaionCommand(ctx, user) {
@@ -937,7 +932,7 @@ How can I assist you today?`;
937
932
  Construtor.probe(),
938
933
  ]);
939
934
  if (servers.length === 0) {
940
- await ctx.reply('*No MCP Servers Configured*\n\nThere are currently no MCP servers configured in the system.', { parse_mode: 'MarkdownV2' });
935
+ await ctx.reply('*No MCP Servers Configured*\n\nThere are currently no MCP servers configured in the system\\.', { parse_mode: 'MarkdownV2' });
941
936
  return;
942
937
  }
943
938
  const probeMap = new Map(probeResults.map(r => [r.name, r]));
@@ -984,7 +979,7 @@ How can I assist you today?`;
984
979
  }
985
980
  catch (error) {
986
981
  this.display.log('Error listing MCP servers: ' + (error instanceof Error ? error.message : String(error)), { source: 'Telegram', level: 'error' });
987
- await ctx.reply('An error occurred while retrieving the list of MCP servers. Please check the logs for more details.', { parse_mode: 'MarkdownV2' });
982
+ await ctx.reply('An error occurred while retrieving the list of MCP servers\\. Please check the logs for more details\\.', { parse_mode: 'MarkdownV2' });
988
983
  }
989
984
  }
990
985
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "morpheus-cli",
3
- "version": "0.4.12",
3
+ "version": "0.4.13",
4
4
  "description": "Morpheus is a local AI agent for developers, running as a CLI daemon that connects to LLMs, local tools, and MCPs, enabling interaction via Terminal, Telegram, and Discord. Inspired by the character Morpheus from *The Matrix*, the project acts as an intelligent orchestrator, bridging the gap between the developer and complex systems.",
5
5
  "bin": {
6
6
  "morpheus": "./bin/morpheus.js"