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

Compare

+42 −6 in 6 places
Lines 26–33 at 318 (were 26–31 at 44)
2626import { clientVersion, headCommit } from "../src/client-version.ts";
2727import {
2828 AVCS_MOD,
29+ hookCommand,
30+ installerCommand,
2931 installMod,
3032 keptModCommit,
3133 type ModSpec,
Lines 115–142 at 318 (were 113–118 at 44)
113115 );
114116 });
115117
118+ it("stamps the command that runs this client's abso hook, where stamp.ts has a HOOK_COMMAND line", () => {
119+ const spec = source({
120+ "hooks/stamp.ts":
121+ "export const STAMP: string | undefined = undefined\nexport const HOOK_COMMAND: readonly string[] | undefined = undefined\n",
122+ });
123+ const target = join(temp(), "avcs");
124+ installMod(spec, {
125+ target,
126+ check: pass,
127+ commit: "702c616",
128+ hookCommand: ["C:\\node.exe", "C:\\abso\\client\\abso.ts", "hook"],
129+ });
130+ assert.equal(
131+ read(target, "hooks/stamp.ts"),
132+ "export const STAMP: string | undefined = '0.1.0+702c616'\n" +
133+ 'export const HOOK_COMMAND: readonly string[] | undefined = ["C:\\\\node.exe","C:\\\\abso\\\\client\\\\abso.ts","hook"]\n',
134+ );
135+ // By default, this checkout's own: the node running it and client/abso.ts.
136+ assert.deepEqual(hookCommand().slice(0, 1), [process.execPath]);
137+ assert.match(hookCommand()[1]!, /client[\\/]abso\.ts$/);
138+ });
116140 it("moves the files in by rename, what the hook imports first and plugin.json last", () => {
117141 const spec = source();
118142 const target = join(temp(), "avcs");
Lines 337–349 at 318 (were 313–321 at 44)
313337 spawnSync("git", ["-c", "user.name=t", "-c", "user.email=t@t", "-C", spec.from, ...args], {
314338 encoding: "utf8",
315339 }).stdout.trim();
316− // Every mod file a minute old, so a kept answer can be trusted.
340+ // Every mod file minutes old, so a kept answer can be trusted. Each call sets a whole minute earlier
341+ // than the last: git's own index compares times by the second, and a same-size edit given the time
342+ // git last saw would look unchanged to git itself.
343+ let minutes = 0;
317344 const age = () => {
318− const old = new Date(Date.now() - 60_000);
345+ minutes += 1;
346+ const old = new Date(Date.now() - minutes * 60_000);
319347 for (const rel of FILES) utimesSync(at(spec.from, rel), old, old);
320348 };
321349 // Swaps every kept answer for a made-up one: what comes back says whether git ran.
Lines 451–460 at 318 (were 423–431 at 44)
423451 assert.equal(client, `abso ${clientVersion()} (${dirname(import.meta.dirname)})`);
424452 assert.match(
425453 mod!,
426− /^the abso-hooks mod: 0\.1\.0\+aaaaaaa in .*skills[\\/]abso-hooks, installed 2026-10-05 04:30 UTC; this client has 0.2.0(\+[0-9a-f]{7}(\.dirty)?)?: node client\/install-mod\.ts installs it$/,
454+ /^the abso-hooks mod: 0\.1\.0\+aaaaaaa in .*skills[\\/]abso-hooks, installed 2026-10-05 04:30 UTC; this client has 0.2.0(\+[0-9a-f]{7}(\.dirty)?)?: /,
427455 );
428− assert.equal(view, "the abso-view mod: not installed (node client/install-view.ts)");
456+ assert.ok(mod!.endsWith(`: ${installerCommand("install-mod.ts")} installs it`), mod);
457+ assert.equal(view, `the abso-view mod: not installed (${installerCommand("install-view.ts")})`);
429458 const json = JSON.parse(
430459 (await main(["--version", "--json"], { cwd: config, env: { CLAUDE_CONFIG_DIR: config }, write: () => {} }))
431460 .stdout,
Lines 499–505 at 318 (were 470–476 at 44)
470499 const current = (versionReport(env).json.mods as { current: string }[])[0]!.current;
471500 if (/\+[0-9a-f]{7}$/.test(current))
472501 assert.deepEqual(modsBehindText(env), [
473− `The avcs mod installed on this machine is 0.1.0+aaaaaaa, and this client has ${current}: node client/install-mod.ts installs it (new chats load it).`,
502+ `The ${AVCS_MOD.name} mod installed on this machine is 0.1.0+aaaaaaa, and this client has ${current}: ${installerCommand("install-mod.ts")} installs it (new chats load it).`,
474503 ]);
475504 // A client outside git (an abso folder, a box) can't tell, so it says nothing.
476505 else assert.deepEqual(modsBehindText(env), []);
Lines 512–525 at 318 (were 483–489 at 44)
483512 agent: "a",
484513 token: "t",
485514 } as ConstructorParameters<typeof Api>[0]).headers("application/json");
486− assert.equal(headers["x-avcs-client"], `abso-cli/${clientVersion()}`);
515+ assert.equal(headers["x-abso-client"], `abso-cli/${clientVersion()}`);
487516 assert.match(clientVersion(), /^\d+\.\d+\.\d+(\+[0-9a-f]{7})?$/);
488517 });
519+ it("the npm package's client gives the package's version", () => {
520+ const url = new URL("../src/client-version.ts", import.meta.url).href;
521+ const script = `globalThis.__ABSO_PACKAGE_VERSION__ = "0.58.0"; const m = await import(${JSON.stringify(url)}); console.log(m.clientVersion());`;
522+ const r = spawnSync(process.execPath, ["--input-type=module", "-e", script], { encoding: "utf8" });
523+ assert.equal(r.stdout.trim(), "0.58.0", r.stderr);
524+ });
489525});
MCP
compare on this site's /mcp
CLI
abso diff 44 318 client/test/install.test.ts --json
JSON
/christopher/abso-core/compare/44..318?file=client%2Ftest%2Finstall.test.ts&format=json