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

+8 −13 in 1 place
Lines 383–404 at 156 (were 383–409 at 155)
383383 assert.equal(forgetBox(SERVER, h), false);
384384});
385385
386−test("join and init pick the server: --server, ABSO_SERVER, the box's sign-in, then api.abso.dev", () => {
386+test("join and init pick the server in the one order: --server, the folder's, ABSO_SERVER, then prod", () => {
387387 const h = home();
388+ const outside = home();
388389 const args = (server?: string) => ({ positionals: [], flags: new Map(server ? [["server", server]] : []) });
389− const none = { env: {} };
390− assert.equal(serverFrom(args(), none, h), "https://api.abso.dev", "nothing signed in: the abso API");
390+ const none = { env: {}, cwd: outside };
391+ assert.equal(serverFrom(args(), none), "https://api.abso.dev", "nothing named: prod");
391392 writeBox({ ...record, expiresAt: Date.now() + 1e6 }, h);
392393 assert.deepEqual(signedInServers(h), [SERVER]);
393− assert.equal(serverFrom(args(), none, h), SERVER, "the server abso login signed this box in to");
394+ assert.equal(serverFrom(args(), none), "https://api.abso.dev", "a sign-in elsewhere doesn't pick the server");
394395 assert.deepEqual(signedInServers(h, Date.now() + 2e6), [], "an expired sign-in doesn't count");
395− assert.equal(serverFrom(args(), { env: { ABSO_SERVER: "https://env.example" } }, h), "https://env.example");
396+ assert.equal(serverFrom(args(), { ...none, env: { ABSO_SERVER: "https://env.example" } }), "https://env.example");
396397 assert.equal(
397− serverFrom(args("https://flag.example"), { env: { ABSO_SERVER: "https://env.example" } }, h),
398+ serverFrom(args("https://flag.example"), { ...none, env: { ABSO_SERVER: "https://env.example" } }),
398399 "https://flag.example",
399400 );
400− writeBox({ ...record, server: "https://other.abso.example", expiresAt: Date.now() + 1e6 }, h);
401− writeBox({ ...record, expiresAt: Date.now() + 1e6 }, h);
402− assert.throws(
403− () => serverFrom(args(), none, h),
404− /signed in to https:\/\/other\.abso\.example and https:\/\/staging\.abso\.example: say which with --server/,
405− );
406− assert.equal(serverFrom(args(SERVER), none, h), SERVER, "--server settles it");
401+ assert.equal(serverFrom(args(SERVER), none), SERVER, "--server is used as given");
407402});
408403
409404test("join with no --agent takes the box's name, skips names this box holds, and moves past a taken one", async () => {
MCP
compare on this site's /mcp
CLI
abso diff 155 156 client/test/box.test.ts --json
JSON
/christopher/abso-core/compare/155..156?file=client%2Ftest%2Fbox.test.ts&format=json