Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Directions to the move say it needs a My Cloud, and how a Team plan's Cloud gets a computer's bots
milind-soni20f37a581dd3
diff --git a/server/app-settings/places.test.ts b/server/app-settings/places.test.tsindex 2ea5acea16..a4a00d17d6 100644--- a/server/app-settings/places.test.ts+++ b/server/app-settings/places.test.ts@@ -17,6 +17,9 @@ describe("places", () => {expect(placePath("send-key")).toBe("Settings → General → Send messages with (shown in Advanced mode; the switch is at the bottom of Settings)");expect(placesList()).not.toContain("appearance.advanced");expect(placePath("wifi")).toMatch(/\(only in the desktop app, on this computer's own page\)$/);+ // The move to My Cloud is a switch only someone with a My Cloud sees: a bot never sends a Team plan's owner to it.+ expect(placePath("move")).toMatch(/^Settings → Import & export → Move to My Cloud \(only in the desktop app, on this computer's own page; it is the switch "Keep this computer's bots on this computer", shown only with a My Cloud of the person's own;/);+ expect(placePath("move")).toContain("A Team plan's Cloud is a team, not My Cloud: to move all bots to a new one, Export full backup here, then Import backup");});it("find a place by the person's words", () => {diff --git a/server/app-settings/places.ts b/server/app-settings/places.tsindex 5835d5e5c7..c42c7c1603 100644--- a/server/app-settings/places.ts+++ b/server/app-settings/places.ts@@ -9,6 +9,7 @@ function described(place: SettingsPlace): string {const notes = [...(place.advanced ? [place.simplePath ? `in Simple mode it is at ${place.simplePath}` : "shown in Advanced mode; the switch is at the bottom of Settings"] : []),...(place.only ? [`only in ${place.only}`] : []),+ ...(place.note ? [place.note] : []),];return notes.length ? `${place.path} (${notes.join("; ")})` : place.path;}diff --git a/server/places-elsewhere.test.ts b/server/places-elsewhere.test.tsindex dfc6d88f33..3cbc57ce2f 100644--- a/server/places-elsewhere.test.ts+++ b/server/places-elsewhere.test.ts@@ -225,7 +225,7 @@ describe("a team the person is a member of", () => {const here = createPlacesElsewhere({ dataDir: dataDir() });here.write({ v: 1, self: { name: "Garage server", kind: "server" }, places: [ACME] });const told = (here.explain("Support") as { where: string }).where;- expect(told).toContain("Tell the person they can ask it in Acme, or, from My Cloud, move a bot to Acme.");+ expect(told).toContain("Tell the person they can ask it in Acme, or, from a My Cloud of theirs, move a bot to Acme.");expect(told).not.toMatch(/bring their bots together|my home|Bring them together|Keep this computer/);expect(resolveTeammate([{ id: "chief", name: "Chief" }], { id: "chief", name: "Chief" }, "Support", here.explain)).toEqual({ error: told });});diff --git a/server/places-elsewhere.ts b/server/places-elsewhere.tsindex 2c2d54e167..60459e19e2 100644--- a/server/places-elsewhere.ts+++ b/server/places-elsewhere.ts@@ -37,7 +37,7 @@ type Kind = Place["kind"];* (`here`): only a computer's page in the desktop app moves its bots to My Cloud, and a server becomes home from its icon. */export function onePlace(here: Kind | null): string {const how = here === "computer"- ? ` To bring them together, in the desktop app ${CLOUD_HOW}, or right-click their own server's icon on the left of the desktop app and choose "Make … my home".`+ ? ` To bring them together, with a My Cloud of their own, in the desktop app ${CLOUD_HOW}, or right-click their own server's icon on the left of the desktop app and choose "Make … my home".`: here === "cloud" ? " To bring a computer's bots here, the person can choose \"Bring them together\" on that computer's page in the desktop app.": here === "server" ? " To bring them together here, in the desktop app, right-click this server's icon on the left of the app and choose \"Make … my home\".": "";@@ -80,7 +80,7 @@ function bringTogether(place: Place, self: Elsewhere["self"], to: "bot" | "persofunction moveToTeam(place: Place, self: Elsewhere["self"], to: "bot" | "person"): string {const move = self.kind === "cloud"? `or move this bot to ${place.name}: in the desktop app, open the bot's menu in the sidebar and choose "Move to ${place.name}"`- : `or, from My Cloud, move a bot to ${place.name}`;+ : `or, from a My Cloud of theirs, move a bot to ${place.name}`;return to === "bot" ? `Tell the person they can ask it in ${place.name}, ${move}.` : `Ask it in ${place.name}, ${move}.`;}diff --git a/shared/settings-places.ts b/shared/settings-places.tsindex b5897b7921..e7afea7147 100644--- a/shared/settings-places.ts+++ b/shared/settings-places.ts@@ -1,7 +1,8 @@// Written by scripts/gen-settings-places.ts from Settings' own index and the English catalog; edit those, then run it./** A real place in Settings, as the person reads it in English. `advanced`: only Advanced mode shows it; `simplePath`:- * where Simple mode shows it instead. `only`: the one kind of place or app it shows on. */+ * where Simple mode shows it instead. `only`: the one kind of place or app it shows on. `note`: what it is and the state+ * it depends on, said with the path. */export interface SettingsPlace {id: string;path: string;@@ -9,6 +10,7 @@ export interface SettingsPlace {advanced?: true;simplePath?: string;only?: string;+ note?: string;}export const SETTINGS_HOW_TO_OPEN = "Settings opens from the menu under the person's name at the bottom of the sidebar (or Cmd+, on a Mac, Ctrl+, elsewhere). Its first entry is named after the place (This computer, My Cloud, or the server's name).";@@ -74,7 +76,7 @@ export const SETTINGS_PLACES = [{"id":"bring-in","path":"Settings → Import & export → Bring things in","words":["import","move from","bring"]},{"id":"backup-export","path":"Settings → Import & export → Take things out → Export full backup","words":["backup","backups","export","full backup","download"]},{"id":"take-out","path":"Settings → Import & export → Take things out","words":["export","backup"]},- {"id":"move","path":"Settings → Import & export → Move to My Cloud","words":["keep here","move back","bring back","move to cloud"],"only":"the desktop app, on this computer's own page"},+ {"id":"move","path":"Settings → Import & export → Move to My Cloud","words":["keep here","move back","bring back","move to cloud"],"only":"the desktop app, on this computer's own page","note":"it is the switch \"Keep this computer's bots on this computer\", shown only with a My Cloud of the person's own; off, this computer's bots move there. A Team plan's Cloud is a team, not My Cloud: to move all bots to a new one, Export full backup here, then Import backup in its Settings → Import & export (that replaces what it holds)"},{"id":"storage","path":"Settings → Data → Storage","words":["attachments","clear attachments","event log","cleanup","retention"],"advanced":true},{"id":"activity","path":"Settings → Data → Activity","words":["activity","audit","audit log","history","who did what"],"advanced":true,"only":"MausBot in a browser"},{"id":"members","path":"Settings → People → Members","words":["invite","roles","admins"],"only":"a team's or a self-hosted server's Settings, for admins"},diff --git a/src/components/settings/settings-index.ts b/src/components/settings/settings-index.tsindex 56baa81e7e..8fa274aec1 100644--- a/src/components/settings/settings-index.ts+++ b/src/components/settings/settings-index.ts@@ -182,6 +182,8 @@ export interface SettingsIndexEntry {jump?: "apps" | "automations" | "shortcuts" | "bot";/** where Simple mode shows this row, when that is another page than Advanced's (General's language on This app) */simple?: { page: SettingsPageId; anchor?: string };+ /** for bots only, in English: what the row is and the state it depends on, when its path alone would mislead */+ note?: string;}const desk = (ctx: SettingsContext) => ctx.desktop && !ctx.client;@@ -234,7 +236,8 @@ export const SETTINGS_INDEX: readonly SettingsIndexEntry[] = [{ id: "bring-in", page: "transfer", anchor: "bring-in", labelKey: "settings.data.bringIn", synonyms: ["import", "move from", "bring"] },{ id: "backup-export", page: "transfer", anchor: "take-out", labelKey: "backup.export", sectionKey: "settings.data.takeOut", topFor: ["backup", "backups", "export"], synonyms: ["full backup", "download"] },{ id: "take-out", page: "transfer", anchor: "take-out", labelKey: "settings.data.takeOut", synonyms: ["export", "backup"] },- { id: "move", page: "transfer", anchor: "move", labelKey: "settings.data.move", when: hereOnly, topFor: ["keep here", "move back", "bring back", "move to cloud"] },+ { id: "move", page: "transfer", anchor: "move", labelKey: "settings.data.move", when: hereOnly, topFor: ["keep here", "move back", "bring back", "move to cloud"],+ note: "it is the switch \"Keep this computer's bots on this computer\", shown only with a My Cloud of the person's own; off, this computer's bots move there. A Team plan's Cloud is a team, not My Cloud: to move all bots to a new one, Export full backup here, then Import backup in its Settings → Import & export (that replaces what it holds)" },{ id: "storage", page: "data", anchor: "storage", labelKey: "settings.data.storage", synonyms: ["attachments", "clear attachments", "event log", "cleanup", "retention"] },{ id: "activity", page: "data", anchor: "activity", labelKey: "settings.section.activity", when: browserAdmin, topFor: ["activity", "audit", "audit log"], synonyms: ["history", "who did what"] },{ id: "members", page: "people", anchor: "members", labelKey: "settings.people.members", synonyms: ["invite", "roles", "admins"] },diff --git a/src/components/settings/settings-places.ts b/src/components/settings/settings-places.tsindex 89a1b9c8d1..b0fa990114 100644--- a/src/components/settings/settings-places.ts+++ b/src/components/settings/settings-places.ts@@ -71,7 +71,7 @@ export function buildSettingsPlaces(labels: Readonly<Record<string, string>>): Sconst only = onlyOn((ctx) => page.when(ctx) && (entry.when?.(ctx) ?? true));places.push({id: entry.id, path, words: [...new Set([...(entry.topFor ?? []), ...(entry.synonyms ?? [])])],- ...(advanced ? { advanced: true as const } : {}), ...(simple ? { simplePath: simple } : {}), ...(only ? { only } : {}),+ ...(advanced ? { advanced: true as const } : {}), ...(simple ? { simplePath: simple } : {}), ...(only ? { only } : {}), ...(entry.note ? { note: entry.note } : {}),});}places.push(@@ -87,7 +87,8 @@ export function settingsPlacesFile(labels: Readonly<Record<string, string>>): st"// Written by scripts/gen-settings-places.ts from Settings' own index and the English catalog; edit those, then run it.","","/** A real place in Settings, as the person reads it in English. `advanced`: only Advanced mode shows it; `simplePath`:",- " * where Simple mode shows it instead. `only`: the one kind of place or app it shows on. */",+ " * where Simple mode shows it instead. `only`: the one kind of place or app it shows on. `note`: what it is and the state",+ " * it depends on, said with the path. */","export interface SettingsPlace {"," id: string;"," path: string;",@@ -95,6 +96,7 @@ export function settingsPlacesFile(labels: Readonly<Record<string, string>>): st" advanced?: true;"," simplePath?: string;"," only?: string;",+ " note?: string;","}","",`export const SETTINGS_HOW_TO_OPEN = ${JSON.stringify(HOW_TO_OPEN)};`,