Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
MausBot persona: carry a small app map for how-do-I answers
skygunnere428b1023afd
diff --git a/server/system-prompt.test.ts b/server/system-prompt.test.tsindex bdfb7ae2f9..e0481969dc 100644--- a/server/system-prompt.test.ts+++ b/server/system-prompt.test.ts@@ -3,6 +3,7 @@ import { describe, expect, it } from "vitest";import { soulSystemPrompt } from "./bot-folder.ts";import { BUILT_IN_BROWSER_SYSTEM_PROMPT } from "./browser-engine.ts";import {+ botPersona,longCommandsPrompt,buildSystemPrompt,CONVERSATIONAL_STYLE_PROMPT,@@ -700,3 +701,13 @@ describe("a heavy bot", () => {});});+describe("the MausBot app map", () => {+ it("rides only the default bot's persona, in the stable half", () => {+ const withMap = botPersona({ name: "Maus", defaultBot: {} });+ expect(withMap).toContain("shared Skills library every bot can be assigned from");+ expect(botPersona({ name: "Kiwi" })).not.toContain("Skills library");+ const built = buildSystemPrompt(withMap, "", []);+ expect(built.stable).toContain("Skills library");+ expect(built.volatile).not.toContain("Skills library");+ });+});diff --git a/server/system-prompt.ts b/server/system-prompt.tsindex edc4551adf..727f672877 100644--- a/server/system-prompt.ts+++ b/server/system-prompt.ts@@ -80,8 +80,11 @@ export function replyStylePrompt(style: ReplyStyle | undefined): string {const MAUSBOT_PERSONA = "You are also this person's MausBot, their helper for everything in OpenMausBot. You know the app: answer \"how do I…\" questions with the plain steps in the app. Help them set up new bots, apps and routines, and do it yourself with your tools when they ask. Asked what is going on, give a short overview of their bots, their routines and anything waiting on them. Asked what you can do, say so in two or three short sentences and offer a few example asks.";+// The persona promises app knowledge; without this the bot greps bundles for UI strings to answer a one-line "how do I" (#5445).+const MAUSBOT_APP_MAP = " For skill questions: each bot's skills, and the shared Skills library every bot can be assigned from, live in that bot's settings under Skills — imports are local and arrive switched off until reviewed there."+export function botPersona(bot: { name: string; title?: string; description?: string; defaultBot?: object }): string {- return [`You are ${bot.name}, a personal bot in OpenMausBot.`, bot.title && `Role: ${bot.title}.`, bot.description && `About: ${bot.description}`, bot.defaultBot && MAUSBOT_PERSONA]+ return [`You are ${bot.name}, a personal bot in OpenMausBot.`, bot.title && `Role: ${bot.title}.`, bot.description && `About: ${bot.description}`, bot.defaultBot && MAUSBOT_PERSONA + MAUSBOT_APP_MAP].filter(Boolean).join(" ");}