@tritard/waterbrother 0.16.82 → 0.16.83
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/package.json +1 -1
- package/src/gateway.js +16 -0
package/package.json
CHANGED
package/src/gateway.js
CHANGED
|
@@ -483,6 +483,11 @@ function findLiveHostForAgent(hosts = [], agent = {}) {
|
|
|
483
483
|
}) || null;
|
|
484
484
|
}
|
|
485
485
|
|
|
486
|
+
function chooseReviewerAgent(project) {
|
|
487
|
+
const agents = listProjectAgents(project);
|
|
488
|
+
return agents.find((agent) => String(agent?.role || "").trim() === "reviewer") || null;
|
|
489
|
+
}
|
|
490
|
+
|
|
486
491
|
function parseReviewerOutcome(text = "") {
|
|
487
492
|
const value = String(text || "").trim();
|
|
488
493
|
const lower = value.toLowerCase();
|
|
@@ -890,6 +895,11 @@ function formatTelegramRoomMarkup(project, options = {}) {
|
|
|
890
895
|
: ["• none"];
|
|
891
896
|
const runtimeConflict = summarizeRuntimeConflict(project, executor);
|
|
892
897
|
const liveHosts = Array.isArray(options.liveHosts) ? options.liveHosts : [];
|
|
898
|
+
const selectedExecutor = chooseExecutorAgent(project, executor);
|
|
899
|
+
const selectedReviewer = chooseReviewerAgent(project);
|
|
900
|
+
const blockingReview = getLatestBlockingReviewPolicy(project);
|
|
901
|
+
const selectedExecutorLiveHost = selectedExecutor ? findLiveHostForAgent(liveHosts, selectedExecutor) : null;
|
|
902
|
+
const selectedReviewerLiveHost = selectedReviewer ? findLiveHostForAgent(liveHosts, selectedReviewer) : null;
|
|
893
903
|
const executorBits = [
|
|
894
904
|
`surface: <code>${escapeTelegramHtml(executor.surface || "telegram")}</code>`,
|
|
895
905
|
`provider: <code>${escapeTelegramHtml(executor.provider || "unknown")}</code>`,
|
|
@@ -912,6 +922,12 @@ function formatTelegramRoomMarkup(project, options = {}) {
|
|
|
912
922
|
`room: <code>${escapeTelegramHtml(roomLabel)}</code>`,
|
|
913
923
|
`active operator: <code>${escapeTelegramHtml(active)}</code>`,
|
|
914
924
|
`pending invites: <code>${pendingInviteCount}</code>`,
|
|
925
|
+
"<b>Coordination</b>",
|
|
926
|
+
`selected executor: <code>${escapeTelegramHtml(selectedExecutor ? (selectedExecutor.ownerName || selectedExecutor.label || selectedExecutor.ownerId || selectedExecutor.id || "unknown") : "none")}</code>`,
|
|
927
|
+
`executor live: <code>${escapeTelegramHtml(selectedExecutorLiveHost ? "yes" : "no")}</code>`,
|
|
928
|
+
`reviewer: <code>${escapeTelegramHtml(selectedReviewer ? (selectedReviewer.ownerName || selectedReviewer.label || selectedReviewer.ownerId || selectedReviewer.id || "none") : "none")}</code>`,
|
|
929
|
+
`reviewer live: <code>${escapeTelegramHtml(selectedReviewerLiveHost ? "yes" : "no")}</code>`,
|
|
930
|
+
`blocking review: <code>${escapeTelegramHtml(blockingReview ? "yes" : "no")}</code>`,
|
|
915
931
|
"<b>Executor</b>",
|
|
916
932
|
...executorBits,
|
|
917
933
|
"<b>Runtime Split</b>",
|