Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Keep the hosted grace window open through shutdown and startup.
Shreerama94a8afd81024a
diff --git a/server/hosted-access.test.ts b/server/hosted-access.test.tsindex 259460ac7e..1b9f5cf8c8 100644--- a/server/hosted-access.test.ts+++ b/server/hosted-access.test.ts@@ -328,8 +328,9 @@ describe("hosted bridge in the full server", () => {await refuseFullTask();}, 25_000);it("withdraws hosted readiness the moment the running server's license grace period ends", async () => {- // Restart may use its whole 20s health wait. The grace must still be open then, and the poll must cover whatever is left.- const remainMs = 22_000;+ // The clock starts here, before restart. Shutdown may take its 5s signal plus 2s kill, then the health poll its 20s.+ // The grace stays open through that, and the poll covers whatever is left after a fast restart.+ const remainMs = 30_000;state("admin", false, { expiresAt: new Date(Date.now() + remainMs - 14 * 24 * 60 * 60_000).toISOString() });await restart({ OMB_ADMIN_MEMBERSHIP: "portal", OMB_SHARED_WORKSPACE_FULL_ACCESS: "1" });expect((await call("/api/health/hosted")).status).toBe(200);@@ -338,7 +339,7 @@ describe("hosted bridge in the full server", () => {expect((await call("/api/health")).status).toBe(200);await policyHealth(false);await refuseFullTask();- }, 60_000);+ }, 90_000);it("never activates the shared Full policy in a desktop-managed process", async () => {state();await policyBot();