Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

fix(meetings): tell a bot why it can't join meetings without a cloud computer

AdityaUmale90f8074f85d7
diff --git a/server/host/meetings-host.ts b/server/host/meetings-host.ts
index 56073cb3e4..22bcd6876b 100644
--- a/server/host/meetings-host.ts
+++ b/server/host/meetings-host.ts
@@ -10,6 +10,7 @@ import { createBotEngine, type MeetingComputer } from "../meetings/engine.ts";
import { END_LINE, LEAVE_ACTION, liveCard } from "../meetings/cards.ts";
import { createMeetings, type MeetingRecord } from "../meetings/manager.ts";
import { createMeetingRoutes, type MeetingRouteContext, type MeetingRouteDeps } from "../meetings/routes.ts";
+import { MEETINGS_NEED_CLOUD_COMPUTER } from "../meetings/prompt.ts";
import { speechSource } from "../meetings/speech.ts";
import { OUTSIDE, type WorkOrigin } from "../peer-provenance.ts";
import type { RequestAuth } from "../request-auth.ts";
@@ -118,7 +119,7 @@ export function createMeetingsHost(deps: MeetingsHostDeps, routeDeps: () => Meet
computerOwner(botId) {
const bot = store.bot(botId);
if (!bot) return { error: "The bot is gone." };
- if (!boat.boatConfigured(cfg)) return { error: "Meeting notes run on a cloud computer, and none is set up here. Add a Boat key in Settings → Computers, or use MausBot Cloud." };
+ if (!boat.boatConfigured(cfg)) return { error: MEETINGS_NEED_CLOUD_COMPUTER };
return deps.computerOwner(bot);
},
createRoutine(botId, threadId) {
diff --git a/server/index.ts b/server/index.ts
index 7d43a47388..b106d69b6b 100644
--- a/server/index.ts
+++ b/server/index.ts
@@ -72,7 +72,7 @@ import {
} from "./message-file.ts";
import { avatarImageStatus } from "./avatar-image.ts";
import { imageGenerationReady } from "./image-generation.ts";
-import { createImageToolRoutes } from "./routes/image-tools.ts"; import { createMeetingsHost } from "./host/meetings-host.ts";
+import { createImageToolRoutes } from "./routes/image-tools.ts"; import { createMeetingsHost } from "./host/meetings-host.ts"; import { meetingsUnavailablePrompt } from "./meetings/prompt.ts";
import { createImageSettingsRoutes } from "./routes/image-settings.ts";
import { fitsOnOneLine, parseBotProfilePatch } from "./bot-profile.ts";
import { routeDirectTurn } from "./turn-route.ts"; import { QuickModelFallback } from "./quick-model-fallback.ts"; import { COMPUTER_JOURNAL_PATH, createSavedSteps, personRequest, savedStepsEnabled } from "./saved-steps/saved-steps.ts";
@@ -2983,7 +2983,7 @@ function previewSystemPrompt(bot: BotRecord) {
}, { note: previewPlan.note, cloudHome: Boolean(CLOUD_HOME), ownComputer: CLOUD_HOME && agentsMounted && lendingEnabled() ? sharedComputers.known(CLOUD_HOME_LENDER) : undefined }) },
{ id: "cloud-home", label: "My Cloud", text: CLOUD_HOME ? cloudHomePrompt(agentsMounted && lendingEnabled(), syncedFolders(DATA_DIR), sharedComputers.known(CLOUD_HOME_LENDER), CLOUD_PERSONAL) + firstHourHooks.prompt(bot.id, bot.threadId) : "" },
{ id: "composio", label: "Connected apps", text: caps?.composioMcp && bot.composio !== false && composio.configured(cfg) ? composioSystemPrompt(bot.connectorTools) + describeConnectorScopes(bot.connectorScopes) : "" },
- { id: "email", label: "Email", text: caps?.emailMcp === true ? emailHost.prompt(bot) : "" },
+ { id: "email", label: "Email", text: caps?.emailMcp === true ? emailHost.prompt(bot) : "" }, { id: "meetings", label: "Meetings", text: meetingsUnavailablePrompt({ agentsTools: agentsMounted, cloudComputer: boat.boatConfigured(cfg) }) },
...phones.previewParts(bot, caps?.deviceMcp === true),
{ id: "mcp", label: "MCP servers", text: caps?.customMcp ? customMcpPrompt(Object.keys(engineMcpServers(bot)), mcpServersHost.off(bot)) : "" }, { id: "to-connect", label: "Connections to make", text: cloudConnections.prompt(bot) },
{ id: "browser", label: "Browser", text: previewPlan.browser ? browserPromptFor(bot, agentsMounted) : "" },
@@ -8386,7 +8386,7 @@ async function beginTurn(
{ id: "mcp", label: "MCP servers", text: customMcpPrompt(Object.keys(integrations.custom ?? {}), mcpServersHost.off(bot)) }, { id: "to-connect", label: "Connections to make", text: cloudConnections.prompt(liveBot ?? bot, lentMcp.lines(liveBot ?? bot, { botId: bot.id, threadId, generation: dispatchClaimId })) + teamConnections.prompt(threadId, dispatchClaimId, integrations) },
{ id: "browser", label: "Browser", text: integrations.browser ? browserPromptFor(bot, Boolean(integrations.agents)) : "" },
{ id: "data", label: "Data", text: integrations.data ? BUILT_IN_DATA_SYSTEM_PROMPT : "" },
- { id: "email", label: "Email", text: instance.adapter.capabilities.emailMcp === true ? emailHost.prompt(liveBot ?? bot) : "" },
+ { id: "email", label: "Email", text: instance.adapter.capabilities.emailMcp === true ? emailHost.prompt(liveBot ?? bot) : "" }, { id: "meetings", label: "Meetings", text: meetingsUnavailablePrompt({ agentsTools: Boolean(integrations.agents), cloudComputer: boat.boatConfigured(cfg) }) },
...phones.promptParts(liveBot ?? bot, {
mounted: Boolean(integrations.device), offered: instance.adapter.capabilities.deviceMcp === true, turn: { botId: bot.id, threadId, generation: dispatchClaimId },
place: phones.place(threadId, !(commsDepth > 0 || opts?.automationSource !== undefined || opts?.unattended || opts?.peerAsk || opts?.coordination)),
diff --git a/server/meetings/prompt.test.ts b/server/meetings/prompt.test.ts
new file mode 100644
index 0000000000..b74c80c109
--- /dev/null
+++ b/server/meetings/prompt.test.ts
@@ -0,0 +1,15 @@
+import { describe, expect, it } from "vitest";
+import { meetingsUnavailablePrompt, MEETINGS_NEED_CLOUD_COMPUTER } from "./prompt.ts";
+
+describe("what a bot is told when meeting notes can't run here (email 1a1bc66c)", () => {
+ it("without a cloud computer it is told why it has no meeting tools and what fixes it", () => {
+ const prompt = meetingsUnavailablePrompt({ agentsTools: true, cloudComputer: false });
+ expect(prompt).toContain("no meeting tools");
+ expect(prompt).toContain(MEETINGS_NEED_CLOUD_COMPUTER);
+ expect(prompt).toContain("Settings → Computers");
+ });
+ it("says nothing with a cloud computer, or to a bot without the agents tools", () => {
+ expect(meetingsUnavailablePrompt({ agentsTools: true, cloudComputer: true })).toBe("");
+ expect(meetingsUnavailablePrompt({ agentsTools: false, cloudComputer: false })).toBe("");
+ });
+});
diff --git a/server/meetings/prompt.ts b/server/meetings/prompt.ts
new file mode 100644
index 0000000000..c05191b1a5
--- /dev/null
+++ b/server/meetings/prompt.ts
@@ -0,0 +1,11 @@
+// What a bot is told about meeting notes when it can't take them here: without a cloud computer it gets no meeting tools,
+// so without this line it can't say why a meeting link does nothing.
+
+/** Why meeting notes can't start here, and the way to fix it. */
+export const MEETINGS_NEED_CLOUD_COMPUTER = "Meeting notes run on a cloud computer, and none is set up here. Add a Boat key in Settings → Computers, or use MausBot Cloud.";
+
+/** The system prompt part for a bot with the agents tools on a server with no cloud computer; nothing otherwise. */
+export function meetingsUnavailablePrompt({ agentsTools, cloudComputer }: { agentsTools: boolean; cloudComputer: boolean }): string {
+ if (!agentsTools || cloudComputer) return "";
+ return ` You can't join online meetings to take notes here, so you have no meeting tools. When the person asks you to join a meeting or sends a meeting link, tell them in one line: ${MEETINGS_NEED_CLOUD_COMPUTER}`;
+}