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 27 to 28

Compare

+29 −0 in 1 place
new file, 29 lines
1+import assert from "node:assert/strict";
2+import { mkdirSync, mkdtempSync, writeFileSync } from "node:fs";
3+import { tmpdir } from "node:os";
4+import { join } from "node:path";
5+import { test } from "node:test";
6+import { newFolderDir } from "../src/state-dir.ts";
7+
8+/** A Claude config folder with these mods installed, each at this version. */
9+function claudeWith(mods: Record<string, string>): { CLAUDE_CONFIG_DIR: string } {
10+ const dir = mkdtempSync(join(tmpdir(), "abso-claude-"));
11+ for (const [name, version] of Object.entries(mods)) {
12+ const mod = join(dir, "skills", name);
13+ mkdirSync(mod, { recursive: true });
14+ writeFileSync(join(mod, ".avcs-install.json"), JSON.stringify({ mod: name, version }));
15+ }
16+ return { CLAUDE_CONFIG_DIR: dir };
17+}
19+test("a new folder gets .abso when no mod is installed, or every installed mod knows it", () => {
20+ assert.equal(newFolderDir(claudeWith({})), ".abso");
21+ assert.equal(newFolderDir(claudeWith({ avcs: "0.2.0+abc1234", "avcs-view": "0.2.0" })), ".abso");
22+ assert.equal(newFolderDir(claudeWith({ abso: "0.3.1.dirty" })), ".abso");
23+});
25+test("a new folder keeps .avcs while any installed mod is older than the rename", () => {
26+ assert.equal(newFolderDir(claudeWith({ avcs: "0.1.0+2ecf1a7" })), ".avcs");
27+ assert.equal(newFolderDir(claudeWith({ avcs: "0.2.0", "avcs-view": "0.1.0" })), ".avcs");
28+ assert.equal(newFolderDir(claudeWith({ avcs: "unreadable" })), ".avcs");
29+});
MCP
compare on this site's /mcp
CLI
abso diff 27 28 client/test/new-folder-dir.test.ts --json
JSON
/christopher/abso-core/compare/27..28?file=client%2Ftest%2Fnew-folder-dir.test.ts&format=json