@tritard/waterbrother 0.16.90 → 0.16.91

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/gateway.js +13 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tritard/waterbrother",
3
- "version": "0.16.90",
3
+ "version": "0.16.91",
4
4
  "description": "Waterbrother: bring-your-own-model coding CLI with local tools, sessions, operator modes, and approval controls",
5
5
  "type": "module",
6
6
  "bin": {
package/src/gateway.js CHANGED
@@ -3188,7 +3188,7 @@ class TelegramGateway {
3188
3188
 
3189
3189
  if (text === "/new") {
3190
3190
  const sessionId = await this.startFreshSession(message);
3191
- await this.sendMessage(message.chat.id, `Started new remote session: <code>${escapeTelegramHtml(sessionId)}</code>`, message.message_id);
3191
+ await this.sendMarkup(message.chat.id, `Started new remote session: <code>${escapeTelegramHtml(sessionId)}</code>`, message.message_id);
3192
3192
  return;
3193
3193
  }
3194
3194
 
@@ -3510,7 +3510,7 @@ class TelegramGateway {
3510
3510
  if (text === "/claim") {
3511
3511
  const { session, project } = await this.bindSharedRoomForMessage(message, sessionId);
3512
3512
  if (!project?.enabled) {
3513
- await this.sendMessage(message.chat.id, "This project is not shared. Enable sharing from the terminal first with <code>waterbrother project share</code>.", message.message_id);
3513
+ await this.sendMarkup(message.chat.id, "This project is not shared. Enable sharing from the terminal first with <code>waterbrother project share</code>.", message.message_id);
3514
3514
  return;
3515
3515
  }
3516
3516
  try {
@@ -3518,7 +3518,7 @@ class TelegramGateway {
3518
3518
  id: userId,
3519
3519
  name: peer?.username || [message?.from?.first_name, message?.from?.last_name].filter(Boolean).join(" ").trim() || userId
3520
3520
  });
3521
- await this.sendMessage(message.chat.id, `Shared room claimed by <code>${escapeTelegramHtml(claimed.activeOperator?.name || claimed.activeOperator?.id || userId)}</code>`, message.message_id);
3521
+ await this.sendMarkup(message.chat.id, `Shared room claimed by <code>${escapeTelegramHtml(claimed.activeOperator?.name || claimed.activeOperator?.id || userId)}</code>`, message.message_id);
3522
3522
  } catch (error) {
3523
3523
  await this.sendMessage(message.chat.id, escapeTelegramHtml(error instanceof Error ? error.message : String(error)), message.message_id);
3524
3524
  }
@@ -3579,7 +3579,7 @@ Ask them to run <code>/whoami</code> and then <code>/accept-invite ${escapeTeleg
3579
3579
  }
3580
3580
  try {
3581
3581
  const result = await approveSharedInvite(session.cwd || this.cwd, inviteId, { actorId: userId });
3582
- await this.sendMessage(message.chat.id, `Approved invite <code>${escapeTelegramHtml(result.invite.id)}</code>`, message.message_id);
3582
+ await this.sendMarkup(message.chat.id, `Approved invite <code>${escapeTelegramHtml(result.invite.id)}</code>`, message.message_id);
3583
3583
  } catch (error) {
3584
3584
  await this.sendMessage(message.chat.id, escapeTelegramHtml(error instanceof Error ? error.message : String(error)), message.message_id);
3585
3585
  }
@@ -3602,7 +3602,7 @@ Ask them to run <code>/whoami</code> and then <code>/accept-invite ${escapeTeleg
3602
3602
  actorId: userId,
3603
3603
  actorName: peer?.username || [message?.from?.first_name, message?.from?.last_name].filter(Boolean).join(" ").trim() || userId
3604
3604
  });
3605
- await this.sendMessage(message.chat.id, `Accepted invite <code>${escapeTelegramHtml(result.invite.id)}</code>`, message.message_id);
3605
+ await this.sendMarkup(message.chat.id, `Accepted invite <code>${escapeTelegramHtml(result.invite.id)}</code>`, message.message_id);
3606
3606
  } catch (error) {
3607
3607
  await this.sendMessage(message.chat.id, escapeTelegramHtml(error instanceof Error ? error.message : String(error)), message.message_id);
3608
3608
  }
@@ -3622,7 +3622,7 @@ Ask them to run <code>/whoami</code> and then <code>/accept-invite ${escapeTeleg
3622
3622
  }
3623
3623
  try {
3624
3624
  const result = await rejectSharedInvite(session.cwd || this.cwd, inviteId, { actorId: userId });
3625
- await this.sendMessage(message.chat.id, `Rejected invite <code>${escapeTelegramHtml(result.invite.id)}</code>`, message.message_id);
3625
+ await this.sendMarkup(message.chat.id, `Rejected invite <code>${escapeTelegramHtml(result.invite.id)}</code>`, message.message_id);
3626
3626
  } catch (error) {
3627
3627
  await this.sendMessage(message.chat.id, escapeTelegramHtml(error instanceof Error ? error.message : String(error)), message.message_id);
3628
3628
  }
@@ -3666,7 +3666,7 @@ Ask them to run <code>/whoami</code> and then <code>/accept-invite ${escapeTeleg
3666
3666
  }
3667
3667
  try {
3668
3668
  const result = await addSharedTask(session.cwd || this.cwd, taskText, { actorId: userId });
3669
- await this.sendMessage(message.chat.id, `Added shared task <code>${escapeTelegramHtml(result.task.id)}</code>`, message.message_id);
3669
+ await this.sendMarkup(message.chat.id, `Added shared task <code>${escapeTelegramHtml(result.task.id)}</code>`, message.message_id);
3670
3670
  } catch (error) {
3671
3671
  await this.sendMessage(message.chat.id, escapeTelegramHtml(error instanceof Error ? error.message : String(error)), message.message_id);
3672
3672
  }
@@ -3687,7 +3687,7 @@ Ask them to run <code>/whoami</code> and then <code>/accept-invite ${escapeTeleg
3687
3687
  try {
3688
3688
  const before = (project?.tasks || []).find((task) => task.id === taskId) || null;
3689
3689
  const result = await moveSharedTask(session.cwd || this.cwd, taskId, state, { actorId: userId });
3690
- await this.sendMessage(message.chat.id, `Moved shared task <code>${escapeTelegramHtml(result.task.id)}</code> to <code>${escapeTelegramHtml(result.task.state)}</code>`, message.message_id);
3690
+ await this.sendMarkup(message.chat.id, `Moved shared task <code>${escapeTelegramHtml(result.task.id)}</code> to <code>${escapeTelegramHtml(result.task.state)}</code>`, message.message_id);
3691
3691
  const notice = buildTaskOwnershipNotice(result.task, { action: "move", previousAssignee: before?.assignedTo || "", previousState: before?.state || "" });
3692
3692
  if (notice) await this.sendMessage(message.chat.id, notice, null, { parseMode: "HTML" });
3693
3693
  } catch (error) {
@@ -3710,7 +3710,7 @@ Ask them to run <code>/whoami</code> and then <code>/accept-invite ${escapeTeleg
3710
3710
  try {
3711
3711
  const before = (project?.tasks || []).find((task) => task.id === taskId) || null;
3712
3712
  const result = await assignSharedTask(session.cwd || this.cwd, taskId, memberId, { actorId: userId });
3713
- await this.sendMessage(message.chat.id, `Assigned shared task <code>${escapeTelegramHtml(result.task.id)}</code> to <code>${escapeTelegramHtml(memberId)}</code>`, message.message_id);
3713
+ await this.sendMarkup(message.chat.id, `Assigned shared task <code>${escapeTelegramHtml(result.task.id)}</code> to <code>${escapeTelegramHtml(memberId)}</code>`, message.message_id);
3714
3714
  const notice = buildTaskOwnershipNotice(result.task, { action: "assign", previousAssignee: before?.assignedTo || "" });
3715
3715
  if (notice) await this.sendMessage(message.chat.id, notice, null, { parseMode: "HTML" });
3716
3716
  } catch (error) {
@@ -3737,7 +3737,7 @@ Ask them to run <code>/whoami</code> and then <code>/accept-invite ${escapeTeleg
3737
3737
  actorId: userId,
3738
3738
  actorName: peer?.username || [message?.from?.first_name, message?.from?.last_name].filter(Boolean).join(" ").trim() || userId
3739
3739
  });
3740
- await this.sendMessage(message.chat.id, `Commented on shared task <code>${escapeTelegramHtml(result.task.id)}</code>`, message.message_id);
3740
+ await this.sendMarkup(message.chat.id, `Commented on shared task <code>${escapeTelegramHtml(result.task.id)}</code>`, message.message_id);
3741
3741
  } catch (error) {
3742
3742
  await this.sendMessage(message.chat.id, escapeTelegramHtml(error instanceof Error ? error.message : String(error)), message.message_id);
3743
3743
  }
@@ -3777,7 +3777,7 @@ Ask them to run <code>/whoami</code> and then <code>/accept-invite ${escapeTeleg
3777
3777
  }
3778
3778
  try {
3779
3779
  const result = await claimSharedTask(session.cwd || this.cwd, taskId, { actorId: userId });
3780
- await this.sendMessage(message.chat.id, `Claimed shared task <code>${escapeTelegramHtml(result.task.id)}</code>`, message.message_id);
3780
+ await this.sendMarkup(message.chat.id, `Claimed shared task <code>${escapeTelegramHtml(result.task.id)}</code>`, message.message_id);
3781
3781
  const notice = buildTaskOwnershipNotice(result.task, { action: "claim" });
3782
3782
  if (notice) await this.sendMessage(message.chat.id, notice, null, { parseMode: "HTML" });
3783
3783
  } catch (error) {
@@ -3894,7 +3894,7 @@ Ask them to run <code>/whoami</code> and then <code>/accept-invite ${escapeTeleg
3894
3894
  }
3895
3895
 
3896
3896
  if (text === "/run") {
3897
- await this.sendMessage(message.chat.id, "Usage: <code>/run &lt;prompt&gt;</code>", message.message_id);
3897
+ await this.sendMarkup(message.chat.id, "Usage: <code>/run &lt;prompt&gt;</code>", message.message_id);
3898
3898
  return;
3899
3899
  }
3900
3900
 
@@ -4069,7 +4069,7 @@ Ask them to run <code>/whoami</code> and then <code>/accept-invite ${escapeTeleg
4069
4069
  if (taskText) {
4070
4070
  try {
4071
4071
  const result = await addSharedTask(sharedBinding.session.cwd || this.cwd, taskText, { actorId: userId });
4072
- await this.sendMessage(message.chat.id, `Planner captured task <code>${escapeTelegramHtml(result.task.id)}</code>`, message.message_id);
4072
+ await this.sendMarkup(message.chat.id, `Planner captured task <code>${escapeTelegramHtml(result.task.id)}</code>`, message.message_id);
4073
4073
  } catch (error) {
4074
4074
  await this.sendMessage(message.chat.id, escapeTelegramHtml(error instanceof Error ? error.message : String(error)), message.message_id);
4075
4075
  }