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

Compare

+20 −9 in 4 places
Lines 5–17 at 318 (were 5–14 at 161)
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
11−/** The lowest Node major each kind of copy runs on: the npm package is built for 20, a checkout runs its .ts as is. */
11+/**
12+ * The lowest Node major each kind of copy runs on: a built one (the npm package, or a checkout's client/bin/abso.mjs)
13+ * is built for 20; a checkout's client/abso.ts runs its .ts as is, which takes Node's type stripping.
14+ */
1215export function nodeNeeded(built: boolean): number {
1316 return built ? 20 : 24;
1417}
Lines 26–38 at 318 (were 23–29 at 161)
2326}
2427
2528export function realProbe(): Probe {
26− return { fetcher: fetch, now: Date.now(), node: process.versions.node, built: builtCopy() };
29+ // Bundled, this module is client/bin/abso.mjs (or the npm package's file); from client/abso.ts, it is this .ts.
30+ return {
31+ fetcher: fetch,
32+ now: Date.now(),
33+ node: process.versions.node,
34+ built: builtCopy() || !import.meta.url.endsWith(".ts"),
35+ };
2736}
2837
2938/** This folder's settings, or why they can't be read; undefined outside a folder. */
Lines 84–92 at 318 (were 75–81 at 161)
7584 ? "the shared token"
7685 : c.kind === "pipeline run key"
7786 ? "a pipeline run's key"
78− : "no key";
87+ : tokenFile() !== undefined
88+ ? "no key (~/.abso/token is here, and is used only with --token-file)"
89+ : "no key";
7990}
8091
8192export async function whoami(
Lines 327–340 at 318 (were 316–329 at 161)
316327
317328/**
318329 * The commonest failures in plain words, with the next step: no credential, a credential the server refuses, and a
319− * 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.
320331 */
321−export function plainError(err: unknown, signedIn: boolean): string | undefined {
332+export function plainError(err: unknown, sent: string | undefined, tokenFileUnasked = false): string | undefined {
322333 if (!(err instanceof ApiError)) return undefined;
323334 if (err.status === 401)
324− return signedIn
325− ? `The server didn't accept this folder's key: it may be revoked or expired. abso doctor checks it. (${err.message})`
326− : "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." : ""}`;
327338 if (err.status === undefined && err.message.startsWith("could not reach ")) {
328339 const said = err.message.replace(/^could not reach /, "Can't reach ");
329340 // 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 161 318 client/src/doctor.ts --json
JSON
/christopher/abso-core/compare/161..318?file=client%2Fsrc%2Fdoctor.ts&format=json