@tritard/waterbrother 0.16.92 → 0.16.93

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 +20 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tritard/waterbrother",
3
- "version": "0.16.92",
3
+ "version": "0.16.93",
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
@@ -786,6 +786,12 @@ function parseTelegramStateIntent(text = "") {
786
786
  const lower = value.toLowerCase();
787
787
  if (!value) return null;
788
788
 
789
+ if (/^(?:are you|you(?:'re| are)?|wb|waterbrother)\s+(?:online|running|alive|there)\??$/.test(lower)
790
+ || /^(?:you online|you running|you there)\??$/.test(lower)
791
+ || /^(?:are you online|are you running|are you there)\??$/.test(lower)) {
792
+ return { action: "bot-status" };
793
+ }
794
+
789
795
  if (/\bwhat project\b/.test(lower) || /\bwhich project\b/.test(lower) || /\bproject is this chat\b/.test(lower) || /\bchat bound to\b/.test(lower)) {
790
796
  return { action: "project-status" };
791
797
  }
@@ -2188,6 +2194,20 @@ class TelegramGateway {
2188
2194
  hostSessionId: host?.sessionId || ""
2189
2195
  };
2190
2196
 
2197
+ if (intent.action === "bot-status") {
2198
+ const lines = [
2199
+ "<b>Waterbrother status</b>",
2200
+ "status: <code>online</code>",
2201
+ `surface: <code>${escapeTelegramHtml(host ? "live-tui" : "telegram-fallback")}</code>`,
2202
+ `room mode: <code>${escapeTelegramHtml(project?.enabled ? (project.roomMode || "chat") : "off")}</code>`,
2203
+ project?.activeOperator?.id
2204
+ ? `active operator: <code>${escapeTelegramHtml(project.activeOperator.name || project.activeOperator.id)}</code>`
2205
+ : "active operator: <code>none</code>",
2206
+ `runtime: <code>${escapeTelegramHtml(`${executor.provider || "unknown"}/${executor.model || "unknown"}`)}</code>`
2207
+ ];
2208
+ return lines.join("\n");
2209
+ }
2210
+
2191
2211
  if (intent.action === "accept-reviewer-concerns") {
2192
2212
  if (!project?.enabled) {
2193
2213
  return "This project is not shared.";