Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Session route test: a phone token's refused config write is a PATCH
milind-sonic7b34f441499
diff --git a/companion/test/session-route.test.ts b/companion/test/session-route.test.tsindex 22cf36aa28..f63a7e27b8 100644--- a/companion/test/session-route.test.ts+++ b/companion/test/session-route.test.ts@@ -148,7 +148,7 @@ it("keeps the phone app's surface for everyone else", async () => {// Not over the encrypted route: a session token on the LAN listener gets no pass-through.expect((await send(null, lanPort, "PUT", "/api/config", { authorization: "Bearer omb_sess_abc" })).status).toBe(401);// Other routes and other tokens keep the allowlist.- expect((await send(await origin.connect(DEVICE), null, "PUT", "/api/config", { authorization: "Bearer phone-token" })).status).toBe(403);+ expect((await send(await origin.connect(DEVICE), null, "PATCH", "/api/config", { authorization: "Bearer phone-token" })).status).toBe(403);expect((await send(await origin.connect(DEVICE), null, "POST", "/api/auth/pair", { authorization: "Bearer phone-token" })).status).not.toBe(200);expect(received).toHaveLength(0);// The phone app's own allowed route still gets the companion's capability, never the session route's marking.