Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Move status: keep telling the Admin another account's move holds this computer
milind-soni93ff31d16b0c
diff --git a/electron/app-permissions.node-test.mjs b/electron/app-permissions.node-test.mjsindex a7a61e2be3..93c15ad715 100644--- a/electron/app-permissions.node-test.mjs+++ b/electron/app-permissions.node-test.mjs@@ -271,7 +271,7 @@ test("the app installs these handlers, with its one rule for My Cloud and a waitassert.match(main, /cloudPageSenderAllowed\(event, \{ contents, homeOrigin: myCloud\(\),/);assert.doesNotMatch(main, /rememberedHome\??\.accountId/);assert.doesNotMatch(main, /remembered: true/);- assert.match(main, /cloudAccountRestoring = true;\n\s+cloudAccountStarted = ensureCloudAccount\(\)\.start\(\)\.catch\(\(\) => \{\}\)\.finally\(\(\) => \{ cloudAccountRestoring = false; \}\);/);+ assert.match(main, /cloudAccountRestoring = true;\n\s+cloudAccountStarted = ensureCloudAccount\(\)\.start\(\)\.catch\(\(\) => \{\}\)\.then\(\(\) => accountRing\(\)\?\.start\(\)\)\.finally\(\(\) => \{ cloudAccountRestoring = false; \}\);/);});const ADMIN = "http://127.0.0.1:9";diff --git a/electron/one-home-accounts.node-test.mjs b/electron/one-home-accounts.node-test.mjsindex 974dfdd932..236cfd83ba 100644--- a/electron/one-home-accounts.node-test.mjs+++ b/electron/one-home-accounts.node-test.mjs@@ -131,7 +131,7 @@ test("a move under way stays with its account when a second one signs in here",running.installed.close();});-test("Keep this computer's bots here isn't offered to B for A's move, and a move's status isn't reported through B's sign-in", async () => {+test("Keep this computer's bots here isn't offered to B for A's move, and A's move doesn't hold B", async () => {const f = main({ state: withCloud("b", CLOUD_B), accounts: 2, journal: movedToA("done"), marker: { frozen: true, cloud: CLOUD_A } });const keep = await f.handlers.get("one-home:keep")({});assert.equal(keep.shown, false);diff --git a/electron/one-home-main.mjs b/electron/one-home-main.mjsindex 7fde8f58f0..65af2ef967 100644--- a/electron/one-home-main.mjs+++ b/electron/one-home-main.mjs@@ -148,10 +148,7 @@ export function installOneHome({ localRequest, account, journalFile, tempRoot, lconst report = createMoveStatusReport({status,// A sign-in the Admin has ended (or that expired) only gets 401s until the person signs in again.- signIn: () => {- const state = account()?.state(), moved = parseJournal(journal.read());- return state?.status === "reauth-required" || (moved && state?.account?.id !== moved.cloud.account) ? null : state?.deviceId ?? null;- },+ signIn: () => { const state = account()?.state(); return state?.status === "reauth-required" ? null : state?.deviceId ?? null; },send: async (body) => (await account()?.reportMoveStatus?.(body)) === true,log,...(reportTimers ? { timers: reportTimers } : {}),