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 17 to 18

Compare

+10 −5 in 2 places
Lines 1–8 at 18 (were 1–6 at 17)
1−// Where abso keeps its state (the rename from avcs). A new folder keeps it in .abso/ and the user's in ~/.abso/.
2−// Folders and machines from before keep working on .avcs/ and ~/.avcs/, untouched: a folder is never half-moved,
3−// so an older client or installed mod still finds it. A later `abso migrate` moves a folder once its mods are updated.
1+// Where abso keeps its state (the rename from avcs). Reading takes .abso/ first, then .avcs/, so a folder in
2+// either works. A new folder is still made with .avcs/ for now: an edit mod or Cursor hook installed before the
3+// rename looks only for .avcs/config.json, and would stop recording a .abso/ folder's edits without a word.
4+// New folders move to .abso/ once installs can say which mods know it; `abso migrate` will move old ones. The
5+// user's files are written to ~/.abso/ (an older client that can't find them says so: it isn't silent).
46// No imports from the rest of the client, so any module can use this.
57
68import { existsSync } from "node:fs";
Lines 12–27 at 18 (were 10–22 at 17)
1012export const OLD_STATE_DIR = ".avcs";
1113const STATE_DIRS = [STATE_DIR, OLD_STATE_DIR] as const;
1214
13−/** A folder's state folder: whichever has a config.json (.abso first), else whichever exists, else .abso for a folder not made yet. */
15+/** A folder's state folder: whichever has a config.json (.abso first), else whichever exists, else .avcs for a folder not made yet (see above). */
1416export function stateDir(root: string): string {
1517 for (const name of STATE_DIRS) if (existsSync(join(root, name, "config.json"))) return join(root, name);
1618 for (const name of STATE_DIRS) if (existsSync(join(root, name))) return join(root, name);
17− return join(root, STATE_DIR);
19+ return join(root, NEW_FOLDER_DIR);
1820}
1921
22+/** What a new folder is made with: .avcs until installed mods can be relied on to know .abso. */
23+export const NEW_FOLDER_DIR: string = OLD_STATE_DIR;
2025/** A file under the user's home to read: ~/.abso/<parts>, else the old ~/.avcs/<parts> when only that exists, else the new place. */
2126export function homeFile(home: string, ...parts: string[]): string {
2227 for (const name of STATE_DIRS) {
MCP
compare on this site's /mcp
CLI
abso diff 17 18 client/src/state-dir.ts --json
JSON
/christopher/abso-core/compare/17..18?file=client%2Fsrc%2Fstate-dir.ts&format=json