@link-assistant/hive-mind 2.0.27 → 2.0.28

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @link-assistant/hive-mind
2
2
 
3
+ ## 2.0.28
4
+
5
+ ### Patch Changes
6
+
7
+ - 5b4f3df: Recommend and accept `/queue` instead of the legacy solve-prefixed queue commands, and recommend `/stop` for cancelling running sessions.
8
+
3
9
  ## 2.0.27
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@link-assistant/hive-mind",
3
- "version": "2.0.27",
3
+ "version": "2.0.28",
4
4
  "description": "AI-powered issue solver and hive mind for collaborative problem solving",
5
5
  "main": "src/hive.mjs",
6
6
  "type": "module",
@@ -355,7 +355,7 @@ en
355
355
  queue
356
356
  only
357
357
  in
358
- groups "❌ The /solve_queue command only works in group chats. Please add this bot to a group and make it an admin."
358
+ groups "❌ The /queue command only works in group chats. Please add this bot to a group and make it an admin."
359
359
  disabled "❌ The solve command is disabled on this bot instance."
360
360
  rejected """
361
361
  ❌ Solve command rejected.
@@ -413,7 +413,7 @@ en
413
413
  URL: {{url}}
414
414
  Status: {{status}}
415
415
 
416
- 💡 Use /solve_queue to check the queue status.
416
+ 💡 Use /queue to check the queue status.
417
417
  """
418
418
  session
419
419
  running """
@@ -422,7 +422,7 @@ en
422
422
  URL: {{url}}
423
423
  Session: `{{session}}`
424
424
 
425
- 💡 Wait for the current session to complete, or use /solve\_stop to cancel it.
425
+ 💡 Wait for the current session to complete, or use /stop to cancel it.
426
426
  """
427
427
  issues
428
428
  list
@@ -515,7 +515,7 @@ en
515
515
  detail "Tool aliases imply `--tool <tool>`: `/codex <github-url>` equals `/solve <github-url> --tool codex`"
516
516
  reply "Or reply to a message with a GitHub link: `/solve`"
517
517
  disabled "*/solve* (aliases: */do*, */continue*, */claude*, */codex*, */opencode*, */agent*, */gemini*, */qwen*) - ❌ Disabled"
518
- queue "`/solve_queue` (alias: `/queue`) - Show solve queue status"
518
+ queue "`/queue` - Show solve queue status"
519
519
  locked
520
520
  options "🔒 Locked options: `{{options}}`"
521
521
  task
@@ -553,7 +553,7 @@ en
553
553
  isolation
554
554
  mode "🔒 *Isolation Mode:* `{{isolationBackend}}` (experimental)"
555
555
  group
556
- note "⚠️ *Note:* /solve, /do, /continue, /claude, /codex, /opencode, /agent, /gemini, /qwen, /task, /split, /hive, /solve\\_queue, /limits, /version, /accept\\_invites, /merge, /stop and /start commands only work in group chats. /terminal\\_watch, /watch, /subscribe and /unsubscribe work in private and group chats."
556
+ note "⚠️ *Note:* /solve, /do, /continue, /claude, /codex, /opencode, /agent, /gemini, /qwen, /task, /split, /hive, /queue, /limits, /version, /accept\\_invites, /merge, /stop and /start commands only work in group chats. /terminal\\_watch, /watch, /subscribe and /unsubscribe work in private and group chats."
557
557
  common
558
558
  options "🔧 *Common Options:*"
559
559
  model
@@ -355,7 +355,7 @@ hi
355
355
  queue
356
356
  only
357
357
  in
358
- groups "❌ /solve_queue कमांड केवल समूह चैट में काम करती है। कृपया बॉट को समूह में जोड़ें और व्यवस्थापक बनाएँ।"
358
+ groups "❌ /queue कमांड केवल समूह चैट में काम करती है। कृपया बॉट को समूह में जोड़ें और व्यवस्थापक बनाएँ।"
359
359
  disabled "❌ इस बॉट इंस्टेंस पर solve कमांड अक्षम है।"
