@tritard/waterbrother 0.16.86 → 0.16.88
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 +12 -2
package/package.json
CHANGED
package/src/gateway.js
CHANGED
|
@@ -276,7 +276,7 @@ function buildTelegramDmOnboardingMarkup({ cwd = "", project = null, peer = null
|
|
|
276
276
|
const activeProject = project?.projectName || (cwd ? path.basename(cwd) : "");
|
|
277
277
|
return [
|
|
278
278
|
"<b>Waterbrother on Telegram</b>",
|
|
279
|
-
"
|
|
279
|
+
"This chat is a first-class Waterbrother surface. Ask questions, make changes, refine work, or share the current project into a team room.",
|
|
280
280
|
activeProject ? `current project: <code>${escapeTelegramHtml(activeProject)}</code>` : "",
|
|
281
281
|
cwd ? `cwd: <code>${escapeTelegramHtml(cwd)}</code>` : "",
|
|
282
282
|
peer?.sessionId ? `linked session: <code>${escapeTelegramHtml(peer.sessionId)}</code>` : "",
|
|
@@ -285,6 +285,7 @@ function buildTelegramDmOnboardingMarkup({ cwd = "", project = null, peer = null
|
|
|
285
285
|
"• ask <code>what project are you in?</code>",
|
|
286
286
|
"• say <code>make a test page in this project</code>",
|
|
287
287
|
"• say <code>share this project in my Telegram room</code>",
|
|
288
|
+
"• ask <code>what can I do here?</code>",
|
|
288
289
|
"",
|
|
289
290
|
"<b>Need the full command list?</b>",
|
|
290
291
|
"Use <code>/help</code>."
|
|
@@ -294,6 +295,8 @@ function buildTelegramDmOnboardingMarkup({ cwd = "", project = null, peer = null
|
|
|
294
295
|
function buildTelegramRoomOnboardingMarkup({ project = null, actorName = "", executor = {} } = {}) {
|
|
295
296
|
const participants = listProjectParticipants(project);
|
|
296
297
|
const agents = listProjectAgents(project);
|
|
298
|
+
const reviewer = chooseReviewerAgent(project);
|
|
299
|
+
const blockingReview = getLatestBlockingReviewPolicy(project);
|
|
297
300
|
return [
|
|
298
301
|
"<b>Roundtable room</b>",
|
|
299
302
|
actorName ? `${escapeTelegramHtml(actorName)} is talking to Waterbrother in the shared room for <code>${escapeTelegramHtml(project?.projectName || "this project")}</code>.` : "",
|
|
@@ -301,11 +304,14 @@ function buildTelegramRoomOnboardingMarkup({ project = null, actorName = "", exe
|
|
|
301
304
|
`participants: <code>${escapeTelegramHtml(String(participants.length || (project?.members || []).length || 0))}</code>`,
|
|
302
305
|
`agents: <code>${escapeTelegramHtml(String(agents.length || 0))}</code>`,
|
|
303
306
|
executor?.provider && executor?.model ? `active runtime: <code>${escapeTelegramHtml(`${executor.provider}/${executor.model}`)}</code>` : "",
|
|
307
|
+
reviewer ? `reviewer: <code>${escapeTelegramHtml(reviewer.ownerName || reviewer.label || reviewer.ownerId || reviewer.id || "unknown")}</code>` : "",
|
|
308
|
+
`blocking review: <code>${escapeTelegramHtml(blockingReview ? "yes" : "no")}</code>`,
|
|
304
309
|
"",
|
|
305
310
|
"<b>What you can do here</b>",
|
|
306
311
|
"• ask <code>what project is this chat bound to?</code>",
|
|
307
312
|
"• ask <code>who is in the room?</code>",
|
|
308
313
|
"• say <code>add Austin as editor</code>",
|
|
314
|
+
"• ask <code>which terminals are live?</code>",
|
|
309
315
|
"• in execute mode, address Waterbrother directly to build or change code",
|
|
310
316
|
"",
|
|
311
317
|
"Use <code>/help</code> for the full command list."
|
|
@@ -1606,6 +1612,8 @@ class TelegramGateway {
|
|
|
1606
1612
|
const participants = listProjectParticipants(project);
|
|
1607
1613
|
const agents = listProjectAgents(project);
|
|
1608
1614
|
const executorAgent = agents.find((agent) => String(agent?.role || "").trim() === "executor") || null;
|
|
1615
|
+
const reviewerAgent = chooseReviewerAgent(project);
|
|
1616
|
+
const blockingReview = getLatestBlockingReviewPolicy(project);
|
|
1609
1617
|
return [
|
|
1610
1618
|
"<b>Roundtable room</b>",
|
|
1611
1619
|
`${escapeTelegramHtml(actor.displayName || actor.userId)} is now in <code>${escapeTelegramHtml(project.projectName || "this project")}</code> as <code>observer</code>.`,
|
|
@@ -1615,9 +1623,11 @@ class TelegramGateway {
|
|
|
1615
1623
|
: "active operator: <code>none</code>",
|
|
1616
1624
|
`participants: <code>${escapeTelegramHtml(String(participants.length || (project.members || []).length))}</code>`,
|
|
1617
1625
|
executorAgent ? `active terminal: <code>${escapeTelegramHtml(formatAgentLabel(executorAgent) || executorAgent.id)}</code>` : "",
|
|
1626
|
+
reviewerAgent ? `reviewer: <code>${escapeTelegramHtml(reviewerAgent.ownerName || reviewerAgent.label || reviewerAgent.ownerId || reviewerAgent.id || "unknown")}</code>` : "",
|
|
1627
|
+
`blocking review: <code>${escapeTelegramHtml(blockingReview ? "yes" : "no")}</code>`,
|
|
1618
1628
|
"As observer, you can ask questions, discuss plans, and review work here.",
|
|
1619
1629
|
"An owner can promote you to editor or owner conversationally.",
|
|
1620
|
-
"Examples: <code>what project is this chat bound to?</code>, <code>who is in the room?</code>, <code>what can I do here?</code>"
|
|
1630
|
+
"Examples: <code>what project is this chat bound to?</code>, <code>who is in the room?</code>, <code>which terminals are live?</code>, <code>what can I do here?</code>"
|
|
1621
1631
|
].filter(Boolean).join("\n");
|
|
1622
1632
|
}
|
|
1623
1633
|
|