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

Compare

+21 −3 in 1 place
Lines 3–35 at 318 (were 3–17 at 175)
33// `abso help` lists the commands. `abso hook` is the Claude Code hook; it
44// loads only what it needs, since every edit pays for its start-up.
55
6+import { readFileSync } from "node:fs";
67import * as nodeModule from "node:module";
8+import { dirname, join } from "node:path";
79
10+const argv = process.argv.slice(2);
12+/**
13+ * Whether this command opens a local project (abso init --local): --local, or a folder whose config names the server
14+ * "local". Those load the open server's code through a module hook, and with the compile cache on Node 24 crashes.
15+ */
16+function opensLocal(): boolean {
17+ if (argv.includes("--local")) return true;
18+ for (let dir = process.cwd(); ; dir = dirname(dir)) {
19+ for (const state of [".abso", ".avcs"]) {
20+ try {
21+ return /"server"\s*:\s*"local"/.test(readFileSync(join(dir, state, "config.json"), "utf8"));
22+ } catch {}
23+ }
24+ if (dirname(dir) === dir) return false;
25+ }
26+}
828// Node keeps the compiled modules (TypeScript already stripped) in a cache in
929// the temp folder. Loading the hook's modules drops from about 55 ms to 11 ms.
1030// Node 20 has no compile cache, and the built client runs there without one.
11−(nodeModule as { enableCompileCache?: () => unknown }).enableCompileCache?.();
31+if (!opensLocal()) (nodeModule as { enableCompileCache?: () => unknown }).enableCompileCache?.();
1232
13−const argv = process.argv.slice(2);
14−
1533if (argv[0] === "hook") {
1634 const { runHook } = await import("./src/hook.ts");
1735 const chunks: Buffer[] = [];
MCP
compare on this site's /mcp
CLI
abso diff 175 318 client/avcs.ts --json
JSON
/christopher/abso-core/compare/175..318?file=client%2Favcs.ts&format=json