360
360
  rejected """
361
361
  ❌ Solve कमांड अस्वीकृत।
@@ -413,7 +413,7 @@ hi
413
413
  URL: {{url}}
414
414
  स्थिति: {{status}}
415
415
 
416
- 💡 कतार स्थिति देखने के लिए /solve_queue का उपयोग करें।
416
+ 💡 कतार स्थिति देखने के लिए /queue का उपयोग करें।
417
417
  """
418
418
  session
419
419
  running """
@@ -422,7 +422,7 @@ hi
422
422
  URL: {{url}}
423
423
  सत्र: `{{session}}`
424
424
 
425
- 💡 वर्तमान सत्र के पूरा होने की प्रतीक्षा करें, या रद्द करने के लिए /solve\_stop का उपयोग करें।
425
+ 💡 वर्तमान सत्र के पूरा होने की प्रतीक्षा करें, या रद्द करने के लिए /stop का उपयोग करें।
426
426
  """
427
427
  issues
428
428
  list
@@ -515,7 +515,7 @@ hi
515
515
  detail "Tool aliases `--tool <tool>` लगाते हैं: `/codex <github-url>` का अर्थ `/solve <github-url> --tool codex` है"
516
516
  reply "या GitHub लिंक वाले संदेश का उत्तर दें: `/solve`"
517
517
  disabled "*/solve* (aliases: */do*, */continue*, */claude*, */codex*, */opencode*, */agent*, */gemini*, */qwen*) - ❌ अक्षम"
518
- queue "`/solve_queue` (उपनाम: `/queue`) - solve queue status दिखाएँ"
518
+ queue "`/queue` - solve queue status दिखाएँ"
519
519
  locked
520
520
  options "🔒 लॉक किए गए विकल्प: `{{options}}`"
521
521
  task
@@ -553,7 +553,7 @@ hi
553
553
  isolation
554
554
  mode "🔒 *Isolation Mode:* `{{isolationBackend}}` (experimental)"
555
555
  group
556
- note "⚠️ *नोट:* /solve, /do, /continue, /claude, /codex, /opencode, /agent, /gemini, /qwen, /task, /split, /hive, /solve\\_queue, /limits, /version, /accept\\_invites, /merge, /stop और /start commands केवल group chats में काम करती हैं। /terminal\\_watch, /watch, /subscribe और /unsubscribe private और group chats में काम करती हैं।"
556
+ note "⚠️ *नोट:* /solve, /do, /continue, /claude, /codex, /opencode, /agent, /gemini, /qwen, /task, /split, /hive, /queue, /limits, /version, /accept\\_invites, /merge, /stop और /start commands केवल group chats में काम करती हैं। /terminal\\_watch, /watch, /subscribe और /unsubscribe private और group chats में काम करती हैं।"
557
557
  common
558
558
  options "🔧 *Common Options:*"
559
559
  model
@@ -355,7 +355,7 @@ ru
355
355
  queue
356
356
  only
357
357
  in
358
- groups "❌ Команда /solve_queue работает только в групповых чатах. Добавьте бота в группу и сделайте его администратором."
358
+ groups "❌ Команда /queue работает только в групповых чатах. Добавьте бота в группу и сделайте его администратором."
359
359
  disabled "❌ Команда solve отключена в этом экземпляре бота."
360
360
  rejected """
361
361
  ❌ Команда solve отклонена.
@@ -413,7 +413,7 @@ ru
413
413
  URL: {{url}}
414
414
  Статус: {{status}}
415
415
 
416
- 💡 Используйте /solve_queue для проверки очереди.
416
+ 💡 Используйте /queue для проверки очереди.
417
417
  """
418
418
  session
419
419
  running """
@@ -422,7 +422,7 @@ ru
422
422
  URL: {{url}}
423
423
  Сеанс: `{{session}}`
424
424
 
425
- 💡 Дождитесь завершения текущего сеанса или используйте /solve\_stop для отмены.
425
+ 💡 Дождитесь завершения текущего сеанса или используйте /stop для отмены.
426
426
  """
