Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
fix(remote): offer full access first when pairing a self-hosted server
Azad Jagtap587661f0d6da
diff --git a/src/components/RemoteComputerSection.test.ts b/src/components/RemoteComputerSection.test.tsindex b253c499bc..524b179976 100644--- a/src/components/RemoteComputerSection.test.ts+++ b/src/components/RemoteComputerSection.test.ts@@ -53,7 +53,10 @@ describe("remote connection Settings", () => {expect(html).toContain('<option value="server" selected="">Self-hosted server</option>');expect(html).toContain('<option value="companion">Desktop companion</option>');expect(html).toContain("Server pairing link");- expect(html).toContain("npx openmausbot pair --client");+ // Full access first: only it can make a server you own your bots' home; chat-only says what it can't do.+ expect(html.indexOf('data-pair-access="full"')).toBeLessThan(html.indexOf('data-pair-access="client"'));+ expect(html).toMatch(/data-pair-access="full"[\s\S]*?Your own server: full access[\s\S]*?>npx openmausbot pair<\/code>/);+ expect(html).toMatch(/data-pair-access="client"[\s\S]*?chat and approvals only[\s\S]*?>npx openmausbot pair --client<\/code>[\s\S]*?make the server your bots[\s\S]{1,8}home/);expect(html).toContain("12-character code");expect(html).toContain("custom domains and Cloudflare Tunnel");expect(html).toContain("Connect to server");diff --git a/src/components/RemoteComputerSection.tsx b/src/components/RemoteComputerSection.tsxindex b6314b230d..798ea38e5e 100644--- a/src/components/RemoteComputerSection.tsx+++ b/src/components/RemoteComputerSection.tsx@@ -153,9 +153,16 @@ export function RemoteComputerSection({ hideWhenUnavailable = false }: { hideWhe<p className="text-[13px] leading-relaxed text-ink-secondary">{t("remote.client.server.hint")}</p>- <code className="select-all rounded-lg bg-inset px-3 py-2 text-[12px] text-ink">- npx openmausbot pair --client- </code>+ {/* A chat-only link cannot pass the ownership check behind "Make … my home", so full access comes first. */}+ <div data-pair-access="full" className="flex flex-col gap-1">+ <p className="text-[12px] font-medium text-ink">{t("remote.client.server.fullTitle")}</p>+ <code className="select-all rounded-lg bg-inset px-3 py-2 text-[12px] text-ink">npx openmausbot pair</code>+ </div>+ <div data-pair-access="client" className="flex flex-col gap-1">+ <p className="text-[12px] font-medium text-ink">{t("remote.client.server.clientTitle")}</p>+ <code className="select-all rounded-lg bg-inset px-3 py-2 text-[12px] text-ink">npx openmausbot pair --client</code>+ <p className="text-[12px] leading-relaxed text-ink-secondary">{t("remote.client.server.clientNote")}</p>+ </div><label className="flex flex-col gap-1.5 text-[12px] text-ink-secondary">{t("remote.client.server.pairingLink")}<inputdiff --git a/src/locales/en.json b/src/locales/en.jsonindex 4c4330aa86..886248f2dd 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -4296,6 +4296,9 @@"remote.client.connectionType": "Connection type","remote.client.server.option": "Self-hosted server","remote.client.server.hint": "On your server, run this command to create a fresh, single-use pairing link. Paste the full link below, including its 12-character code.",+ "remote.client.server.fullTitle": "Your own server: full access",+ "remote.client.server.clientTitle": "Someone else's server: chat and approvals only",+ "remote.client.server.clientNote": "A chat-only link can't make the server your bots' home, add bots or connect apps. Use full access for a server you own.","remote.client.server.pairingLink": "Server pairing link","remote.client.server.domainHint": "Supports your server’s HTTPS address, including custom domains and Cloudflare Tunnel.","remote.client.server.connect": "Connect to server",