Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Connect to a server takes a link, an address and a code, or private http (#4763)

Milind Soniea32028545db
diff --git a/apps/docs/content/docs/security/analytics.mdx b/apps/docs/content/docs/security/analytics.mdx
index 46e8ce8a6a..9bba6baaa9 100644
--- a/apps/docs/content/docs/security/analytics.mdx
+++ b/apps/docs/content/docs/security/analytics.mdx
@@ -157,7 +157,7 @@ use their own Boat key, and how many bots run on cloud computers, without sendin
| `cloud_checkout_opened` | A Cloud checkout opens in the browser | `plan`: Cloud plan; `trial`: true/false; `source`: as for `cloud_dialog_shown` |
| `cloud_add_another` | Buying another Cloud, for someone who has one, takes a step | `step`: `plan` (a plan chosen), `checkout_opened`, `ready`; `plan`: Cloud plan, for `plan` and `checkout_opened` |
| `rail_place_opened` | You open a place from the rail of Clouds at the window's left edge | `kind`: `computer`, `cloud`, `team`, `server` |
-| `rail_add` | You use the rail's + | `step`: `opened` (its sheet opened), `cloud` (Buy a Cloud, on this computer's own sheet), `link` (Paste pairing link), `address` (Enter its address instead), `organization` (a new organization added on the Team plan) |
+| `rail_add` | You use the rail's + | `step`: `opened` (its sheet opened), `cloud` (Buy a Cloud, on this computer's own sheet), `link` (Connect to a server), `address` (Enter its address instead), `organization` (a new organization added on the Team plan) |
| `cloud_setup_started` | A new Cloud starts its first job | none |
| `cloud_intent_submitted` | You tell a new Cloud what to do first | `idea`: `digest`, `watch`, `research`, `plan`, or none for your own words; `edited`: true/false |
| `cloud_intent_skipped` | You skip that question | none |
diff --git a/docs/analytics.md b/docs/analytics.md
index 6a5e0ee23c..8a4e716ae4 100644
--- a/docs/analytics.md
+++ b/docs/analytics.md
@@ -153,7 +153,7 @@ use their own Boat key, and how many bots run on cloud computers, without sendin
| `cloud_checkout_opened` | A Cloud checkout opens in the browser | `plan`: Cloud plan; `trial`: true/false; `source`: as for `cloud_dialog_shown` |
| `cloud_add_another` | Buying another Cloud, for someone who has one, takes a step | `step`: `plan` (a plan chosen), `checkout_opened`, `ready`; `plan`: Cloud plan, for `plan` and `checkout_opened` |
| `rail_place_opened` | You open a place from the rail of Clouds at the window's left edge | `kind`: `computer`, `cloud`, `team`, `server` |
-| `rail_add` | You use the rail's + | `step`: `opened` (its sheet opened), `cloud` (Buy a Cloud, on this computer's own sheet), `link` (Paste pairing link), `address` (Enter its address instead), `organization` (a new organization added on the Team plan) |
+| `rail_add` | You use the rail's + | `step`: `opened` (its sheet opened), `cloud` (Buy a Cloud, on this computer's own sheet), `link` (Connect to a server), `address` (Enter its address instead), `organization` (a new organization added on the Team plan) |
| `cloud_setup_started` | A new Cloud starts its first job | none |
| `cloud_intent_submitted` | You tell a new Cloud what to do first | `idea`: `digest`, `watch`, `research`, `plan`, or none for your own words; `edited`: true/false |
| `cloud_intent_skipped` | You skip that question | none |
diff --git a/docs/headless-cli.md b/docs/headless-cli.md
index 2a081ffc0a..6eac07c11f 100644
--- a/docs/headless-cli.md
+++ b/docs/headless-cli.md
@@ -20,8 +20,9 @@ files it links, and writes everything to `./rehearsal`.
## Which workspace, and as whom
-- `--url URL` or `OPENMAUSBOT_URL`: a workspace somewhere else. Use `https://`
- unless it is this computer (`ALLOW_INSECURE_HTTP=true` allows plain `http://`).
+- `--url URL` or `OPENMAUSBOT_URL`: a workspace somewhere else. `https://`
+ works anywhere; plain `http://` works only on this computer or a private
+ network (a LAN address, Tailscale's 100.x or `*.ts.net`, `*.local`).
- `--port N` or `OMB_PORT`: this computer, on that port.
- Otherwise the command looks on this computer's usual ports (8799, 18799,
28799), as the desktop app uses them.
@@ -30,13 +31,15 @@ On this computer a headless server treats you as its owner, and no token is
needed. Anywhere else you need a token:
```sh
-openmausbot connect https://maus.example.com --code ABCD1234 --out ~/.openmausbot-token
+openmausbot connect https://maus.example.com --code 7KQ2-M9XD-H4TP --out ~/.openmausbot-token
openmausbot doctor --url https://maus.example.com --token-file ~/.openmausbot-token
```
-Get the code in the app under **Settings → Phone → Set up a phone**, or on
-the server with `openmausbot pair --client --ttl 24h` (a code lasts five
-minutes unless `--ttl` says otherwise, at most a day, and works once). On this
+`connect` also takes the whole link the server printed
+(`https://maus.example.com/pair#code=…`), so `--code` can be left out then.
+Make the pairing code on the server with `openmausbot pair` (add
+`--client --ttl 24h` for a chat-only code that stays open up to a day; a code
+works once). On this
computer's own server, `connect` makes the code itself (`--client` gives a
token that can chat but not change settings). The token goes to a file only
you can read, and is never printed. Pass it with `--token-file FILE` or
diff --git a/docs/mcp-server.md b/docs/mcp-server.md
index a071dc4f0d..ceb7604a03 100644
--- a/docs/mcp-server.md
+++ b/docs/mcp-server.md
@@ -109,8 +109,8 @@ With no configuration, the MCP process probes OpenMausBot's three desktop ports
and accepts only a health response that identifies itself as OpenMausBot. This handles the desktop's normal
fallback when another local process already owns port 8799.
-Set `OMB_PORT` to force one local port, or `OPENMAUSBOT_URL` to use an explicit HTTP(S) origin. Cleartext remote
-HTTP is rejected unless `ALLOW_INSECURE_HTTP=true`; HTTPS should be used outside loopback. An optional
+Set `OMB_PORT` to force one local port, or `OPENMAUSBOT_URL` to use an explicit HTTP(S) origin. Plain HTTP is
+accepted only for loopback and private networks (LAN addresses, Tailscale, `*.local`); anything else needs HTTPS. An optional
`OPENMAUSBOT_TOKEN` is sent as a bearer token for authenticated reverse proxies. When a token is set, an
explicit `OPENMAUSBOT_URL` or `OMB_PORT` is required so the credential is never sent while probing unrelated
local ports. `OPENMAUSBOT_MCP_TIMEOUT_MS` can set an HTTP timeout between 1,000 and 120,000 milliseconds.
diff --git a/electron/bridge-contract.json b/electron/bridge-contract.json
index a9487df60c..2b21759923 100644
--- a/electron/bridge-contract.json
+++ b/electron/bridge-contract.json
@@ -245,6 +245,7 @@
"workspaces.onChanged",
"workspaces.open",
"workspaces.places",
+ "workspaces.probe",
"workspaces.recolor",
"workspaces.remove",
"workspaces.state"
diff --git a/electron/cloud-home.node-test.mjs b/electron/cloud-home.node-test.mjs
index 01ab99a5eb..a7d493a0cc 100644
--- a/electron/cloud-home.node-test.mjs
+++ b/electron/cloud-home.node-test.mjs
@@ -9,6 +9,7 @@ import environments from "./environments.cjs";
import { handSaved } from "./own-home-main.mjs";
import { homeLook, withoutOldCloudHome } from "./cloud-list.mjs";
import nativeText from "./native-text.cjs";
+import { pairingPageUrl, parseServerInput } from "./server-address.mjs";
const NOW = 1_800_000_000_000;
const origin = "https://omb-u-1a2b3c4d5e6f.fly.dev";
@@ -99,7 +100,8 @@ test("connecting uses the pairing page with the code in the hash, or the machine
assert.equal(cloudHomeConnectUrl({ origin, grant: { origin, code, expiresAt: NOW + 1 } }, NOW, "phone"), `${origin}/pair?desktop-settings=phone#code=${code}`);
assert.equal(cloudHomeConnectUrl({ origin, grant: null }, NOW, "phone"), `${origin}/?desktop-settings=phone`);
assert.equal(cloudHomeConnectUrl({ origin, grant: null }, NOW, "evil"), origin);
- assert.deepEqual(environments.parseHostedWorkspaceLink(`${origin}/pair#code=${code}`), { origin, code, url: `${origin}/pair#code=${code}` });
+ const parsed = parseServerInput(`${origin}/pair#code=${code}`);
+ assert.deepEqual([parsed.candidates, parsed.code, pairingPageUrl(origin, parsed.code)], [[origin], code, `${origin}/pair#code=${code}`]);
});
const accessToken = `omc_${"T".repeat(43)}`;
diff --git a/electron/cloud-rail.mjs b/electron/cloud-rail.mjs
index cd7433453f..b81bdd6b39 100644
--- a/electron/cloud-rail.mjs
+++ b/electron/cloud-rail.mjs
@@ -231,11 +231,16 @@ export function installCloudRail({ ipcMain, guard, trusted, lists = trusted, bes
throw new Error(t("native.places.noLongerHere"));
});
listed("workspaces:local-remove", (_event, id) => local.remove(profileListed(id)));
- // A link pasted on +'s sheet goes to main's own Connect dialog, which checks it and names its host before connecting.
- listed("workspaces:add", (_event, choice, link) => {
+ // The Connect sheet's address (a link, or an address with the code typed apart): main finds the server there first,
+ // then connects only to what it found.
+ listed("workspaces:add", (_event, choice, link, code) => {
if (!CHOICES.includes(choice) || !add.choices()[choice]) throw new Error(t("native.places.cannotAdd"));
const pasted = choice === "link" ? plain(link).trim().slice(0, 4096) : "";
- return pasted ? add.run(choice, pasted) : add.run(choice);
+ return pasted ? add.run(choice, pasted, typeof code === "string" ? code.trim().slice(0, 256) : null) : add.run(choice);
+ });
+ listed("workspaces:probe", (_event, address, code) => {
+ if (!add.choices().link || !add.probe) throw new Error(t("native.places.cannotAdd"));
+ return add.probe(plain(address).trim().slice(0, 4096), plain(code).trim().slice(0, 256));
});
handle("cloud-add:state", () => view());
handle("cloud-add:start", async (_event, tier, name, color, source) => {
diff --git a/electron/cloud-rail.node-test.mjs b/electron/cloud-rail.node-test.mjs
index 6f0fc1d037..2fe751e3f5 100644
--- a/electron/cloud-rail.node-test.mjs
+++ b/electron/cloud-rail.node-test.mjs
@@ -116,7 +116,7 @@ function rail(over = {}) {
const installed = installCloudRail({ ipcMain: { handle: (channel, handler) => handlers.set(channel, handler) }, guard: handler => handler, trusted: () => w.trusted,
lists: () => w.lists, beside: () => w.beside,
places: () => railPlaces({ saved: saved(), home: HOME, mine: HOME, state: w.state }), open: id => opened.push(id), account: () => account,
- add: { choices: () => ({ cloud: true, link: true, address: false }), run: (...args) => ran.push(args) }, clipboard: { writeText: text => sent.push(text) },
+ add: { choices: () => ({ cloud: true, link: true, address: false }), run: (...args) => ran.push(args), probe: (...args) => ran.push(["probe", ...args]) }, clipboard: { writeText: text => sent.push(text) },
openCloud: async id => opened.push(`cloud:${id}`), targets: () => [{ isDestroyed: () => false, send: (channel) => sent.push(`page:${channel}`) }, null,
{ isDestroyed: () => false, send: (channel) => sent.push(`rail:${channel}`) }], ...over });
return { handlers, opened, ran, sent, w, installed, call: (channel, ...args) => handlers.get(channel)({ sender: {} }, ...args) };
@@ -141,10 +141,13 @@ test("the rail's channels: the list only for the rail's own page, a circle only
r.call("workspaces:add", "link", " https://bots.example.test/#pair=abc ");
r.call("workspaces:add", "link", { href: "https://evil.example.test" });
r.call("workspaces:add", "link", "x".repeat(5000));
+ r.call("workspaces:add", "link", "192.168.1.20:8799", " abcd-efgh-jklm ");
+ r.call("workspaces:probe", " 192.168.1.20:8799 ", { code: "x" });
assert.throws(() => r.call("workspaces:add", "address"), /isn't something/, "not offered here");
assert.throws(() => r.call("workspaces:add", "javascript:alert(1)"), /isn't something/);
- assert.deepEqual([r.opened, r.ran], [["a"], [["link"], ["link", "https://bots.example.test/#pair=abc"], ["link"], ["link", "x".repeat(4096)]]],
- "a pasted link reaches main's own Connect dialog trimmed and bounded; anything but text is the clipboard's");
+ assert.deepEqual([r.opened, r.ran], [["a"], [["link"], ["link", "https://bots.example.test/#pair=abc", null], ["link"], ["link", "x".repeat(4096), null],
+ ["link", "192.168.1.20:8799", "abcd-efgh-jklm"], ["probe", "192.168.1.20:8799", ""]]],
+ "a pasted link reaches main trimmed and bounded, with the code typed apart when the sheet sends one; anything but text is the clipboard's");
r.installed.changed(); r.installed.changed();
assert.deepEqual(r.sent, ["page:workspaces:changed", "rail:workspaces:changed"], "a signal only, to the page and the rail, and once per change");
r.w.beside = true;
@@ -322,7 +325,7 @@ function preload(origin, { activation = false } = {}) {
test("a Cloud's page gets the rail and the add sheet's narrow bridges; a circle, + and checkout open only from the person's click", async () => {
const page = preload(HOME);
- assert.deepEqual(Object.keys(page.bridge.workspaces), ["state", "menu", "line", "places", "open", "add", "look", "color", "recolor", "remove", "makeHome", "onChanged", "local", "onNewLocal"]);
+ assert.deepEqual(Object.keys(page.bridge.workspaces), ["state", "menu", "line", "places", "open", "add", "probe", "look", "color", "recolor", "remove", "makeHome", "onChanged", "local", "onNewLocal"]);
assert.deepEqual(Object.keys(page.bridge.cloudAdd), ["state", "start", "reopen", "copyLink", "open", "interest", "sheet", "organization"]);
await page.bridge.workspaces.places();
await page.bridge.cloudAdd.state();
diff --git a/electron/computer-sharing.mjs b/electron/computer-sharing.mjs
index 8394aab5a2..dbe42969a2 100644
--- a/electron/computer-sharing.mjs
+++ b/electron/computer-sharing.mjs
@@ -4,6 +4,7 @@ import path from "node:path";
import os from "node:os";
import { randomBytes, randomUUID } from "node:crypto";
import { setTimeout as delay } from "node:timers/promises";
+import { allowedServerOrigin } from "./server-address.mjs";
import { createSharedCua, executeSharedOperation, personalSecretPaths, sharedComputerError, validCommandSeconds } from "./shared-computer-access.mjs";
import { createLentMcp, LENT_MCP_ACTIONS, validLentMcpServer } from "./lent-mcp.mjs";
import { sharedCuaConnection } from "./shared-cua-connection.mjs";
@@ -332,8 +333,7 @@ export function createComputerSharing({ file, fetch: fetchImpl, environments, lo
return ownGates.get(env.id);
};
const request = async (env, route, body, signal, secret) => {
- const origin = new URL(env.origin);
- if (origin.protocol !== "https:" && !(origin.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(origin.hostname))) throw new Error("Computer sharing requires an HTTPS server address");
+ if (!allowedServerOrigin(env.origin)) throw new Error("Computer sharing needs the server's HTTPS address, or one on your own network");
const response = await fetchImpl(`${env.origin}${route}`, {
method: body === undefined ? "GET" : "POST", credentials: "include", redirect: "error", cache: "no-store",
signal: signal ? AbortSignal.any([signal, AbortSignal.timeout(35_000)]) : AbortSignal.timeout(10_000),
diff --git a/electron/environments.cjs b/electron/environments.cjs
index 595d1424c2..0163bfb709 100644
--- a/electron/environments.cjs
+++ b/electron/environments.cjs
@@ -33,45 +33,6 @@ function normalizeOrigin(input) {
return url.origin;
}
-function parsePairingLink(input) {
- const origin = normalizeOrigin(input);
- if (!origin) return null;
- let url;
- try {
- url = new URL(input.trim());
- } catch {
- return null;
- }
- // A code travels in the hash only: a query string reaches server logs.
- if (url.searchParams.has("code")) return null;
- const code = /(?:^|[#&])code=([^&]+)/.exec(url.hash)?.[1] ?? null;
- const isPairPage = url.pathname === "/pair" || url.pathname === "/pair/";
- if (code && !isPairPage) return null;
- try {
- return { origin, code: code ? decodeURIComponent(code) : null, url: code ? `${origin}/pair#code=${code}` : origin };
- } catch {
- return null;
- }
-}
-
-function parseHostedWorkspaceLink(input) {
- if (typeof input !== "string") return null;
- const text = input.trim();
- if (!text || /[\s\\]/.test(text)) return null;
- try {
- const url = new URL(text.includes("://") ? text : `https://${text}`);
- const loopback = ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname);
- if (url.protocol !== "https:" && !(url.protocol === "http:" && loopback)) return null;
- if (url.username || url.password || url.search || !["/", "/pair", "/pair/"].includes(url.pathname)) return null;
- if (!loopback && !url.hostname.includes(".")) return null;
- const parsed = parsePairingLink(url.href);
- if (!parsed || (url.hash && (!parsed.code || !/^[A-Z0-9-]{12,16}$/i.test(parsed.code)))) return null;
- return parsed;
- } catch {
- return null;
- }
-}
-
/** Remote renderers learn only their current workspace, never the local list. */
function workspaceSummary(state) {
const active = activeEnvironment(state);
@@ -514,8 +475,6 @@ module.exports = {
normalizeOrigin,
otherPlaces,
parseEnvironments,
- parsePairingLink,
- parseHostedWorkspaceLink,
savedPlace,
serializeEnvironments,
startupEnvironmentDir,
diff --git a/electron/environments.node-test.mjs b/electron/environments.node-test.mjs
index b9e5962620..290548e107 100644
--- a/electron/environments.node-test.mjs
+++ b/electron/environments.node-test.mjs
@@ -2,6 +2,8 @@ import assert from "node:assert/strict";
import { test } from "node:test";
import { createRequire } from "node:module";
+import { parseServerInput } from "./server-address.mjs";
+
const require = createRequire(import.meta.url);
const env = require("./environments.cjs");
const { createNativeText } = require("./native-text.cjs");
@@ -13,23 +15,10 @@ test("origins are bare http(s) origins, nothing else", () => {
for (const bad of ["ftp://x", "mini.example", "https://user:pw@host", "", 42, null]) assert.equal(env.normalizeOrigin(bad), null, String(bad));
});
-test("a pairing link keeps its code in the hash; a code anywhere else is refused", () => {
- assert.deepEqual(env.parsePairingLink("https://mini.example/pair#code=ABCD-EFGH-JKLM"), {
- origin: "https://mini.example",
- code: "ABCD-EFGH-JKLM",
- url: "https://mini.example/pair#code=ABCD-EFGH-JKLM",
- });
- assert.deepEqual(env.parsePairingLink(" https://mini.example "), { origin: "https://mini.example", code: null, url: "https://mini.example" });
- assert.equal(env.parsePairingLink("https://mini.example/?code=ABCD"), null);
- assert.equal(env.parsePairingLink("not a link"), null);
-});
-
test("self-hosted pairing supports custom HTTPS and Cloudflare names without Tailscale", () => {
for (const origin of ["https://bots.example.com", "https://example.trycloudflare.com", "https://c-example.openmausbot.com"]) {
- const link = `${origin}/pair#code=ABCD-EFGH-JKLM`;
- assert.deepEqual(env.parsePairingLink(link), {
- origin, code: "ABCD-EFGH-JKLM", url: link,
- });
+ const parsed = parseServerInput(`${origin}/pair#code=ABCD-EFGH-JKLM`);
+ assert.deepEqual([parsed.candidates, parsed.code], [[origin], "ABCD-EFGH-JKLM"]);
const saved = env.withEnvironment({ environments: [], activeId: "local" }, { origin, name: "My server" }, () => "fixture");
assert.equal(saved.environments[0].origin, origin);
assert.ok(!env.serializeEnvironments(saved).includes("ABCD"), "pairing codes must not enter saved server records");
@@ -79,24 +68,6 @@ test("adding the same server twice updates the name instead of duplicating; forg
assert.equal(env.activeEnvironment(state), null);
});
-test("hosted workspace input accepts addresses and keeps valid codes only in the fragment", () => {
- for (const address of ["bots.company.com", " https://bots.company.com/ ", "https://bots.company.com:8443"]) {
- const parsed = env.parseHostedWorkspaceLink(address);
- assert.ok(parsed);
- assert.equal(parsed.code, null);
- assert.equal(parsed.url, parsed.origin);
- }
- const parsed = env.parseHostedWorkspaceLink("https://bots.company.com/pair#code=ABCD%2DEFGH%2DJKLM");
- assert.equal(parsed.code, "ABCD-EFGH-JKLM");
- assert.ok(parsed.url.includes("#code="));
- assert.ok(!parsed.origin.includes("ABCD"));
- assert.ok(env.parseHostedWorkspaceLink("http://127.0.0.1:19999"));
- for (const bad of ["", null, "ABCD-EFGH-JKLM", "https:example.com", "http://cloud.example.com", "https://a.example/other", "https://a.example/?code=SECRET", "https://a.example/pair#code=%", "https://a.example/pair#code=", "https://a.example/pair#code=%20", "https://user:[email protected]", "https://a.example\\@b.example", "javascript:alert(1)"]) {
- assert.equal(env.parseHostedWorkspaceLink(bad), null, String(bad));
- }
- assert.equal(env.parsePairingLink("https://a.example/pair#code=%"), null);
-});
-
test("workspace shell exposes only current identity and rejects subframes and unrelated windows", () => {
const state = { environments: [{ id: "cloud", name: "Acme", origin: "https://acme.example" }], activeId: "cloud" };
assert.deepEqual(env.workspaceSummary(state), { local: false, name: "Acme", origin: "https://acme.example" });
diff --git a/electron/main.mjs b/electron/main.mjs
index e8622dbd0f..af83fc2690 100644
--- a/electron/main.mjs
+++ b/electron/main.mjs
@@ -87,6 +87,7 @@ import {
} from "./companion-account-service.mjs";
import capabilitiesModule from "./capabilities.cjs";
import environmentsModule from "./environments.cjs";
+import { pairingPageUrl } from "./server-address.mjs"; import { createServerConnect } from "./server-probe.mjs";
import localOriginModule from "./local-origin.cjs";
import { buildApplicationMenu } from "./menu.mjs";
import { createComputerSharing, isHomeFolder, validateSharedFolders } from "./computer-sharing.mjs"; import { ownEnvironmentIds } from "./lent-mcp.mjs";
@@ -1417,7 +1418,7 @@ ipcMain.on("desktop:unread-count", (event, value) => {
applyUnreadBadge(sender);
});
-const { LOCAL_ID, activeEnvironment, activeRemote, allowedOrigins, bootEnvironmentDir, otherPlaces, parseHostedWorkspaceLink, savedPlace, startupEnvironmentDir, withActive, withEnvironment, withEnvironmentLook, withLocalEnvironment, withMicrophone, withPlaceColor, withoutEnvironment, withOwnCloud, withTeam, placesMenuOptions, workspaceMenuTemplate, workspaceNavigationAllowed, workspaceSenderAllowed, workspaceSummary, workspaceWindowTitle } = environmentsModule;
+const { LOCAL_ID, activeEnvironment, activeRemote, allowedOrigins, bootEnvironmentDir, otherPlaces, savedPlace, startupEnvironmentDir, withActive, withEnvironment, withEnvironmentLook, withLocalEnvironment, withMicrophone, withPlaceColor, withoutEnvironment, withOwnCloud, withTeam, placesMenuOptions, workspaceMenuTemplate, workspaceNavigationAllowed, workspaceSenderAllowed, workspaceSummary, workspaceWindowTitle } = environmentsModule;
let environmentsState = { environments: [], activeId: LOCAL_ID };
let computerSharing;
const sharingPrompts = new Set();
@@ -1818,28 +1819,16 @@ async function addServerFromClipboard() {
}
}
-async function connectHostedWorkspace(input, name) {
- const link = parseHostedWorkspaceLink(input);
- if (!link) {
- throw new Error(nativeT("native.dialog.connect.badLink"));
- }
- const host = new URL(link.origin).host;
- const { response } = await dialog.showMessageBox({
- type: "question",
- buttons: [nativeT("native.dialog.connect.button"), nativeT("native.common.cancel")],
- defaultId: 0,
- cancelId: 1,
- message: nativeT("native.dialog.connect.title", { host }),
- detail: nativeT(link.code ? "native.dialog.connect.withCode" : "native.dialog.connect.noCode"),
- });
- if (response !== 0) return false;
- let next = withEnvironment(environmentsState, { origin: link.origin, name }, () => randomUUID());
- const added = next.environments.find((e) => e.origin === link.origin);
- next = withActive(next, added.id);
- persistEnvironments(next);
- navigateMainWindow(link.url);
- return true;
-}
+const serverConnect = createServerConnect({ fetch: (...args) => session.defaultSession.fetch(...args), t: nativeT,
+ ownEnvironmentId: async () => (await (await localServerRequest("/.well-known/openmausbot/environment")).json())?.environmentId ?? null,
+ ask: async (found) => (await dialog.showMessageBox({ type: "question", buttons: [nativeT("native.dialog.connect.button"), nativeT("native.common.cancel")], defaultId: 0, cancelId: 1,
+ message: nativeT("native.dialog.connect.title", { host: found.label }), detail: nativeT(found.code || found.credential ? "native.dialog.connect.withCode" : "native.dialog.connect.noCode") })).response === 0,
+ open: (found, name) => {
+ const next = withEnvironment(environmentsState, { origin: found.origin, name: name ?? found.label }, () => randomUUID());
+ persistEnvironments(withActive(next, next.environments.find((e) => e.origin === found.origin).id));
+ navigateMainWindow(pairingPageUrl(found.origin, found.code ?? found.credential));
+ } });
+const connectHostedWorkspace = (input, name) => serverConnect.connectAsking(input, name);
/** My Cloud, and each team's Cloud the session lists (home-places.mjs), under Servers. */
function rememberCloudHome(state) {
@@ -2682,7 +2671,7 @@ const rail = installCloudRail({ t: nativeT, ipcMain, clipboard, openCloud: openO
targets: () => [mainWindow && !mainWindow.isDestroyed() ? mainWindow.webContents : null, { send: channel => chromeRail.send(channel), isDestroyed: () => false }],
places: railList, open: id => workspaceMenuAction(() => switchEnvironment(id)), makeHome: id => ownHome.start(id), forget: id => forgetEnvironment(id, false, true), openProfile: id => workspaceMenuAction(async () => { const opened = await localProfiles.open(id); railChanged(); if (opened === false) throw new Error(nativeT("native.places.profileFailed")); }), local: localProfiles,
add: { choices: () => ({ cloud: cloudOffersAllowed(), link: !desktopRemoteAccess, address: !desktopRemoteAccess && !homeWindow.cloudOrigin(), account: !desktopRemoteAccess && Boolean(accounts.view().active) }),
- run: (choice, link) => (choice === "link" ? (link ? connectHostedWorkspace(link) : addServerFromClipboard()) : choice === "address" ? openWorkspaceSettings() : homeWindow.cloudOrigin() ? undefined : openCloudAdd("app_menu")) } });
+ probe: serverConnect.probe, run: (choice, link, code) => (choice === "link" ? (link ? (code === null ? connectHostedWorkspace(link) : serverConnect.connect(link, code)) : addServerFromClipboard()) : choice === "address" ? openWorkspaceSettings() : homeWindow.cloudOrigin() ? undefined : openCloudAdd("app_menu")) } });
const announceAddedCloud = createAddedCloudNotice({ t: nativeT, Notification, focused: () => Boolean(mainWindow && !mainWindow.isDestroyed() && mainWindow.isFocused()), sheetOpen: rail.sheetOpen,
open: id => { if (!desktopTray?.show()) activateExistingWindow(appWindows()); void openOwnCloud(id); }, shown: () => cloudAccount?.addDone() }); const desktopNotifications = installDesktopNotifications({ ipcMain, Notification, nativeImage, fetch: (...args) => session.defaultSession.fetch(...args), window: () => mainWindow, mayNotify: (contents, url) => appPermissions?.check(contents, "notifications", url, { isMainFrame: true }) === true, reveal: revealForLink, openPlace: origin => (origin === homeWindow.cloudOrigin() ? showHome({ place: "cloud" }) : workspaceMenuAction(() => switchEnvironment(origin === rendererOrigin() ? LOCAL_ID : environmentsState.environments.find(entry => entry.origin === origin)?.id))) });
// A place's colour (place-look.mjs): the Admin's for a Cloud, this app's for This computer and a server connected by
diff --git a/electron/preload.cjs b/electron/preload.cjs
index b48cc52ea9..f4b3137111 100644
--- a/electron/preload.cjs
+++ b/electron/preload.cjs
@@ -154,8 +154,9 @@ const bridge = {
places: () => ipcRenderer.invoke("workspaces:places"),
open: (id) => isLocalPage || navigator.userActivation?.isActive === true
? ipcRenderer.invoke("workspaces:open", String(id)) : Promise.reject(new Error("Choose a place to open it.")),
- add: (choice, link) => isLocalPage || navigator.userActivation?.isActive === true
- ? ipcRenderer.invoke("workspaces:add", String(choice), ...(typeof link === "string" ? [link] : [])) : Promise.reject(new Error("Choose what to add.")),
+ add: (choice, link, code) => isLocalPage || navigator.userActivation?.isActive === true
+ ? ipcRenderer.invoke("workspaces:add", String(choice), ...(typeof link === "string" ? [link, ...(typeof code === "string" ? [code] : [])] : [])) : Promise.reject(new Error("Choose what to add.")),
+ probe: (address, code) => ipcRenderer.invoke("workspaces:probe", String(address ?? ""), String(code ?? "")),
// The colour of the place this page is (never another's): read, and changed only from the person's click.
look: () => ipcRenderer.invoke("workspaces:look"),
color: (swatch) => isLocalPage || navigator.userActivation?.isActive === true
diff --git a/electron/remote-microphone-permission.node-test.mjs b/electron/remote-microphone-permission.node-test.mjs
index a26addc116..5ece7c6104 100644
--- a/electron/remote-microphone-permission.node-test.mjs
+++ b/electron/remote-microphone-permission.node-test.mjs
@@ -3,6 +3,7 @@ import { readFileSync } from "node:fs";
import { createRequire } from "node:module";
import test from "node:test";
import { appPermissionHandlers } from "./app-permissions.mjs";
+import { parseServerInput } from "./server-address.mjs";
const require = createRequire(import.meta.url);
const environments = require("./environments.cjs");
@@ -60,7 +61,7 @@ test("a saved server's page is refused the microphone until the person allows it
});
test("an address typed before pairing gets no microphone on its own (the review's repro)", async () => {
- const typed = environments.parseHostedWorkspaceLink("stranger-server.example.com");
+ const typed = { origin: parseServerInput("stranger-server.example.com").candidates[0] };
let s = environments.withEnvironment({ environments: [], activeId: environments.LOCAL_ID }, { origin: typed.origin }, () => "typed");
s = environments.withActive(s, "typed");
const h = harness(s);
diff --git a/electron/server-address.d.mts b/electron/server-address.d.mts
new file mode 100644
index 0000000000..30096a93a4
--- /dev/null
+++ b/electron/server-address.d.mts
@@ -0,0 +1,27 @@
+export declare const PAIRING_CODE_ALPHABET: string;
+export declare const PAIRING_CODE_LENGTH: number;
+export declare const EXAMPLE_ADDRESS: string;
+
+export type PairingCodeProblem = "emailCode" | "oldCode" | "scriptKey" | "notACode";
+export type PairingCodeInput =
+ | { kind: "code"; code: string }
+ | { kind: "credential"; credential: string }
+ | { kind: "wrong"; problem: PairingCodeProblem }
+ | { kind: "empty" };
+
+export type ServerInputProblem = "empty" | "codeOnly" | "publicHttp" | "phoneLink" | "notAnAddress" | PairingCodeProblem;
+export type ServerInput =
+ | { ok: true; candidates: string[]; code: string | null; credential: string | null }
+ | { ok: false; problem: ServerInputProblem; code?: string; host?: string };
+
+export type ServerTransport = "https" | "tailscale" | "private-http" | "loopback";
+
+export declare function isLoopbackHost(host: string): boolean;
+export declare function isPrivateHost(host: string): boolean;
+export declare function serverTransport(origin: string): ServerTransport;
+export declare function allowedServerOrigin(origin: string): boolean;
+export declare function normalizePairingCode(input: string): string;
+export declare function formatPairingCode(code: string): string;
+export declare function readPairingCode(raw: string): PairingCodeInput;
+export declare function parseServerInput(addressInput: string, codeInput?: string): ServerInput;
+export declare function pairingPageUrl(origin: string, secret: string | null): string;
diff --git a/electron/server-address.mjs b/electron/server-address.mjs
new file mode 100644
index 0000000000..9b09004ce2
--- /dev/null
+++ b/electron/server-address.mjs
@@ -0,0 +1,164 @@
+// What a person types or pastes to reach a MausBot server: a pairing link, an address, an address and a code typed
+// apart, or a code on its own. One reader for the desktop's Connect sheet, `openmausbot connect` and the MCP bridge.
+
+export const PAIRING_CODE_ALPHABET = "23456789ABCDEFGHJKLMNPQRSTUVWXYZ";
+export const PAIRING_CODE_LENGTH = 12;
+const PAIRING_CREDENTIAL = /^omb_pair_[A-Za-z0-9_-]{43}$/;
+/** The port `openmausbot serve` listens on, used in examples only. */
+export const EXAMPLE_ADDRESS = "http://192.168.1.20:8799";
+
+const bareHost = (host) => String(host ?? "").trim().toLowerCase().replace(/^\[|\]$/g, "").replace(/\.$/, "");
+
+function ipv4(host) {
+ const parts = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(host);
+ if (!parts) return null;
+ const octets = parts.slice(1).map(Number);
+ return octets.some((octet) => octet > 255) ? null : octets;
+}
+
+export function isLoopbackHost(host) {
+ const name = bareHost(host);
+ const v4 = ipv4(name);
+ return name === "localhost" || name.endsWith(".localhost") || name === "::1" || (v4 !== null && v4[0] === 127);
+}
+
+/**
+ * A host only this machine or a network the person runs can reach: loopback, RFC 1918, CGNAT 100.64/10 (Tailscale),
+ * link-local, IPv6 unique-local, `*.ts.net`, `*.local`, `*.home.arpa` and single-label names. Plain http stays on
+ * such a network; any other host is the open internet, where http would carry the session in clear.
+ */
+export function isPrivateHost(host) {
+ const name = bareHost(host);
+ if (!name) return false;
+ const v4 = ipv4(name);
+ if (v4) {
+ const [a, b] = v4;
+ return a === 127 || a === 10 || (a === 172 && b >= 16 && b <= 31) || (a === 192 && b === 168) || (a === 169 && b === 254) || (a === 100 && b >= 64 && b <= 127);
+ }
+ if (/^\d+(\.\d+){0,3}$/.test(name)) return false;
+ if (name.includes(":")) return name === "::1" || /^f[cd][0-9a-f]{0,2}:/.test(name) || /^fe[89ab][0-9a-f]?:/.test(name);
+ if (isLoopbackHost(name) || [".ts.net", ".local", ".home.arpa"].some((suffix) => name.endsWith(suffix))) return true;
+ return !name.includes(".") && /^[a-z0-9-]+$/.test(name);
+}
+
+/** How a saved server is reached, for the line under its name. */
+export function serverTransport(origin) {
+ const url = new URL(origin);
+ if (url.protocol === "https:") return url.hostname.endsWith(".ts.net") ? "tailscale" : "https";
+ return isLoopbackHost(url.hostname) ? "loopback" : "private-http";
+}
+
+/** An origin a client may talk to: https anywhere, http only on a private network. Everything else is refused. */
+export function allowedServerOrigin(origin) {
+ try {
+ const url = new URL(origin);
+ if (url.username || url.password) return false;
+ return url.protocol === "https:" || (url.protocol === "http:" && isPrivateHost(url.hostname));
+ } catch {
+ return false;
+ }
+}
+
+export function normalizePairingCode(input) {
+ return String(input).toUpperCase().replace(/[^A-Z0-9]/g, "").replace(/0/g, "O").replace(/1/g, "I");
+}
+
+export function formatPairingCode(code) {
+ return normalizePairingCode(code).match(/.{1,4}/g)?.join("-") ?? code;
+}
+
+/**
+ * A pairing code as typed: `{ kind: "code", code }` (formatted XXXX-XXXX-XXXX), the high-entropy credential a QR may
+ * carry, nothing, or the wrong kind of secret with what it is: an emailed sign-in code (8 digits), a code from an older
+ * MausBot (6 digits), a script key (`omb_sess_…`), or not a code at all.
+ */
+export function readPairingCode(raw) {
+ const value = String(raw ?? "").trim();
+ if (!value) return { kind: "empty" };
+ if (value.startsWith("omb_sess_")) return { kind: "wrong", problem: "scriptKey" };
+ if (value.startsWith("omb_pair_")) return PAIRING_CREDENTIAL.test(value) ? { kind: "credential", credential: value } : { kind: "wrong", problem: "notACode" };
+ const digits = value.replace(/[\s-]/g, "");
+ if (/^\d{8}$/.test(digits)) return { kind: "wrong", problem: "emailCode" };
+ if (/^\d{6}$/.test(digits)) return { kind: "wrong", problem: "oldCode" };
+ const code = normalizePairingCode(value);
+ if (code.length !== PAIRING_CODE_LENGTH || [...code].some((symbol) => !PAIRING_CODE_ALPHABET.includes(symbol))) return { kind: "wrong", problem: "notACode" };
+ return { kind: "code", code: formatPairingCode(code) };
+}
+
+function decoded(value) {
+ try {
+ return decodeURIComponent(value);
+ } catch {
+ return null;
+ }
+}
+
+/** `{ address, secret }` from an `openmausbot://pair` link; only one naming a server's own http(s) origin. */
+function appLink(url) {
+ const address = url.searchParams.get("address") ?? "";
+ if (!/^https?:\/\//i.test(address)) return null;
+ return { address, secret: url.searchParams.get("code") ?? url.searchParams.get("token") };
+}
+
+function secretOf(url) {
+ const fromHash = /(?:^|[#&])code=([^&]*)/.exec(url.hash)?.[1];
+ if (fromHash !== undefined) return decoded(fromHash);
+ return url.searchParams.get("code");
+}
+
+/**
+ * Reads the Connect sheet's two fields (or `connect URL --code CODE`). On success: the origins to try in order (a bare
+ * private address tries https, then http), and the code or QR credential when one was given. On failure: `problem`,
+ * one of empty, codeOnly (with the `code` to move into the code field), emailCode, oldCode, scriptKey, notACode,
+ * publicHttp (with `host`), phoneLink and notAnAddress.
+ */
+export function parseServerInput(addressInput, codeInput = "") {
+ let text = String(addressInput ?? "").trim();
+ if (!text) return { ok: false, problem: "empty" };
+ const asCode = readPairingCode(text);
+ if (asCode.kind === "code") return { ok: false, problem: "codeOnly", code: asCode.code };
+ if (asCode.kind === "wrong" && asCode.problem !== "notACode") return { ok: false, problem: asCode.problem };
+ if (/[\s\\]/.test(text)) return { ok: false, problem: "notAnAddress" };
+ let secret = null;
+ if (/^openmausbot:/i.test(text)) {
+ let link;
+ try {
+ link = appLink(new URL(text));
+ } catch {
+ link = null;
+ }
+ if (!link) return { ok: false, problem: "phoneLink" };
+ text = link.address;
+ secret = link.secret;
+ }
+ const schemed = /^[a-z][a-z0-9+.-]*:\/\//i.test(text);
+ let url;
+ try {
+ url = new URL(schemed ? text : `https://${text}`);
+ } catch {
+ return { ok: false, problem: "notAnAddress" };
+ }
+ if ((url.protocol !== "https:" && url.protocol !== "http:") || url.username || url.password || !url.hostname) return { ok: false, problem: "notAnAddress" };
+ if (!["/", "", "/pair", "/pair/"].includes(url.pathname)) return { ok: false, problem: "notAnAddress" };
+ const fromLink = secret ?? secretOf(url);
+ const carried = url.hash || url.searchParams.has("code") || secret !== null;
+ const typed = String(codeInput ?? "").trim();
+ if (!typed && carried && !fromLink?.trim()) return { ok: false, problem: "notACode" };
+ const read = readPairingCode(typed || fromLink || "");
+ if (read.kind === "wrong") return { ok: false, problem: read.problem };
+ const privateHost = isPrivateHost(url.hostname);
+ if (url.protocol === "http:" && schemed && !privateHost) return { ok: false, problem: "publicHttp", host: url.host };
+ const https = `https://${url.host}`, http = `http://${url.host}`;
+ const candidates = schemed ? [url.origin] : privateHost ? [https, http] : [https];
+ return {
+ ok: true,
+ candidates,
+ code: read.kind === "code" ? read.code : null,
+ credential: read.kind === "credential" ? read.credential : null,
+ };
+}
+
+/** The page that finishes pairing on the server itself, with the code in the fragment so it never reaches a log. */
+export function pairingPageUrl(origin, secret) {
+ return secret ? `${origin}/pair#code=${encodeURIComponent(secret)}` : origin;
+}
diff --git a/electron/server-address.node-test.mjs b/electron/server-address.node-test.mjs
new file mode 100644
index 0000000000..0330c7cd1a
--- /dev/null
+++ b/electron/server-address.node-test.mjs
@@ -0,0 +1,89 @@
+import assert from "node:assert/strict";
+import test from "node:test";
+
+import { allowedServerOrigin, isPrivateHost, pairingPageUrl, parseServerInput, readPairingCode, serverTransport } from "./server-address.mjs";
+
+const CODE = "ABCD-EFGH-JKLM";
+
+test("http is accepted on private networks and refused on the open internet", () => {
+ for (const host of ["192.168.1.20:8799", "10.0.0.5", "172.16.4.2:3000", "172.31.255.1", "100.101.102.103:8799", "100.64.0.1", "box.tail1234.ts.net",
+ "kitchen.local", "nas.home.arpa", "hetzner-1:8799", "localhost:8799", "127.0.0.1:8799", "[::1]:8799", "169.254.10.2", "[fd12:3456::1]:8799", "[fe80::1]"]) {
+ const parsed = parseServerInput(`http://${host}/pair#code=${CODE}`);
+ assert.equal(parsed.ok, true, host);
+ assert.deepEqual(parsed.candidates, [`http://${host}`], host);
+ assert.equal(parsed.code, CODE, host);
+ }
+ for (const host of ["203.0.113.9:8799", "maus.example.com", "100.128.0.1", "172.32.0.1", "11.0.0.1", "8.8.8.8", "[2001:db8::1]", "box.ts.net.evil.com"]) {
+ assert.deepEqual(parseServerInput(`http://${host}`), { ok: false, problem: "publicHttp", host: new URL(`http://${host}`).host }, host);
+ }
+});
+
+test("isPrivateHost draws the line at the private ranges", () => {
+ assert.equal(isPrivateHost("100.63.255.255"), false);
+ assert.equal(isPrivateHost("100.127.255.255"), true);
+ assert.equal(isPrivateHost("192.169.0.1"), false);
+ assert.equal(isPrivateHost("example"), true);
+ assert.equal(isPrivateHost("example.com"), false);
+ assert.equal(isPrivateHost(""), false);
+ assert.equal(allowedServerOrigin("http://192.168.1.20:8799"), true);
+ assert.equal(allowedServerOrigin("http://maus.example.com"), false);
+ assert.equal(allowedServerOrigin("https://maus.example.com"), true);
+ assert.equal(allowedServerOrigin("https://user:[email protected]"), false);
+});
+
+test("a bare address tries https first, then http only when the host is private", () => {
+ assert.deepEqual(parseServerInput("192.168.1.20:8799"), { ok: true, candidates: ["https://192.168.1.20:8799", "http://192.168.1.20:8799"], code: null, credential: null });
+ assert.deepEqual(parseServerInput("maus.example.com").candidates, ["https://maus.example.com"]);
+ assert.deepEqual(parseServerInput(" https://maus.example.com/ ").candidates, ["https://maus.example.com"]);
+ assert.deepEqual(parseServerInput("hetzner-1:8799").candidates, ["https://hetzner-1:8799", "http://hetzner-1:8799"]);
+});
+
+test("an address and a code typed apart make one pairing", () => {
+ const parsed = parseServerInput("192.168.1.20:8799", " abcd efgh jklm ");
+ assert.equal(parsed.ok, true);
+ assert.equal(parsed.code, CODE);
+ assert.equal(pairingPageUrl("http://192.168.1.20:8799", parsed.code), `http://192.168.1.20:8799/pair#code=${CODE}`);
+ assert.equal(pairingPageUrl("https://maus.example.com", null), "https://maus.example.com");
+ assert.equal(parseServerInput(`https://maus.example.com/pair#code=${CODE}`, "").code, CODE);
+ assert.equal(parseServerInput("https://maus.example.com/pair#code=ABCD%2DEFGH%2DJKLM").code, CODE);
+ assert.equal(parseServerInput(`https://maus.example.com/pair?code=${CODE}`).code, CODE);
+});
+
+test("a code alone is moved, not refused without a word", () => {
+ assert.deepEqual(parseServerInput(CODE), { ok: false, problem: "codeOnly", code: CODE });
+ assert.deepEqual(parseServerInput("abcdefghjklm"), { ok: false, problem: "codeOnly", code: CODE });
+});
+
+test("the wrong kind of code says what it is, in either field", () => {
+ assert.equal(parseServerInput("1234 5678").problem, "emailCode");
+ assert.equal(parseServerInput("123456").problem, "oldCode");
+ assert.equal(parseServerInput("omb_sess_abc").problem, "scriptKey");
+ assert.equal(parseServerInput("maus.example.com", "12345678").problem, "emailCode");
+ assert.equal(parseServerInput("maus.example.com", "654321").problem, "oldCode");
+ assert.equal(parseServerInput("maus.example.com", "nope").problem, "notACode");
+ assert.equal(parseServerInput("https://maus.example.com/pair#code=").problem, "notACode");
+ assert.equal(parseServerInput("https://maus.example.com/pair#code=%").problem, "notACode");
+ assert.deepEqual(readPairingCode(`omb_pair_${"a".repeat(43)}`), { kind: "credential", credential: `omb_pair_${"a".repeat(43)}` });
+});
+
+test("app links naming a server are read; a phone's link to a computer is named", () => {
+ const parsed = parseServerInput(`openmausbot://pair?address=${encodeURIComponent("https://maus.example.com")}&code=${CODE}`);
+ assert.deepEqual(parsed, { ok: true, candidates: ["https://maus.example.com"], code: CODE, credential: null });
+ const token = `omb_pair_${"b".repeat(43)}`;
+ assert.equal(parseServerInput(`openmausbot://pair?address=${encodeURIComponent("http://192.168.1.20:8799")}&token=${token}`).credential, token);
+ assert.equal(parseServerInput("openmausbot://pair?address=192.168.1.20&port=8810&token=x").problem, "phoneLink");
+});
+
+test("anything that is not a server address is refused", () => {
+ for (const bad of ["https:example.com", "https://a.example/other", "https://user:[email protected]", "https://a.example\\@b.example", "javascript:alert(1)", "ftp://a.example", "two words"]) {
+ assert.equal(parseServerInput(bad).ok, false, bad);
+ }
+ assert.equal(parseServerInput("").problem, "empty");
+});
+
+test("each transport is named for the line under a saved server", () => {
+ assert.equal(serverTransport("https://maus.example.com"), "https");
+ assert.equal(serverTransport("https://box.tail1234.ts.net"), "tailscale");
+ assert.equal(serverTransport("http://192.168.1.20:8799"), "private-http");
+ assert.equal(serverTransport("http://127.0.0.1:8799"), "loopback");
+});
diff --git a/electron/server-probe.d.mts b/electron/server-probe.d.mts
new file mode 100644
index 0000000000..8575f7fe9e
--- /dev/null
+++ b/electron/server-probe.d.mts
@@ -0,0 +1,25 @@
+import type { ServerInputProblem, ServerTransport } from "./server-address.mjs";
+
+export type ServerProbeProblem = ServerInputProblem | "unreachable" | "dns" | "certificate" | "notMausBot" | "loopback";
+export type ServerProbe =
+ | { outcome: "found"; origin: string; label: string; version: string | null; transport: ServerTransport; code: string | null; credential: string | null }
+ | { outcome: "problem"; problem: ServerProbeProblem; host?: string; code?: string; reason?: "refused" | "timeout" };
+
+/** What the Connect sheet's Connect resolves with. */
+export type ConnectOutcome = { outcome: "connected"; label: string } | Extract<ServerProbe, { outcome: "problem" }>;
+
+export declare function probeServer(input: { address: string; code?: string; fetch: typeof fetch; ownEnvironmentId?: () => Promise<string | null>; timeoutMs?: number }): Promise<ServerProbe>;
+
+export declare const CONNECT_PROBLEM_KEYS: Readonly<Record<ServerProbeProblem, `native.connect.${ServerProbeProblem}`>>;
+
+export declare function createServerConnect(deps: {
+ fetch: typeof fetch;
+ ownEnvironmentId: () => Promise<string | null>;
+ ask: (found: Extract<ServerProbe, { outcome: "found" }>) => Promise<boolean>;
+ open: (found: Extract<ServerProbe, { outcome: "found" }>, name?: string) => void;
+ t: (key: string, params?: Record<string, string>) => string;
+}): {
+ probe: (address: string, code?: string) => Promise<ServerProbe>;
+ connect: (address: string, code?: string) => Promise<ConnectOutcome>;
+ connectAsking: (input: string, name?: string) => Promise<boolean>;
+};
diff --git a/electron/server-probe.mjs b/electron/server-probe.mjs
new file mode 100644
index 0000000000..2d192891d0
--- /dev/null
+++ b/electron/server-probe.mjs
@@ -0,0 +1,99 @@
+// Before connecting, the Connect sheet asks the address who it is: the server's public descriptor names it, and a
+// failure is sorted into one thing the person can fix.
+import { EXAMPLE_ADDRESS, isLoopbackHost, parseServerInput, serverTransport } from "./server-address.mjs";
+
+const DESCRIPTOR = "/.well-known/openmausbot/environment";
+
+/** The sentence for each problem, in the window's catalog and main's alike ({host}, {example} filled in). */
+export const CONNECT_PROBLEM_KEYS = Object.freeze({
+ empty: "native.connect.empty",
+ codeOnly: "native.connect.codeOnly",
+ emailCode: "native.connect.emailCode",
+ oldCode: "native.connect.oldCode",
+ scriptKey: "native.connect.scriptKey",
+ notACode: "native.connect.notACode",
+ publicHttp: "native.connect.publicHttp",
+ phoneLink: "native.connect.phoneLink",
+ notAnAddress: "native.connect.notAnAddress",
+ unreachable: "native.connect.unreachable",
+ dns: "native.connect.dns",
+ certificate: "native.connect.certificate",
+ notMausBot: "native.connect.notMausBot",
+ loopback: "native.connect.loopback",
+});
+
+/** Chromium's net errors (Electron 43 `session.fetch`) and Node's (undici) for the same causes. */
+function failureKind(error) {
+ const text = `${error?.message ?? ""} ${error?.cause?.code ?? ""} ${error?.cause?.message ?? ""} ${error?.name ?? ""}`;
+ if (/NAME_NOT_RESOLVED|ENOTFOUND|EAI_AGAIN|EAI_NONAME/i.test(text)) return "dns";
+ if (/ERR_CERT|CERT_|SELF_SIGNED|UNABLE_TO_VERIFY|ALTNAME|certificate/i.test(text)) return "certificate";
+ if (/TimeoutError|TIMED_OUT|ETIMEDOUT|aborted/i.test(text)) return "timeout";
+ if (/CONNECTION_REFUSED|ECONNREFUSED/i.test(text)) return "refused";
+ return "unreachable";
+}
+
+async function describe(origin, fetchImpl, timeoutMs) {
+ let response;
+ try {
+ response = await fetchImpl(`${origin}${DESCRIPTOR}`, { redirect: "error", cache: "no-store", credentials: "omit", signal: AbortSignal.timeout(timeoutMs) });
+ } catch (error) {
+ return { ok: false, kind: failureKind(error) };
+ }
+ const body = response.ok ? await response.json().catch(() => null) : null;
+ if (typeof body?.environmentId !== "string" || !body.environmentId) return { ok: false, kind: "notMausBot" };
+ return { ok: true, environmentId: body.environmentId, label: typeof body.label === "string" && body.label.trim() ? body.label.trim().slice(0, 60) : new URL(origin).host,
+ version: typeof body.version === "string" ? body.version.slice(0, 32) : null };
+}
+
+/**
+ * Reads the sheet's fields and finds the server: `{ outcome: "found", origin, label, version, transport, code, credential }`,
+ * or `{ outcome: "problem", problem, host?, code? }` with one of parseServerInput's problems or: unreachable, dns,
+ * certificate, notMausBot, loopback (an address on this computer that is this app's own workspace, or nothing at all).
+ * `ownEnvironmentId()`: this app's own local workspace, so a "this computer" link copied off a server is caught.
+ */
+export async function probeServer({ address, code = "", fetch: fetchImpl, ownEnvironmentId = async () => null, timeoutMs = 6_000 }) {
+ const parsed = parseServerInput(address, code);
+ if (!parsed.ok) {
+ const { ok: _ok, ...problem } = parsed;
+ return { outcome: "problem", ...problem };
+ }
+ let failure = null;
+ for (const origin of parsed.candidates) {
+ const host = new URL(origin).host;
+ const loopback = isLoopbackHost(new URL(origin).hostname);
+ const found = await describe(origin, fetchImpl, timeoutMs);
+ if (!found.ok) {
+ failure = loopback ? { problem: "loopback", host } : { problem: found.kind === "refused" || found.kind === "timeout" ? "unreachable" : found.kind, host, ...(found.kind === "refused" || found.kind === "timeout" ? { reason: found.kind } : {}) };
+ continue;
+ }
+ if (loopback && found.environmentId === await ownEnvironmentId().catch(() => null)) return { outcome: "problem", problem: "loopback", host };
+ return { outcome: "found", origin, label: found.label, version: found.version, transport: serverTransport(origin), code: parsed.code, credential: parsed.credential };
+ }
+ return { outcome: "problem", ...failure };
+}
+
+/**
+ * Connecting from the desktop: `probe` for the sheet's line under the field; `connect` for its button, which names the
+ * server already, so it opens exactly what it finds or resolves with the problem; `connectAsking` for a link from the
+ * clipboard or Settings, which names the server in main's own dialog (`ask(found)`) first and throws a problem's sentence.
+ * `open(found, name)` saves the server and opens its /pair page.
+ */
+export function createServerConnect({ fetch: fetchImpl, ownEnvironmentId, ask, open, t }) {
+ const probe = (address, code = "") => probeServer({ address, code, fetch: fetchImpl, ownEnvironmentId });
+ return {
+ probe,
+ async connect(address, code = "") {
+ const found = await probe(address, code);
+ if (found.outcome !== "found") return found;
+ open(found);
+ return { outcome: "connected", label: found.label };
+ },
+ async connectAsking(input, name) {
+ const found = await probe(input);
+ if (found.outcome !== "found") throw new Error(t(CONNECT_PROBLEM_KEYS[found.problem], { host: found.host ?? "", example: EXAMPLE_ADDRESS }));
+ if (!(await ask(found))) return false;
+ open(found, name);
+ return true;
+ },
+ };
+}
diff --git a/electron/server-probe.node-test.mjs b/electron/server-probe.node-test.mjs
new file mode 100644
index 0000000000..a2794a61c0
--- /dev/null
+++ b/electron/server-probe.node-test.mjs
@@ -0,0 +1,61 @@
+import assert from "node:assert/strict";
+import test from "node:test";
+
+import { createServerConnect, probeServer } from "./server-probe.mjs";
+
+const descriptor = (environmentId, label = "hetzner-1") => new Response(JSON.stringify({ environmentId, label, version: "0.1.147" }), { headers: { "content-type": "application/json" } });
+const refused = () => Object.assign(new TypeError("fetch failed"), { cause: { code: "ECONNREFUSED" } });
+
+function fakeFetch(answers) {
+ const asked = [];
+ const fetch = async (url) => {
+ asked.push(new URL(url).origin);
+ const answer = answers[new URL(url).origin];
+ if (!answer) throw refused();
+ if (answer instanceof Error) throw answer;
+ return answer();
+ };
+ return { fetch, asked };
+}
+
+test("a private address over http is found after https fails, and names the server", async () => {
+ const { fetch, asked } = fakeFetch({ "http://192.168.1.20:8799": () => descriptor("env-a") });
+ const found = await probeServer({ address: "192.168.1.20:8799", code: "abcd-efgh-jklm", fetch });
+ assert.deepEqual(asked, ["https://192.168.1.20:8799", "http://192.168.1.20:8799"]);
+ assert.deepEqual(found, { outcome: "found", origin: "http://192.168.1.20:8799", label: "hetzner-1", version: "0.1.147", transport: "private-http", code: "ABCD-EFGH-JKLM", credential: null });
+});
+
+test("failures are sorted into what the person can fix", async () => {
+ assert.deepEqual(await probeServer({ address: "http://192.168.1.50:8799", fetch: fakeFetch({}).fetch }), { outcome: "problem", problem: "unreachable", host: "192.168.1.50:8799", reason: "refused" });
+ const dns = Object.assign(new Error("net::ERR_NAME_NOT_RESOLVED"));
+ assert.equal((await probeServer({ address: "maus.example.com", fetch: fakeFetch({ "https://maus.example.com": dns }).fetch })).problem, "dns");
+ const cert = new Error("net::ERR_CERT_AUTHORITY_INVALID");
+ assert.equal((await probeServer({ address: "maus.example.com", fetch: fakeFetch({ "https://maus.example.com": cert }).fetch })).problem, "certificate");
+ const other = () => new Response("<html>", { status: 200 });
+ assert.equal((await probeServer({ address: "maus.example.com", fetch: fakeFetch({ "https://maus.example.com": other }).fetch })).problem, "notMausBot");
+ assert.deepEqual(await probeServer({ address: "http://203.0.113.9", fetch: fakeFetch({}).fetch }), { outcome: "problem", problem: "publicHttp", host: "203.0.113.9" });
+ assert.deepEqual(await probeServer({ address: "ABCD-EFGH-JKLM", fetch: fakeFetch({}).fetch }), { outcome: "problem", problem: "codeOnly", code: "ABCD-EFGH-JKLM" });
+});
+
+test("a link to this computer is caught: nothing there, or this app's own workspace", async () => {
+ assert.deepEqual(await probeServer({ address: "http://127.0.0.1:8799/pair#code=ABCD-EFGH-JKLM", fetch: fakeFetch({}).fetch }), { outcome: "problem", problem: "loopback", host: "127.0.0.1:8799" });
+ const own = fakeFetch({ "http://127.0.0.1:18799": () => descriptor("mine") });
+ assert.equal((await probeServer({ address: "http://127.0.0.1:18799", fetch: own.fetch, ownEnvironmentId: async () => "mine" })).problem, "loopback");
+ const other = fakeFetch({ "http://127.0.0.1:8799": () => descriptor("a-server-here") });
+ assert.equal((await probeServer({ address: "http://127.0.0.1:8799", fetch: other.fetch, ownEnvironmentId: async () => "mine" })).outcome, "found");
+});
+
+test("connecting opens only the server it found; a pasted link asks first and throws the problem's sentence", async () => {
+ const opened = [];
+ const asked = [];
+ const make = (answer) => createServerConnect({ fetch: fakeFetch({ "http://192.168.1.20:8799": () => descriptor("env-a") }).fetch, ownEnvironmentId: async () => null,
+ ask: async (found) => { asked.push(found.label); return answer; }, open: (found, name) => opened.push([found.origin, found.code, name]), t: (key, params) => `${key} ${params.host}` });
+ assert.deepEqual(await make(true).connect("http://192.168.1.20:8799", "abcd-efgh-jklm"), { outcome: "connected", label: "hetzner-1" });
+ assert.deepEqual(opened.pop(), ["http://192.168.1.20:8799", "ABCD-EFGH-JKLM", undefined]);
+ assert.equal((await make(true).connect("http://192.168.1.50:8799")).problem, "unreachable");
+ assert.equal(await make(false).connectAsking("http://192.168.1.20:8799/pair#code=ABCD-EFGH-JKLM"), false);
+ assert.deepEqual([asked, opened], [["hetzner-1"], []]);
+ assert.equal(await make(true).connectAsking("http://192.168.1.20:8799/pair#code=ABCD-EFGH-JKLM", "Kitchen"), true);
+ assert.deepEqual(opened.pop(), ["http://192.168.1.20:8799", "ABCD-EFGH-JKLM", "Kitchen"]);
+ await assert.rejects(make(true).connectAsking("http://203.0.113.9"), /native\.connect\.publicHttp 203\.0\.113\.9/);
+});
diff --git a/electron/shared-computer-access.node-test.mjs b/electron/shared-computer-access.node-test.mjs
index 0dbb2af76f..652186109b 100644
--- a/electron/shared-computer-access.node-test.mjs
+++ b/electron/shared-computer-access.node-test.mjs
@@ -70,6 +70,15 @@ test("legacy insecure saved addresses never receive sharing credentials", async
assert.equal(calls, 0);
});
+test("a server on the person's own network is reached over plain http", async t => {
+ const { dir } = await fixture(t);
+ const asked = [];
+ const sharing = createComputerSharing({ file: path.join(dir, "profile", "sharing.json"), environments: () => [], enabled: async () => true, cuaConnection: async () => null, fetch: async (url) => { asked.push(new URL(url).origin); throw new Error("fixture offline"); } });
+ t.after(() => sharing.close());
+ await sharing.observe({ id: "lan", origin: "http://192.168.1.20:8799", name: "Kitchen box" }).catch(() => {});
+ assert.deepEqual([...new Set(asked)], ["http://192.168.1.20:8799"]);
+});
+
test("saved grants and stale consent cannot bypass a disabled or unavailable local gate", async t => {
const { dir, folder } = await fixture(t);
const env = { id: "saved", origin: "https://workspace.fixture.example", name: "Saved" };
diff --git a/scripts/mcp-server.ts b/scripts/mcp-server.ts
index 4c79f119e1..394fcf6154 100644
--- a/scripts/mcp-server.ts
+++ b/scripts/mcp-server.ts
@@ -2,15 +2,17 @@
// Model Context Protocol (MCP) server for OpenMausBot over JSON-RPC 2.0 stdio,
// for external agents (Hermes, Claude Desktop, Cursor, etc.).
import readline from "node:readline";
+import { allowedServerOrigin, EXAMPLE_ADDRESS } from "../electron/server-address.mjs";
import { isRecord, projectMessage } from "./mcp-message-projection.ts";
+/** A server's base URL: https anywhere, http only on loopback or a private network (LAN, Tailscale). */
export function validateBaseUrl(url: string): string {
- const trimmed = url.replace(/\/+$/, "");
+ const trimmed = url.trim().replace(/\/+$/, "");
let parsed: URL;
try {
parsed = new URL(trimmed);
} catch {
- throw new Error(`Invalid OpenMausBot URL: '${url}'`);
+ throw new Error(`Invalid OpenMausBot URL: '${url}'. Start it with http:// or https://, like ${EXAMPLE_ADDRESS}`);
}
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
throw new Error("OpenMausBot URL must use http:// or https://");
@@ -21,12 +23,8 @@ export function validateBaseUrl(url: string): string {
if ((parsed.pathname !== "/" && parsed.pathname !== "") || parsed.search || parsed.hash) {
throw new Error("OpenMausBot URL must be an origin without a path, query, or fragment");
}
- const hostname = parsed.hostname.toLowerCase().replace(/^\[|\]$/g, "");
- const isLoopback = hostname === "127.0.0.1" || hostname === "localhost" || hostname === "::1";
- if (parsed.protocol === "http:" && !isLoopback && process.env.ALLOW_INSECURE_HTTP !== "true") {
- throw new Error(
- `Insecure cleartext HTTP origin '${parsed.origin}' is rejected. Use https:// or set ALLOW_INSECURE_HTTP=true.`,
- );
+ if (!allowedServerOrigin(parsed.origin)) {
+ throw new Error(`${parsed.origin} is on the open internet and plain http isn't encrypted. Use the server's https:// address, or put HTTPS in front (cloudflared, Caddy or Tailscale).`);
}
return parsed.origin;
}
diff --git a/scripts/verify-server-connection.mjs b/scripts/verify-server-connection.mjs
index 42277d2758..d42c93d14b 100644
--- a/scripts/verify-server-connection.mjs
+++ b/scripts/verify-server-connection.mjs
@@ -13,7 +13,8 @@ const fixtureFlag = "--omb-server-connection-fixture";
if (process.versions.electron && process.argv.includes(fixtureFlag)) {
const { app, BrowserWindow, ipcMain, Menu, session } = await import("electron");
- const { parseHostedWorkspaceLink, withEnvironment, withActive, withoutEnvironment, workspaceSummary, workspaceMenuTemplate } = createRequire(import.meta.url)("../electron/environments.cjs");
+ const { parseServerInput } = await import("../electron/server-address.mjs");
+ const { withEnvironment, withActive, withoutEnvironment, workspaceSummary, workspaceMenuTemplate } = createRequire(import.meta.url)("../electron/environments.cjs");
const [url, output, serverUrl] = process.argv.slice(process.argv.indexOf(fixtureFlag) + 1);
app.setPath("userData", join(output, "user-data"));
app.setPath("sessionData", join(output, "user-data"));
@@ -59,8 +60,9 @@ if (process.versions.electron && process.argv.includes(fixtureFlag)) {
throw new Error("Fixture companion pairing rejected");
});
ipcMain.handle("environments:add-from-link", (_event, link, name) => {
- const parsed = parseHostedWorkspaceLink(link);
- if (!parsed) throw new Error("Enter an HTTPS server address or a full pairing link.");
+ const read = parseServerInput(link);
+ if (!read.ok) throw new Error("Enter the server's address or its pairing link.");
+ const parsed = { origin: read.candidates[0] };
calls.push({ kind: "server", link, ...(name === undefined ? {} : { name }) });
return new Promise((resolve, reject) => { pending = { reject, resolve: (confirmed) => {
if (confirmed) saved = withEnvironment(saved, { origin: parsed.origin, name }, () => "new-cloud");
@@ -159,7 +161,7 @@ if (process.versions.electron && process.argv.includes(fixtureFlag)) {
await fill(addressLabel, "http://unsafe.fixture.example");
await evaluate(`${hostedConnect}.click()`);
- await until(() => evaluate("document.querySelector('[role=alert]')?.textContent === 'Enter an HTTPS server address or a full pairing link.'"), "invalid workspace input rejected visibly");
+ await until(() => evaluate("document.querySelector('[role=alert]')?.textContent === 'Enter the server\\'s address or its pairing link.'"), "invalid workspace input rejected visibly");
await fill(addressLabel, "other.fixture.example");
await fill("Name (optional)", "Research team");
const beforeHosted = calls.length;
diff --git a/server/cli-invocation.test.ts b/server/cli-invocation.test.ts
new file mode 100644
index 0000000000..d94d88e984
--- /dev/null
+++ b/server/cli-invocation.test.ts
@@ -0,0 +1,14 @@
+import { describe, expect, it } from "vitest";
+
+import { cliCommand, cliPrefix } from "./cli-invocation.ts";
+
+describe("cliPrefix", () => {
+ it("prints commands the way the CLI was started", () => {
+ expect(cliPrefix({}, "/home/me/.npm/_npx/1a2b/node_modules/openmausbot/dist-server/openmausbot.js")).toBe("npx openmausbot");
+ expect(cliPrefix({ npm_command: "exec" }, "/x/openmausbot.js")).toBe("npx openmausbot");
+ expect(cliPrefix({ npm_lifecycle_event: "omb" }, "/repo/server/openmausbot.ts")).toBe("pnpm omb");
+ expect(cliPrefix({ OMB_CLI_PREFIX: "docker compose exec omb openmausbot" }, "/app/dist-server/openmausbot.js")).toBe("docker compose exec omb openmausbot");
+ expect(cliPrefix({}, "/usr/lib/node_modules/openmausbot/dist-server/openmausbot.js")).toBe("openmausbot");
+ expect(cliCommand("pair", {}, "C:\\Users\\me\\AppData\\Local\\npm-cache\\_npx\\9\\node_modules\\openmausbot\\x.js")).toBe("npx openmausbot pair");
+ });
+});
diff --git a/server/cli-invocation.ts b/server/cli-invocation.ts
new file mode 100644
index 0000000000..5627c6e1e9
--- /dev/null
+++ b/server/cli-invocation.ts
@@ -0,0 +1,15 @@
+/** How this CLI was started, so every command it prints can be pasted as is: `npx openmausbot`, `pnpm omb` in a
+ * checkout, the Docker image's `docker compose exec omb openmausbot` (OMB_CLI_PREFIX), or plain `openmausbot`. */
+export function cliPrefix(env: NodeJS.ProcessEnv = process.env, script = process.argv[1] ?? ""): string {
+ const fixed = env.OMB_CLI_PREFIX?.trim();
+ if (fixed) return fixed;
+ if (env.npm_lifecycle_event === "omb") return "pnpm omb";
+ // npm 7+ runs `npx` packages from its cache's `_npx` folder and marks the run `npm_command=exec`.
+ if (/[\\/]_npx[\\/]/.test(script) || env.npm_command === "exec") return "npx openmausbot";
+ return "openmausbot";
+}
+
+/** `openmausbot <rest>` the way this CLI was started. */
+export function cliCommand(rest: string, env?: NodeJS.ProcessEnv, script?: string): string {
+ return `${cliPrefix(env, script)} ${rest}`;
+}
diff --git a/server/headless/client.test.ts b/server/headless/client.test.ts
index 2f2b0f17ff..93c833b361 100644
--- a/server/headless/client.test.ts
+++ b/server/headless/client.test.ts
@@ -39,7 +39,7 @@ describe("the server and the credential", () => {
expect(request).toHaveBeenCalledWith("/api/bots?messages=0", expect.objectContaining({ headers: expect.any(Headers) }), "http://127.0.0.1:19990");
expect((request.mock.calls[0] as unknown as [string, RequestInit])[1].headers).toEqual(new Headers({ Authorization: "Bearer omb_sess_abc" }));
await expect(openClient({}, { env: { OPENMAUSBOT_TOKEN: "omb_sess_abc" } }, false)).rejects.toMatchObject({ exitCode: 2, message: expect.stringContaining("never sent while looking") });
- await expect(openClient({ url: "http://10.0.0.5:8799" }, { env: {} }, false)).rejects.toMatchObject({ exitCode: 2, message: expect.stringContaining("Insecure cleartext HTTP") });
+ await expect(openClient({ url: "http://203.0.113.9:8799" }, { env: {} }, false)).rejects.toMatchObject({ exitCode: 2, message: expect.stringContaining("open internet") });
await expect(openClient({ port: "70000" }, { env: {} }, false)).rejects.toMatchObject({ exitCode: 2 });
});
diff --git a/server/headless/connect.test.ts b/server/headless/connect.test.ts
index 75a568b1fc..667fa11c1e 100644
--- a/server/headless/connect.test.ts
+++ b/server/headless/connect.test.ts
@@ -24,10 +24,10 @@ beforeAll(async () => {
requests.push({ path: req.url ?? "", body: raw ? JSON.parse(raw) : undefined });
const send = (status: number, body: unknown) => { res.writeHead(status, { "content-type": "application/json" }); res.end(JSON.stringify(body)); };
if (req.url === "/.well-known/openmausbot/environment") return send(200, { environmentId: "env-1", label: "Sandbox", version: "0.1.109" });
- if (req.url === "/api/auth/pairing") return send(200, { code: "ABCD1234" });
+ if (req.url === "/api/auth/pairing") return send(200, { code: "ABCD-EFGH-JKLM" });
if (req.url === "/api/auth/pair") {
const body = JSON.parse(raw);
- return body.code === "ABCD1234"
+ return body.code === "ABCD-EFGH-JKLM"
? send(200, { token: "omb_sess_secret_token_value", session: { id: "s1", label: body.label, scopes: ["admin", "client"], expiresAt: Date.UTC(2026, 11, 1) } })
: send(401, { error: "invalid or expired pairing code" });
}
@@ -66,22 +66,42 @@ describe("connect", () => {
const file = join(dir, "token-2");
writeFileSync(file, "old\n");
const refused = capture();
- expect(await runHeadless(["connect", origin, "--code", "ABCD 1234", "--out", file], { io: refused.io, env: {} })).toBe(2);
+ expect(await runHeadless(["connect", origin, "--code", "abcd efgh jklm", "--out", file], { io: refused.io, env: {} })).toBe(2);
expect(refused.err[0]).toContain("already exists");
- expect(await runHeadless(["connect", origin, "--code", "ABCD 1234", "--out", file, "--force"], { io: capture().io, env: {} })).toBe(0);
+ expect(await runHeadless(["connect", origin, "--code", "abcd efgh jklm", "--out", file, "--force"], { io: capture().io, env: {} })).toBe(0);
expect(readFileSync(file, "utf8")).toBe("omb_sess_secret_token_value\n");
// the file it replaced was readable by others; the token in it is not
if (process.platform !== "win32") expect(statSync(file).mode & 0o777).toBe(0o600);
const wrong = capture();
- expect(await runHeadless(["connect", origin, "--code", "NOPE", "--out", join(dir, "token-3")], { io: wrong.io, env: {} })).toBe(5);
+ expect(await runHeadless(["connect", origin, "--code", "ZZZZ-ZZZZ-ZZZZ", "--out", join(dir, "token-3")], { io: wrong.io, env: {} })).toBe(5);
expect(wrong.err[0]).toBe("error: the code was not accepted: invalid or expired pairing code");
+ const notACode = capture();
+ expect(await runHeadless(["connect", origin, "--code", "12345678", "--out", join(dir, "token-4")], { io: notACode.io, env: {} })).toBe(2);
+ expect(notACode.err[0]).toContain("sign-in code from an email");
});
it("needs a code for a workspace elsewhere, and never writes a token to the terminal", async () => {
const remote = capture();
expect(await runHeadless(["connect", "https://maus.example.com", "--out", join(dir, "t")], { io: remote.io, env: {} })).toBe(2);
expect(remote.err[0]).toBe("error: a workspace elsewhere needs a pairing code");
+ expect(remote.err.join("\n")).toContain("npx openmausbot pair");
expect(() => writeTokenFile("-", "x", false)).toThrow("never to the terminal");
expect(() => writeTokenFile("/dev/stdout", "x", true)).toThrow("never to the terminal");
});
+ it("takes the pairing link the server printed, and a private address over plain http", async () => {
+ const file = join(dir, "token-link");
+ const { io } = capture();
+ expect(await runHeadless(["connect", `${origin}/pair#code=ABCD-EFGH-JKLM`, "--out", file], { io, env: {} })).toBe(0);
+ expect(requests.at(-1)).toMatchObject({ path: "/api/auth/pair", body: { code: "ABCD-EFGH-JKLM" } });
+ const lan = capture();
+ expect(await runHeadless(["connect", "http://omb-test-no-such-host:1", "--code", "ABCD-EFGH-JKLM", "--out", join(dir, "token-lan")], { io: lan.io, env: {} })).toBe(5);
+ expect(lan.err[0]).toContain("no MausBot server answers at http://omb-test-no-such-host:1");
+ const open = capture();
+ expect(await runHeadless(["connect", "http://203.0.113.9:8799", "--code", "ABCD-EFGH-JKLM", "--out", join(dir, "token-open")], { io: open.io, env: {} })).toBe(2);
+ expect(open.err.join("\n")).toContain("put HTTPS in front");
+ const bare = capture();
+ expect(await runHeadless(["connect", "ABCD-EFGH-JKLM", "--out", join(dir, "token-bare")], { io: bare.io, env: {} })).toBe(2);
+ expect(bare.err[0]).toContain("give the server's address too");
+ });
+
});
diff --git a/server/headless/connect.ts b/server/headless/connect.ts
index be4509ebc8..e55986e51e 100644
--- a/server/headless/connect.ts
+++ b/server/headless/connect.ts
@@ -2,12 +2,17 @@
import { closeSync, existsSync, fchmodSync, fstatSync, openSync, writeSync } from "node:fs";
import { isatty } from "node:tty";
+import { parseServerInput } from "../../electron/server-address.mjs";
+import { cliCommand } from "../cli-invocation.ts";
import { EXIT, flag, HeadlessError, usageError } from "./args.ts";
-import { loadMcp, namedServer } from "./client.ts";
+import { namedServer } from "./client.ts";
import type { VerbContext, VerbOutcome } from "./context.ts";
type Rec = Record<string, any>;
+/** The command that makes a pairing code on a server, whichever way that server was installed. */
+const PAIR_ON_SERVER = "npx openmausbot pair (Docker: docker compose exec omb node dist-server/openmausbot.js pair)";
+
const isLoopback = (origin: string) => /^https?:\/\/(?:127\.0\.0\.1|localhost|\[::1\])(?::\d+)?$/i.test(origin);
async function call(origin: string, path: string, init: RequestInit = {}): Promise<{ status: number; body: Rec }> {
@@ -33,34 +38,58 @@ export function writeTokenFile(path: string, token: string, force: boolean): voi
}
}
+const PROBLEM: Record<string, string> = {
+ empty: "give the server's address or its pairing link",
+ codeOnly: "that is a pairing code: give the server's address too, like openmausbot connect http://192.168.1.20:8799 --code CODE",
+ emailCode: "that is a sign-in code from an email; pairing needs a 12-character code like 7KQ2-M9XD-H4TP",
+ oldCode: "that is a code from an older MausBot; pairing needs a 12-character code like 7KQ2-M9XD-H4TP",
+ scriptKey: "that is a script key; pass it with --token-file instead of pairing",
+ notACode: "that is not a pairing code; pairing needs a 12-character code like 7KQ2-M9XD-H4TP",
+ phoneLink: "that link is for the MausBot phone app; give the server's address or the link the server printed",
+ notAnAddress: "that is not a server address; give the link the server printed, or its address like http://192.168.1.20:8799",
+};
+
+function target(ctx: VerbContext): { candidates: string[]; secret: string | null } {
+ const typedCode = flag(ctx.flags, "code")?.trim() ?? "";
+ const positional = ctx.positionals[0]?.trim();
+ const named = positional ? { url: positional } : namedServer(ctx.flags, ctx.env) ?? { port: "8799" };
+ const read = parseServerInput("url" in named ? named.url : `http://127.0.0.1:${named.port}`, typedCode);
+ if (read.ok) return { candidates: read.candidates, secret: read.code ?? read.credential };
+ if (read.problem === "publicHttp") {
+ throw usageError(`http://${read.host} is on the open internet and plain http isn't encrypted`, "use the server's https:// address, or put HTTPS in front (cloudflared, Caddy or Tailscale)");
+ }
+ throw usageError(PROBLEM[read.problem] ?? PROBLEM.notAnAddress!);
+}
+
export async function connectVerb(ctx: VerbContext): Promise<VerbOutcome> {
const out = flag(ctx.flags, "out")?.trim();
- if (!out) throw usageError("--out FILE is required: where to keep the token");
- const mcp = await loadMcp();
- const named = ctx.positionals[0]?.trim() ? { url: ctx.positionals[0]!.trim() } : namedServer(ctx.flags, ctx.env) ?? { port: "8799" };
- let origin: string;
- try {
- origin = "url" in named ? mcp.validateBaseUrl(named.url) : mcp.validateBaseUrl(`http://127.0.0.1:${named.port}`);
- } catch (error) {
- throw usageError(error instanceof Error ? error.message : String(error));
+ if (!out) throw usageError("--out FILE is required: where to keep the script key");
+ const { candidates, secret } = target(ctx);
+ let origin = candidates[0]!;
+ let described: { status: number; body: Rec } | null = null;
+ for (const candidate of candidates) {
+ described = await call(candidate, "/.well-known/openmausbot/environment").catch(() => null);
+ origin = candidate;
+ if (described?.status === 200 && typeof described.body.environmentId === "string") break;
+ }
+ const pairHint = `make a code on the server: ${PAIR_ON_SERVER}, then pass --code CODE`;
+ let code = secret;
+ if (!code && !isLoopback(origin)) throw usageError("a workspace elsewhere needs a pairing code", pairHint);
+ if (described?.status !== 200 || typeof described.body.environmentId !== "string") {
+ throw new HeadlessError(`no MausBot server answers at ${origin}`, EXIT.unreachable, "check the address, and that the server is running with a way in (see openmausbot serve --help on the server)");
}
- let code = flag(ctx.flags, "code")?.replace(/\s+/g, "");
- if (!code && !isLoopback(origin)) throw usageError("a workspace elsewhere needs a pairing code", "open Settings → Phone → Set up a phone there, then pass --code CODE");
- const unreachable = () => new HeadlessError(`no OpenMausBot server answers at ${origin}`, EXIT.unreachable, "check the address, and that the server is running");
- const described = await call(origin, "/.well-known/openmausbot/environment").catch(() => { throw unreachable(); });
- if (described.status !== 200 || typeof described.body.environmentId !== "string") throw unreachable();
const label = flag(ctx.flags, "label")?.trim() || "openmausbot CLI";
if (!code) {
const minted = await call(origin, "/api/auth/pairing", { method: "POST", body: JSON.stringify({ label, ...(ctx.flags.client ? { scopes: ["client"] } : {}) }) });
if (minted.status !== 200 || typeof minted.body.code !== "string") {
throw new HeadlessError(`this server will not mint a pairing code for a command on this computer${minted.body.error ? ` (${minted.body.error})` : ""}`,
- EXIT.unreachable, "pair from Settings → Phone → Set up a phone in the app, then pass --code CODE");
+ EXIT.unreachable, `${cliCommand("pair")} in a terminal on this computer, then pass --code CODE`);
}
- code = minted.body.code;
+ code = minted.body.code as string;
}
const paired = await call(origin, "/api/auth/pair", { method: "POST", body: JSON.stringify({ code, label }) });
if (paired.status !== 200 || typeof paired.body.token !== "string") {
- throw new HeadlessError(`the code was not accepted${paired.body.error ? `: ${paired.body.error}` : ""}`, EXIT.unreachable, "codes are single use and expire (after five minutes, unless made with openmausbot pair --ttl): get a new one");
+ throw new HeadlessError(`the code was not accepted${paired.body.error ? `: ${paired.body.error}` : ""}`, EXIT.unreachable, `codes work once and run out: ${pairHint}`);
}
writeTokenFile(out, paired.body.token, ctx.flags.force === true);
const session = paired.body.session ?? {};
@@ -74,9 +103,8 @@ export async function connectVerb(ctx: VerbContext): Promise<VerbOutcome> {
},
exitCode: EXIT.done,
human: [
- `Connected to "${environment.label}" (${origin}, id ${environment.environmentId}).`,
- `Session "${session.label ?? label}", ${scope === "admin" ? "full access" : "chat and approvals only"}${typeof session.expiresAt === "number" ? `, until ${new Date(session.expiresAt).toISOString().slice(0, 10)}` : ""}.`,
- `Token saved to ${out}. Use it with: openmausbot doctor --url ${origin} --token-file ${out}`,
+ `Connected to "${environment.label}" (${origin}, ${scope === "admin" ? "everything" : "chat and approvals"}${typeof session.expiresAt === "number" ? `, until ${new Date(session.expiresAt).toISOString().slice(0, 10)}` : ""}).`,
+ `Script key saved to ${out}. Check it: ${cliCommand(`doctor --url ${origin} --token-file ${out}`)}`,
],
};
}
diff --git a/server/mcp-server.test.ts b/server/mcp-server.test.ts
index 058d7df61c..2cfbb0be89 100644
--- a/server/mcp-server.test.ts
+++ b/server/mcp-server.test.ts
@@ -31,7 +31,6 @@ afterEach(() => {
vi.restoreAllMocks();
globalThis.fetch = ORIGINAL_FETCH;
delete process.env.OPENMAUSBOT_TOKEN;
- delete process.env.ALLOW_INSECURE_HTTP;
});
describe("MCP JSON-RPC protocol", () => {
@@ -709,7 +708,11 @@ describe("connection security and discovery", () => {
expect(() => validateBaseUrl("ftp://maus.example.com")).toThrow("http:// or https://");
expect(() => validateBaseUrl("https://maus.example.com/api")).toThrow("origin without a path");
expect(() => validateBaseUrl("https://user:[email protected]")).toThrow("must not contain credentials");
- expect(() => validateBaseUrl("http://0.0.0.0:8799")).toThrow("Insecure cleartext HTTP");
+ expect(() => validateBaseUrl("http://0.0.0.0:8799")).toThrow("open internet");
+ expect(() => validateBaseUrl("http://203.0.113.9:8799")).toThrow("put HTTPS in front");
+ expect(validateBaseUrl("http://192.168.1.20:8799")).toBe("http://192.168.1.20:8799");
+ expect(validateBaseUrl("http://100.101.102.103:8799")).toBe("http://100.101.102.103:8799");
+ expect(validateBaseUrl("http://box.tail1234.ts.net:8799")).toBe("http://box.tail1234.ts.net:8799");
});
it("skips a foreign process and discovers the real fallback port", async () => {
diff --git a/src/components/PlaceAddSheet.tsx b/src/components/PlaceAddSheet.tsx
index 8ba0c534c9..5b434d26f8 100644
--- a/src/components/PlaceAddSheet.tsx
+++ b/src/components/PlaceAddSheet.tsx
@@ -1,53 +1,119 @@
// + at the end of the rail: one sheet of choices. A new workspace on this computer (named here, then main opens it), a new
// organization on the Team plan the person pays for (when they run one), buy a Cloud (the buying sheet: another Cloud right
-// here, or the first one on this computer's own sheet), or add a server of the person's own by pasting its pairing link.
+// here, or the first one on this computer's own sheet), or connect to a server of the person's own.
import { useEffect, useRef, useState, type FormEvent, type ReactNode } from "react";
import { Building2, Cloud, Laptop, Loader2, Server, UserRound, X } from "lucide-react";
import type { CloudSwatch } from "../../electron/cloud-list.mjs";
import type { RailAddChoices, RailPlace } from "../../electron/cloud-rail.mjs";
+import { EXAMPLE_ADDRESS, parseServerInput } from "../../electron/server-address.mjs";
+import { CONNECT_PROBLEM_KEYS, type ServerProbe, type ServerProbeProblem } from "../../electron/server-probe.mjs";
import { track } from "@/lib/analytics";
import { cn } from "@/lib/cn";
import { CLOUD_LIST_NAME_LIMIT, CLOUD_SWATCH_ORDER, SWATCH_COLOR, swatchFill } from "@/lib/cloud-extra";
+import { useCopyFeedback } from "@/lib/copy-text";
import { t } from "@/lib/i18n";
+import type { LocaleKey } from "@/locales";
import { computerName, createLocal, placeInitials, suggestedLocalName } from "@/lib/places";
import { AddCloudFlow } from "./cloud-buy/AddCloudFlow";
import { NewOrganization } from "./cloud-buy/NewOrganization";
import { BackLink, FIELD, Heading, PRIMARY_WIDE } from "./cloud-buy/parts";
import { SwatchRadios } from "./SwatchRadios";
-/** A server's pairing link, pasted here: main checks it and asks "Connect to <host>?" itself, then opens it. The sheet
- * stays open when the person cancels, and says so when the link isn't one. `connect`: a server of theirs that signed in
- * with their account, not connected to this app yet. */
+const PAIR_COMMAND = "npx openmausbot pair";
+
+/** A command to run on the server, with its own Copy button. */
+function CommandLine({ command }: { command: string }) {
+ const { state, copy } = useCopyFeedback(command);
+ return <span className="flex items-center gap-2">
+ <code className="min-w-0 truncate rounded-md bg-inset px-2 py-1 font-mono text-[12px] text-ink">{command}</code>
+ <button type="button" onClick={copy} className="text-[12px] font-medium text-accent-text hover:underline">{t(state === "copied" ? "connect.copied" : "connect.copy")}</button>
+ </span>;
+}
+
+function problemText(problem: ServerProbeProblem, host?: string): string {
+ return t(CONNECT_PROBLEM_KEYS[problem] as LocaleKey, { host: host ?? "", example: EXAMPLE_ADDRESS });
+}
+
+const TRANSPORT_KEY = { https: "connect.found.https", tailscale: "connect.found.tailscale", "private-http": "connect.found.privateHttp", loopback: "connect.found.loopback" } as const;
+
+/** Connect to a server: a link, or an address with the pairing code typed apart (a code pasted alone is moved to its
+ * field). Main looks the address up as the person types and connects only to the server it found, opening that server's
+ * own /pair page with the code. `connect`: a server of theirs that signed in with their account, not connected yet. */
export function OwnServerLink({ onBack, onConnected, connect = null }: { onBack: (() => void) | null; onConnected: () => void; connect?: { name: string } | null }) {
- const [link, setLink] = useState("");
+ const [address, setAddress] = useState("");
+ const [code, setCode] = useState("");
+ const [movedCode, setMovedCode] = useState(false);
+ const [probe, setProbe] = useState<ServerProbe | null>(null);
const [busy, setBusy] = useState(false);
- const [failed, setFailed] = useState(false);
+ const [failure, setFailure] = useState<string | null>(null);
+ const codeField = useRef<HTMLInputElement>(null);
+ const workspaces = window.ogb?.workspaces;
+ const canProbe = typeof workspaces?.probe === "function";
+ const parsed = parseServerInput(address, code);
+ const linkHasCode = parsed.ok && !code.trim() && (parsed.code !== null || parsed.credential !== null);
+ const showCode = movedCode || (address.trim() !== "" && !linkHasCode && !(parsed.ok === false && parsed.problem === "codeOnly"));
+ useEffect(() => {
+ if (!canProbe || !address.trim()) { setProbe(null); return; }
+ let current = true;
+ const timer = window.setTimeout(() => {
+ void workspaces!.probe!(address, code).then((found) => { if (current) setProbe(found); }).catch(() => { if (current) setProbe(null); });
+ }, 400);
+ return () => { current = false; window.clearTimeout(timer); };
+ }, [address, code, canProbe, workspaces]);
+ const typeAddress = (value: string) => {
+ setFailure(null);
+ const read = parseServerInput(value);
+ if (!read.ok && read.problem === "codeOnly" && read.code) {
+ setCode(read.code);
+ setAddress("");
+ setMovedCode(true);
+ return;
+ }
+ setAddress(value);
+ if (read.ok && read.code === null && read.credential === null) window.setTimeout(() => codeField.current?.focus(), 0);
+ };
+ const found = probe?.outcome === "found" ? probe : null;
const submit = async (event: FormEvent) => {
event.preventDefault();
- const pasted = link.trim();
- if (!pasted || busy) return;
+ if (!address.trim() || busy || (canProbe && !found)) return;
track("rail_add", { step: "link" });
setBusy(true);
- setFailed(false);
+ setFailure(null);
try {
- if (await window.ogb?.workspaces?.add?.("link", pasted) !== false) onConnected();
- } catch {
- setFailed(true);
+ const result = await workspaces?.add?.("link", address.trim(), code.trim());
+ if (result && typeof result === "object") {
+ if (result.outcome === "connected") onConnected();
+ else if (result.outcome === "problem") setFailure(problemText(result.problem, result.host));
+ } else if (result !== false) onConnected();
+ } catch (error) {
+ setFailure(error instanceof Error && error.message ? error.message.replace(/^Error invoking remote method '[^']+': (?:Error: )?/, "") : problemText("notAnAddress"));
} finally {
setBusy(false);
}
};
+ const shownProblem = failure ?? (probe?.outcome === "problem" && probe.problem !== "empty" ? problemText(probe.problem, probe.host) : null);
+ const codeOnlyHint = movedCode && !address.trim();
return <form data-place-add={connect ? "connect-server" : "own-server"} onSubmit={(event) => void submit(event)} className="flex flex-col gap-4 px-[30px] pb-[26px] pt-7">
{onBack && <div><BackLink label={t("rail.back")} onClick={onBack} /></div>}
- <Heading title={connect ? t("rail.connectTitle", { name: connect.name }) : t("rail.own")} sub={t(connect ? "rail.connectPasteLede" : "rail.pasteLede")} />
- <label className="flex flex-col gap-1.5 text-[13px] font-medium text-ink">{t("rail.paste")}
- <input data-autofocus data-own-server-link value={link} disabled={busy} onChange={(event) => { setLink(event.target.value); setFailed(false); }}
- placeholder="https://" autoCapitalize="none" autoCorrect="off" autoComplete="off" spellCheck={false} aria-invalid={failed || undefined}
+ <Heading title={connect ? t("rail.connectTitle", { name: connect.name }) : t("connect.title")} sub={t(connect ? "connect.signedInLede" : "connect.lede")} />
+ <label className="flex flex-col gap-1.5 text-[13px] font-medium text-ink">{t("connect.address")}
+ <input data-autofocus data-own-server-link value={address} disabled={busy} onChange={(event) => typeAddress(event.target.value)}
+ placeholder={t("connect.addressPlaceholder")} autoCapitalize="none" autoCorrect="off" autoComplete="off" spellCheck={false} aria-invalid={Boolean(shownProblem) || undefined}
className="w-full rounded-lg border border-hairline/40 bg-inset px-3 py-2 text-[14px] font-normal text-ink outline-none focus:border-accent/50" />
</label>
- {failed && <p role="alert" className="text-[13px] text-danger">{t("rail.linkFailed")}</p>}
- <div><button type="submit" disabled={busy || !link.trim()} className="ui-button ui-button-primary inline-flex items-center gap-2">
- {busy && <Loader2 size={14} className="animate-spin" aria-hidden="true" />}{t("rail.connect")}
+ {codeOnlyHint && <p data-connect-hint className="text-[13px] text-ink-secondary">{t("connect.addAddress", { example: EXAMPLE_ADDRESS })}</p>}
+ {found && <p data-connect-found className="text-[13px] text-ink-secondary">
+ ✓ {found.version ? t("connect.found", { name: found.label, version: found.version }) : found.label} · {t(TRANSPORT_KEY[found.transport])}
+ </p>}
+ {showCode && <label className="flex flex-col gap-1.5 text-[13px] font-medium text-ink">{t("connect.code")}
+ <input ref={codeField} data-own-server-code value={code} disabled={busy} onChange={(event) => { setCode(event.target.value); setFailure(null); }}
+ placeholder="7KQ2-M9XD-H4TP" autoCapitalize="characters" autoCorrect="off" autoComplete="off" spellCheck={false}
+ className="w-full rounded-lg border border-hairline/40 bg-inset px-3 py-2 font-mono text-[14px] font-normal text-ink outline-none focus:border-accent/50" />
+ <span className="flex flex-col gap-1 text-[12px] font-normal text-ink-secondary">{t("connect.noCode")}<CommandLine command={PAIR_COMMAND} /></span>
+ </label>}
+ {shownProblem && <p role="alert" data-connect-problem className="text-[13px] text-danger">{shownProblem}</p>}
+ <div><button type="submit" data-own-server-connect disabled={busy || !address.trim() || (canProbe && !found)} className="ui-button ui-button-primary inline-flex items-center gap-2">
+ {busy && <Loader2 size={14} className="animate-spin" aria-hidden="true" />}{found ? t("connect.to", { name: found.label }) : t("rail.connect")}
</button></div>
</form>;
}
@@ -174,7 +240,7 @@ export function PlaceAddSheet({ choices, places = [], connect = null, onClose, o
<div className="flex flex-col gap-3 sm:flex-row">
{organization && <Choice kind="organization" icon={<Building2 size={19} />} title={t("rail.org")} sub={t("rail.orgSub")} onClick={() => setView("organization")} />}
{choices.cloud && <Choice kind="cloud" icon={<Cloud size={19} />} title={t("rail.buy")} sub={t("rail.buySub")} onClick={() => setView("cloud")} />}
- {server && <Choice kind="server" icon={<Server size={19} />} title={t("rail.own")} sub={t("rail.ownSub")} onClick={() => setView("server")} />}
+ {server && <Choice kind="server" icon={<Server size={19} />} title={t("connect.title")} sub={t("connect.choiceSub")} onClick={() => setView("server")} />}
{account && <Choice kind="account" icon={<UserRound size={19} />} title={t("accounts.add")} sub={t("rail.accountSub")} onClick={() => onAccount!()} />}
</div>
</div>}
diff --git a/src/components/PlacesRail.test.ts b/src/components/PlacesRail.test.ts
index cbc5a76944..7be440318f 100644
--- a/src/components/PlacesRail.test.ts
+++ b/src/components/PlacesRail.test.ts
@@ -132,21 +132,21 @@ const submit = async (form: Element | null) => {
await act(async () => { (form as HTMLFormElement).requestSubmit(); await Promise.resolve(); await Promise.resolve(); });
};
-it("+ offers buying a Cloud or adding the person's own server: a box to paste its pairing link, sent to main's own Connect dialog", async () => {
+it("+ offers buying a Cloud or connecting to the person's own server: a box for its link or address, sent to main", async () => {
await mount(createElement(PlacesRail));
await click(host.querySelector("[data-rail-add]"));
const sheet = document.querySelector("[data-place-add-sheet]")!;
expect([...sheet.querySelectorAll("[data-place-add-choice]")].map((choice) => choice.getAttribute("data-place-add-choice"))).toEqual(["cloud", "server"]);
await click(sheet.querySelector('[data-place-add-choice="server"]'));
const form = document.querySelector('[data-place-add="own-server"]')!;
- expect(form.textContent).toContain("Paste pairing link");
- expect(form.textContent, "no install commands: the server's Settings shows its link").not.toContain("npx");
+ expect(form.textContent).toContain("Link or address");
+ expect(form.textContent, "no commands before the person starts typing").not.toContain("npx");
expect(document.activeElement).toBe(form.querySelector("[data-own-server-link]"));
const connect = [...form.querySelectorAll("button")].find((button) => button.textContent === "Connect")!;
expect(connect.disabled, "nothing pasted yet").toBe(true);
await type(form.querySelector("[data-own-server-link]"), " https://bots.example.test/#pair=abc ");
await submit(form);
- expect(workspaces.add.mock.calls).toEqual([["link", "https://bots.example.test/#pair=abc"]]);
+ expect(workspaces.add.mock.calls).toEqual([["link", "https://bots.example.test/#pair=abc", ""]]);
expect(document.querySelector("[data-place-add-sheet]")).toBeNull();
});
@@ -156,9 +156,9 @@ it("a pasted link main can't open says so and keeps the sheet; cancelling main's
await click(document.querySelector('[data-place-add-choice="server"]'));
const form = document.querySelector('[data-place-add="own-server"]')!;
await type(form.querySelector("[data-own-server-link]"), "not a link");
- workspaces.add.mockRejectedValueOnce(new Error("Enter an HTTPS server address or a full pairing link."));
+ workspaces.add.mockRejectedValueOnce(new Error("Error invoking remote method 'workspaces:add': Error: That isn't a server address."));
await submit(form);
- expect(form.querySelector('[role="alert"]')?.textContent).toContain("isn't a pairing link");
+ expect(form.querySelector('[role="alert"]')?.textContent).toBe("That isn't a server address.");
expect(document.querySelector("[data-place-add-sheet]")).toBeTruthy();
await type(form.querySelector("[data-own-server-link]"), "https://bots.example.test/#pair=abc");
expect(form.querySelector('[role="alert"]'), "editing the link clears the error").toBeNull();
@@ -167,6 +167,42 @@ it("a pasted link main can't open says so and keeps the sheet; cancelling main's
expect(document.querySelector("[data-place-add-sheet]"), "the person cancelled Connect").toBeTruthy();
});
+const settle = () => act(async () => { await new Promise((done) => setTimeout(done, 450)); });
+
+it("Connect to a server takes an address and a code typed apart: a code pasted alone moves to its field, and main names the server it found", async () => {
+ const probe = vi.fn(async (address: string): Promise<unknown> => (address.includes("192.168.1.20")
+ ? { outcome: "found", origin: "http://192.168.1.20:8799", label: "kitchen-box", version: "0.1.147", transport: "private-http", code: null, credential: null }
+ : { outcome: "problem", problem: "publicHttp", host: "203.0.113.9" }));
+ Object.assign(window, { ogb: { workspaces: { ...workspaces, probe }, cloudAdd } });
+ await mount(createElement(PlacesRail));
+ await click(host.querySelector("[data-rail-add]"));
+ await click(document.querySelector('[data-place-add-choice="server"]'));
+ const form = document.querySelector('[data-place-add="own-server"]')!;
+ await type(form.querySelector("[data-own-server-link]"), "abcd-efgh-jklm");
+ expect((form.querySelector("[data-own-server-link]") as HTMLInputElement).value, "the code left the address field").toBe("");
+ expect((form.querySelector("[data-own-server-code]") as HTMLInputElement).value).toBe("ABCD-EFGH-JKLM");
+ expect(form.querySelector("[data-connect-hint]")?.textContent).toBe("Now add the server's address, like http://192.168.1.20:8799.");
+ await type(form.querySelector("[data-own-server-link]"), "http://203.0.113.9");
+ await settle();
+ expect(form.querySelector("[data-connect-problem]")?.textContent).toContain("http://203.0.113.9 is on the open internet");
+ expect((form.querySelector("[data-own-server-connect]") as HTMLButtonElement).disabled).toBe(true);
+ await type(form.querySelector("[data-own-server-link]"), "192.168.1.20:8799");
+ await settle();
+ expect(probe).toHaveBeenLastCalledWith("192.168.1.20:8799", "ABCD-EFGH-JKLM");
+ expect(form.querySelector("[data-connect-found]")?.textContent).toBe("✓ kitchen-box · MausBot 0.1.147 · Private network, not encrypted. Fine on your own network or Tailscale.");
+ expect(form.querySelector("[data-connect-problem]")).toBeNull();
+ const button = form.querySelector("[data-own-server-connect]") as HTMLButtonElement;
+ expect([button.disabled, button.textContent]).toEqual([false, "Connect to kitchen-box"]);
+ expect(form.textContent).toContain("npx openmausbot pair");
+ workspaces.add.mockResolvedValueOnce({ outcome: "problem", problem: "unreachable", host: "192.168.1.20:8799" });
+ await submit(form);
+ expect(form.querySelector('[role="alert"]')?.textContent).toBe("Can't reach 192.168.1.20:8799. Check the server is running and reachable from this computer.");
+ workspaces.add.mockResolvedValueOnce({ outcome: "connected", label: "kitchen-box" });
+ await submit(form);
+ expect(workspaces.add.mock.calls.at(-1)).toEqual(["link", "192.168.1.20:8799", "ABCD-EFGH-JKLM"]);
+ expect(document.querySelector("[data-place-add-sheet]")).toBeNull();
+});
+
const createButton = () => [...document.querySelectorAll<HTMLButtonElement>('[data-place-add="organization"] button[type="submit"]')][0];
it("+ for the account a Team plan's organizations are billed to: New organization first; a name and a color add it at once, no checkout, and the sheet closes", async () => {
@@ -286,7 +322,7 @@ it("a server of the person's own that signed in: a small server mark, the offlin
expect(connect.textContent, "it runs OpenMausBot already: only its pairing link is left").not.toContain("npx");
await type(connect.querySelector("[data-own-server-link]"), "https://render.example.test/#pair=xyz");
await submit(connect);
- expect(workspaces.add.mock.calls).toEqual([["link", "https://render.example.test/#pair=xyz"]]);
+ expect(workspaces.add.mock.calls).toEqual([["link", "https://render.example.test/#pair=xyz", ""]]);
});
it("where no pairing link can be pasted here, a signed-in server not connected yet opens nothing", async () => {
diff --git a/src/components/RemoteComputerSection.test.ts b/src/components/RemoteComputerSection.test.ts
index 524b179976..c5b4f96ed1 100644
--- a/src/components/RemoteComputerSection.test.ts
+++ b/src/components/RemoteComputerSection.test.ts
@@ -14,7 +14,10 @@ describe("self-hosted server pairing links", () => {
"https://bots.example.com/pair#code=ABCD-EFGH-JKLM",
" https://custom.example.com:8443/pair/#code=ABCD%2DEFGH%2DJKLM ",
"https://random.trycloudflare.com/pair#code=ABCDEFGHJKLM",
- ])("accepts a complete custom HTTPS link: %s", (link) => {
+ "https://bots.example.com/pair?code=ABCD-EFGH-JKLM",
+ "http://192.168.1.20:8799/pair#code=ABCD-EFGH-JKLM",
+ "http://100.101.102.103:8799/pair#code=ABCD-EFGH-JKLM",
+ ])("accepts a complete HTTPS link, or plain http on a private network: %s", (link) => {
expect(isServerPairingLink(link)).toBe(true);
});
@@ -30,8 +33,6 @@ describe("self-hosted server pairing links", () => {
"https://bots.example.com/pair#code=%20",
"https://bots.example.com/pair#code=%",
"https://bots.example.com/other#code=ABCD-EFGH-JKLM",
- "https://bots.example.com/pair?code=ABCD-EFGH-JKLM",
- "https://bots.example.com/pair?code=secret#code=ABCD-EFGH-JKLM",
"https://bots.example.com/pair#code=ABCD EFGH JKLM",
"https://bots.example.com\\@other.example/pair#code=ABCD-EFGH-JKLM",
"openmausbot://pair?code=123456",
diff --git a/src/components/RemoteComputerSection.tsx b/src/components/RemoteComputerSection.tsx
index 798ea38e5e..1eb62711aa 100644
--- a/src/components/RemoteComputerSection.tsx
+++ b/src/components/RemoteComputerSection.tsx
@@ -1,4 +1,5 @@
import { useCallback, useEffect, useRef, useState } from "react";
+import { parseServerInput } from "../../electron/server-address.mjs";
import { t } from "@/lib/i18n";
import { Laptop, Loader2, Unplug } from "lucide-react";
import { Select } from "./Select";
@@ -14,18 +15,12 @@ function errorText(error: unknown): string {
);
}
+/** A whole pairing link with its code: https anywhere, http on a private network. */
export function isServerPairingLink(input: string): boolean {
const link = input.trim();
- if (!/^https:\/\//i.test(link) || /[\s\\]/.test(link)) return false;
- try {
- const url = new URL(link);
- const code = /(?:^|[#&])code=([^&]+)/.exec(url.hash)?.[1];
- return url.protocol === "https:" && !url.username && !url.password && !url.search
- && (url.pathname === "/pair" || url.pathname === "/pair/")
- && Boolean(code && decodeURIComponent(code).trim());
- } catch {
- return false;
- }
+ if (!/^https?:\/\//i.test(link)) return false;
+ const read = parseServerInput(link);
+ return read.ok && (read.code !== null || read.credential !== null);
}
export function RemoteComputerSection({ hideWhenUnavailable = false }: { hideWhenUnavailable?: boolean }) {
diff --git a/src/locales/de.json b/src/locales/de.json
index 316241b5da..4c5cb41eed 100644
--- a/src/locales/de.json
+++ b/src/locales/de.json
@@ -2774,9 +2774,6 @@
"rail.orgNoPlan": "Dein Team-Tarif läuft gerade nicht, deshalb kann keine Organisation hinzugefügt werden. Warum, steht bei der Abrechnung auf der Cloud-Seite.",
"rail.orgOff": "Neue Organisationen sind gerade nicht verfügbar.",
"rail.orgFailed": "Es wurde nichts hinzugefügt. Versuch es gleich noch einmal.",
- "rail.own": "Eigenen Server hinzufügen",
- "rail.ownSub": "Einen gemieteten im Netz, einen Mac mini zu Hause oder einen Computer in deinem Tailscale-Netzwerk.",
- "rail.paste": "Kopplungslink einfügen",
"rail.back": "Zurück",
"rail.ownServer": "{name}, dein eigener Server",
"rail.offline": "{name}: offline",
@@ -2785,6 +2782,23 @@
"rail.ownNetwork": "Nur im eigenen Netzwerk erreichbar",
"rail.update": "auf {version}, {latest} ist erschienen",
"rail.connectTitle": "{name} verbinden",
+ "connect.title": "Mit einem Server verbinden",
+ "connect.choiceSub": "Ein eigener Server: ein VPS, ein Mac mini zu Hause oder ein Computer in deinem Tailscale-Netzwerk.",
+ "connect.lede": "Füge den Link ein, den der Server ausgegeben hat, oder gib seine Adresse und den Kopplungscode ein. Seine Bots bleiben auf dem Server.",
+ "connect.signedInLede": "Er ist bereits mit deinem Konto angemeldet. Füge seinen Link ein oder gib seine Adresse und einen Kopplungscode ein.",
+ "connect.address": "Link oder Adresse",
+ "connect.addressPlaceholder": "https://maus.example.com oder 192.168.1.20:8799",
+ "connect.code": "Kopplungscode",
+ "connect.noCode": "Kein Code? Führe auf dem Server aus:",
+ "connect.addAddress": "Gib jetzt die Adresse des Servers ein, z. B. {example}.",
+ "connect.found": "{name} · MausBot {version}",
+ "connect.found.https": "HTTPS",
+ "connect.found.tailscale": "Tailscale",
+ "connect.found.privateHttp": "Privates Netzwerk, nicht verschlüsselt. In Ordnung im eigenen Netzwerk oder über Tailscale.",
+ "connect.found.loopback": "Dieser Computer",
+ "connect.to": "Mit {name} verbinden",
+ "connect.copy": "Kopieren",
+ "connect.copied": "Kopiert",
"rail.hide": "Deine Computer ausblenden",
"rail.show": "Deine Computer anzeigen",
"rail.showSub": "Ein Symbol für jeden Ort, an dem deine Bots leben, links in der App.",
@@ -3297,5 +3311,19 @@
"server.meetings.end.meet_refused": "Google Meet hat mich nicht als Gast hereingelassen. Der Host kann Gäste in den Hoststeuerelementen zulassen, oder die Besprechung lässt keine Personen außerhalb der Organisation zu.",
"server.meetings.end.speech_unavailable": "Ich konnte für diese Besprechung keine Spracherkennung bekommen, daher bin ich nicht beigetreten.",
"server.meetings.card.settingUp": "Transkription wird eingerichtet (einmalig, etwa eine Minute)…",
- "server.meetings.card.speechStopped": "Transkription gestoppt: {problem}"
+ "server.meetings.card.speechStopped": "Transkription gestoppt: {problem}",
+ "native.connect.empty": "Gib die Adresse des Servers ein oder füge seinen Link ein.",
+ "native.connect.codeOnly": "Das ist ein Kopplungscode. Gib auch die Adresse des Servers ein, z. B. {example}.",
+ "native.connect.emailCode": "Das ist ein Anmeldecode aus einer E-Mail. Zum Koppeln brauchst du einen 12-stelligen Code wie 7KQ2-M9XD-H4TP.",
+ "native.connect.oldCode": "Das ist ein Code von einer älteren MausBot-Version. Zum Koppeln brauchst du einen 12-stelligen Code wie 7KQ2-M9XD-H4TP: Führe auf dem Server openmausbot pair aus.",
+ "native.connect.scriptKey": "Das ist ein Skriptschlüssel. Zum Koppeln brauchst du einen Kopplungscode.",
+ "native.connect.notACode": "Das ist kein Kopplungscode. Zum Koppeln brauchst du einen 12-stelligen Code wie 7KQ2-M9XD-H4TP.",
+ "native.connect.publicHttp": "http://{host} liegt im offenen Internet und ist nicht verschlüsselt, andere könnten deine Chats mitlesen. Nutze seine https-Adresse oder setze HTTPS davor (cloudflared, Caddy oder Tailscale).",
+ "native.connect.phoneLink": "Dieser Link ist für die MausBot-App auf dem Telefon. Füge den Link ein, den der Server ausgegeben hat, oder seine Adresse.",
+ "native.connect.notAnAddress": "Das ist keine Serveradresse. Füge den Link ein, den der Server ausgegeben hat, oder gib seine Adresse ein, z. B. {example}.",
+ "native.connect.unreachable": "{host} ist nicht erreichbar. Prüfe, ob der Server läuft und von diesem Computer aus erreichbar ist.",
+ "native.connect.dns": "{host} gibt es noch nicht. Prüfe die Schreibweise oder warte auf den DNS-Eintrag.",
+ "native.connect.certificate": "Das Zertifikat von {host} ist noch nicht gültig. Ein neuer Server braucht dafür manchmal eine Minute.",
+ "native.connect.notMausBot": "Diese Adresse antwortet, ist aber kein MausBot-Server.",
+ "native.connect.loopback": "Das zeigt auf diesen Computer ({host}), nicht auf den Server. Nutze die eigene Adresse des Servers."
}
diff --git a/src/locales/en.json b/src/locales/en.json
index c7b503583d..22640a1aff 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -658,13 +658,7 @@
"rail.orgNoPlan": "Your Team plan isn't running right now, so no organization can be added. Its billing on the Cloud page says why.",
"rail.orgOff": "New organizations aren't available right now.",
"rail.orgFailed": "Nothing was added. Try again in a moment.",
- "rail.own": "Add your own server",
- "rail.ownSub": "One you rent online, a Mac mini at home, or a computer on your Tailscale network.",
- "rail.paste": "Paste pairing link",
- "rail.pasteLede": "Paste the pairing link from your own server's Settings → Remote access. This app opens it like a Cloud, and its bots stay on it.",
- "rail.connectPasteLede": "It's signed in to your account already. Paste the pairing link from its Settings → Remote access.",
"rail.connect": "Connect",
- "rail.linkFailed": "That isn't a pairing link this app can open. Copy the whole link from your own server and paste it again.",
"rail.back": "Back",
"rail.ownServer": "{name}, your own server",
"rail.offline": "{name}: offline",
@@ -673,6 +667,23 @@
"rail.ownNetwork": "Only reachable on its own network",
"rail.update": "on {version}, {latest} is out",
"rail.connectTitle": "Connect {name}",
+ "connect.title": "Connect to a server",
+ "connect.choiceSub": "A server of your own: a VPS, a Mac mini at home, or a computer on your Tailscale network.",
+ "connect.lede": "Paste the link the server printed, or type its address and pairing code. Its bots stay on the server.",
+ "connect.signedInLede": "It's signed in to your account already. Paste its link, or type its address and a pairing code.",
+ "connect.address": "Link or address",
+ "connect.addressPlaceholder": "https://maus.example.com or 192.168.1.20:8799",
+ "connect.code": "Pairing code",
+ "connect.noCode": "No code? On the server, run:",
+ "connect.addAddress": "Now add the server's address, like {example}.",
+ "connect.found": "{name} · MausBot {version}",
+ "connect.found.https": "HTTPS",
+ "connect.found.tailscale": "Tailscale",
+ "connect.found.privateHttp": "Private network, not encrypted. Fine on your own network or Tailscale.",
+ "connect.found.loopback": "This computer",
+ "connect.to": "Connect to {name}",
+ "connect.copy": "Copy",
+ "connect.copied": "Copied",
"rail.hide": "Hide your computers",
"rail.show": "Show your computers",
"rail.showSub": "An icon for each place your bots live, on the left of the app.",
@@ -9005,11 +9016,24 @@
"native.dialog.org.consHosted": "The hosted connection stays saved and can be selected again from the Server menu.",
"native.dialog.connectFailed.title": "Could not connect to the server",
"native.dialog.connectFailed.detail": "You can also choose Connect to a server to enter an address in Settings.",
- "native.dialog.connect.badLink": "Enter an HTTPS server address or a full pairing link. Keep the pairing code after #, not in the URL query.",
"native.dialog.connect.button": "Connect",
"native.dialog.connect.title": "Connect to {host}?",
"native.dialog.connect.withCode": "The pairing code in the link is used once, then this app stays signed in to that server.",
"native.dialog.connect.noCode": "The link has no pairing code; the server will ask for one.",
+ "native.connect.empty": "Enter the server's address or paste its link.",
+ "native.connect.codeOnly": "That's a pairing code. Also enter the server's address, like {example}.",
+ "native.connect.emailCode": "That's a sign-in code from an email. Pairing needs a 12-character code like 7KQ2-M9XD-H4TP.",
+ "native.connect.oldCode": "That's a code from an older MausBot. Pairing needs a 12-character code like 7KQ2-M9XD-H4TP: on the server, run openmausbot pair.",
+ "native.connect.scriptKey": "That's a script key. Pairing needs a pairing code.",
+ "native.connect.notACode": "That isn't a pairing code. Pairing needs a 12-character code like 7KQ2-M9XD-H4TP.",
+ "native.connect.publicHttp": "http://{host} is on the open internet and isn't encrypted, so others could read your chats. Use its https address, or put HTTPS in front (cloudflared, Caddy or Tailscale).",
+ "native.connect.phoneLink": "That link is for the MausBot phone app. Paste the link the server printed, or its address.",
+ "native.connect.notAnAddress": "That isn't a server address. Paste the link the server printed, or type its address, like {example}.",
+ "native.connect.unreachable": "Can't reach {host}. Check the server is running and reachable from this computer.",
+ "native.connect.dns": "{host} doesn't exist yet. Check the spelling, or wait for the DNS record.",
+ "native.connect.certificate": "{host}'s certificate isn't valid yet. A new server can take a minute to get one.",
+ "native.connect.notMausBot": "That address answers, but it isn't a MausBot server.",
+ "native.connect.loopback": "This points at this computer ({host}), not at the server. Use the server's own address.",
"native.dialog.mic.allow": "Allow",
"native.dialog.mic.deny": "Don’t Allow",
"native.dialog.mic.title": "Allow “{name}” to use the microphone?",
diff --git a/src/locales/es.json b/src/locales/es.json
index 527c4237ba..4cf8f9474a 100644
--- a/src/locales/es.json
+++ b/src/locales/es.json
@@ -525,9 +525,6 @@
"rail.orgNoPlan": "Tu plan Team no está activo ahora mismo, así que no se puede añadir ninguna organización. La facturación en la página de Cloud explica por qué.",
"rail.orgOff": "Las organizaciones nuevas no están disponibles ahora mismo.",
"rail.orgFailed": "No se añadió nada. Vuelve a intentarlo en un momento.",
- "rail.own": "Añadir tu propio servidor",
- "rail.ownSub": "Uno que alquilas en internet, un Mac mini en casa o un equipo de tu red de Tailscale.",
- "rail.paste": "Pegar enlace de vinculación",
"rail.back": "Atrás",
"rail.ownServer": "{name}, tu propio servidor",
"rail.offline": "{name}: sin conexión",
@@ -536,6 +533,23 @@
"rail.ownNetwork": "Solo accesible desde su propia red",
"rail.update": "en {version}, ya salió {latest}",
"rail.connectTitle": "Conectar {name}",
+ "connect.title": "Conectar a un servidor",
+ "connect.choiceSub": "Un servidor propio: un VPS, un Mac mini en casa o un ordenador en tu red de Tailscale.",
+ "connect.lede": "Pega el enlace que mostró el servidor, o escribe su dirección y el código de vinculación. Sus bots se quedan en el servidor.",
+ "connect.signedInLede": "Ya ha iniciado sesión con tu cuenta. Pega su enlace, o escribe su dirección y un código de vinculación.",
+ "connect.address": "Enlace o dirección",
+ "connect.addressPlaceholder": "https://maus.example.com o 192.168.1.20:8799",
+ "connect.code": "Código de vinculación",
+ "connect.noCode": "¿No tienes código? En el servidor, ejecuta:",
+ "connect.addAddress": "Ahora añade la dirección del servidor, por ejemplo {example}.",
+ "connect.found": "{name} · MausBot {version}",
+ "connect.found.https": "HTTPS",
+ "connect.found.tailscale": "Tailscale",
+ "connect.found.privateHttp": "Red privada, sin cifrar. Está bien en tu propia red o en Tailscale.",
+ "connect.found.loopback": "Este ordenador",
+ "connect.to": "Conectar a {name}",
+ "connect.copy": "Copiar",
+ "connect.copied": "Copiado",
"rail.hide": "Ocultar tus equipos",
"rail.show": "Mostrar tus equipos",
"rail.showSub": "Un icono por cada lugar donde viven tus bots, a la izquierda de la aplicación.",
@@ -5947,5 +5961,19 @@
"server.meetings.end.meet_refused": "Google Meet no me dejó entrar como invitado. El anfitrión puede permitir invitados en los controles del anfitrión, o puede que la reunión no admita personas de fuera de la organización.",
"server.meetings.end.speech_unavailable": "No pude conseguir la transcripción de voz para esta reunión, así que no entré.",
"server.meetings.card.settingUp": "Preparando la transcripción (una sola vez, alrededor de un minuto)…",
- "server.meetings.card.speechStopped": "La transcripción se detuvo: {problem}"
+ "server.meetings.card.speechStopped": "La transcripción se detuvo: {problem}",
+ "native.connect.empty": "Escribe la dirección del servidor o pega su enlace.",
+ "native.connect.codeOnly": "Eso es un código de vinculación. Escribe también la dirección del servidor, por ejemplo {example}.",
+ "native.connect.emailCode": "Eso es un código de inicio de sesión de un correo. Para vincular hace falta un código de 12 caracteres como 7KQ2-M9XD-H4TP.",
+ "native.connect.oldCode": "Eso es un código de una versión anterior de MausBot. Para vincular hace falta un código de 12 caracteres como 7KQ2-M9XD-H4TP: en el servidor, ejecuta openmausbot pair.",
+ "native.connect.scriptKey": "Eso es una clave de script. Para vincular hace falta un código de vinculación.",
+ "native.connect.notACode": "Eso no es un código de vinculación. Para vincular hace falta un código de 12 caracteres como 7KQ2-M9XD-H4TP.",
+ "native.connect.publicHttp": "http://{host} está en internet abierto y no está cifrado, así que otros podrían leer tus chats. Usa su dirección https, o pon HTTPS delante (cloudflared, Caddy o Tailscale).",
+ "native.connect.phoneLink": "Ese enlace es para la app de MausBot del teléfono. Pega el enlace que mostró el servidor, o su dirección.",
+ "native.connect.notAnAddress": "Eso no es una dirección de servidor. Pega el enlace que mostró el servidor, o escribe su dirección, por ejemplo {example}.",
+ "native.connect.unreachable": "No se puede contactar con {host}. Comprueba que el servidor está en marcha y que se puede alcanzar desde este ordenador.",
+ "native.connect.dns": "{host} todavía no existe. Revisa cómo está escrito o espera al registro DNS.",
+ "native.connect.certificate": "El certificado de {host} todavía no es válido. Un servidor nuevo puede tardar un minuto en obtenerlo.",
+ "native.connect.notMausBot": "Esa dirección responde, pero no es un servidor de MausBot.",
+ "native.connect.loopback": "Esto apunta a este ordenador ({host}), no al servidor. Usa la dirección del propio servidor."
}
diff --git a/src/locales/fr.json b/src/locales/fr.json
index d4697ce399..9deb02f563 100644
--- a/src/locales/fr.json
+++ b/src/locales/fr.json
@@ -2707,9 +2707,6 @@
"rail.orgNoPlan": "Votre forfait Team n'est pas actif en ce moment, donc aucune organisation ne peut être ajoutée. La facturation sur la page Cloud indique pourquoi.",
"rail.orgOff": "Les nouvelles organisations ne sont pas disponibles pour le moment.",
"rail.orgFailed": "Rien n'a été ajouté. Réessayez dans un instant.",
- "rail.own": "Ajouter votre propre serveur",
- "rail.ownSub": "Un serveur loué en ligne, un Mac mini à la maison ou un ordinateur de votre réseau Tailscale.",
- "rail.paste": "Coller le lien d'appairage",
"rail.back": "Retour",
"rail.ownServer": "{name}, votre propre serveur",
"rail.offline": "{name} : hors ligne",
@@ -2718,6 +2715,23 @@
"rail.ownNetwork": "Accessible uniquement depuis son propre réseau",
"rail.update": "en {version}, {latest} est disponible",
"rail.connectTitle": "Connecter {name}",
+ "connect.title": "Se connecter à un serveur",
+ "connect.choiceSub": "Un serveur à vous : un VPS, un Mac mini à la maison ou un ordinateur de votre réseau Tailscale.",
+ "connect.lede": "Collez le lien affiché par le serveur, ou saisissez son adresse et le code d'appairage. Ses bots restent sur le serveur.",
+ "connect.signedInLede": "Il est déjà connecté à votre compte. Collez son lien, ou saisissez son adresse et un code d'appairage.",
+ "connect.address": "Lien ou adresse",
+ "connect.addressPlaceholder": "https://maus.example.com ou 192.168.1.20:8799",
+ "connect.code": "Code d'appairage",
+ "connect.noCode": "Pas de code ? Sur le serveur, lancez :",
+ "connect.addAddress": "Ajoutez maintenant l'adresse du serveur, par exemple {example}.",
+ "connect.found": "{name} · MausBot {version}",
+ "connect.found.https": "HTTPS",
+ "connect.found.tailscale": "Tailscale",
+ "connect.found.privateHttp": "Réseau privé, non chiffré. Convient sur votre propre réseau ou avec Tailscale.",
+ "connect.found.loopback": "Cet ordinateur",
+ "connect.to": "Se connecter à {name}",
+ "connect.copy": "Copier",
+ "connect.copied": "Copié",
"rail.hide": "Masquer vos ordinateurs",
"rail.show": "Afficher vos ordinateurs",
"rail.showSub": "Une icône pour chaque endroit où vivent vos bots, à gauche de l'application.",
@@ -3163,5 +3177,19 @@
"server.meetings.end.meet_refused": "Google Meet ne m'a pas laissé entrer comme invité. L'organisateur peut autoriser les invités dans les commandes de l'organisateur, ou la réunion n'accepte peut-être pas les personnes extérieures à l'organisation.",
"server.meetings.end.speech_unavailable": "Je n'ai pas pu obtenir la transcription pour cette réunion, je ne l'ai donc pas rejointe.",
"server.meetings.card.settingUp": "Configuration de la transcription (une seule fois, environ une minute)…",
- "server.meetings.card.speechStopped": "Transcription arrêtée : {problem}"
+ "server.meetings.card.speechStopped": "Transcription arrêtée : {problem}",
+ "native.connect.empty": "Saisissez l'adresse du serveur ou collez son lien.",
+ "native.connect.codeOnly": "C'est un code d'appairage. Saisissez aussi l'adresse du serveur, par exemple {example}.",
+ "native.connect.emailCode": "C'est un code de connexion reçu par e-mail. L'appairage demande un code de 12 caractères comme 7KQ2-M9XD-H4TP.",
+ "native.connect.oldCode": "C'est un code d'une ancienne version de MausBot. L'appairage demande un code de 12 caractères comme 7KQ2-M9XD-H4TP : sur le serveur, lancez openmausbot pair.",
+ "native.connect.scriptKey": "C'est une clé de script. L'appairage demande un code d'appairage.",
+ "native.connect.notACode": "Ce n'est pas un code d'appairage. L'appairage demande un code de 12 caractères comme 7KQ2-M9XD-H4TP.",
+ "native.connect.publicHttp": "http://{host} est sur l'internet ouvert et n'est pas chiffré : d'autres pourraient lire vos discussions. Utilisez son adresse https, ou placez HTTPS devant (cloudflared, Caddy ou Tailscale).",
+ "native.connect.phoneLink": "Ce lien est destiné à l'app MausBot du téléphone. Collez le lien affiché par le serveur, ou son adresse.",
+ "native.connect.notAnAddress": "Ce n'est pas une adresse de serveur. Collez le lien affiché par le serveur, ou saisissez son adresse, par exemple {example}.",
+ "native.connect.unreachable": "Impossible de joindre {host}. Vérifiez que le serveur tourne et qu'il est joignable depuis cet ordinateur.",
+ "native.connect.dns": "{host} n'existe pas encore. Vérifiez l'orthographe, ou attendez l'enregistrement DNS.",
+ "native.connect.certificate": "Le certificat de {host} n'est pas encore valide. Un nouveau serveur peut mettre une minute à l'obtenir.",
+ "native.connect.notMausBot": "Cette adresse répond, mais ce n'est pas un serveur MausBot.",
+ "native.connect.loopback": "Ceci pointe vers cet ordinateur ({host}), pas vers le serveur. Utilisez l'adresse du serveur lui-même."
}
diff --git a/src/locales/hi.json b/src/locales/hi.json
index 9739334b2c..0e79c9ee72 100644
--- a/src/locales/hi.json
+++ b/src/locales/hi.json
@@ -2707,9 +2707,6 @@
"rail.orgNoPlan": "आपका Team प्लान अभी चालू नहीं है, इसलिए कोई संगठन नहीं जोड़ा जा सकता। Cloud पेज पर बिलिंग में इसकी वजह दिखेगी।",
"rail.orgOff": "नए संगठन अभी उपलब्ध नहीं हैं।",
"rail.orgFailed": "कुछ नहीं जोड़ा गया। थोड़ी देर में फिर कोशिश करें।",
- "rail.own": "अपना सर्वर जोड़ें",
- "rail.ownSub": "ऑनलाइन किराए का, घर पर रखा Mac mini, या आपके Tailscale नेटवर्क का कोई कंप्यूटर।",
- "rail.paste": "पेयरिंग लिंक पेस्ट करें",
"rail.back": "वापस",
"rail.ownServer": "{name}, आपका अपना सर्वर",
"rail.offline": "{name}: ऑफ़लाइन",
@@ -2718,6 +2715,23 @@
"rail.ownNetwork": "सिर्फ़ उसके अपने नेटवर्क पर पहुँचा जा सकता है",
"rail.update": "{version} पर है, {latest} आ गया है",
"rail.connectTitle": "{name} जोड़ें",
+ "connect.title": "किसी सर्वर से कनेक्ट करें",
+ "connect.choiceSub": "आपका अपना सर्वर: कोई VPS, घर पर Mac mini, या आपके Tailscale नेटवर्क का कोई कंप्यूटर।",
+ "connect.lede": "सर्वर ने जो लिंक दिखाया उसे पेस्ट करें, या उसका पता और पेयरिंग कोड टाइप करें। उसके बॉट सर्वर पर ही रहते हैं।",
+ "connect.signedInLede": "यह पहले से आपके खाते में साइन इन है। इसका लिंक पेस्ट करें, या इसका पता और एक पेयरिंग कोड टाइप करें।",
+ "connect.address": "लिंक या पता",
+ "connect.addressPlaceholder": "https://maus.example.com या 192.168.1.20:8799",
+ "connect.code": "पेयरिंग कोड",
+ "connect.noCode": "कोड नहीं है? सर्वर पर चलाएँ:",
+ "connect.addAddress": "अब सर्वर का पता जोड़ें, जैसे {example}।",
+ "connect.found": "{name} · MausBot {version}",
+ "connect.found.https": "HTTPS",
+ "connect.found.tailscale": "Tailscale",
+ "connect.found.privateHttp": "निजी नेटवर्क, एन्क्रिप्टेड नहीं। आपके अपने नेटवर्क या Tailscale पर ठीक है।",
+ "connect.found.loopback": "यह कंप्यूटर",
+ "connect.to": "{name} से कनेक्ट करें",
+ "connect.copy": "कॉपी करें",
+ "connect.copied": "कॉपी हो गया",
"rail.hide": "अपने कंप्यूटर छिपाएँ",
"rail.show": "अपने कंप्यूटर दिखाएँ",
"rail.showSub": "हर उस जगह के लिए एक आइकन जहाँ आपके बॉट रहते हैं, ऐप के बाईं ओर।",
@@ -3015,5 +3029,19 @@
"server.meetings.end.meet_refused": "Google Meet ने मुझे मेहमान के रूप में अंदर नहीं आने दिया। होस्ट, होस्ट कंट्रोल में मेहमानों को अनुमति दे सकते हैं, या हो सकता है मीटिंग संगठन के बाहर के लोगों को अनुमति न देती हो।",
"server.meetings.end.speech_unavailable": "इस मीटिंग के लिए मुझे स्पीच-टू-टेक्स्ट नहीं मिल सका, इसलिए मैं शामिल नहीं हुआ।",
"server.meetings.card.settingUp": "ट्रांसक्रिप्शन सेट हो रहा है (एक बार, लगभग एक मिनट)…",
- "server.meetings.card.speechStopped": "ट्रांसक्रिप्शन रुक गया: {problem}"
+ "server.meetings.card.speechStopped": "ट्रांसक्रिप्शन रुक गया: {problem}",
+ "native.connect.empty": "सर्वर का पता दर्ज करें या उसका लिंक पेस्ट करें।",
+ "native.connect.codeOnly": "यह एक पेयरिंग कोड है। सर्वर का पता भी दर्ज करें, जैसे {example}।",
+ "native.connect.emailCode": "यह ईमेल से आया साइन-इन कोड है। पेयरिंग के लिए 7KQ2-M9XD-H4TP जैसा 12 अक्षरों का कोड चाहिए।",
+ "native.connect.oldCode": "यह MausBot के पुराने संस्करण का कोड है। पेयरिंग के लिए 7KQ2-M9XD-H4TP जैसा 12 अक्षरों का कोड चाहिए: सर्वर पर openmausbot pair चलाएँ।",
+ "native.connect.scriptKey": "यह एक स्क्रिप्ट कुंजी है। पेयरिंग के लिए पेयरिंग कोड चाहिए।",
+ "native.connect.notACode": "यह पेयरिंग कोड नहीं है। पेयरिंग के लिए 7KQ2-M9XD-H4TP जैसा 12 अक्षरों का कोड चाहिए।",
+ "native.connect.publicHttp": "http://{host} खुले इंटरनेट पर है और एन्क्रिप्टेड नहीं है, इसलिए दूसरे आपकी चैट पढ़ सकते हैं। इसका https पता इस्तेमाल करें, या आगे HTTPS लगाएँ (cloudflared, Caddy या Tailscale)।",
+ "native.connect.phoneLink": "यह लिंक फ़ोन के MausBot ऐप के लिए है। सर्वर ने जो लिंक दिखाया वह पेस्ट करें, या उसका पता।",
+ "native.connect.notAnAddress": "यह सर्वर का पता नहीं है। सर्वर ने जो लिंक दिखाया वह पेस्ट करें, या उसका पता टाइप करें, जैसे {example}।",
+ "native.connect.unreachable": "{host} तक नहीं पहुँच पा रहे। जाँचें कि सर्वर चल रहा है और इस कंप्यूटर से पहुँचा जा सकता है।",
+ "native.connect.dns": "{host} अभी मौजूद नहीं है। वर्तनी जाँचें, या DNS रिकॉर्ड का इंतज़ार करें।",
+ "native.connect.certificate": "{host} का सर्टिफ़िकेट अभी मान्य नहीं है। नए सर्वर को इसे पाने में एक मिनट लग सकता है।",
+ "native.connect.notMausBot": "यह पता जवाब देता है, लेकिन यह MausBot सर्वर नहीं है।",
+ "native.connect.loopback": "यह इस कंप्यूटर ({host}) की ओर इशारा करता है, सर्वर की ओर नहीं। सर्वर का अपना पता इस्तेमाल करें।"
}
diff --git a/src/locales/it.json b/src/locales/it.json
index 9d9d5c8835..8740a5edc7 100644
--- a/src/locales/it.json
+++ b/src/locales/it.json
@@ -530,9 +530,6 @@
"rail.orgNoPlan": "Il tuo piano Team non è attivo in questo momento, quindi non si possono aggiungere organizzazioni. La fatturazione nella pagina del Cloud spiega perché.",
"rail.orgOff": "Le nuove organizzazioni non sono disponibili in questo momento.",
"rail.orgFailed": "Non è stato aggiunto niente. Riprova tra un attimo.",
- "rail.own": "Aggiungi il tuo server",
- "rail.ownSub": "Uno che affitti online, un Mac mini a casa o un computer della tua rete Tailscale.",
- "rail.paste": "Incolla il link di abbinamento",
"rail.back": "Indietro",
"rail.ownServer": "{name}, il tuo server",
"rail.offline": "{name}: offline",
@@ -541,6 +538,23 @@
"rail.ownNetwork": "Raggiungibile solo dalla sua rete",
"rail.update": "su {version}, è uscita la {latest}",
"rail.connectTitle": "Collega {name}",
+ "connect.title": "Connettiti a un server",
+ "connect.choiceSub": "Un server tuo: un VPS, un Mac mini a casa o un computer della tua rete Tailscale.",
+ "connect.lede": "Incolla il link mostrato dal server, oppure scrivi il suo indirizzo e il codice di abbinamento. I suoi bot restano sul server.",
+ "connect.signedInLede": "Ha già effettuato l'accesso con il tuo account. Incolla il suo link, oppure scrivi il suo indirizzo e un codice di abbinamento.",
+ "connect.address": "Link o indirizzo",
+ "connect.addressPlaceholder": "https://maus.example.com o 192.168.1.20:8799",
+ "connect.code": "Codice di abbinamento",
+ "connect.noCode": "Nessun codice? Sul server, esegui:",
+ "connect.addAddress": "Ora aggiungi l'indirizzo del server, ad esempio {example}.",
+ "connect.found": "{name} · MausBot {version}",
+ "connect.found.https": "HTTPS",
+ "connect.found.tailscale": "Tailscale",
+ "connect.found.privateHttp": "Rete privata, non cifrata. Va bene sulla tua rete o con Tailscale.",
+ "connect.found.loopback": "Questo computer",
+ "connect.to": "Connettiti a {name}",
+ "connect.copy": "Copia",
+ "connect.copied": "Copiato",
"rail.hide": "Nascondi i tuoi computer",
"rail.show": "Mostra i tuoi computer",
"rail.showSub": "Un'icona per ogni posto in cui vivono i tuoi bot, a sinistra nell'app.",
@@ -6570,5 +6584,19 @@
"server.meetings.end.meet_refused": "Google Meet non mi ha fatto entrare come ospite. L'organizzatore può consentire gli ospiti nei controlli dell'organizzatore, oppure la riunione potrebbe non ammettere persone esterne all'organizzazione.",
"server.meetings.end.speech_unavailable": "Non ho potuto ottenere la trascrizione per questa riunione, quindi non sono entrato.",
"server.meetings.card.settingUp": "Preparo la trascrizione (una sola volta, circa un minuto)…",
- "server.meetings.card.speechStopped": "Trascrizione interrotta: {problem}"
+ "server.meetings.card.speechStopped": "Trascrizione interrotta: {problem}",
+ "native.connect.empty": "Scrivi l'indirizzo del server o incolla il suo link.",
+ "native.connect.codeOnly": "Questo è un codice di abbinamento. Scrivi anche l'indirizzo del server, ad esempio {example}.",
+ "native.connect.emailCode": "Questo è un codice di accesso arrivato per email. Per l'abbinamento serve un codice di 12 caratteri come 7KQ2-M9XD-H4TP.",
+ "native.connect.oldCode": "Questo è un codice di una versione precedente di MausBot. Per l'abbinamento serve un codice di 12 caratteri come 7KQ2-M9XD-H4TP: sul server, esegui openmausbot pair.",
+ "native.connect.scriptKey": "Questa è una chiave per script. Per l'abbinamento serve un codice di abbinamento.",
+ "native.connect.notACode": "Questo non è un codice di abbinamento. Per l'abbinamento serve un codice di 12 caratteri come 7KQ2-M9XD-H4TP.",
+ "native.connect.publicHttp": "http://{host} è su internet aperto e non è cifrato, quindi altri potrebbero leggere le tue chat. Usa il suo indirizzo https, oppure metti HTTPS davanti (cloudflared, Caddy o Tailscale).",
+ "native.connect.phoneLink": "Quel link è per l'app MausBot del telefono. Incolla il link mostrato dal server, o il suo indirizzo.",
+ "native.connect.notAnAddress": "Questo non è un indirizzo di server. Incolla il link mostrato dal server, oppure scrivi il suo indirizzo, ad esempio {example}.",
+ "native.connect.unreachable": "Impossibile raggiungere {host}. Controlla che il server sia in funzione e raggiungibile da questo computer.",
+ "native.connect.dns": "{host} non esiste ancora. Controlla come è scritto, o attendi il record DNS.",
+ "native.connect.certificate": "Il certificato di {host} non è ancora valido. Un nuovo server può impiegare un minuto per ottenerlo.",
+ "native.connect.notMausBot": "Quell'indirizzo risponde, ma non è un server MausBot.",
+ "native.connect.loopback": "Questo punta a questo computer ({host}), non al server. Usa l'indirizzo del server stesso."
}
diff --git a/src/locales/ja.json b/src/locales/ja.json
index 818d5bdca3..74ddf647b4 100644
--- a/src/locales/ja.json
+++ b/src/locales/ja.json
@@ -587,13 +587,7 @@
"rail.orgNoPlan": "Teamプランが現在有効ではないため、組織を追加できません。理由はCloudページの請求情報で確認できます。",
"rail.orgOff": "新しい組織は現在ご利用いただけません。",
"rail.orgFailed": "何も追加されませんでした。しばらくしてからもう一度お試しください。",
- "rail.own": "自分のサーバーを追加",
- "rail.ownSub": "オンラインで借りたもの、自宅のMac mini、またはTailscaleネットワーク上のコンピューター。",
- "rail.paste": "ペアリングリンクを貼り付け",
- "rail.pasteLede": "自分のサーバーの「設定 → リモートアクセス」にあるペアリングリンクを貼り付けてください。このアプリは Cloud と同じようにそのサーバーを開き、ボットはそのサーバー上に残ります。",
- "rail.connectPasteLede": "すでにあなたのアカウントでサインインしています。そのサーバーの「設定 → リモートアクセス」にあるペアリングリンクを貼り付けてください。",
"rail.connect": "接続",
- "rail.linkFailed": "このアプリで開けるペアリングリンクではありません。自分のサーバーからリンク全体をコピーして、もう一度貼り付けてください。",
"rail.back": "戻る",
"rail.ownServer": "{name}(自分のサーバー)",
"rail.offline": "{name}: オフライン",
@@ -602,6 +596,23 @@
"rail.ownNetwork": "そのネットワーク内からのみ接続できます",
"rail.update": "{version} を実行中、{latest} が公開されています",
"rail.connectTitle": "{name} を接続",
+ "connect.title": "サーバーに接続",
+ "connect.choiceSub": "自分のサーバー:VPS、自宅の Mac mini、または Tailscale ネットワーク上のコンピュータ。",
+ "connect.lede": "サーバーが表示したリンクを貼り付けるか、アドレスとペアリングコードを入力してください。ボットはサーバーに残ります。",
+ "connect.signedInLede": "すでにあなたのアカウントでサインインしています。リンクを貼り付けるか、アドレスとペアリングコードを入力してください。",
+ "connect.address": "リンクまたはアドレス",
+ "connect.addressPlaceholder": "https://maus.example.com または 192.168.1.20:8799",
+ "connect.code": "ペアリングコード",
+ "connect.noCode": "コードがない場合は、サーバーで次を実行:",
+ "connect.addAddress": "次にサーバーのアドレスを入力してください(例:{example})。",
+ "connect.found": "{name} · MausBot {version}",
+ "connect.found.https": "HTTPS",
+ "connect.found.tailscale": "Tailscale",
+ "connect.found.privateHttp": "プライベートネットワーク、暗号化なし。自分のネットワークや Tailscale なら問題ありません。",
+ "connect.found.loopback": "このコンピュータ",
+ "connect.to": "{name} に接続",
+ "connect.copy": "コピー",
+ "connect.copied": "コピーしました",
"rail.hide": "コンピューターを非表示",
"rail.show": "コンピューターを表示",
"rail.showSub": "アプリの左側に、ボットの居場所ごとのアイコンを表示します。",
@@ -7628,5 +7639,19 @@
"server.meetings.end.meet_refused": "Google Meet にゲストとして入れてもらえませんでした。主催者は主催者用の管理機能でゲストを許可できます。または、この会議は組織外の参加者を許可していない可能性があります。",
"server.meetings.end.speech_unavailable": "この会議の音声文字起こしを利用できなかったため、参加しませんでした。",
"server.meetings.card.settingUp": "文字起こしを準備しています(初回のみ、約 1 分)…",
- "server.meetings.card.speechStopped": "文字起こしが停止しました: {problem}"
+ "server.meetings.card.speechStopped": "文字起こしが停止しました: {problem}",
+ "native.connect.empty": "サーバーのアドレスを入力するか、リンクを貼り付けてください。",
+ "native.connect.codeOnly": "これはペアリングコードです。サーバーのアドレスも入力してください(例:{example})。",
+ "native.connect.emailCode": "これはメールで届いたサインインコードです。ペアリングには 7KQ2-M9XD-H4TP のような 12 文字のコードが必要です。",
+ "native.connect.oldCode": "これは古い MausBot のコードです。ペアリングには 7KQ2-M9XD-H4TP のような 12 文字のコードが必要です。サーバーで openmausbot pair を実行してください。",
+ "native.connect.scriptKey": "これはスクリプトキーです。ペアリングにはペアリングコードが必要です。",
+ "native.connect.notACode": "これはペアリングコードではありません。ペアリングには 7KQ2-M9XD-H4TP のような 12 文字のコードが必要です。",
+ "native.connect.publicHttp": "http://{host} はインターネットに公開されていて暗号化されていないため、他人にチャットを読まれるおそれがあります。https のアドレスを使うか、前段に HTTPS を置いてください(cloudflared、Caddy、Tailscale)。",
+ "native.connect.phoneLink": "このリンクはスマートフォンの MausBot アプリ用です。サーバーが表示したリンクかアドレスを貼り付けてください。",
+ "native.connect.notAnAddress": "これはサーバーのアドレスではありません。サーバーが表示したリンクを貼り付けるか、アドレスを入力してください(例:{example})。",
+ "native.connect.unreachable": "{host} に接続できません。サーバーが動作していて、このコンピュータから到達できるか確認してください。",
+ "native.connect.dns": "{host} はまだ存在しません。綴りを確認するか、DNS レコードを待ってください。",
+ "native.connect.certificate": "{host} の証明書はまだ有効ではありません。新しいサーバーでは取得に 1 分ほどかかることがあります。",
+ "native.connect.notMausBot": "そのアドレスは応答しますが、MausBot サーバーではありません。",
+ "native.connect.loopback": "これはサーバーではなく、このコンピュータ({host})を指しています。サーバー自身のアドレスを使ってください。"
}
diff --git a/src/locales/ko.json b/src/locales/ko.json
index d1bf15837d..ca83a65115 100644
--- a/src/locales/ko.json
+++ b/src/locales/ko.json
@@ -577,9 +577,6 @@
"rail.orgNoPlan": "지금 Team 요금제가 활성 상태가 아니라서 조직을 추가할 수 없어요. 클라우드 페이지의 결제 정보에서 이유를 확인하세요.",
"rail.orgOff": "지금은 새 조직을 만들 수 없어요.",
"rail.orgFailed": "아무것도 추가되지 않았어요. 잠시 후 다시 시도하세요.",
- "rail.own": "내 서버 추가",
- "rail.ownSub": "온라인에서 빌린 서버, 집의 Mac mini, Tailscale 네트워크의 컴퓨터 등.",
- "rail.paste": "페어링 링크 붙여 넣기",
"rail.back": "뒤로",
"rail.ownServer": "{name}, 내 서버",
"rail.offline": "{name}: 오프라인",
@@ -588,6 +585,23 @@
"rail.ownNetwork": "자체 네트워크에서만 접속 가능",
"rail.update": "{version} 사용 중, {latest} 출시됨",
"rail.connectTitle": "{name} 연결",
+ "connect.title": "서버에 연결",
+ "connect.choiceSub": "내 서버: VPS, 집에 있는 Mac mini, 또는 Tailscale 네트워크의 컴퓨터.",
+ "connect.lede": "서버가 보여 준 링크를 붙여 넣거나, 주소와 페어링 코드를 입력하세요. 봇은 서버에 그대로 남습니다.",
+ "connect.signedInLede": "이미 내 계정으로 로그인되어 있습니다. 링크를 붙여 넣거나, 주소와 페어링 코드를 입력하세요.",
+ "connect.address": "링크 또는 주소",
+ "connect.addressPlaceholder": "https://maus.example.com 또는 192.168.1.20:8799",
+ "connect.code": "페어링 코드",
+ "connect.noCode": "코드가 없나요? 서버에서 실행하세요:",
+ "connect.addAddress": "이제 서버 주소를 입력하세요. 예: {example}",
+ "connect.found": "{name} · MausBot {version}",
+ "connect.found.https": "HTTPS",
+ "connect.found.tailscale": "Tailscale",
+ "connect.found.privateHttp": "사설 네트워크, 암호화되지 않음. 내 네트워크나 Tailscale에서는 괜찮습니다.",
+ "connect.found.loopback": "이 컴퓨터",
+ "connect.to": "{name}에 연결",
+ "connect.copy": "복사",
+ "connect.copied": "복사됨",
"placeLook.title": "색상",
"placeLook.sub": "{name}은(는) 사이드바 맨 위와 앱 왼쪽의 아이콘에 이 색으로 표시돼요.",
"placeLook.aria": "{name}의 색상",
@@ -7294,5 +7308,19 @@
"server.meetings.end.meet_refused": "Google Meet이 저를 게스트로 들여보내지 않았습니다. 호스트는 호스트 제어에서 게스트를 허용할 수 있으며, 또는 이 회의가 조직 외부 사람을 허용하지 않을 수 있습니다.",
"server.meetings.end.speech_unavailable": "이 회의에 음성 텍스트 변환을 사용할 수 없어서 참여하지 않았습니다.",
"server.meetings.card.settingUp": "녹취 설정 중(최초 1회, 약 1분)…",
- "server.meetings.card.speechStopped": "녹취가 중단됨: {problem}"
+ "server.meetings.card.speechStopped": "녹취가 중단됨: {problem}",
+ "native.connect.empty": "서버 주소를 입력하거나 링크를 붙여 넣으세요.",
+ "native.connect.codeOnly": "페어링 코드입니다. 서버 주소도 입력하세요. 예: {example}",
+ "native.connect.emailCode": "이메일로 받은 로그인 코드입니다. 페어링에는 7KQ2-M9XD-H4TP 같은 12자리 코드가 필요합니다.",
+ "native.connect.oldCode": "이전 MausBot의 코드입니다. 페어링에는 7KQ2-M9XD-H4TP 같은 12자리 코드가 필요합니다. 서버에서 openmausbot pair를 실행하세요.",
+ "native.connect.scriptKey": "스크립트 키입니다. 페어링에는 페어링 코드가 필요합니다.",
+ "native.connect.notACode": "페어링 코드가 아닙니다. 페어링에는 7KQ2-M9XD-H4TP 같은 12자리 코드가 필요합니다.",
+ "native.connect.publicHttp": "http://{host}는 공개 인터넷에 있고 암호화되지 않아 다른 사람이 채팅을 읽을 수 있습니다. https 주소를 사용하거나 앞단에 HTTPS를 두세요(cloudflared, Caddy 또는 Tailscale).",
+ "native.connect.phoneLink": "이 링크는 휴대폰의 MausBot 앱용입니다. 서버가 보여 준 링크나 주소를 붙여 넣으세요.",
+ "native.connect.notAnAddress": "서버 주소가 아닙니다. 서버가 보여 준 링크를 붙여 넣거나 주소를 입력하세요. 예: {example}",
+ "native.connect.unreachable": "{host}에 연결할 수 없습니다. 서버가 실행 중이고 이 컴퓨터에서 접근할 수 있는지 확인하세요.",
+ "native.connect.dns": "{host}가 아직 존재하지 않습니다. 철자를 확인하거나 DNS 레코드를 기다리세요.",
+ "native.connect.certificate": "{host}의 인증서가 아직 유효하지 않습니다. 새 서버는 인증서를 받는 데 1분 정도 걸릴 수 있습니다.",
+ "native.connect.notMausBot": "이 주소는 응답하지만 MausBot 서버가 아닙니다.",
+ "native.connect.loopback": "서버가 아니라 이 컴퓨터({host})를 가리킵니다. 서버 자체의 주소를 사용하세요."
}
diff --git a/src/locales/pl.json b/src/locales/pl.json
index 93e5666330..e94ecd1723 100644
--- a/src/locales/pl.json
+++ b/src/locales/pl.json
@@ -534,9 +534,6 @@
"rail.orgNoPlan": "Twój plan Team nie jest teraz aktywny, więc nie można dodać organizacji. Powód znajdziesz w rozliczeniach na stronie Chmury.",
"rail.orgOff": "Nowe organizacje są teraz niedostępne.",
"rail.orgFailed": "Nic nie zostało dodane. Spróbuj ponownie za chwilę.",
- "rail.own": "Dodaj własny serwer",
- "rail.ownSub": "Wynajęty w sieci, Mac mini w domu albo komputer w twojej sieci Tailscale.",
- "rail.paste": "Wklej link do parowania",
"rail.back": "Wstecz",
"rail.ownServer": "{name}, twój własny serwer",
"rail.offline": "{name}: offline",
@@ -545,6 +542,23 @@
"rail.ownNetwork": "Dostępny tylko w swojej sieci",
"rail.update": "na {version}, dostępna jest {latest}",
"rail.connectTitle": "Połącz {name}",
+ "connect.title": "Połącz z serwerem",
+ "connect.choiceSub": "Własny serwer: VPS, Mac mini w domu albo komputer w Twojej sieci Tailscale.",
+ "connect.lede": "Wklej link wyświetlony przez serwer albo wpisz jego adres i kod parowania. Jego boty zostają na serwerze.",
+ "connect.signedInLede": "Jest już zalogowany na Twoje konto. Wklej jego link albo wpisz jego adres i kod parowania.",
+ "connect.address": "Link lub adres",
+ "connect.addressPlaceholder": "https://maus.example.com lub 192.168.1.20:8799",
+ "connect.code": "Kod parowania",
+ "connect.noCode": "Nie masz kodu? Na serwerze uruchom:",
+ "connect.addAddress": "Teraz dodaj adres serwera, np. {example}.",
+ "connect.found": "{name} · MausBot {version}",
+ "connect.found.https": "HTTPS",
+ "connect.found.tailscale": "Tailscale",
+ "connect.found.privateHttp": "Sieć prywatna, bez szyfrowania. W porządku we własnej sieci lub w Tailscale.",
+ "connect.found.loopback": "Ten komputer",
+ "connect.to": "Połącz z {name}",
+ "connect.copy": "Kopiuj",
+ "connect.copied": "Skopiowano",
"rail.hide": "Ukryj swoje komputery",
"rail.show": "Pokaż swoje komputery",
"rail.showSub": "Ikona dla każdego miejsca, w którym mieszkają twoje boty, po lewej stronie aplikacji.",
@@ -6709,5 +6723,19 @@
"server.meetings.end.meet_refused": "Google Meet nie wpuścił mnie jako gościa. Organizator może zezwolić na gości w ustawieniach organizatora albo spotkanie nie przyjmuje osób spoza organizacji.",
"server.meetings.end.speech_unavailable": "Nie udało się uzyskać zamiany mowy na tekst dla tego spotkania, więc nie dołączyłem.",
"server.meetings.card.settingUp": "Konfiguruję transkrypcję (jednorazowo, około minuty)…",
- "server.meetings.card.speechStopped": "Transkrypcja zatrzymana: {problem}"
+ "server.meetings.card.speechStopped": "Transkrypcja zatrzymana: {problem}",
+ "native.connect.empty": "Wpisz adres serwera albo wklej jego link.",
+ "native.connect.codeOnly": "To jest kod parowania. Wpisz też adres serwera, np. {example}.",
+ "native.connect.emailCode": "To kod logowania z e-maila. Do parowania potrzebny jest 12-znakowy kod, np. 7KQ2-M9XD-H4TP.",
+ "native.connect.oldCode": "To kod ze starszej wersji MausBot. Do parowania potrzebny jest 12-znakowy kod, np. 7KQ2-M9XD-H4TP: na serwerze uruchom openmausbot pair.",
+ "native.connect.scriptKey": "To klucz skryptu. Do parowania potrzebny jest kod parowania.",
+ "native.connect.notACode": "To nie jest kod parowania. Do parowania potrzebny jest 12-znakowy kod, np. 7KQ2-M9XD-H4TP.",
+ "native.connect.publicHttp": "http://{host} jest w otwartym internecie i nie jest szyfrowany, więc inni mogliby czytać Twoje czaty. Użyj jego adresu https albo postaw przed nim HTTPS (cloudflared, Caddy lub Tailscale).",
+ "native.connect.phoneLink": "Ten link jest dla aplikacji MausBot na telefonie. Wklej link wyświetlony przez serwer albo jego adres.",
+ "native.connect.notAnAddress": "To nie jest adres serwera. Wklej link wyświetlony przez serwer albo wpisz jego adres, np. {example}.",
+ "native.connect.unreachable": "Nie można połączyć się z {host}. Sprawdź, czy serwer działa i jest osiągalny z tego komputera.",
+ "native.connect.dns": "{host} jeszcze nie istnieje. Sprawdź pisownię albo poczekaj na rekord DNS.",
+ "native.connect.certificate": "Certyfikat {host} nie jest jeszcze ważny. Nowy serwer może potrzebować minuty, żeby go dostać.",
+ "native.connect.notMausBot": "Ten adres odpowiada, ale to nie jest serwer MausBot.",
+ "native.connect.loopback": "To wskazuje na ten komputer ({host}), a nie na serwer. Użyj adresu samego serwera."
}
diff --git a/src/locales/pt-br.json b/src/locales/pt-br.json
index e480b9fdf3..d51f804686 100644
--- a/src/locales/pt-br.json
+++ b/src/locales/pt-br.json
@@ -644,13 +644,7 @@
"rail.orgNoPlan": "O plano Team não está ativo agora, por isso não é possível adicionar uma organização. Veja o motivo na cobrança, na página do Cloud.",
"rail.orgOff": "Não é possível criar organizações agora.",
"rail.orgFailed": "Nada foi adicionado. Tente novamente em instantes.",
- "rail.own": "Adicionar seu próprio servidor",
- "rail.ownSub": "Um servidor que você aluga na internet, um Mac mini em casa ou um computador na sua rede Tailscale.",
- "rail.paste": "Colar link de pareamento",
- "rail.pasteLede": "Cole o link de pareamento disponível em Configurações → Acesso remoto no seu próprio servidor. Este app o abre como um Cloud, e os bots continuam nele.",
- "rail.connectPasteLede": "Ele já está conectado à sua conta. Cole aqui o link de pareamento disponível em Configurações → Acesso remoto desse servidor.",
"rail.connect": "Conectar",
- "rail.linkFailed": "Este app não consegue abrir esse link de pareamento. Copie o link inteiro do seu próprio servidor e cole novamente.",
"rail.back": "Voltar",
"rail.ownServer": "{name}, seu próprio servidor",
"rail.offline": "{name}: desconectado",
@@ -659,6 +653,23 @@
"rail.ownNetwork": "Só pode ser acessado pela própria rede",
"rail.update": "na versão {version}, a {latest} já está disponível",
"rail.connectTitle": "Conectar {name}",
+ "connect.title": "Conectar a um servidor",
+ "connect.choiceSub": "Um servidor seu: um VPS, um Mac mini em casa ou um computador na sua rede Tailscale.",
+ "connect.lede": "Cole o link que o servidor mostrou, ou digite o endereço dele e o código de pareamento. Os bots dele ficam no servidor.",
+ "connect.signedInLede": "Ele já está conectado à sua conta. Cole o link dele, ou digite o endereço e um código de pareamento.",
+ "connect.address": "Link ou endereço",
+ "connect.addressPlaceholder": "https://maus.example.com ou 192.168.1.20:8799",
+ "connect.code": "Código de pareamento",
+ "connect.noCode": "Sem código? No servidor, execute:",
+ "connect.addAddress": "Agora adicione o endereço do servidor, por exemplo {example}.",
+ "connect.found": "{name} · MausBot {version}",
+ "connect.found.https": "HTTPS",
+ "connect.found.tailscale": "Tailscale",
+ "connect.found.privateHttp": "Rede privada, sem criptografia. Tudo bem na sua própria rede ou no Tailscale.",
+ "connect.found.loopback": "Este computador",
+ "connect.to": "Conectar a {name}",
+ "connect.copy": "Copiar",
+ "connect.copied": "Copiado",
"rail.hide": "Ocultar seus computadores",
"rail.show": "Mostrar seus computadores",
"rail.showSub": "Um ícone para cada lugar onde seus bots ficam, à esquerda do app.",
@@ -8988,11 +8999,24 @@
"native.dialog.org.consHosted": "A conexão com o servidor hospedado continua salva e pode ser escolhida novamente no menu Servidor.",
"native.dialog.connectFailed.title": "Não foi possível conectar ao servidor",
"native.dialog.connectFailed.detail": "Você também pode escolher “Conectar a um servidor” para digitar um endereço em Configurações.",
- "native.dialog.connect.badLink": "Digite um endereço de servidor HTTPS ou um link de pareamento completo. Deixe o código de pareamento depois do #, não nos parâmetros da URL.",
"native.dialog.connect.button": "Conectar",
"native.dialog.connect.title": "Conectar a {host}?",
"native.dialog.connect.withCode": "O app usa o código de pareamento do link uma vez e depois continua conectado a esse servidor.",
"native.dialog.connect.noCode": "O link não tem código de pareamento; o servidor vai pedir um.",
+ "native.connect.empty": "Digite o endereço do servidor ou cole o link dele.",
+ "native.connect.codeOnly": "Isso é um código de pareamento. Digite também o endereço do servidor, por exemplo {example}.",
+ "native.connect.emailCode": "Isso é um código de login de um e-mail. O pareamento precisa de um código de 12 caracteres como 7KQ2-M9XD-H4TP.",
+ "native.connect.oldCode": "Isso é um código de uma versão antiga do MausBot. O pareamento precisa de um código de 12 caracteres como 7KQ2-M9XD-H4TP: no servidor, execute openmausbot pair.",
+ "native.connect.scriptKey": "Isso é uma chave de script. O pareamento precisa de um código de pareamento.",
+ "native.connect.notACode": "Isso não é um código de pareamento. O pareamento precisa de um código de 12 caracteres como 7KQ2-M9XD-H4TP.",
+ "native.connect.publicHttp": "http://{host} está na internet aberta e não tem criptografia, então outras pessoas poderiam ler suas conversas. Use o endereço https dele, ou coloque HTTPS na frente (cloudflared, Caddy ou Tailscale).",
+ "native.connect.phoneLink": "Esse link é para o app MausBot do celular. Cole o link que o servidor mostrou, ou o endereço dele.",
+ "native.connect.notAnAddress": "Isso não é um endereço de servidor. Cole o link que o servidor mostrou, ou digite o endereço dele, por exemplo {example}.",
+ "native.connect.unreachable": "Não foi possível acessar {host}. Verifique se o servidor está rodando e se é acessível deste computador.",
+ "native.connect.dns": "{host} ainda não existe. Confira a grafia, ou aguarde o registro DNS.",
+ "native.connect.certificate": "O certificado de {host} ainda não é válido. Um servidor novo pode levar um minuto para obter um.",
+ "native.connect.notMausBot": "Esse endereço responde, mas não é um servidor MausBot.",
+ "native.connect.loopback": "Isso aponta para este computador ({host}), não para o servidor. Use o endereço do próprio servidor.",
"native.dialog.mic.allow": "Permitir",
"native.dialog.mic.deny": "Não permitir",
"native.dialog.mic.title": "Permitir que “{name}” use o microfone?",
diff --git a/src/locales/ru.json b/src/locales/ru.json
index 3f3ff3d6c2..e9c8dd0c60 100644
--- a/src/locales/ru.json
+++ b/src/locales/ru.json
@@ -534,9 +534,6 @@
"rail.orgNoPlan": "Ваш тариф Team сейчас не действует, поэтому добавить организацию нельзя. Причину покажет раздел оплаты на странице Cloud.",
"rail.orgOff": "Новые организации сейчас недоступны.",
"rail.orgFailed": "Ничего не добавлено. Попробуйте снова через минуту.",
- "rail.own": "Добавить свой сервер",
- "rail.ownSub": "Арендованный в сети, Mac mini дома или компьютер в вашей сети Tailscale.",
- "rail.paste": "Вставить ссылку сопряжения",
"rail.back": "Назад",
"rail.ownServer": "{name}, ваш собственный сервер",
"rail.offline": "{name}: не в сети",
@@ -545,6 +542,23 @@
"rail.ownNetwork": "Доступен только из своей сети",
"rail.update": "версия {version}, вышла {latest}",
"rail.connectTitle": "Подключить {name}",
+ "connect.title": "Подключиться к серверу",
+ "connect.choiceSub": "Свой сервер: VPS, Mac mini дома или компьютер в вашей сети Tailscale.",
+ "connect.lede": "Вставьте ссылку, которую показал сервер, или введите его адрес и код сопряжения. Его боты остаются на сервере.",
+ "connect.signedInLede": "Он уже вошёл в ваш аккаунт. Вставьте его ссылку или введите адрес и код сопряжения.",
+ "connect.address": "Ссылка или адрес",
+ "connect.addressPlaceholder": "https://maus.example.com или 192.168.1.20:8799",
+ "connect.code": "Код сопряжения",
+ "connect.noCode": "Нет кода? Выполните на сервере:",
+ "connect.addAddress": "Теперь введите адрес сервера, например {example}.",
+ "connect.found": "{name} · MausBot {version}",
+ "connect.found.https": "HTTPS",
+ "connect.found.tailscale": "Tailscale",
+ "connect.found.privateHttp": "Частная сеть, без шифрования. Подходит для своей сети или Tailscale.",
+ "connect.found.loopback": "Этот компьютер",
+ "connect.to": "Подключиться к {name}",
+ "connect.copy": "Копировать",
+ "connect.copied": "Скопировано",
"rail.hide": "Скрыть ваши компьютеры",
"rail.show": "Показать ваши компьютеры",
"rail.showSub": "Значок для каждого места, где живут ваши боты, в левой части приложения.",
@@ -6771,5 +6785,19 @@
"server.meetings.end.meet_refused": "Google Meet не пустил меня как гостя. Организатор может разрешить гостей в настройках организатора, или встреча не допускает людей не из организации.",
"server.meetings.end.speech_unavailable": "Не удалось получить распознавание речи для этой встречи, поэтому я не подключился.",
"server.meetings.card.settingUp": "Настраиваю расшифровку (один раз, около минуты)…",
- "server.meetings.card.speechStopped": "Расшифровка остановлена: {problem}"
+ "server.meetings.card.speechStopped": "Расшифровка остановлена: {problem}",
+ "native.connect.empty": "Введите адрес сервера или вставьте его ссылку.",
+ "native.connect.codeOnly": "Это код сопряжения. Введите также адрес сервера, например {example}.",
+ "native.connect.emailCode": "Это код входа из письма. Для сопряжения нужен 12-символьный код, например 7KQ2-M9XD-H4TP.",
+ "native.connect.oldCode": "Это код из старой версии MausBot. Для сопряжения нужен 12-символьный код, например 7KQ2-M9XD-H4TP: выполните на сервере openmausbot pair.",
+ "native.connect.scriptKey": "Это ключ для скриптов. Для сопряжения нужен код сопряжения.",
+ "native.connect.notACode": "Это не код сопряжения. Для сопряжения нужен 12-символьный код, например 7KQ2-M9XD-H4TP.",
+ "native.connect.publicHttp": "http://{host} находится в открытом интернете и не зашифрован, поэтому другие могут прочитать ваши чаты. Используйте его https-адрес или поставьте перед ним HTTPS (cloudflared, Caddy или Tailscale).",
+ "native.connect.phoneLink": "Эта ссылка для приложения MausBot на телефоне. Вставьте ссылку, которую показал сервер, или его адрес.",
+ "native.connect.notAnAddress": "Это не адрес сервера. Вставьте ссылку, которую показал сервер, или введите его адрес, например {example}.",
+ "native.connect.unreachable": "Не удаётся связаться с {host}. Проверьте, что сервер запущен и доступен с этого компьютера.",
+ "native.connect.dns": "{host} пока не существует. Проверьте написание или дождитесь DNS-записи.",
+ "native.connect.certificate": "Сертификат {host} пока недействителен. Новому серверу может понадобиться минута, чтобы его получить.",
+ "native.connect.notMausBot": "Этот адрес отвечает, но это не сервер MausBot.",
+ "native.connect.loopback": "Это указывает на этот компьютер ({host}), а не на сервер. Используйте адрес самого сервера."
}
diff --git a/src/locales/tr.json b/src/locales/tr.json
index c124cc0f56..8bf56d0414 100644
--- a/src/locales/tr.json
+++ b/src/locales/tr.json
@@ -5142,9 +5142,6 @@
"rail.orgNoPlan": "Team planınız şu anda çalışmıyor, bu yüzden organizasyon eklenemiyor. Nedenini Cloud sayfasındaki faturalandırma bölümünde görebilirsiniz.",
"rail.orgOff": "Yeni organizasyonlar şu anda kullanılamıyor.",
"rail.orgFailed": "Hiçbir şey eklenmedi. Biraz sonra yeniden deneyin.",
- "rail.own": "Kendi sunucunuzu ekleyin",
- "rail.ownSub": "Çevrimiçi kiraladığınız biri, evdeki bir Mac mini ya da Tailscale ağınızdaki bir bilgisayar.",
- "rail.paste": "Eşleştirme bağlantısını yapıştır",
"rail.back": "Geri",
"rail.ownServer": "{name}, kendi sunucunuz",
"rail.offline": "{name}: çevrimdışı",
@@ -5153,6 +5150,23 @@
"rail.ownNetwork": "Yalnızca kendi ağından erişilebilir",
"rail.update": "{version} sürümünde, {latest} çıktı",
"rail.connectTitle": "Bağla: {name}",
+ "connect.title": "Bir sunucuya bağlan",
+ "connect.choiceSub": "Kendi sunucunuz: bir VPS, evdeki bir Mac mini ya da Tailscale ağınızdaki bir bilgisayar.",
+ "connect.lede": "Sunucunun gösterdiği bağlantıyı yapıştırın ya da adresini ve eşleştirme kodunu yazın. Botları sunucuda kalır.",
+ "connect.signedInLede": "Hesabınızla zaten oturum açmış. Bağlantısını yapıştırın ya da adresini ve bir eşleştirme kodu yazın.",
+ "connect.address": "Bağlantı veya adres",
+ "connect.addressPlaceholder": "https://maus.example.com veya 192.168.1.20:8799",
+ "connect.code": "Eşleştirme kodu",
+ "connect.noCode": "Kodunuz yok mu? Sunucuda şunu çalıştırın:",
+ "connect.addAddress": "Şimdi sunucunun adresini ekleyin, örneğin {example}.",
+ "connect.found": "{name} · MausBot {version}",
+ "connect.found.https": "HTTPS",
+ "connect.found.tailscale": "Tailscale",
+ "connect.found.privateHttp": "Özel ağ, şifrelenmemiş. Kendi ağınızda veya Tailscale'de sorun değil.",
+ "connect.found.loopback": "Bu bilgisayar",
+ "connect.to": "{name} sunucusuna bağlan",
+ "connect.copy": "Kopyala",
+ "connect.copied": "Kopyalandı",
"rail.hide": "Bilgisayarlarınızı gizleyin",
"rail.show": "Bilgisayarlarınızı gösterin",
"rail.showSub": "Botlarınızın yaşadığı her yer için uygulamanın solunda bir simge.",
@@ -5446,5 +5460,19 @@
"server.meetings.end.meet_refused": "Google Meet beni misafir olarak içeri almadı. Toplantı sahibi, toplantı sahibi denetimlerinden misafirlere izin verebilir ya da toplantı kuruluş dışından kişileri kabul etmiyor olabilir.",
"server.meetings.end.speech_unavailable": "Bu toplantı için konuşmayı yazıya dökme hizmeti alamadım, bu yüzden katılmadım.",
"server.meetings.card.settingUp": "Döküm hazırlanıyor (bir kerelik, yaklaşık bir dakika)…",
- "server.meetings.card.speechStopped": "Döküm durdu: {problem}"
+ "server.meetings.card.speechStopped": "Döküm durdu: {problem}",
+ "native.connect.empty": "Sunucunun adresini girin veya bağlantısını yapıştırın.",
+ "native.connect.codeOnly": "Bu bir eşleştirme kodu. Sunucunun adresini de girin, örneğin {example}.",
+ "native.connect.emailCode": "Bu, bir e-postadan gelen oturum açma kodu. Eşleştirme için 7KQ2-M9XD-H4TP gibi 12 karakterlik bir kod gerekir.",
+ "native.connect.oldCode": "Bu, eski bir MausBot sürümünün kodu. Eşleştirme için 7KQ2-M9XD-H4TP gibi 12 karakterlik bir kod gerekir: sunucuda openmausbot pair komutunu çalıştırın.",
+ "native.connect.scriptKey": "Bu bir betik anahtarı. Eşleştirme için bir eşleştirme kodu gerekir.",
+ "native.connect.notACode": "Bu bir eşleştirme kodu değil. Eşleştirme için 7KQ2-M9XD-H4TP gibi 12 karakterlik bir kod gerekir.",
+ "native.connect.publicHttp": "http://{host} açık internette ve şifrelenmemiş; başkaları sohbetlerinizi okuyabilir. Onun https adresini kullanın ya da önüne HTTPS koyun (cloudflared, Caddy veya Tailscale).",
+ "native.connect.phoneLink": "Bu bağlantı telefondaki MausBot uygulaması için. Sunucunun gösterdiği bağlantıyı ya da adresini yapıştırın.",
+ "native.connect.notAnAddress": "Bu bir sunucu adresi değil. Sunucunun gösterdiği bağlantıyı yapıştırın ya da adresini yazın, örneğin {example}.",
+ "native.connect.unreachable": "{host} adresine ulaşılamıyor. Sunucunun çalıştığını ve bu bilgisayardan erişilebildiğini kontrol edin.",
+ "native.connect.dns": "{host} henüz yok. Yazımı kontrol edin ya da DNS kaydını bekleyin.",
+ "native.connect.certificate": "{host} sertifikası henüz geçerli değil. Yeni bir sunucunun sertifika alması bir dakika sürebilir.",
+ "native.connect.notMausBot": "Bu adres yanıt veriyor ama bir MausBot sunucusu değil.",
+ "native.connect.loopback": "Bu, sunucuyu değil bu bilgisayarı ({host}) gösteriyor. Sunucunun kendi adresini kullanın."
}
diff --git a/src/locales/uk.json b/src/locales/uk.json
index af6e00da5b..9bb2f75576 100644
--- a/src/locales/uk.json
+++ b/src/locales/uk.json
@@ -3148,9 +3148,6 @@
"rail.orgNoPlan": "Ваш план Team зараз не діє, тож додати організацію не можна. Причину покаже розділ оплати на сторінці Cloud.",
"rail.orgOff": "Нові організації зараз недоступні.",
"rail.orgFailed": "Нічого не додано. Спробуйте знову за хвилину.",
- "rail.own": "Додати власний сервер",
- "rail.ownSub": "Орендований в інтернеті, Mac mini вдома або комп'ютер у вашій мережі Tailscale.",
- "rail.paste": "Вставити посилання прив'язки",
"rail.back": "Назад",
"rail.ownServer": "{name}, ваш власний сервер",
"rail.offline": "{name}: не в мережі",
@@ -3159,6 +3156,23 @@
"rail.ownNetwork": "Доступний лише з власної мережі",
"rail.update": "версія {version}, вийшла {latest}",
"rail.connectTitle": "Під’єднати {name}",
+ "connect.title": "Під'єднатися до сервера",
+ "connect.choiceSub": "Власний сервер: VPS, Mac mini вдома або комп'ютер у вашій мережі Tailscale.",
+ "connect.lede": "Вставте посилання, яке показав сервер, або введіть його адресу й код прив'язки. Його боти залишаються на сервері.",
+ "connect.signedInLede": "Він уже ввійшов у ваш обліковий запис. Вставте його посилання або введіть адресу й код прив'язки.",
+ "connect.address": "Посилання або адреса",
+ "connect.addressPlaceholder": "https://maus.example.com або 192.168.1.20:8799",
+ "connect.code": "Код прив'язки",
+ "connect.noCode": "Немає коду? На сервері виконайте:",
+ "connect.addAddress": "Тепер введіть адресу сервера, наприклад {example}.",
+ "connect.found": "{name} · MausBot {version}",
+ "connect.found.https": "HTTPS",
+ "connect.found.tailscale": "Tailscale",
+ "connect.found.privateHttp": "Приватна мережа, без шифрування. Годиться для власної мережі або Tailscale.",
+ "connect.found.loopback": "Цей комп'ютер",
+ "connect.to": "Під'єднатися до {name}",
+ "connect.copy": "Копіювати",
+ "connect.copied": "Скопійовано",
"rail.hide": "Сховати ваші комп'ютери",
"rail.show": "Показати ваші комп'ютери",
"rail.showSub": "Значок для кожного місця, де живуть ваші боти, ліворуч у застосунку.",
@@ -3456,5 +3470,19 @@
"server.meetings.end.meet_refused": "Google Meet не пустив мене як гостя. Організатор може дозволити гостей у налаштуваннях організатора, або зустріч не допускає людей поза організацією.",
"server.meetings.end.speech_unavailable": "Не вдалося отримати розпізнавання мовлення для цієї зустрічі, тому я не приєднався.",
"server.meetings.card.settingUp": "Налаштовую розшифровку (один раз, близько хвилини)…",
- "server.meetings.card.speechStopped": "Розшифровку зупинено: {problem}"
+ "server.meetings.card.speechStopped": "Розшифровку зупинено: {problem}",
+ "native.connect.empty": "Введіть адресу сервера або вставте його посилання.",
+ "native.connect.codeOnly": "Це код прив'язки. Введіть також адресу сервера, наприклад {example}.",
+ "native.connect.emailCode": "Це код входу з листа. Для прив'язки потрібен 12-символьний код, наприклад 7KQ2-M9XD-H4TP.",
+ "native.connect.oldCode": "Це код зі старішої версії MausBot. Для прив'язки потрібен 12-символьний код, наприклад 7KQ2-M9XD-H4TP: на сервері виконайте openmausbot pair.",
+ "native.connect.scriptKey": "Це ключ для скриптів. Для прив'язки потрібен код прив'язки.",
+ "native.connect.notACode": "Це не код прив'язки. Для прив'язки потрібен 12-символьний код, наприклад 7KQ2-M9XD-H4TP.",
+ "native.connect.publicHttp": "http://{host} у відкритому інтернеті й не зашифрований, тож інші можуть прочитати ваші чати. Використайте його https-адресу або поставте перед ним HTTPS (cloudflared, Caddy чи Tailscale).",
+ "native.connect.phoneLink": "Це посилання для застосунку MausBot на телефоні. Вставте посилання, яке показав сервер, або його адресу.",
+ "native.connect.notAnAddress": "Це не адреса сервера. Вставте посилання, яке показав сервер, або введіть його адресу, наприклад {example}.",
+ "native.connect.unreachable": "Не вдається зв'язатися з {host}. Перевірте, що сервер працює й доступний із цього комп'ютера.",
+ "native.connect.dns": "{host} ще не існує. Перевірте написання або дочекайтеся DNS-запису.",
+ "native.connect.certificate": "Сертифікат {host} ще недійсний. Новому серверу може знадобитися хвилина, щоб його отримати.",
+ "native.connect.notMausBot": "Ця адреса відповідає, але це не сервер MausBot.",
+ "native.connect.loopback": "Це вказує на цей комп'ютер ({host}), а не на сервер. Використайте адресу самого сервера."
}
diff --git a/src/locales/vi.json b/src/locales/vi.json
index 76a405ce10..626b1f113d 100644
--- a/src/locales/vi.json
+++ b/src/locales/vi.json
@@ -5142,9 +5142,6 @@
"rail.orgNoPlan": "Gói Team của bạn hiện không hoạt động nên không thể thêm tổ chức. Phần thanh toán trên trang Cloud cho biết lý do.",
"rail.orgOff": "Hiện chưa thể tạo tổ chức mới.",
"rail.orgFailed": "Chưa thêm được gì. Hãy thử lại sau giây lát.",
- "rail.own": "Thêm máy chủ của riêng bạn",
- "rail.ownSub": "Một máy chủ bạn thuê trực tuyến, một Mac mini ở nhà hoặc một máy tính trong mạng Tailscale của bạn.",
- "rail.paste": "Dán liên kết ghép nối",
"rail.back": "Quay lại",
"rail.ownServer": "{name}, máy chủ của riêng bạn",
"rail.offline": "{name}: ngoại tuyến",
@@ -5153,6 +5150,23 @@
"rail.ownNetwork": "Chỉ truy cập được từ mạng riêng của nó",
"rail.update": "đang ở {version}, đã có {latest}",
"rail.connectTitle": "Kết nối {name}",
+ "connect.title": "Kết nối với máy chủ",
+ "connect.choiceSub": "Máy chủ của riêng bạn: một VPS, một Mac mini ở nhà hoặc một máy tính trong mạng Tailscale của bạn.",
+ "connect.lede": "Dán liên kết mà máy chủ đã hiển thị, hoặc nhập địa chỉ và mã ghép nối của nó. Các bot của nó vẫn ở trên máy chủ.",
+ "connect.signedInLede": "Máy chủ này đã đăng nhập vào tài khoản của bạn. Dán liên kết của nó, hoặc nhập địa chỉ và một mã ghép nối.",
+ "connect.address": "Liên kết hoặc địa chỉ",
+ "connect.addressPlaceholder": "https://maus.example.com hoặc 192.168.1.20:8799",
+ "connect.code": "Mã ghép nối",
+ "connect.noCode": "Chưa có mã? Trên máy chủ, hãy chạy:",
+ "connect.addAddress": "Giờ hãy thêm địa chỉ của máy chủ, ví dụ {example}.",
+ "connect.found": "{name} · MausBot {version}",
+ "connect.found.https": "HTTPS",
+ "connect.found.tailscale": "Tailscale",
+ "connect.found.privateHttp": "Mạng riêng, không mã hóa. Ổn trong mạng của riêng bạn hoặc qua Tailscale.",
+ "connect.found.loopback": "Máy tính này",
+ "connect.to": "Kết nối với {name}",
+ "connect.copy": "Sao chép",
+ "connect.copied": "Đã sao chép",
"rail.hide": "Ẩn các máy tính của bạn",
"rail.show": "Hiện các máy tính của bạn",
"rail.showSub": "Một biểu tượng cho mỗi nơi các bot của bạn sống, ở bên trái ứng dụng.",
@@ -5446,5 +5460,19 @@
"server.meetings.end.meet_refused": "Google Meet không cho tôi vào với tư cách khách. Người chủ trì có thể cho phép khách trong phần điều khiển của người chủ trì, hoặc cuộc họp có thể không cho người ngoài tổ chức tham gia.",
"server.meetings.end.speech_unavailable": "Tôi không lấy được dịch vụ chuyển giọng nói thành văn bản cho cuộc họp này, nên tôi không tham gia.",
"server.meetings.card.settingUp": "Đang thiết lập ghi chép (một lần, khoảng một phút)…",
- "server.meetings.card.speechStopped": "Đã dừng ghi chép: {problem}"
+ "server.meetings.card.speechStopped": "Đã dừng ghi chép: {problem}",
+ "native.connect.empty": "Nhập địa chỉ của máy chủ hoặc dán liên kết của nó.",
+ "native.connect.codeOnly": "Đó là mã ghép nối. Hãy nhập cả địa chỉ của máy chủ, ví dụ {example}.",
+ "native.connect.emailCode": "Đó là mã đăng nhập từ email. Ghép nối cần một mã 12 ký tự như 7KQ2-M9XD-H4TP.",
+ "native.connect.oldCode": "Đó là mã từ phiên bản MausBot cũ. Ghép nối cần một mã 12 ký tự như 7KQ2-M9XD-H4TP: trên máy chủ, hãy chạy openmausbot pair.",
+ "native.connect.scriptKey": "Đó là khóa dành cho script. Ghép nối cần một mã ghép nối.",
+ "native.connect.notACode": "Đó không phải mã ghép nối. Ghép nối cần một mã 12 ký tự như 7KQ2-M9XD-H4TP.",
+ "native.connect.publicHttp": "http://{host} nằm trên internet công khai và không được mã hóa, nên người khác có thể đọc các cuộc trò chuyện của bạn. Hãy dùng địa chỉ https của nó, hoặc đặt HTTPS phía trước (cloudflared, Caddy hoặc Tailscale).",
+ "native.connect.phoneLink": "Liên kết đó dành cho ứng dụng MausBot trên điện thoại. Hãy dán liên kết mà máy chủ đã hiển thị, hoặc địa chỉ của nó.",
+ "native.connect.notAnAddress": "Đó không phải địa chỉ máy chủ. Hãy dán liên kết mà máy chủ đã hiển thị, hoặc nhập địa chỉ của nó, ví dụ {example}.",
+ "native.connect.unreachable": "Không thể kết nối tới {host}. Hãy kiểm tra máy chủ đang chạy và có thể truy cập từ máy tính này.",
+ "native.connect.dns": "{host} chưa tồn tại. Hãy kiểm tra chính tả, hoặc chờ bản ghi DNS.",
+ "native.connect.certificate": "Chứng chỉ của {host} chưa hợp lệ. Máy chủ mới có thể mất một phút để nhận chứng chỉ.",
+ "native.connect.notMausBot": "Địa chỉ đó có phản hồi, nhưng không phải máy chủ MausBot.",
+ "native.connect.loopback": "Địa chỉ này trỏ tới máy tính này ({host}), không phải máy chủ. Hãy dùng địa chỉ riêng của máy chủ."
}
diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.json
index 62be33c8bc..fc3d210533 100644
--- a/src/locales/zh-tw.json
+++ b/src/locales/zh-tw.json
@@ -4533,9 +4533,6 @@
"rail.orgNoPlan": "你的 Team 方案目前未生效,所以無法新增組織。Cloud 頁面上的帳單資訊會說明原因。",
"rail.orgOff": "目前無法新增組織。",
"rail.orgFailed": "沒有新增任何內容。請稍後再試。",
- "rail.own": "新增你自己的伺服器",
- "rail.ownSub": "線上租用的伺服器、家裡的 Mac mini,或你 Tailscale 網路中的電腦。",
- "rail.paste": "貼上配對連結",
"rail.back": "返回",
"rail.ownServer": "{name}(你自己的伺服器)",
"rail.offline": "{name}:離線",
@@ -4544,6 +4541,23 @@
"rail.ownNetwork": "只能從它自己的網路連線",
"rail.update": "目前是 {version},{latest} 已推出",
"rail.connectTitle": "連線 {name}",
+ "connect.title": "連線到伺服器",
+ "connect.choiceSub": "你自己的伺服器:VPS、家裡的 Mac mini,或你 Tailscale 網路上的電腦。",
+ "connect.lede": "貼上伺服器顯示的連結,或輸入它的位址和配對碼。它的機器人會留在伺服器上。",
+ "connect.signedInLede": "它已經登入你的帳號。貼上它的連結,或輸入它的位址和配對碼。",
+ "connect.address": "連結或位址",
+ "connect.addressPlaceholder": "https://maus.example.com 或 192.168.1.20:8799",
+ "connect.code": "配對碼",
+ "connect.noCode": "沒有配對碼?在伺服器上執行:",
+ "connect.addAddress": "現在加上伺服器的位址,例如 {example}。",
+ "connect.found": "{name} · MausBot {version}",
+ "connect.found.https": "HTTPS",
+ "connect.found.tailscale": "Tailscale",
+ "connect.found.privateHttp": "私人網路,未加密。在你自己的網路或 Tailscale 上沒問題。",
+ "connect.found.loopback": "這台電腦",
+ "connect.to": "連線到 {name}",
+ "connect.copy": "複製",
+ "connect.copied": "已複製",
"rail.hide": "隱藏你的電腦",
"rail.show": "顯示你的電腦",
"rail.showSub": "在應用程式左側,為你的機器人所在的每個地方顯示一個圖示。",
@@ -4838,5 +4852,19 @@
"server.meetings.end.meet_refused": "Google Meet 沒有讓我以訪客身分進入。主持人可以在主持人控制項中允許訪客,或者這場會議可能不允許組織外的人加入。",
"server.meetings.end.speech_unavailable": "我無法為這場會議取得語音轉文字服務,所以沒有加入。",
"server.meetings.card.settingUp": "正在設定逐字稿(僅首次,約一分鐘)…",
- "server.meetings.card.speechStopped": "逐字稿已停止:{problem}"
+ "server.meetings.card.speechStopped": "逐字稿已停止:{problem}",
+ "native.connect.empty": "輸入伺服器的位址,或貼上它的連結。",
+ "native.connect.codeOnly": "這是配對碼。也請輸入伺服器的位址,例如 {example}。",
+ "native.connect.emailCode": "這是電子郵件裡的登入碼。配對需要像 7KQ2-M9XD-H4TP 這樣的 12 字元配對碼。",
+ "native.connect.oldCode": "這是舊版 MausBot 的代碼。配對需要像 7KQ2-M9XD-H4TP 這樣的 12 字元配對碼:請在伺服器上執行 openmausbot pair。",
+ "native.connect.scriptKey": "這是指令碼金鑰。配對需要配對碼。",
+ "native.connect.notACode": "這不是配對碼。配對需要像 7KQ2-M9XD-H4TP 這樣的 12 字元配對碼。",
+ "native.connect.publicHttp": "http://{host} 位於公開網際網路且未加密,別人可能讀到你的對話。請使用它的 https 位址,或在前面加上 HTTPS(cloudflared、Caddy 或 Tailscale)。",
+ "native.connect.phoneLink": "這個連結是給手機上的 MausBot App 用的。請貼上伺服器顯示的連結,或它的位址。",
+ "native.connect.notAnAddress": "這不是伺服器位址。請貼上伺服器顯示的連結,或輸入它的位址,例如 {example}。",
+ "native.connect.unreachable": "無法連到 {host}。請確認伺服器正在執行,且這台電腦連得到它。",
+ "native.connect.dns": "{host} 還不存在。請檢查拼字,或等待 DNS 記錄生效。",
+ "native.connect.certificate": "{host} 的憑證還無效。新伺服器可能需要一分鐘取得憑證。",
+ "native.connect.notMausBot": "這個位址有回應,但它不是 MausBot 伺服器。",
+ "native.connect.loopback": "這指向這台電腦({host}),而不是伺服器。請使用伺服器自己的位址。"
}
diff --git a/src/locales/zh.json b/src/locales/zh.json
index 63dce71cc0..f2afd5e600 100644
--- a/src/locales/zh.json
+++ b/src/locales/zh.json
@@ -585,13 +585,7 @@
"rail.orgNoPlan": "你的 Team 方案目前未生效,所以无法添加组织。Cloud 页面上的账单信息会说明原因。",
"rail.orgOff": "目前无法新建组织。",
"rail.orgFailed": "没有添加任何内容。请稍后再试。",
- "rail.own": "添加你自己的服务器",
- "rail.ownSub": "在线租用的服务器、家里的 Mac mini,或你 Tailscale 网络中的电脑。",
- "rail.paste": "粘贴配对链接",
- "rail.pasteLede": "粘贴你自己服务器「设置 → 远程访问」中的配对链接。此应用会像打开 Cloud 一样打开它,而它的机器人仍留在它上面。",
- "rail.connectPasteLede": "它已经登录你的账户。请粘贴它「设置 → 远程访问」中的配对链接。",
"rail.connect": "连接",
- "rail.linkFailed": "这不是此应用能打开的配对链接。请从你自己的服务器复制完整链接再粘贴一次。",
"rail.back": "返回",
"rail.ownServer": "{name}(你自己的服务器)",
"rail.offline": "{name}:离线",
@@ -600,6 +594,23 @@
"rail.ownNetwork": "只能从它自己的网络访问",
"rail.update": "当前为 {version},{latest} 已发布",
"rail.connectTitle": "连接 {name}",
+ "connect.title": "连接到服务器",
+ "connect.choiceSub": "你自己的服务器:VPS、家里的 Mac mini,或你 Tailscale 网络中的电脑。",
+ "connect.lede": "粘贴服务器显示的链接,或输入它的地址和配对码。它的机器人会留在服务器上。",
+ "connect.signedInLede": "它已登录你的账号。粘贴它的链接,或输入它的地址和配对码。",
+ "connect.address": "链接或地址",
+ "connect.addressPlaceholder": "https://maus.example.com 或 192.168.1.20:8799",
+ "connect.code": "配对码",
+ "connect.noCode": "没有配对码?在服务器上运行:",
+ "connect.addAddress": "现在添加服务器的地址,例如 {example}。",
+ "connect.found": "{name} · MausBot {version}",
+ "connect.found.https": "HTTPS",
+ "connect.found.tailscale": "Tailscale",
+ "connect.found.privateHttp": "私有网络,未加密。在你自己的网络或 Tailscale 上没问题。",
+ "connect.found.loopback": "这台电脑",
+ "connect.to": "连接到 {name}",
+ "connect.copy": "复制",
+ "connect.copied": "已复制",
"rail.hide": "隐藏你的电脑",
"rail.show": "显示你的电脑",
"rail.showSub": "在应用左侧,为你的机器人所在的每个地方显示一个图标。",
@@ -7514,5 +7525,19 @@
"server.meetings.end.meet_refused": "Google Meet 没有让我以访客身份进入。主持人可以在主持人控制中允许访客,或者该会议可能不允许组织外的人加入。",
"server.meetings.end.speech_unavailable": "我无法为这场会议获得语音转文字服务,所以没有加入。",
"server.meetings.card.settingUp": "正在设置转写(仅首次,约一分钟)…",
- "server.meetings.card.speechStopped": "转写已停止:{problem}"
+ "server.meetings.card.speechStopped": "转写已停止:{problem}",
+ "native.connect.empty": "输入服务器的地址,或粘贴它的链接。",
+ "native.connect.codeOnly": "这是配对码。还请输入服务器的地址,例如 {example}。",
+ "native.connect.emailCode": "这是邮件里的登录码。配对需要像 7KQ2-M9XD-H4TP 这样的 12 位配对码。",
+ "native.connect.oldCode": "这是旧版 MausBot 的代码。配对需要像 7KQ2-M9XD-H4TP 这样的 12 位配对码:请在服务器上运行 openmausbot pair。",
+ "native.connect.scriptKey": "这是脚本密钥。配对需要配对码。",
+ "native.connect.notACode": "这不是配对码。配对需要像 7KQ2-M9XD-H4TP 这样的 12 位配对码。",
+ "native.connect.publicHttp": "http://{host} 位于公共互联网且未加密,别人可能读到你的聊天。请使用它的 https 地址,或在前面加上 HTTPS(cloudflared、Caddy 或 Tailscale)。",
+ "native.connect.phoneLink": "这个链接是给手机上的 MausBot 应用用的。请粘贴服务器显示的链接,或它的地址。",
+ "native.connect.notAnAddress": "这不是服务器地址。请粘贴服务器显示的链接,或输入它的地址,例如 {example}。",
+ "native.connect.unreachable": "无法连接到 {host}。请确认服务器正在运行,并且这台电脑可以访问它。",
+ "native.connect.dns": "{host} 还不存在。请检查拼写,或等待 DNS 记录生效。",
+ "native.connect.certificate": "{host} 的证书还无效。新服务器可能需要一分钟来获取证书。",
+ "native.connect.notMausBot": "这个地址有响应,但它不是 MausBot 服务器。",
+ "native.connect.loopback": "这指向这台电脑({host}),而不是服务器。请使用服务器自己的地址。"
}
diff --git a/src/types/ogb.d.ts b/src/types/ogb.d.ts
index e47c418d05..11150ed7cf 100644
--- a/src/types/ogb.d.ts
+++ b/src/types/ogb.d.ts
@@ -176,9 +176,12 @@ const __APP_VERSION__: string;
/** Opens a circle main listed, by its id, through main's own switch: only from the person's click. */
/** Nothing for a place of the account in use; for another account's, how its switch went. */
open?: (id: string) => Promise<import("../../electron/cloud-account.mjs").RailOpenResult | undefined>;
- /** +'s fixed choices: buy a Cloud (this computer's own sheet), a server's pairing link (`link`: the one pasted on the
- * sheet; without it, the clipboard's), or type its address. Resolves false when the person cancels Connect. */
- add?: (choice: "cloud" | "link" | "address", link?: string) => Promise<unknown>;
+ /** +'s fixed choices: buy a Cloud (this computer's own sheet), connect to a server (`link`: the sheet's link or
+ * address, `code` the pairing code typed apart; without `link`, the clipboard's), or type its address. With `code`
+ * (even empty) it resolves with the outcome; without, false when the person cancels Connect. */
+ add?: (choice: "cloud" | "link" | "address", link?: string, code?: string) => Promise<import("../../electron/server-probe.mjs").ConnectOutcome | boolean | void>;
+ /** Finds the MausBot server at what the Connect sheet holds, without connecting. Absent on an older app. */
+ probe?: (address: string, code?: string) => Promise<import("../../electron/server-probe.mjs").ServerProbe>;
/** The colour of the place this page is (This computer's too), and whether it can be changed here. Absent on an
* older app. */
look?: () => Promise<import("../../electron/place-look.mjs").PlaceLook | null>;