Skip to content

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

Add pt-br text for the all-departments setting; recheck busy bots before a department grant; scope the no-authority line

AdityaUmalee53211e98b91
diff --git a/server/chief-of-staff.test.ts b/server/chief-of-staff.test.ts
index a1392280f1..f4f2601106 100644
--- a/server/chief-of-staff.test.ts
+++ b/server/chief-of-staff.test.ts
@@ -90,6 +90,8 @@ describe("chiefOfStaffSystemPrompt", () => {
const everywhere = bots.map(bot => bot.id === "chief" ? { ...bot, chiefOfStaff: true, managesAllSections: true } : bot);
const prompt = chiefOfStaffSystemPrompt("chief", everywhere, true);
expect(prompt).toContain("The owner also made you responsible for every department, including ones added later.");
+ expect(prompt).toContain("Reaching a bot outside your team gives you no authority over it");
+ expect(prompt).not.toContain("Reaching a bot gives you no authority over it");
expect(prompt).toMatch(/Your team, in every department:\n(?:- .*\n)*- Scout — Travel planner \(Personal\) \[id: personal\]/);
expect(prompt).not.toContain("Other bots you can reach, in other departments:");
expect(chiefOfStaffSystemPrompt("chief", bots, true)).not.toContain("every department");
diff --git a/server/chief-of-staff.ts b/server/chief-of-staff.ts
index f385fd15a6..aa65dfbdbe 100644
--- a/server/chief-of-staff.ts
+++ b/server/chief-of-staff.ts
@@ -72,7 +72,7 @@ export function chiefOfStaffSystemPrompt(
responsibleFor
? `The owner also made you responsible for ${responsibleFor}. You supervise their bots and may propose setup changes there. You remain the user's single point of contact. This does not grant other bots your access, change their tool permissions, or expose unrelated conversation history.`
: "",
- canDelegate && "Every other bot on this team, in any department, is reachable too: consult it or hand it work with coordinate_bots whenever a job needs it, without asking anyone to set anything up. Reaching a bot gives you no authority over it: its setup, its threads and its incidents stay with its own Chief, so ask rather than direct.",
+ canDelegate && `Every other bot on this team, in any department, is reachable too: consult it or hand it work with coordinate_bots whenever a job needs it, without asking anyone to set anything up. Reaching a bot${responsibleFor ? " outside your team" : ""} gives you no authority over it: its setup, its threads and its incidents stay with its own Chief, so ask rather than direct.`,
"Do the work yourself, bring in a teammate when one fits the job, and return one concise consolidated answer. Never invent a teammate's progress or result. Normal permission and approval rules still apply.",
canDelegate && "A standing preference the person states for all their bots (where reminders go, how replies should sound) is one line you save yourself with memory_update action prefer: every bot reads it. Never send it to each bot with coordinate_bots.",
canDelegate ? SPECIALISTS : "",
diff --git a/server/routes/bot-patch.ts b/server/routes/bot-patch.ts
index f616222583..d2ddc2e58f 100644
--- a/server/routes/bot-patch.ts
+++ b/server/routes/bot-patch.ts
@@ -648,6 +648,10 @@ export function createBotPatchRoutes(deps: BotPatchRouteDeps): RouteHandler {
section !== undefined &&
sectionKey(existingBot?.section) !== sectionKey(section);
let bot: BotRecord | null;
+ // Rechecked: a turn can start during the awaits above, and nothing awaits between here and the write.
+ if ((loosened.includes("managedSections") || loosened.includes("managesAllSections")) && auth.kind === "loopback" && !DESKTOP_MANAGED && store.bots.some(bot => bot.busy)) {
+ return json(res, 409, userError("serverError.department.stopBots"));
+ }
const freshBrowserBot = store.bot(m[1]);
// Rechecked: the awaits above can yield after the first memory check.
if (freshBrowserBot && body.memoryEnabled !== undefined &&
diff --git a/src/locales/pt-br.json b/src/locales/pt-br.json
index fedb2e4dad..3c0db5bdf6 100644
--- a/src/locales/pt-br.json
+++ b/src/locales/pt-br.json
@@ -6725,6 +6725,7 @@
"botAccess.scopes.readWriteHint": "As permissões de ferramentas e os limites de envio continuam valendo.",
"botAccess.teams.title": "Também é responsável por",
"botAccess.teams.description": "{name} já pode falar com todos os bots, de qualquer equipe. Escolha as outras equipes pelas quais também será responsável como chefe de gabinete: ele cuida dos bots delas, recebe avisos sobre os problemas deles e pode sugerir mudanças nas configurações. A própria equipe sempre está incluída.",
+ "botAccess.teams.all": "Todas as equipes, incluindo as novas",
"botAccess.teams.legend": "Equipes sob a responsabilidade de {name}",
"botAccess.teams.general": "Geral",
"botAccess.teams.empty": "Ainda não há outras equipes.",
@@ -6924,6 +6925,7 @@
"botOverview.line.talksToAll": "Pode falar com todos os outros {count} bots, de qualquer equipe.",
"botOverview.line.talksToOne": "Pode falar com o outro bot.",
"botOverview.line.talksToChosen": "Fala apenas com os bots escolhidos para ele.",
+ "botOverview.line.allDepartments": "Responsável por todas as equipes, incluindo as novas.",
"botOverview.line.alsoInCharge": "Também é responsável por estas equipes: {departments}.",
"botOverview.preference.auto": "Auto; a disponibilidade é verificada quando uma tarefa começa",
"botOverview.preference.cloud": "desktop na nuvem",