427
427
  issues
428
428
  list
@@ -515,7 +515,7 @@ ru
515
515
  detail "Алиасы инструментов добавляют `--tool <tool>`: `/codex <github-url>` равно `/solve <github-url> --tool codex`"
516
516
  reply "Или ответьте на сообщение со ссылкой GitHub: `/solve`"
517
517
  disabled "*/solve* (алиасы: */do*, */continue*, */claude*, */codex*, */opencode*, */agent*, */gemini*, */qwen*) - ❌ Отключено"
518
- queue "`/solve_queue` (псевдоним: `/queue`) - Показать состояние очереди solve"
518
+ queue "`/queue` - Показать состояние очереди solve"
519
519
  locked
520
520
  options "🔒 Заблокированные опции: `{{options}}`"
521
521
  task
@@ -553,7 +553,7 @@ ru
553
553
  isolation
554
554
  mode "🔒 *Режим изоляции:* `{{isolationBackend}}` (экспериментально)"
555
555
  group
556
- note "⚠️ *Замечание:* команды /solve, /do, /continue, /claude, /codex, /opencode, /agent, /gemini, /qwen, /task, /split, /hive, /solve\\_queue, /limits, /version, /accept\\_invites, /merge, /stop и /start работают только в групповых чатах. /terminal\\_watch, /watch, /subscribe и /unsubscribe работают в личных и групповых чатах."
556
+ note "⚠️ *Замечание:* команды /solve, /do, /continue, /claude, /codex, /opencode, /agent, /gemini, /qwen, /task, /split, /hive, /queue, /limits, /version, /accept\\_invites, /merge, /stop и /start работают только в групповых чатах. /terminal\\_watch, /watch, /subscribe и /unsubscribe работают в личных и групповых чатах."
557
557
  common
558
558
  options "🔧 *Общие опции:*"
559
559
  model
@@ -355,7 +355,7 @@ zh
355
355
  queue
356
356
  only
357
357
  in
358
- groups "❌ /solve_queue 命令仅在群聊中有效。请将本机器人加入群组并设为管理员。"
358
+ groups "❌ /queue 命令仅在群聊中有效。请将本机器人加入群组并设为管理员。"
359
359
  disabled "❌ 此机器人实例已禁用 solve 命令。"
360
360
  rejected """
361
361
  ❌ Solve 命令被拒绝。
@@ -413,7 +413,7 @@ zh
413
413
  URL:{{url}}
414
414
  状态:{{status}}
415
415
 
416
- 💡 使用 /solve_queue 查看队列状态。
416
+ 💡 使用 /queue 查看队列状态。
417
417
  """
418
418
  session
419
419
  running """
@@ -422,7 +422,7 @@ zh
422
422
  URL:{{url}}
423
423
  会话:`{{session}}`
424
424
 
425
- 💡 等待当前会话完成,或使用 /solve\_stop 取消。
425
+ 💡 等待当前会话完成,或使用 /stop 取消。
426
426
  """
427
427
  issues
428
428
  list
@@ -515,7 +515,7 @@ zh
515
515
  detail "工具别名会添加 `--tool <tool>`:`/codex <github-url>` 等同于 `/solve <github-url> --tool codex`"
516
516
  reply "也可以回复包含 GitHub 链接的消息:`/solve`"
517
517
  disabled "*/solve*(别名:*/do*、*/continue*、*/claude*、*/codex*、*/opencode*、*/agent*、*/gemini*、*/qwen*)- ❌ 已禁用"
518
- queue "`/solve_queue`(别名:`/queue`)- 显示 solve 队列状态"
518
+ queue "`/queue` - 显示 solve 队列状态"
519
519
  locked
520
520
  options "🔒 锁定选项:`{{options}}`"
521
521
  task
@@ -553,7 +553,7 @@ zh
553
553
  isolation
554
554
  mode "🔒 *隔离模式:* `{{isolationBackend}}`(实验性)"
