Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Team: a member's own MausBot's main chat stays its main chat for its person
milind-sonif03bc947c97c
diff --git a/server/cloud-team-mausbot-own-chat.e2e.test.ts b/server/cloud-team-mausbot-own-chat.e2e.test.tsindex fdf6e5be50..783a475f27 100644--- a/server/cloud-team-mausbot-own-chat.e2e.test.ts+++ b/server/cloud-team-mausbot-own-chat.e2e.test.ts@@ -56,6 +56,7 @@ afterAll(async () => {it("is the person's own: private on the wire, its notes in their layer, and nobody else reads it through any route", async () => {const maus = await ownMausBot(mira);expect(maus.tasks!.find((task) => task.threadId === maus.threadId)?.private, "her main chat is marked hers").toBe(true);+ expect((maus as Bot & { mainThreadId?: string }).mainThreadId, "and it is still her MausBot's main chat").toBe(maus.threadId);writeFileSync(planPath(), JSON.stringify({ [maus.id]: { script: [{ key: "M-NOTE", repeat: true, match: ["MAIN-CHAT-LINE"], reply: "Noted Kestrel19.", steps: [{ tool: "memory_update", arguments: { action: "append", text: NOTE } }] },] } }));diff --git a/server/index.ts b/server/index.tsindex f1f2731d03..7b6d7dce64 100644--- a/server/index.ts+++ b/server/index.ts@@ -8762,7 +8762,7 @@ function routineSourceOwner(run: Pick<RoutineRun, "botId" | "sourceThreadId" | "return group?.memberIds.includes(bot.id) ? { bot, group, threadId } : null;}-function mainThreadTasks(botId: string) { const tasks = store.tasks(botId); return CLOUD_TEAM ? tasks.filter((task) => teamHost.audienceOf(task.threadId) === "team") : CLOUD_HOME ? tasks.filter((task) => !cloudGuestOpened(task.threadId)) : tasks; }+function mainThreadTasks(botId: string) { const tasks = store.tasks(botId), own = store.bot(botId)?.defaultBot?.person ? store.bot(botId)?.threadId : undefined; return CLOUD_TEAM ? tasks.filter((task) => teamHost.audienceOf(task.threadId) === "team" || task.threadId === own) : CLOUD_HOME ? tasks.filter((task) => !cloudGuestOpened(task.threadId)) : tasks; }function botMainThread(botId: string): string | undefined {return mainThread(mainThreadTasks(botId), store.bot(botId)?.threadId, store.bot(botId)?.mainThreadChoice);}