{"version":69,"agent":"pinch","message":"join, signed out: for a public project, the error names its page on the website and says the client needs a sign-in, even to read ('abso-core is public: read it at https://abso.dev/p/abso-core (every page is also JSON). The client needs a sign-in, even to read: abso login.'). Whether it's public is asked of the server with no credentials. A project that isn't public keeps the plain 'abso login signs it in'. Product Lead's wording.","time":1791607846461,"timeIso":"2026-10-10T04:50:46.461Z","changes":4,"change":863,"files":["client/src/join-commands.ts","client/test/join-signed-out.test.ts"],"draft":null,"diff":[{"path":"client/src/join-commands.ts","added":22,"removed":2,"diff":"--- a/client/src/join-commands.ts\n+++ b/client/src/join-commands.ts\n@@ -16,6 +16,7 @@\n import { clearKnown, loadIgnore, readFolder, writeKnown } from \"./folder.ts\";\n import { modInstalled } from \"./install.ts\";\n import { type FullMode, foldModes, writeKnownModes } from \"./modes.ts\";\n+import { siteOf } from \"./orgs.ts\";\n import { projectFileName, readProjectFile, startingProjectFileText, writeStartingProjectFile } from \"./project-file.ts\";\n import { refusedText } from \"./safety.ts\";\n import { OLD_STATE_DIR, STATE_DIR, stateDir } from \"./state-dir.ts\";\n@@ -123,6 +124,22 @@\n \treturn sub;\n }\n \n+/**\n+ * Why a join failed signed out. The client reads only as an agent, which needs a\n+ * sign-in; a public project is read signed out on the website. Whether the\n+ * project is public is asked of the server with no credentials.\n+ */\n+async function signedOut(server: string, project: string): Promise<string> {\n+\tlet open = false;\n+\ttry {\n+\t\tconst response = await fetch(new URL(`/p/${project}/status`, server), { signal: AbortSignal.timeout(3000) });\n+\t\topen = response.ok;\n+\t} catch {}\n+\treturn open\n+\t\t? `${project} is public: read it at ${siteOf(server)}/p/${project} (every page is also JSON). The client needs a sign-in, even to read: abso login.`\n+\t\t: `This box isn't signed in to ${server}. abso login signs it in.`;\n+}\n+\n export async function runJoin(args: Parsed, env: Env): Promise<Output> {\n \tif (args.positionals.length !== 1) throw new UsageError(\"join takes the project name: abso join <project>\");\n \tconst project = args.positionals[0]!;\n@@ -144,7 +161,10 @@\n \t\tminted = box && !hasKey ? await mintKey(box, project, agent) : undefined;\n \t} else {\n \t\t// No --agent: the box's name, or the next free -2, -3.\n-\t\tif (!box) throw new UsageError(\"abso login signs this box in first (or give --agent <name>)\");\n+\t\tif (!box)\n+\t\t\tthrow new UsageError(\n+\t\t\t\t`${await signedOut(server, project)} (A folder that already has a key joins with --agent <name>.)`,\n+\t\t\t);\n \t\tif (hasKey) throw new UsageError(`${root} already has a key: give its agent's name with --agent <name>`);\n \t\tconst free = await mintFreeName(box, project, defaultAgentName());\n \t\tagent = free.agent;\n@@ -165,7 +185,7 @@\n \t} catch (error) {\n \t\tif (!(error instanceof ApiError && error.status === 401 && !box && !settings.token)) throw error;\n \t\trmSync(stateDir(root), { recursive: true, force: true });\n-\t\tthrow new UsageError(`This box isn't signed in to ${config.server}. abso login signs it in.`);\n+\t\tthrow new UsageError(await signedOut(config.server, project));\n \t}\n \treturn {\n \t\ttext: ["},{"path":"client/test/join-signed-out.test.ts","added":79,"removed":0,"diff":"--- /dev/null\n+++ b/client/test/join-signed-out.test.ts\n@@ -0,0 +1,79 @@\n+// A join with no sign-in says abso login signs the box in. For a public project\n+// it also says where the website shows it, since the client needs a sign-in\n+// even to read. The client runs as its own process with an empty home, so no\n+// sign-in or token on this machine is found.\n+\n+import assert from \"node:assert/strict\";\n+import { execFile } from \"node:child_process\";\n+import { mkdtempSync, rmSync } from \"node:fs\";\n+import { createServer, type Server } from \"node:http\";\n+import type { AddressInfo } from \"node:net\";\n+import { tmpdir } from \"node:os\";\n+import { join, resolve } from \"node:path\";\n+import { after, before, describe, it } from \"node:test\";\n+import { type Fake, startFake } from \"./fake-server.ts\";\n+\n+const CLIENT = resolve(import.meta.dirname, \"..\", \"abso.ts\");\n+let fake: Fake;\n+// A server where every project is public: status answers signed out, and the agent routes want a sign-in.\n+let open: Server;\n+let openUrl: string;\n+const dirs: string[] = [];\n+const temp = () => {\n+\tconst dir = mkdtempSync(join(tmpdir(), \"abso-test-signed-out-\"));\n+\tdirs.push(dir);\n+\treturn dir;\n+};\n+\n+before(async () => {\n+\tfake = await startFake(0, \"test-token-not-secret\");\n+\topen = createServer((req, res) => {\n+\t\tif (req.method === \"GET\" && /^\\/p\\/[^/]+\\/status$/.test(req.url ?? \"\"))\n+\t\t\treturn res.writeHead(200, { \"content-type\": \"application/json\" }).end('{\"version\":1,\"agents\":[]}');\n+\t\tres.writeHead(401, { \"content-type\": \"application/json\" }).end('{\"error\":\"sign in\"}');\n+\t});\n+\tawait new Promise<void>((done) => open.listen(0, \"127.0.0.1\", done));\n+\topenUrl = `http://127.0.0.1:${(open.address() as AddressInfo).port}`;\n+});\n+after(async () => {\n+\tawait fake.close();\n+\topen.close();\n+\tfor (const dir of dirs) rmSync(dir, { recursive: true, force: true });\n+});\n+\n+/** Runs the client signed out: an empty home, and no token in the environment. */\n+function signedOut(...args: string[]): Promise<{ code: number; stderr: string }> {\n+\tconst home = temp();\n+\tconst env: Record<string, string> = {\n+\t\tPATH: process.env.PATH ?? \"\",\n+\t\tHOME: home,\n+\t\tUSERPROFILE: home,\n+\t\tAVCS_SERVERS_FILE: \"no-servers.json\",\n+\t};\n+\tif (process.env.CLAUDE_CONFIG_DIR) env.CLAUDE_CONFIG_DIR = process.env.CLAUDE_CONFIG_DIR;\n+\tif (process.env.SystemRoot) env.SystemRoot = process.env.SystemRoot;\n+\treturn new Promise((done) => {\n+\t\texecFile(process.execPath, [CLIENT, ...args], { cwd: temp(), env }, (error, _stdout, stderr) =>\n+\t\t\tdone({ code: typeof error?.code === \"number\" ? error.code : 0, stderr }),\n+\t\t);\n+\t});\n+}\n+\n+describe(\"join, signed out\", () => {\n+\tit(\"to a public project, as a reader, names its page on the website and abso login\", async () => {\n+\t\tconst run = await signedOut(\"join\", \"abso-core\", \"--agent\", \"qa-reader\", \"--reader\", \"--server\", openUrl);\n+\t\tassert.notEqual(run.code, 0);\n+\t\tassert.match(\n+\t\t\trun.stderr,\n+\t\t\t/abso-core is public: read it at http:\\/\\/127\\.0\\.0\\.1:\\d+\\/p\\/abso-core \\(every page is also JSON\\)\\. The client needs a sign-in, even to read: abso login\\./,\n+\t\t);\n+\t});\n+\n+\tit(\"to a project that isn't public, keeps to abso login, and says a folder with a key joins with --agent\", async () => {\n+\t\tconst run = await signedOut(\"join\", \"secret\", \"--server\", fake.url);\n+\t\tassert.notEqual(run.code, 0);\n+\t\tassert.match(run.stderr, /isn't signed in to .*abso login signs it in\\./);\n+\t\tassert.doesNotMatch(run.stderr, /is public/);\n+\t\tassert.match(run.stderr, /A folder that already has a key joins with --agent <name>/);\n+\t});\n+});"}],"ci":null}