555
555
  group
556
- note "⚠️ *注意:* /solve、/do、/continue、/claude、/codex、/opencode、/agent、/gemini、/qwen、/task、/split、/hive、/solve\\_queue、/limits、/version、/accept\\_invites、/merge、/stop 和 /start 仅在群聊中有效。/terminal\\_watch、/watch、/subscribe 和 /unsubscribe 在私聊和群聊中有效。"
556
+ note "⚠️ *注意:* /solve、/do、/continue、/claude、/codex、/opencode、/agent、/gemini、/qwen、/task、/split、/hive、/queue、/limits、/version、/accept\\_invites、/merge、/stop 和 /start 仅在群聊中有效。/terminal\\_watch、/watch、/subscribe 和 /unsubscribe 在私聊和群聊中有效。"
557
557
  common
558
558
  options "🔧 *常用选项:*"
559
559
  model
@@ -282,7 +282,7 @@ export const QUEUE_CONFIG = {
282
282
 
283
283
  // Display
284
284
  // Maximum number of items shown per section (pending/processing/completed/failed)
285
- // in the /solve_queue (/queue) detailed status before collapsing into a
285
+ // in the /queue detailed status before collapsing into a
286
286
  // "... and N more" line. Keeps the Telegram message under the 4096-char cap.
287
287
  // See: https://github.com/link-assistant/hive-mind/issues/1837
288
288
  MAX_DISPLAY_ITEMS_PER_QUEUE: parseIntWithDefault('HIVE_MIND_MAX_DISPLAY_ITEMS_PER_QUEUE', 5),
@@ -1274,7 +1274,7 @@ export async function getRunningTrackedIsolationSessions(verbose = false, option
1274
1274
 
1275
1275
  /**
1276
1276
  * Return the currently-executing tracked sessions with the details needed to
1277
- * render them as a clickable list in `/solve_queue` (`/queue`): the issue/PR
1277
+ * render them as a clickable list in `/queue`: the issue/PR
1278
1278
  * `url`, the `tool`, the start time, and (for isolation sessions) the backend
1279
1279
  * status. Both isolation and non-isolation screen sessions are included so the
1280
1280
  * list matches what is actually executing — the queue's own in-memory
@@ -1234,8 +1234,7 @@ bot.on('message', async (ctx, next) => {
1234
1234
  // /subscribe + /unsubscribe (#1688) are intentionally not in the text fallback — Telegraf's bot.command() is sufficient.
1235
1235
  const solveHandlers = Object.fromEntries(SOLVE_COMMAND_NAMES.map(command => [command, handleSolveCommand]));
1236
1236
  const taskHandlers = Object.fromEntries(TASK_COMMAND_NAMES.map(command => [command, handleTaskCommand]));
1237
- // /queue is the short alias for /solve_queue (issue #1837)
1238
- const handlers = { ...solveHandlers, ...taskHandlers, auth: handleAuthCommand, hive: handleHiveCommand, solve_queue: handleSolveQueueCommand, solvequeue: handleSolveQueueCommand, queue: handleSolveQueueCommand };
1237
+ const handlers = { ...solveHandlers, ...taskHandlers, auth: handleAuthCommand, hive: handleHiveCommand, queue: handleSolveQueueCommand };
1239
1238
 
1240
1239
  const handler = handlers[extracted.command];
1241
1240
  if (!handler) return next();
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Telegram /solve_queue command implementation
2
+ * Telegram /queue command implementation
3
3
  *
4
- * This module provides the /solve_queue command functionality for the Telegram bot,
4
+ * This module provides the /queue command functionality for the Telegram bot,
5
5
  * allowing users to view the current solve queue status.
6
6
  *
7
7
  * Features:
@@ -15,7 +15,7 @@
15
15
 
16
16
  import { t } from './i18n.lib.mjs';
17
17
 
18
- const GROUP_ONLY_MESSAGE = '❌ The /solve_queue command only works in group chats. Please add this bot to a group and make it an admin.';
18
+ const GROUP_ONLY_MESSAGE = '❌ The /queue command only works in group chats. Please add this bot to a group and make it an admin.';
19
19
 
20
20
  function commandText(key, params = {}, locale = null, fallback = key) {
21
21
  const translated = t(key, params, locale ? { locale } : {});
@@ -23,7 +23,7 @@ function commandText(key, params = {}, locale = null, fallback = key) {
23
23
  }
24
24
 
25
25
  /**
26
- * Registers the /solve_queue command handler with the bot
26
+ * Registers the /queue command handler with the bot
27
27
  * @param {Object} bot - The Telegraf bot instance
28
28
  * @param {Object} options - Options object
29
29
  * @param {boolean} options.VERBOSE - Whether to enable verbose logging
@@ -41,11 +41,11 @@ export function registerSolveQueueCommand(bot, options) {
41
41
  const { VERBOSE = false, isOldMessage, isForwardedOrReply, isGroupChat, isChatAuthorized, isTopicAuthorized, buildAuthErrorMessage, addBreadcrumb, getSolveQueue, safeReply, resolveLocale } = options;
42
42
 
43
43
  async function handleSolveQueueCommand(ctx) {
44
- VERBOSE && console.log('[VERBOSE] /solve_queue command received');
44
+ VERBOSE && console.log('[VERBOSE] /queue command received');
45
45
 
46
46
  await addBreadcrumb({
47
47
  category: 'telegram.command',
48
- message: '/solve_queue command received',
48
+ message: '/queue command received',
49
49
  level: 'info',
50
50
  data: { chatId: ctx.chat?.id, chatType: ctx.chat?.type, userId: ctx.from?.id, username: ctx.from?.username },
51
51
  });
@@ -54,18 +54,18 @@ export function registerSolveQueueCommand(bot, options) {
54
54
 
55
55
  // Ignore messages sent before bot started
56
56
  if (isOldMessage(ctx)) {
57
- VERBOSE && console.log('[VERBOSE] /solve_queue ignored: old message');
57
+ VERBOSE && console.log('[VERBOSE] /queue ignored: old message');
58
58
  return;
59
59
  }
60
60
 
61
61
  // Ignore forwarded or reply messages
62
62
  if (isForwardedOrReply(ctx)) {
63
- VERBOSE && console.log('[VERBOSE] /solve_queue ignored: forwarded or reply');
63
+ VERBOSE && console.log('[VERBOSE] /queue ignored: forwarded or reply');
64
64
  return;
65
65
  }
66
66
 
67
67
  if (!isGroupChat(ctx)) {
68
- VERBOSE && console.log('[VERBOSE] /solve_queue ignored: not a group chat');
68
+ VERBOSE && console.log('[VERBOSE] /queue ignored: not a group chat');
69
69
  await replyWithFallback(commandText('telegram.solve_queue_only_in_groups', {}, locale, GROUP_ONLY_MESSAGE), {
70
70
  reply_to_message_id: ctx.message.message_id,
71
71
  fallbackLocale: locale,
@@ -75,13 +75,13 @@ export function registerSolveQueueCommand(bot, options) {
75
75
 
76
76
  const authorize = isTopicAuthorized || (ctx => isChatAuthorized(ctx.chat.id));
77
77
  if (!authorize(ctx)) {
78
- VERBOSE && console.log('[VERBOSE] /solve_queue ignored: not authorized');
78
+ VERBOSE && console.log('[VERBOSE] /queue ignored: not authorized');
79
79
  const errMsg = buildAuthErrorMessage ? buildAuthErrorMessage(ctx) : `❌ This chat (ID: ${ctx.chat.id}) is not authorized.`;
80
80
  await replyWithFallback(errMsg, { reply_to_message_id: ctx.message.message_id, fallbackLocale: locale });
81
81
  return;
82
82
  }
83
83
 
84
- VERBOSE && console.log('[VERBOSE] /solve_queue passed all checks, generating status...');
84
+ VERBOSE && console.log('[VERBOSE] /queue passed all checks, generating status...');
85
85
 
86
86
  const solveQueue = getSolveQueue({ verbose: VERBOSE });
87
87
 
@@ -97,12 +97,7 @@ export function registerSolveQueueCommand(bot, options) {
97
97
  });
98
98
  }
99
99
 
100
- // Match /solve_queue, /solve-queue, /solvequeue, or the short /queue alias (case-insensitive)
101
- // Note: Telegram Bot API only supports underscores in command names, not hyphens.
102
- // The entity-based matching handles /solve_queue, /solvequeue, and /queue.
103
- // /solve-queue is handled by the text-based fallback in telegram-bot.mjs (issue #1232).
104
- // The /queue alias was added in issue #1837 to make checking the queue faster to type.
105
- bot.command(/^(?:solve[_-]?queue|queue)$/i, handleSolveQueueCommand);
100
+ bot.command(/^queue$/i, handleSolveQueueCommand);
106
101
 
107
102
  return { handleSolveQueueCommand };
108
103
  }
@@ -8,7 +8,7 @@ const execAsync = promisify(exec);
8
8
 
9
9
  /**
10
10
  * Build a clickable, human-readable link to a queued issue/PR for the
11
- * /solve_queue (/queue) detailed status (issue #1837).
11
+ * /queue detailed status (issue #1837).
12
12
  *
13
13
  * For GitHub issue/PR URLs we render a compact `[owner/repo#number](url)`
14
14
  * Markdown link so the list is scannable and clickable. When the label would
@@ -269,7 +269,7 @@ export async function getRunningSessionItems(verbose = false) {
269
269
  return await impl(verbose);
270
270
  } catch (error) {
271
271
  if (verbose) {
272
- console.error('[VERBOSE] /solve_queue error getting running session items:', error.message);
272
+ console.error('[VERBOSE] /queue error getting running session items:', error.message);
273
273
  }
274
274
  return [];
275
275
  }
@@ -300,9 +300,9 @@ export async function getRunningProcesses(processName, verbose = false) {
300
300
  .filter(p => p.pid);
301
301
 
302
302
  if (verbose) {
303
- console.log(`[VERBOSE] /solve_queue found ${processes.length} running ${processName} processes`);
303
+ console.log(`[VERBOSE] /queue found ${processes.length} running ${processName} processes`);
304
304
  if (processes.length > 0) {
305
- console.log(`[VERBOSE] /solve_queue processes: ${JSON.stringify(processes)}`);
305
+ console.log(`[VERBOSE] /queue processes: ${JSON.stringify(processes)}`);
306
306
  }
307
307
  }
308
308
 
@@ -312,7 +312,7 @@ export async function getRunningProcesses(processName, verbose = false) {
312
312
  };
313
313
  } catch (error) {
314
314
  if (verbose) {
315
- console.error(`[VERBOSE] /solve_queue error counting ${processName} processes:`, error.message);
315
+ console.error(`[VERBOSE] /queue error counting ${processName} processes:`, error.message);
316
316
  }
317
317
  return { count: 0, processes: [] };
318
318
  }
@@ -250,7 +250,7 @@ export class SolveQueue {
250
250
  */
251
251
  log(message) {
252
252
  if (this.verbose) {
253
- console.log(`[VERBOSE] /solve_queue: ${message}`);
253
+ console.log(`[VERBOSE] /queue: ${message}`);
254
254
  }
255
255
  }
256
256
 
@@ -1469,7 +1469,7 @@ export async function getRunningIsolatedSessions(verbose = false) {
1469
1469
  return await getRunningTrackedIsolationSessions(verbose);
1470
1470
  } catch (error) {
1471
1471
  if (verbose) {
1472
- console.error(`[VERBOSE] /solve_queue error getting isolated sessions:`, error.message);
1472
+ console.error(`[VERBOSE] /queue error getting isolated sessions:`, error.message);
1473
1473
  }
1474
1474
  return { count: 0, sessions: [], byTool: {} };
1475
1475
  }