{"version":34,"agent":"pinch","message":"Client: abso orgs and abso org <name>, reading as the person who approved this box's sign-in (abso login): your organizations and roles, invitations waiting for you, and an org's projects, people (by name, never id), settings and open invites. Changes (--invite, --role, --remove, --leave, --members, --projects-by), abso org new and abso init --org are made on the website for now; each says where and sends nothing. One change at a time. MCP serves orgs and org. Client tests 283/283, tsc and biome clean.","time":1791543392927,"timeIso":"2026-10-09T10:56:32.927Z","changes":8,"change":406,"files":["client/src/box.ts","client/src/main.ts","client/src/mcp.ts","client/src/orgs.ts","client/test/orgs.test.ts"],"draft":null,"diff":[{"path":"client/src/box.ts","added":29,"removed":2,"diff":"--- a/client/src/box.ts\n+++ b/client/src/box.ts\n@@ -5,7 +5,8 @@\n //\n // The box credential lives in the user's config folder, one file per server,\n // never in a project folder. It is never printed, never an argument, and only\n-// ever sent to the server that issued it, on /box/ routes.\n+// ever sent to the server that issued it: on /box/ routes, and on the org reads,\n+// which answer as the person who approved the box.\n \n import { createHash } from \"node:crypto\";\n import { chmodSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from \"node:fs\";\n@@ -84,7 +85,7 @@\n \treturn out;\n }\n \n-interface Answer {\n+export interface Answer {\n \treadonly status: number;\n \treadonly body: Record<string, unknown>;\n }\n@@ -127,6 +128,32 @@\n \treturn { status: response.status, body: parsed };\n }\n \n+/**\n+ * A read that answers as the person who approved this box: the org reads (GET /orgs, /orgs/<name>). Answers the\n+ * status and body as they came, refusals included, so the caller can say what each means; never the credential.\n+ */\n+export async function boxGet(record: BoxRecord, path: string, fetcher: typeof fetch = fetch): Promise<Answer> {\n+\tconst secrets = [record.credential];\n+\tlet response: Response;\n+\ttry {\n+\t\tresponse = await fetcher(`${originOf(record.server)}${path}`, {\n+\t\t\theaders: { authorization: `Box ${record.credential}` },\n+\t\t\tsignal: AbortSignal.timeout(30_000),\n+\t\t});\n+\t} catch (err) {\n+\t\tthrow new UsageError(\n+\t\t\t`couldn't reach ${originOf(record.server)}: ${scrub(err instanceof Error ? err.message : String(err), secrets)}`,\n+\t\t);\n+\t}\n+\tconst text = await response.text();\n+\ttry {\n+\t\tconst body = JSON.parse(text) as unknown;\n+\t\tif (typeof body === \"object\" && body !== null && !Array.isArray(body))\n+\t\t\treturn { status: response.status, body: body as Record<string, unknown> };\n+\t} catch {}\n+\treturn { status: response.status, body: { error: scrub(text.slice(0, 300), secrets) } };\n+}\n+\n /** This machine's name, as the server takes a box's name: 1-64 letters, digits, '.', '_' or '-'. */\n function boxName(): string {\n \tconst name = hostname()"},{"path":"client/src/main.ts","added":33,"removed":4,"diff":"--- a/client/src/main.ts\n+++ b/client/src/main.ts\n@@ -43,6 +43,7 @@\n import { runBlame, runWhere, runWho, runWhy } from \"./history.ts\";\n import { runAnswer, runAsk, runIssue, runIssues, runSearch, runWaiting } from \"./issues.ts\";\n import { adminToken, issuedPublic, keyList, keyListText, keyNew, keyRevoke } from \"./key-admin.ts\";\n+import { initInOrg, runOrg, runOrgs } from \"./orgs.ts\";\n import { runUnqueue } from \"./queue.ts\";\n import { runNote, runNotes, runReview } from \"./review.ts\";\n import { installSkill, SKILL, skillPath } from \"./skill.ts\";\n@@ -86,11 +87,14 @@\n \n const COMMANDS: Readonly<Record<string, CommandDef>> = {\n \tinit: {\n-\t\tflags: { server: \"string\", project: \"string\", agent: \"string\", \"as-is\": \"boolean\" },\n-\t\tusage: \"abso init [folder] --server <url> --project <name> --agent <name> [--as-is]\",\n+\t\tflags: { server: \"string\", project: \"string\", agent: \"string\", \"as-is\": \"boolean\", org: \"string\" },\n+\t\tusage: \"abso init [folder] --server <url> --project <name> --agent <name> [--as-is] [--org <org>]\",\n \t\tabout:\n-\t\t\t\"Create a project on the server from a folder's text files. The folder becomes that agent's folder. It writes a starting .absoignore, and, when the folder has no avcs.json and package.json gives a check or a build to guess, an avcs.json (setup, check, build and out): what the server's CI runs on each new version of shared. Without one, CI runs what it can guess itself, or nothing. --as-is writes neither: the folder goes up exactly as it is (an import).\",\n-\t\trun: runInit,\n+\t\t\t\"Create a project on the server from a folder's text files. The folder becomes that agent's folder. It writes a starting .absoignore, and, when the folder has no avcs.json and package.json gives a check or a build to guess, an avcs.json (setup, check, build and out): what the server's CI runs on each new version of shared. Without one, CI runs what it can guess itself, or nothing. --as-is writes neither: the folder goes up exactly as it is (an import). --org <org> makes it an organization's project: for now that is done on the website, and abso says where.\",\n+\t\trun: (args, env) => {\n+\t\t\tconst org = str(args, \"org\");\n+\t\t\treturn org === undefined ? runInit(args, env) : initInOrg(org, boxServer(args, env));\n+\t\t},\n \t},\n \tkey: {\n \t\tflags: {\n@@ -207,6 +211,31 @@\n \t\t\t};\n \t\t},\n \t},\n+\torgs: {\n+\t\tflags: { server: \"string\" },\n+\t\tusage: \"abso orgs [--server <url>]\",\n+\t\tabout:\n+\t\t\t\"Your organizations and your role in each, and invitations waiting for you. It reads as the person who approved this box's sign-in (abso login).\",\n+\t\trun: (args, env) => runOrgs(boxServer(args, env)),\n+\t},\n+\torg: {\n+\t\tflags: {\n+\t\t\tserver: \"string\",\n+\t\t\tname: \"string\",\n+\t\t\tinvite: \"string\",\n+\t\t\tas: \"string\",\n+\t\t\trole: \"string\",\n+\t\t\tremove: \"string\",\n+\t\t\tleave: \"boolean\",\n+\t\t\tmembers: \"string\",\n+\t\t\t\"projects-by\": \"string\",\n+\t\t},\n+\t\tusage:\n+\t\t\t\"abso org <name> [--invite <person>|link [--as owner] | --role <person>=owner|member | --remove <person> | --leave | --members read|write | --projects-by members|owners] | abso org new <name> [--name <shown name>]\",\n+\t\tabout:\n+\t\t\t\"An organization: its projects, people, open invites and settings, as the person who approved this box's sign-in sees them (people and settings only to members). One change at a time. Changes and abso org new are made on the website for now, and abso says where.\",\n+\t\trun: (args, env) => runOrg(args, boxServer(args, env)),\n+\t},\n \tskill: {\n \t\tflags: { dir: \"string\" },\n \t\tusage: \"abso skill install [--dir <skills folder>] | abso skill show\","},{"path":"client/src/mcp.ts","added":2,"removed":0,"diff":"--- a/client/src/mcp.ts\n+++ b/client/src/mcp.ts\n@@ -52,6 +52,8 @@\n \t\"ask\",\n \t\"waiting\",\n \t\"answer\",\n+\t\"orgs\",\n+\t\"org\",\n ] as const;\n \n const PROTOCOLS = [\"2025-06-18\", \"2025-03-26\", \"2024-11-05\"];"},{"path":"client/src/orgs.ts","added":174,"removed":0,"diff":"--- /dev/null\n+++ b/client/src/orgs.ts\n@@ -0,0 +1,174 @@\n+// Organizations from the CLI: abso orgs and abso org <name>. They read as the\n+// person who approved this box's sign-in (abso login). Changing an org (new,\n+// invite, role, remove, leave, settings) and making a project in one are done on\n+// the website for now: a box sits where agents run, and its sign-in was given\n+// for project work, so the server takes only reads from it.\n+\n+import { type Parsed, UsageError } from \"./args.ts\";\n+import { type Answer, boxGet, originOf, readBox } from \"./box.ts\";\n+import type { Output } from \"./commands.ts\";\n+\n+/** The website for an API server: api.<site> serves <site>; any other server serves its own pages. */\n+export function siteOf(server: string): string {\n+\ttry {\n+\t\tconst url = new URL(server);\n+\t\tif (url.hostname.startsWith(\"api.\")) url.hostname = url.hostname.slice(\"api.\".length);\n+\t\treturn url.origin;\n+\t} catch {\n+\t\treturn server;\n+\t}\n+}\n+\n+/** The flags that change an org, in the order Design wrote them; each names where the website does it. */\n+const CHANGES: readonly { flag: string; tab: string }[] = [\n+\t{ flag: \"invite\", tab: \"People\" },\n+\t{ flag: \"role\", tab: \"People\" },\n+\t{ flag: \"remove\", tab: \"People\" },\n+\t{ flag: \"leave\", tab: \"People\" },\n+\t{ flag: \"members\", tab: \"Settings\" },\n+\t{ flag: \"projects-by\", tab: \"Settings\" },\n+];\n+\n+const WEBSITE_ONLY =\n+\t\"Organizations are changed on the website for now; from the CLI they can only be read, as the person who approved this box's sign-in\";\n+\n+/** Where the box's sign-in is read from and how the server is reached; tests pass their own. */\n+export interface OrgIo {\n+\treadonly home?: string;\n+\treadonly fetch?: typeof fetch;\n+}\n+\n+async function read(server: string, path: string, io: OrgIo): Promise<Answer> {\n+\tconst record = io.home === undefined ? readBox(server) : readBox(server, io.home);\n+\tif (!record)\n+\t\tthrow new UsageError(\n+\t\t\t`this box isn't signed in to ${originOf(server)}. abso login signs it in; org reads answer as the person who approves it`,\n+\t\t);\n+\treturn boxGet(record, path, io.fetch);\n+}\n+\n+/** What a refusal from an org read means, in words. */\n+function refused(a: Answer, what: string, server: string): UsageError {\n+\tconst said = typeof a.body.error === \"string\" ? a.body.error : `status ${a.status}`;\n+\tif (a.status === 401)\n+\t\treturn new UsageError(`${originOf(server)} didn't take this box's sign-in (${said}). abso login renews it`);\n+\tif (a.status === 404 && /aren't on here/.test(said)) return new UsageError(`${originOf(server)}: ${said}`);\n+\tif (a.status === 404) return new UsageError(`${what}: ${said}`);\n+\treturn new UsageError(`${originOf(server)} refused ${what} (${a.status}): ${said}`);\n+}\n+\n+const when = (iso: unknown) => (typeof iso === \"string\" ? `${iso.slice(0, 16).replace(\"T\", \" \")} UTC` : \"?\");\n+\n+interface OrgRow {\n+\tname: string;\n+\tdisplayName: string;\n+\trole: string;\n+}\n+interface Invitation {\n+\tid: string;\n+\torg: string;\n+\trole: string;\n+\texpiresAt: string;\n+}\n+\n+/** abso orgs: your organizations, your role in each, and invitations waiting for you. */\n+export async function runOrgs(server: string, io: OrgIo = {}): Promise<Output> {\n+\tconst a = await read(server, \"/orgs\", io);\n+\tif (a.status !== 200) throw refused(a, \"the list of your organizations\", server);\n+\tconst orgs = (a.body.orgs ?? []) as OrgRow[];\n+\tconst invitations = (a.body.invitations ?? []) as Invitation[];\n+\tconst lines =\n+\t\torgs.length === 0\n+\t\t\t? [\"You're in no organizations.\"]\n+\t\t\t: [\n+\t\t\t\t\t`Your organizations (${orgs.length}):`,\n+\t\t\t\t\t...orgs.map(\n+\t\t\t\t\t\t(o) => `  ${o.name}${o.displayName && o.displayName !== o.name ? ` (${o.displayName})` : \"\"}: ${o.role}`,\n+\t\t\t\t\t),\n+\t\t\t\t];\n+\tif (invitations.length > 0)\n+\t\tlines.push(\n+\t\t\t\"Invited to:\",\n+\t\t\t...invitations.map((i) => `  ${i.org} as ${i.role}, until ${when(i.expiresAt)}`),\n+\t\t\t`Accept them on the website, signed in: ${siteOf(server)}.`,\n+\t\t);\n+\treturn { text: lines.join(\"\\n\"), json: { orgs, invitations } };\n+}\n+\n+interface Member {\n+\tid: string;\n+\trole: string;\n+\tname: string | null;\n+\traised?: { project: string; role: string }[];\n+}\n+interface Invite {\n+\tid: string;\n+\trole: string;\n+\tkind: \"link\" | \"person\";\n+\texpiresAt: string;\n+}\n+\n+/** abso org <name>, abso org new <name>, and the change flags, which say where the website does each. */\n+export async function runOrg(args: Parsed, server: string, io: OrgIo = {}): Promise<Output> {\n+\tconst [first, second, ...more] = args.positionals;\n+\tconst asked = CHANGES.filter((c) => args.flags.has(c.flag));\n+\tif (first === \"new\") {\n+\t\tif (second === undefined || more.length > 0) throw new UsageError('abso org new <name> [--name \"<shown name>\"]');\n+\t\tthrow new UsageError(`${WEBSITE_ONLY}. Make ${second} at ${siteOf(server)}/orgs/new.`);\n+\t}\n+\tif (first === undefined || second !== undefined)\n+\t\tthrow new UsageError(\"abso org <name> [one change], or abso org new <name>\");\n+\tif (args.flags.has(\"as\") && !args.flags.has(\"invite\")) throw new UsageError(\"--as goes with --invite\");\n+\tif (asked.length > 1)\n+\t\tthrow new UsageError(`one change at a time: --${asked.map((c) => c.flag).join(\" and --\")} were given together`);\n+\tif (asked.length === 1)\n+\t\tthrow new UsageError(\n+\t\t\t`${WEBSITE_ONLY}. --${asked[0]!.flag} is on ${first}'s ${asked[0]!.tab} tab: ${siteOf(server)}/${first}.`,\n+\t\t);\n+\n+\tconst a = await read(server, `/orgs/${encodeURIComponent(first)}`, io);\n+\tif (a.status !== 200) throw refused(a, first, server);\n+\tconst org = a.body as {\n+\t\tname: string;\n+\t\tdisplayName: string;\n+\t\tdescription: string | null;\n+\t\trole?: string;\n+\t\tmembersCan?: string;\n+\t\twhoMakesProjects?: string;\n+\t\tmembers?: Member[];\n+\t\tprojects?: string[];\n+\t\tinvites?: Invite[];\n+\t};\n+\tconst lines = [`${org.name}${org.displayName && org.displayName !== org.name ? ` (${org.displayName})` : \"\"}`];\n+\tif (org.description) lines.push(`  ${org.description.replace(/\\r?\\n/g, \"\\n  \")}`);\n+\tif (org.role === undefined) {\n+\t\tlines.push(\"You aren't a member, so its people and settings aren't shown.\");\n+\t\treturn { text: lines.join(\"\\n\"), json: { org } };\n+\t}\n+\tlines.push(\n+\t\t`You're ${org.role === \"owner\" ? \"an owner\" : \"a member\"}. Members can ${org.membersCan ?? \"?\"} every project; ${org.whoMakesProjects === \"owners\" ? \"only owners make\" : \"members make\"} projects.`,\n+\t);\n+\tconst projects = org.projects ?? [];\n+\tlines.push(projects.length === 0 ? \"Projects: none yet.\" : `Projects (${projects.length}): ${projects.join(\", \")}`);\n+\tconst members = org.members ?? [];\n+\tlines.push(`People (${members.length}):`);\n+\tfor (const m of members) {\n+\t\tconst raised = (m.raised ?? []).map((r) => `${r.role} in ${r.project}`);\n+\t\tlines.push(\n+\t\t\t`  ${m.name ?? \"(no name yet)\"}: ${m.role}${raised.length > 0 ? `, raised to ${raised.join(\", \")}` : \"\"}`,\n+\t\t);\n+\t}\n+\tif (org.invites !== undefined && org.invites.length > 0) {\n+\t\tlines.push(\"Open invites:\");\n+\t\tfor (const i of org.invites)\n+\t\t\tlines.push(`  ${i.kind === \"link\" ? \"a link\" : \"a person, by name\"}, as ${i.role}, until ${when(i.expiresAt)}`);\n+\t}\n+\treturn { text: lines.join(\"\\n\"), json: { org } };\n+}\n+\n+/** abso init --org: making a project in an org is a website step for now. */\n+export function initInOrg(org: string, server: string): never {\n+\tthrow new UsageError(\n+\t\t`projects in an organization are made on the website for now: New project at ${siteOf(server)}, with ${org} as its owner.`,\n+\t);\n+}"},{"path":"client/test/orgs.test.ts","added":198,"removed":0,"diff":"--- /dev/null\n+++ b/client/test/orgs.test.ts\n@@ -0,0 +1,198 @@\n+// abso orgs and abso org: reads as the person who approved the box's sign-in, and the changes say where the\n+// website makes them. The server here is a stand-in that answers the org routes' documented shapes.\n+\n+import assert from \"node:assert/strict\";\n+import { mkdtempSync } from \"node:fs\";\n+import { tmpdir } from \"node:os\";\n+import { join } from \"node:path\";\n+import { describe, it } from \"node:test\";\n+import { parseArgs } from \"../src/args.ts\";\n+import { writeBox } from \"../src/box.ts\";\n+import { commandTable } from \"../src/main.ts\";\n+import { initInOrg, runOrg, runOrgs, siteOf } from \"../src/orgs.ts\";\n+\n+const SERVER = \"https://api.example.dev\";\n+const CREDENTIAL = \"abso_bx_test0000000000\";\n+\n+function signedIn(): string {\n+\tconst home = mkdtempSync(join(tmpdir(), \"abso-orgs-\"));\n+\twriteBox(\n+\t\t{\n+\t\t\tserver: SERVER,\n+\t\t\tid: \"box_1\",\n+\t\t\tcredential: CREDENTIAL,\n+\t\t\tgrant: { projects: [{ project: \"web\", role: \"writer\" }], max_agents: 3 },\n+\t\t\texpiresAt: Date.now() + 86_400_000,\n+\t\t},\n+\t\thome,\n+\t);\n+\treturn home;\n+}\n+\n+/** A stand-in server: answers from `routes` by path, and keeps what was asked. */\n+function server(routes: Record<string, { status: number; body: unknown }>) {\n+\tconst asked: { url: string; method: string; auth: string | null }[] = [];\n+\tconst fetcher = (async (url: string | URL | Request, init?: RequestInit) => {\n+\t\tconst u = new URL(String(url));\n+\t\tasked.push({\n+\t\t\turl: String(url),\n+\t\t\tmethod: init?.method ?? \"GET\",\n+\t\t\tauth: new Headers(init?.headers).get(\"authorization\"),\n+\t\t});\n+\t\tconst r = routes[u.pathname] ?? { status: 404, body: { error: \"no such route\" } };\n+\t\treturn new Response(JSON.stringify(r.body), { status: r.status });\n+\t}) as typeof fetch;\n+\treturn { fetcher, asked };\n+}\n+\n+const args = (line: string[]) => parseArgs(\"org\", line, commandTable().org!.flags);\n+\n+describe(\"abso orgs\", () => {\n+\tit(\"lists yours with your role, and invitations waiting, reading with the box's sign-in\", async () => {\n+\t\tconst home = signedIn();\n+\t\tconst s = server({\n+\t\t\t\"/orgs\": {\n+\t\t\t\tstatus: 200,\n+\t\t\t\tbody: {\n+\t\t\t\t\torgs: [\n+\t\t\t\t\t\t{ name: \"acme-labs\", displayName: \"Acme Labs\", role: \"owner\" },\n+\t\t\t\t\t\t{ name: \"beta\", displayName: \"beta\", role: \"member\" },\n+\t\t\t\t\t],\n+\t\t\t\t\tinvitations: [{ id: \"inv_1\", org: \"gamma\", role: \"member\", expiresAt: \"2026-10-16T10:00:00.000Z\" }],\n+\t\t\t\t},\n+\t\t\t},\n+\t\t});\n+\t\tconst out = await runOrgs(SERVER, { home, fetch: s.fetcher });\n+\t\tassert.equal(\n+\t\t\tout.text,\n+\t\t\t[\n+\t\t\t\t\"Your organizations (2):\",\n+\t\t\t\t\"  acme-labs (Acme Labs): owner\",\n+\t\t\t\t\"  beta: member\",\n+\t\t\t\t\"Invited to:\",\n+\t\t\t\t\"  gamma as member, until 2026-10-16 10:00 UTC\",\n+\t\t\t\t\"Accept them on the website, signed in: https://example.dev.\",\n+\t\t\t].join(\"\\n\"),\n+\t\t);\n+\t\tassert.deepEqual(s.asked, [{ url: `${SERVER}/orgs`, method: \"GET\", auth: `Box ${CREDENTIAL}` }]);\n+\t});\n+\n+\tit(\"says so when the box isn't signed in, the sign-in isn't taken, or orgs aren't on\", async () => {\n+\t\tconst empty = mkdtempSync(join(tmpdir(), \"abso-orgs-\"));\n+\t\tawait assert.rejects(runOrgs(SERVER, { home: empty, fetch: server({}).fetcher }), /abso login signs it in/);\n+\t\tconst home = signedIn();\n+\t\tconst expired = server({ \"/orgs\": { status: 401, body: { error: \"missing or wrong token\" } } });\n+\t\tawait assert.rejects(runOrgs(SERVER, { home, fetch: expired.fetcher }), /abso login renews it/);\n+\t\tconst off = server({ \"/orgs\": { status: 404, body: { error: \"organizations aren't on here yet\" } } });\n+\t\tawait assert.rejects(runOrgs(SERVER, { home, fetch: off.fetcher }), /api\\.example\\.dev: organizations aren't on/);\n+\t});\n+\n+\tit(\"never prints the credential, even when the server echoes it\", async () => {\n+\t\tconst home = signedIn();\n+\t\tconst s = server({ \"/orgs\": { status: 500, body: `oops ${CREDENTIAL}` } });\n+\t\tawait assert.rejects(runOrgs(SERVER, { home, fetch: s.fetcher }), (e: Error) => !e.message.includes(CREDENTIAL));\n+\t});\n+});\n+\n+describe(\"abso org <name>\", () => {\n+\tconst acme = {\n+\t\tname: \"acme-labs\",\n+\t\tdisplayName: \"Acme Labs\",\n+\t\tdescription: \"We make labs.\",\n+\t\trole: \"owner\",\n+\t\tmembersCan: \"write\",\n+\t\twhoMakesProjects: \"members\",\n+\t\tmembers: [\n+\t\t\t{ id: \"cf-1\", role: \"owner\", name: \"sam\", raised: [] },\n+\t\t\t{ id: \"cf-2\", role: \"member\", name: null, raised: [{ project: \"web\", role: \"owner\" }] },\n+\t\t],\n+\t\tprojects: [\"api\", \"web\"],\n+\t\tinvites: [{ id: \"inv_2\", role: \"member\", kind: \"link\", for: null, expiresAt: \"2026-10-16T10:00:00.000Z\" }],\n+\t};\n+\n+\tit(\"shows its projects, people, settings and open invites to a member, never a person's id\", async () => {\n+\t\tconst home = signedIn();\n+\t\tconst s = server({ \"/orgs/acme-labs\": { status: 200, body: acme } });\n+\t\tconst out = await runOrg(args([\"acme-labs\"]), SERVER, { home, fetch: s.fetcher });\n+\t\tassert.equal(\n+\t\t\tout.text,\n+\t\t\t[\n+\t\t\t\t\"acme-labs (Acme Labs)\",\n+\t\t\t\t\"  We make labs.\",\n+\t\t\t\t\"You're an owner. Members can write every project; members make projects.\",\n+\t\t\t\t\"Projects (2): api, web\",\n+\t\t\t\t\"People (2):\",\n+\t\t\t\t\"  sam: owner\",\n+\t\t\t\t\"  (no name yet): member, raised to owner in web\",\n+\t\t\t\t\"Open invites:\",\n+\t\t\t\t\"  a link, as member, until 2026-10-16 10:00 UTC\",\n+\t\t\t].join(\"\\n\"),\n+\t\t);\n+\t\tassert.equal(out.text.includes(\"cf-\"), false);\n+\t});\n+\n+\tit(\"shows a non-member only what the org shows everyone\", async () => {\n+\t\tconst home = signedIn();\n+\t\tconst s = server({\n+\t\t\t\"/orgs/acme-labs\": { status: 200, body: { name: \"acme-labs\", displayName: \"Acme Labs\", description: null } },\n+\t\t});\n+\t\tconst out = await runOrg(args([\"acme-labs\"]), SERVER, { home, fetch: s.fetcher });\n+\t\tassert.equal(out.text, \"acme-labs (Acme Labs)\\nYou aren't a member, so its people and settings aren't shown.\");\n+\t});\n+\n+\tit(\"says when there's no such org\", async () => {\n+\t\tconst home = signedIn();\n+\t\tawait assert.rejects(runOrg(args([\"nope\"]), SERVER, { home, fetch: server({}).fetcher }), /^.*nope: no such route/);\n+\t});\n+\n+\tit(\"sends no change: each says where on the website it is made, and nothing reaches the server\", async () => {\n+\t\tconst home = signedIn();\n+\t\tconst s = server({});\n+\t\tconst cases: [string[], RegExp][] = [\n+\t\t\t[[\"acme-labs\", \"--invite\", \"sam\"], /--invite is on acme-labs's People tab: https:\\/\\/example\\.dev\\/acme-labs\\./],\n+\t\t\t[[\"acme-labs\", \"--invite\", \"link\"], /People tab/],\n+\t\t\t[[\"acme-labs\", \"--role\", \"sam=owner\"], /--role is on acme-labs's People tab/],\n+\t\t\t[[\"acme-labs\", \"--remove\", \"jo\"], /--remove is on/],\n+\t\t\t[[\"acme-labs\", \"--leave\"], /--leave is on acme-labs's People tab/],\n+\t\t\t[[\"acme-labs\", \"--members\", \"read\"], /--members is on acme-labs's Settings tab/],\n+\t\t\t[[\"acme-labs\", \"--projects-by\", \"owners\"], /--projects-by is on acme-labs's Settings tab/],\n+\t\t\t[[\"new\", \"acme-labs\", \"--name\", \"Acme Labs\"], /Make acme-labs at https:\\/\\/example\\.dev\\/orgs\\/new\\./],\n+\t\t];\n+\t\tfor (const [line, said] of cases) {\n+\t\t\tawait assert.rejects(runOrg(args(line), SERVER, { home, fetch: s.fetcher }), said, line.join(\" \"));\n+\t\t\tawait assert.rejects(runOrg(args(line), SERVER, { home, fetch: s.fetcher }), /changed on the website for now/);\n+\t\t}\n+\t\tassert.deepEqual(s.asked, []);\n+\t});\n+\n+\tit(\"takes one change at a time, and --as only with --invite\", async () => {\n+\t\tconst home = signedIn();\n+\t\tconst s = server({});\n+\t\tawait assert.rejects(\n+\t\t\trunOrg(args([\"acme-labs\", \"--remove\", \"jo\", \"--leave\"]), SERVER, { home, fetch: s.fetcher }),\n+\t\t\t/one change at a time: --remove and --leave were given together/,\n+\t\t);\n+\t\tawait assert.rejects(\n+\t\t\trunOrg(args([\"acme-labs\", \"--as\", \"owner\"]), SERVER, { home, fetch: s.fetcher }),\n+\t\t\t/--as goes with --invite/,\n+\t\t);\n+\t\tawait assert.rejects(runOrg(args([]), SERVER, { home, fetch: s.fetcher }), /abso org <name>/);\n+\t});\n+});\n+\n+describe(\"the website for a server\", () => {\n+\tit(\"is the site api. serves, or the server itself\", () => {\n+\t\tassert.equal(siteOf(\"https://api.abso.dev\"), \"https://abso.dev\");\n+\t\tassert.equal(siteOf(\"https://staging.example.workers.dev/\"), \"https://staging.example.workers.dev\");\n+\t\tassert.equal(siteOf(\"http://localhost:8787\"), \"http://localhost:8787\");\n+\t});\n+});\n+\n+describe(\"abso init --org\", () => {\n+\tit(\"says the project is made on the website for now, with the org as its owner\", () => {\n+\t\tassert.throws(\n+\t\t\t() => initInOrg(\"acme-labs\", SERVER),\n+\t\t\t/made on the website for now: New project at https:\\/\\/example\\.dev, with acme-labs as its owner/,\n+\t\t);\n+\t});\n+});"}],"ci":null}