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
MCP
blame on this site's /mcp
CLI
abso blame client/avcs.ts --json
JSON
/christopher/abso-core/blame/client/avcs.ts?format=json
55 linespinch 53% · First import 47%Last change pinch in version 289,

55 lines from 4 changes in 4 versions.

init0Start the project1// The abso client. Run it as:
2// node client/avcs.ts <command> [options]
3// `abso help` lists the commands. `abso hook` is the Claude Code hook; it
4// loads only what it needs, since every edit pays for its start-up.
5
pinch289Local projects run as their own processes again: no compile cache for a local command, and plain words when the server's code can't load At 287, every local command run as `node client/abso.ts` could crash with a segmentation fault (exit 139, at random, init and join included). The cause is Node's compile cache, which client/avcs.ts turns on, together with the module hook that gives the open server's code its cloudflare:workers stand-in. avcs.ts now leaves the cache off for a --local command and in a folder whose config names the server "local". The hook also stays registered rather than being removed after the import. - If the server's code can't load (a package missing, say), it's said as "local projects couldn't load the server's code: ..." rather than "Can't reach local ... check your connection". - In a local folder, status says "It's a local project, in <store>/<project>." instead of "Signed in with none.", and skips the npm newer-client check, which reaches for the network. - worker/project/news.ts is Biome-formatted (only formatting), so the check gets past Biome again. - scripts/local-measure.ts times status, log, blame, pull and push as separate processes on a small and a large local history, with peak memory and the store's size. scripts/local-writers.ts pushes from 1, 4 and 16 writers at once to measure the store lock. Tests: client/test/local.test.ts (9, one running init, push, status and log as child processes with the cache as it is); tsc and Biome clean. Three rounds of init, push and status as processes exit 0.Compare6import { readFileSync } from "node:fs";
pinch66The client runs on Node 20: the compile cache is used where Node has it (22.1 on) and skipped where it doesn't, so a built client loads on Node 20Compare7import * as nodeModule from "node:module";
pinch289Local projects run as their own processes again: no compile cache for a local command, and plain words when the server's code can't load At 287, every local command run as `node client/abso.ts` could crash with a segmentation fault (exit 139, at random, init and join included). The cause is Node's compile cache, which client/avcs.ts turns on, together with the module hook that gives the open server's code its cloudflare:workers stand-in. avcs.ts now leaves the cache off for a --local command and in a folder whose config names the server "local". The hook also stays registered rather than being removed after the import. - If the server's code can't load (a package missing, say), it's said as "local projects couldn't load the server's code: ..." rather than "Can't reach local ... check your connection". - In a local folder, status says "It's a local project, in <store>/<project>." instead of "Signed in with none.", and skips the npm newer-client check, which reaches for the network. - worker/project/news.ts is Biome-formatted (only formatting), so the check gets past Biome again. - scripts/local-measure.ts times status, log, blame, pull and push as separate processes on a small and a large local history, with peak memory and the store's size. scripts/local-writers.ts pushes from 1, 4 and 16 writers at once to measure the store lock. Tests: client/test/local.test.ts (9, one running init, push, status and log as child processes with the cache as it is); tsc and Biome clean. Three rounds of init, push and status as processes exit 0.Compare8import { dirname, join } from "node:path";
init0Start the project9
10const argv = process.argv.slice(2);
pinch289Local projects run as their own processes again: no compile cache for a local command, and plain words when the server's code can't load At 287, every local command run as `node client/abso.ts` could crash with a segmentation fault (exit 139, at random, init and join included). The cause is Node's compile cache, which client/avcs.ts turns on, together with the module hook that gives the open server's code its cloudflare:workers stand-in. avcs.ts now leaves the cache off for a --local command and in a folder whose config names the server "local". The hook also stays registered rather than being removed after the import. - If the server's code can't load (a package missing, say), it's said as "local projects couldn't load the server's code: ..." rather than "Can't reach local ... check your connection". - In a local folder, status says "It's a local project, in <store>/<project>." instead of "Signed in with none.", and skips the npm newer-client check, which reaches for the network. - worker/project/news.ts is Biome-formatted (only formatting), so the check gets past Biome again. - scripts/local-measure.ts times status, log, blame, pull and push as separate processes on a small and a large local history, with peak memory and the store's size. scripts/local-writers.ts pushes from 1, 4 and 16 writers at once to measure the store lock. Tests: client/test/local.test.ts (9, one running init, push, status and log as child processes with the cache as it is); tsc and Biome clean. Three rounds of init, push and status as processes exit 0.Compare11
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 */
16function 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 }
init0Start the project28// Node keeps the compiled modules (TypeScript already stripped) in a cache in
29// the temp folder. Loading the hook's modules drops from about 55 ms to 11 ms.
pinch66The client runs on Node 20: the compile cache is used where Node has it (22.1 on) and skipped where it doesn't, so a built client loads on Node 20Compare30// Node 20 has no compile cache, and the built client runs there without one.
pinch289Local projects run as their own processes again: no compile cache for a local command, and plain words when the server's code can't load At 287, every local command run as `node client/abso.ts` could crash with a segmentation fault (exit 139, at random, init and join included). The cause is Node's compile cache, which client/avcs.ts turns on, together with the module hook that gives the open server's code its cloudflare:workers stand-in. avcs.ts now leaves the cache off for a --local command and in a folder whose config names the server "local". The hook also stays registered rather than being removed after the import. - If the server's code can't load (a package missing, say), it's said as "local projects couldn't load the server's code: ..." rather than "Can't reach local ... check your connection". - In a local folder, status says "It's a local project, in <store>/<project>." instead of "Signed in with none.", and skips the npm newer-client check, which reaches for the network. - worker/project/news.ts is Biome-formatted (only formatting), so the check gets past Biome again. - scripts/local-measure.ts times status, log, blame, pull and push as separate processes on a small and a large local history, with peak memory and the store's size. scripts/local-writers.ts pushes from 1, 4 and 16 writers at once to measure the store lock. Tests: client/test/local.test.ts (9, one running init, push, status and log as child processes with the cache as it is); tsc and Biome clean. Three rounds of init, push and status as processes exit 0.Compare31if (!opensLocal()) (nodeModule as { enableCompileCache?: () => unknown }).enableCompileCache?.();
init0Start the project32
33if (argv[0] === "hook") {
34 const { runHook } = await import("./src/hook.ts");
35 const chunks: Buffer[] = [];
36 for await (const chunk of process.stdin) chunks.push(chunk as Buffer);
37 const result = await runHook(Buffer.concat(chunks).toString("utf8"));
38 if (result.stdout) process.stdout.write(result.stdout);
39 // Always 0: the hook never stops the agent.
40 process.exitCode = 0;
41} else if (argv[0] === "mcp") {
42 // An MCP server on stdin and stdout, for as long as the client keeps it open.
43 const { serveMcp } = await import("./src/mcp.ts");
44 await serveMcp(process.stdin, (line) => process.stdout.write(`${line}\n`), process.cwd(), process.env);
45} else {
46 const { main } = await import("./src/main.ts");
pinch74Server text can't drive the terminal: everything the client prints goes through one filter. Tabs, newlines and colors (SGR) pass, colors only to a terminal with NO_COLOR unset. Every other control character, and so every other escape sequence (OSC clipboard writes and links, cursor moves, DCS), prints as visible text such as \x1b, so nothing vanishes silently. It covers news, version messages, CI logs, file paths and agent names, from any server.Compare47 // Everything printed goes through terminalText: most of it is a server's text (abso-core's terminal-text.ts).
48 const { colorsPass, terminalText } = await import("./src/terminal-text.ts");
49 const out = (text: string) => process.stdout.write(terminalText(text, colorsPass(process.stdout, process.env)));
50 const err = (text: string) => process.stderr.write(terminalText(text, colorsPass(process.stderr, process.env)));
51 const result = await main(argv, { cwd: process.cwd(), env: process.env, write: out, writeErr: err });
52 if (result.stdout) out(result.stdout);
53 if (result.stderr) err(result.stderr);
init0Start the project54 process.exitCode = result.exit;