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 170 to 171

Compare

+9 −22 in 6 places
Lines 31–36 at 171 (were 31–37 at 170)
3131 { project: "abso", role: "writer" },
3232 { project: "game", role: "reader" },
3333 ],
34− max_agents: 5,
3534};
3635const EXPIRES = "2026-10-15T00:00:00.000Z";
3736const record = { server: SERVER, id: "b_0123abcd", credential: CREDENTIAL, grant, expiresAt: Date.parse(EXPIRES) };
Lines 69–89 at 171 (were 70–92 at 170)
7069 };
7170}
7271
73−test("login grant options validate project lists, roles, limits and duration", () => {
72+test("login grant options validate project lists, roles and duration", () => {
7473 const request = (...words: string[]) =>
7574 loginRequest(
7675 parseArgs("login", words, {
7776 projects: "string",
7877 role: "string",
79− "max-agents": "string",
8078 days: "string",
8179 }),
8280 );
8381 assert.equal(request(), undefined);
84− assert.deepEqual(request("--projects", "alpha, beta,alpha", "--max-agents", "1", "--days", "30"), {
82+ assert.deepEqual(request("--projects", "alpha, beta,alpha", "--days", "30"), {
8583 projects: [
8684 { project: "alpha", role: "writer" },
8785 { project: "beta", role: "writer" },
8886 ],
89− max_agents: 1,
9087 days: 30,
9188 });
9289 assert.deepEqual(request("--projects", "alpha", "--role", "reader"), {
Lines 92–98 at 171 (were 95–101 at 170)
9592 assert.deepEqual(request("--projects", "alpha", "--role", "owner"), {
9693 projects: [{ project: "alpha", role: "owner" }],
9794 });
98− assert.deepEqual(request("--max-agents", "50", "--days", "90"), { max_agents: 50, days: 90 });
95+ assert.deepEqual(request("--days", "90"), { days: 90 });
9996 for (const words of [
10097 ["--role", "writer"],
10198 ["--projects", ""],
Lines 102–117 at 171 (were 105–122 at 170)
105102 ["--projects", Array.from({ length: 101 }, (_, i) => `p${i}`).join(",")],
106103 ])
107104 assert.throws(() => request(...words));
108− for (const flag of ["--max-agents", "--days"]) {
109− for (const value of ["0", "-1", "1.5", "1e1", "Infinity", "100", "abc", ""])
110− assert.throws(() => request(flag, value));
111− }
105+ for (const value of ["0", "-1", "1.5", "1e1", "Infinity", "100", "abc", ""])
106+ assert.throws(() => request("--days", value));
112107});
113108
114109test("login sends requested grants only at device start and retains the user's actual approval", async () => {
115110 const h = home();
116111 const seen: Seen = [];
117112 const c = clock();
118− const requested = { projects: [{ project: "abso", role: "owner" as const }], max_agents: 10, days: 90 };
119− const approved = { projects: [{ project: "abso", role: "reader" }], max_agents: 1 };
113+ const requested = { projects: [{ project: "abso", role: "owner" as const }], days: 90 };
114+ const approved = { projects: [{ project: "abso", role: "reader" }] };
120115 const got = await login(
121116 SERVER,
122117 {
Lines 204–211 at 171 (were 209–215 at 170)
209204 assert.equal(files.length, 1);
210205 assert.ok(readFileSync(join(h, ".abso", "boxes", files[0]!), "utf8").includes(CREDENTIAL));
211206 assert.equal(boxText(got, SERVER, 0).includes(CREDENTIAL), false);
212− assert.match(boxText(got, SERVER, 0), /abso \(writer\), game \(reader\)\. Up to 5 agents\./);
207+ assert.match(boxText(got, SERVER, 0), /abso \(writer\), game \(reader\)\.\n/);
208+ assert.doesNotMatch(boxText(got, SERVER, 0), /agents/);
213209 assert.equal(JSON.stringify(boxPublic(got)).includes(CREDENTIAL), false);
214210});
215211
Lines 418–421 at 171 (were 422–434 at 170)
422418 ],
423419 "snow is this box's already: never minted again, which would replace its key",
424420 );
425−
426− const limit = server(
427− [
428− [200, { box_id: record.id, agents: [] }],
429− [409, { error: "this box is at its agent limit" }],
430− ],
431− [],
432− );
433− await assert.rejects(mintFreeName(record, "abso", "snow", limit), /this box is at its agent limit \(5\)/);
434421});
MCP
compare on this site's /mcp
CLI
abso diff 170 171 client/test/box.test.ts --json
JSON
/christopher/abso-core/compare/170..171?file=client%2Ftest%2Fbox.test.ts&format=json