Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed

Versions 155 to 156

Compare

+7 −14 in 3 places
Lines 5–17 at 156 (were 5–17 at 155)
55import { Api, ApiError } from "./api.ts";
66import { bool, type Parsed, str, UsageError } from "./args.ts";
77import { writeKnownBlobs } from "./blobs.ts";
8−import { defaultAgentName, mintFreeName, mintKey, readBox, signedInServers } from "./box.ts";
8+import { defaultAgentName, mintFreeName, mintKey, readBox } from "./box.ts";
99import { STARTING_ABSOIGNORE } from "./check-ignore.ts";
1010import { CLIENT_DIR } from "./client-version.ts";
1111import { type Env, type Output, plural } from "./command-env.ts";
1212import { leftOutText, syncFolder, uploadBlobs } from "./commands.ts";
1313import { findRoot, installKey, readConfig, type Settings, tokenFor, writeConfig } from "./config.ts";
14−import { TOKEN_SERVERS } from "./core.ts";
14+import { elsewhereText } from "./doctor.ts";
1515import { fromEnv } from "./env-names.ts";
1616import { clearKnown, loadIgnore, readFolder, writeKnown } from "./folder.ts";
1717import { modInstalled } from "./install.ts";
Lines 19–30 at 156 (were 19–37 at 155)
1919import { siteOf } from "./orgs.ts";
2020import { projectFileName, readProjectFile, startingProjectFileText, writeStartingProjectFile } from "./project-file.ts";
2121import { refusedText } from "./safety.ts";
22+import { chooseServer, serverFlag } from "./server-choice.ts";
2223import { OLD_STATE_DIR, STATE_DIR, stateDir } from "./state-dir.ts";
2324
24−/**
25− * The server to join or start on: --server, then ABSO_SERVER, then the server this box is signed in
26− * to (abso login wrote it), then https://api.abso.dev. A box signed in to more than one server has to say which.
27− */
28−export function serverFrom(args: Parsed, env: Pick<Env, "env">, home?: string): string {
29− const named = str(args, "server") ?? fromEnv(env.env, "SERVER");
30− if (named) return named;
31− const signedIn = signedInServers(home);
32− if (signedIn.length > 1)
33− throw new UsageError(`this box is signed in to ${signedIn.join(" and ")}: say which with --server <url>`);
34− return signedIn[0] ?? TOKEN_SERVERS[0]!;
25+/** The server to join or start on, in the order every command picks one (server-choice.ts chooseServer). */
26+export function serverFrom(args: Parsed, env: Pick<Env, "env" | "cwd">): string {
27+ return chooseServer(serverFlag(args), env.cwd, env.env);
3528}
3629
3730const NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
Lines 143–149 at 156 (were 150–156 at 155)
150143async function signedOut(server: string, project: string): Promise<string> {
151144 return (await isPublic(server, project))
152145 ? `${project} is public: read it at ${siteOf(server)}/${SITE_OWNER}/${project} (every page is also JSON), or here with abso join ${project} --reader. To work on it: abso login.`
153− : `This box isn't signed in to ${server}. abso login signs it in.`;
146+ : `This box isn't signed in to ${server}. abso login signs it in.${elsewhereText(server, `abso join ${project}`)}`;
154147}
155148
156149/** A folder that reads a public project signed out: no agent, no key, no copy of the files. */
MCP
compare on this site's /mcp
CLI
abso diff 155 156 client/src/join-commands.ts --json
JSON
/christopher/abso-core/compare/155..156?file=client%2Fsrc%2Fjoin-commands.ts&format=json