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

Compare

+4 −4 in 3 places
Lines 14–24 at 17 (were 14–24 at 16)
1414// over goes through a rename aside, which only one process can win.
1515
1616import { closeSync, linkSync, openSync, readFileSync, renameSync, rmSync, statSync, writeSync } from "node:fs";
17−import { join } from "node:path";
17+import { basename, join } from "node:path";
1818import { UsageError } from "./args.ts";
19−import { AVCS_DIR } from "./config.ts";
2019import { LOCK_FILE, LOCK_STALE_MS, type LockInfo } from "./core.ts";
2120import { writeFileAtomic } from "./folder.ts";
21+import { stateDir } from "./state-dir.ts";
2222
2323/** How long a command waits for the lock before it says who holds it. */
2424const WAIT_MS = 3000;
Lines 28–34 at 17 (were 28–34 at 16)
2828/** Locks this process holds, by folder, and how deep: a locked call inside another one doesn't wait for itself. */
2929const held = new Map<string, { depth: number; renew: ReturnType<typeof setInterval> }>();
3030
31−const lockPath = (root: string): string => join(root, AVCS_DIR, LOCK_FILE);
31+const lockPath = (root: string): string => join(stateDir(root), LOCK_FILE);
3232
3333function readInfo(path: string): LockInfo | undefined {
3434 try {
Lines 152–158 at 17 (were 152–158 at 16)
152152 const info = readInfo(lockPath(root));
153153 const since = info ? new Date(info.time).toISOString().slice(11, 19) : "?";
154154 throw new UsageError(
155− `another abso command (${info?.what ?? "one"}, process ${info?.pid ?? "?"}, since ${since} UTC) is changing this folder's records; run this again when it has finished. If none is running, delete .avcs/lock.`,
155+ `another abso command (${info?.what ?? "one"}, process ${info?.pid ?? "?"}, since ${since} UTC) is changing this folder's records; run this again when it has finished. If none is running, delete ${basename(stateDir(root))}/lock.`,
156156 );
157157 }
158158 await new Promise((ok) => setTimeout(ok, 50));
MCP
compare on this site's /mcp
CLI
abso diff 16 17 client/src/lock.ts --json
JSON
/christopher/abso-core/compare/16..17?file=client%2Fsrc%2Flock.ts&format=json