- luxe remote puts the sessions on your computer in reach of your own phone or tablet over Tailscale: write, steer, answer prompts, send photos, browse files, diffs and GitHub, with a paired device and your own Tailscale login. - luxe join lets another program on the same machine join a running session over the RPC protocol. - An AGENTS.md in a subfolder reaches the model the first time it works there. - Long sessions stay fast: no stall before each model call, lighter memory, cheaper drawing. - A session is open in one Luxe at a time, web_search shares results across its phrasings, and a grep glob starting with ! excludes. The CHANGELOG has the full list.
29 lines
1.3 KiB
JavaScript
29 lines
1.3 KiB
JavaScript
// Reading an invitation out of what someone pasted.
|
|
|
|
import assert from "node:assert/strict";
|
|
import { test } from "node:test";
|
|
import { invitationFrom } from "../app/pairing.js";
|
|
|
|
/** A token as `luxe remote pair` makes one: 32 random bytes, URL-safe base64 without padding. */
|
|
const TOKEN = "q3J0-Zx_8fLmN2pQrStUvWxYz0123456789AbCdEfGh";
|
|
|
|
// The break this catches: the whole link sent as the invitation, which the bridge can't match
|
|
test("the token is read out of the printed link", () => {
|
|
assert.equal(invitationFrom(`https://desk.tail1234.ts.net/pair#${TOKEN}`), TOKEN);
|
|
});
|
|
|
|
// The break this catches: insisting on a whole link, when a notes app or a message may carry only
|
|
// the part after the #, or a copy picks up the line's spaces
|
|
test("the token alone is taken, spaces and all", () => {
|
|
assert.equal(invitationFrom(TOKEN), TOKEN);
|
|
assert.equal(invitationFrom(` ${TOKEN}\n`), TOKEN);
|
|
});
|
|
|
|
// The break this catches: a link without its invitation, or text that isn't one, enabling Pair
|
|
// for a request that can only fail
|
|
test("nothing that can't be an invitation is taken for one", () => {
|
|
for (const text of ["", "https://desk.tail1234.ts.net/pair", "https://desk.tail1234.ts.net/pair#", "two words"]) {
|
|
assert.equal(invitationFrom(text), null, JSON.stringify(text));
|
|
}
|
|
});
|