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 175 to 318

Compare

+9 −7 in 3 places
Lines 5–11 at 318 (were 5–11 at 175)
55import { ApiError } from "./api-error.ts";
66import { type Answer, type BoxRecord, boxGet, boxText, originOf, readBox, signedInServers } from "./box.ts";
77import { builtCopy } from "./client-version.ts";
8−import { type Config, credentialLabel, findRoot, readConfig } from "./config.ts";
8+import { type Config, credentialLabel, findRoot, readConfig, tokenFile } from "./config.ts";
99import { sameServer } from "./server-choice.ts";
1010
1111/**
Lines 84–92 at 318 (were 84–90 at 175)
8484 ? "the shared token"
8585 : c.kind === "pipeline run key"
8686 ? "a pipeline run's key"
87− : "no key";
87+ : tokenFile() !== undefined
88+ ? "no key (~/.abso/token is here, and is used only with --token-file)"
89+ : "no key";
8890}
8991
9092export async function whoami(
Lines 327–340 at 318 (were 325–338 at 175)
325327
326328/**
327329 * The commonest failures in plain words, with the next step: no credential, a credential the server refuses, and a
328− * server that can't be reached. Anything else is left as it was. `signedIn` is whether the call carried a key or token.
330+ * server that can't be reached. Anything else is left as it was. `sent` names the key or token the call carried, if any.
329331 */
330−export function plainError(err: unknown, signedIn: boolean): string | undefined {
332+export function plainError(err: unknown, sent: string | undefined, tokenFileUnasked = false): string | undefined {
331333 if (!(err instanceof ApiError)) return undefined;
332334 if (err.status === 401)
333− return signedIn
334− ? `The server didn't accept this folder's key: it may be revoked or expired. abso doctor checks it. (${err.message})`
335− : "You're not signed in. Run abso login, then abso join <project>.";
335+ return sent !== undefined
336+ ? `The server didn't accept ${sent}: it may be revoked or expired. abso doctor checks it. (${err.message})`
337+ : `You're not signed in. Run abso login, then abso join <project>.${tokenFileUnasked ? " ~/.abso/token is used only with --token-file." : ""}`;
336338 if (err.status === undefined && err.message.startsWith("could not reach ")) {
337339 const said = err.message.replace(/^could not reach /, "Can't reach ");
338340 // A message that already gives its next step (publish's "Run the same command again.") keeps it as the last word.
MCP
compare on this site's /mcp
CLI
abso diff 175 318 client/src/doctor.ts --json
JSON
/christopher/abso-core/compare/175..318?file=client%2Fsrc%2Fdoctor.ts&format=json