@tritard/waterbrother 0.16.89 → 0.16.90

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 +16 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tritard/waterbrother",
3
- "version": "0.16.89",
3
+ "version": "0.16.90",
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
@@ -2192,11 +2192,19 @@ class TelegramGateway {
2192
2192
  if (!project?.enabled) {
2193
2193
  return "This project is not shared.";
2194
2194
  }
2195
+ const blockingReview = getLatestBlockingReviewPolicy(project);
2196
+ if (!blockingReview) {
2197
+ return "<b>Reviewer concerns</b>\nNo blocking review is active.";
2198
+ }
2195
2199
  const result = getLatestReviewResult(project);
2196
2200
  if (!result) {
2197
2201
  return "<b>Reviewer concerns</b>\nNo reviewer result is on record yet.";
2198
2202
  }
2199
2203
  const meta = result.meta && typeof result.meta === "object" ? result.meta : {};
2204
+ const blockingMeta = blockingReview.meta && typeof blockingReview.meta === "object" ? blockingReview.meta : {};
2205
+ if (String(meta.agentId || "").trim() !== String(blockingMeta.agentId || "").trim()) {
2206
+ return "<b>Reviewer concerns</b>\nThe latest reviewer result does not match the current blocking reviewer.";
2207
+ }
2200
2208
  if (String(meta.outcome || "").trim() !== "concerns") {
2201
2209
  return "<b>Reviewer concerns</b>\nThe latest reviewer result is not concerns.";
2202
2210
  }
@@ -2227,8 +2235,16 @@ class TelegramGateway {
2227
2235
  if (!project?.enabled) {
2228
2236
  return "This project is not shared.";
2229
2237
  }
2238
+ const blockingReview = getLatestBlockingReviewPolicy(project);
2239
+ if (!blockingReview) {
2240
+ return "<b>Reviewer override</b>\nNo blocking review is active.";
2241
+ }
2230
2242
  const result = getLatestReviewResult(project);
2231
2243
  const meta = result?.meta && typeof result.meta === "object" ? result.meta : {};
2244
+ const blockingMeta = blockingReview.meta && typeof blockingReview.meta === "object" ? blockingReview.meta : {};
2245
+ if (String(meta.agentId || "").trim() !== String(blockingMeta.agentId || "").trim()) {
2246
+ return "<b>Reviewer override</b>\nThe latest reviewer result does not match the current blocking reviewer.";
2247
+ }
2232
2248
  await addSharedRoomNote(cwd, "Reviewer outcome overridden by the room", {
2233
2249
  actorId,
2234
2250
  actorName,