{"draft":null,"from":20,"to":21,"files":[{"path":"client/src/main.ts","added":5,"removed":4,"diff":"--- a/client/src/main.ts\n+++ b/client/src/main.ts\n@@ -37,6 +37,7 @@\n \ttakeNews,\n } from \"./commands.ts\";\n import { configPath, findRoot, installKey, readConfig, readToken } from \"./config.ts\";\n+import { TOKEN_SERVERS } from \"./core.ts\";\n import { runDraftSync, runLand, runSwitch } from \"./drafts.ts\";\n import { runExport } from \"./export.ts\";\n import { runBlame, runWhere, runWho, runWhy } from \"./history.ts\";\n@@ -56,12 +57,12 @@\n \treadonly run: (args: Parsed, env: Env) => Promise<Output>;\n }\n \n-/** The server login, box and logout act on: --server, or the folder's. */\n-function boxServer(args: Parsed, env: Env): string {\n+/** The server login, box and logout act on: --server, the folder's, or outside a folder abso.dev's (TOKEN_SERVERS[0]). */\n+export function boxServer(args: Parsed, env: Pick<Env, \"cwd\">): string {\n \tconst flag = str(args, \"server\");\n \tif (flag) return flag;\n \tconst root = findRoot(env.cwd);\n-\tif (!root) throw new UsageError(\"give --server <url>, or run this inside an agent's folder\");\n+\tif (!root) return TOKEN_SERVERS[0]!;\n \treturn (JSON.parse(readFileSync(configPath(root), \"utf8\")) as { server: string }).server;\n }\n \n@@ -166,7 +167,7 @@\n \t\tflags: { server: \"string\" },\n \t\tusage: \"abso login [--server <url>]\",\n \t\tabout:\n-\t\t\t\"Sign this box in once (abso issue 108): it shows a code and a link, and waits while a person approves the code on the website, choosing the projects, the highest role and how many agents. Then abso join in any of those projects gives each agent its own key, with no approval. The box's sign-in is kept in your user folder, never in a project folder, and is never printed. Without --server, the folder's server.\",\n+\t\t\t\"Sign this box in once (abso issue 108): it shows a code and a link, and waits while a person approves the code on the website, choosing the projects, the highest role and how many agents. Then abso join in any of those projects gives each agent its own key, with no approval. The box's sign-in is kept in your user folder, never in a project folder, and is never printed. Without --server, the folder's server, or https://api.abso.dev outside a folder.\",\n \t\trun: async (args, env) => {\n \t\t\tconst server = boxServer(args, env);\n \t\t\tconst record = await login(server, { say: (line) => process.stderr.write(`${line}\\n`) });"}],"unmatched":[]}