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 83 to 84

Compare

+24 −1 in 2 places
Lines 8–14 at 84 (were 8–14 at 83)
88import { test } from "node:test";
99import { ApiError } from "../src/api-error.ts";
1010import { writeBox } from "../src/box.ts";
11−import { doctor, doctorText, nodeNeeded, type Probe, plainError, whoami } from "../src/doctor.ts";
11+import { checkServer, doctor, doctorText, nodeNeeded, type Probe, plainError, whoami } from "../src/doctor.ts";
1212
1313const SERVER = "https://staging.abso.example";
1414const CREDENTIAL = "abso_bx_the-secret-credential";
Lines 227–252 at 84 (were 227–229 at 83)
227227 assert.equal(plainError(new ApiError("GET /log answered 500: boom", 500), true), undefined);
228228 assert.equal(plainError(new Error("anything else"), true), undefined);
229229});
231+test("whoami and doctor pick the server as join does: --server, ABSO_SERVER, the folder's, the box's sign-in, then abso.dev", () => {
232+ const outside = temp("outside");
233+ const empty = temp("home");
234+ assert.equal(checkServer(undefined, outside, {}, empty, NOW), "https://api.abso.dev");
235+ const home = temp("home");
236+ writeBox(box(), home);
237+ assert.equal(checkServer(undefined, outside, {}, home, NOW), SERVER);
238+ assert.equal(checkServer(undefined, folder(), {}, empty, NOW), SERVER);
239+ assert.equal(checkServer(undefined, outside, { ABSO_SERVER: "http://env.example" }, home, NOW), "http://env.example");
240+ assert.equal(
241+ checkServer("http://flag.example", folder(), { ABSO_SERVER: "http://env.example" }, home, NOW),
242+ "http://flag.example",
243+ );
244+ const expired = temp("home");
245+ writeBox(box(NOW - 1), expired);
246+ assert.equal(checkServer(undefined, outside, {}, expired, NOW), "https://api.abso.dev");
247+ writeBox({ ...box(), server: "https://api.abso.dev" }, home);
248+ assert.throws(
249+ () => checkServer(undefined, outside, {}, home, NOW),
250+ /signed in to .* and .*: say which with --server/,
251+ );
252+});
MCP
compare on this site's /mcp
CLI
abso diff 83 84 client/test/doctor.test.ts --json
JSON
/christopher/abso-core/compare/83..84?file=client%2Ftest%2Fdoctor.test.ts&format=json