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
code on this site's /mcp
CLI
none: the JSON below is the answer
JSON
/christopher/abso-core/files/client/avcs.ts?version=71&format=json
38 linesFirst import 92% · pinch 8%Last change pinch in version 66, 2 versions changed it

You're reading version 71. The newest is 318, and 2 versions since then changed this file. Go to the newestCompare with 318

1// 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
6import * as nodeModule from "node:module";
7
8// Node keeps the compiled modules (TypeScript already stripped) in a cache in
9// the temp folder. Loading the hook's modules drops from about 55 ms to 11 ms.
10// Node 20 has no compile cache, and the built client runs there without one.
11(nodeModule as { enableCompileCache?: () => unknown }).enableCompileCache?.();
13const argv = process.argv.slice(2);
15if (argv[0] === "hook") {
16 const { runHook } = await import("./src/hook.ts");
17 const chunks: Buffer[] = [];
18 for await (const chunk of process.stdin) chunks.push(chunk as Buffer);
19 const result = await runHook(Buffer.concat(chunks).toString("utf8"));
20 if (result.stdout) process.stdout.write(result.stdout);
21 // Always 0: the hook never stops the agent.
22 process.exitCode = 0;
23} else if (argv[0] === "mcp") {
24 // An MCP server on stdin and stdout, for as long as the client keeps it open.
25 const { serveMcp } = await import("./src/mcp.ts");
26 await serveMcp(process.stdin, (line) => process.stdout.write(`${line}\n`), process.cwd(), process.env);
27} else {
28 const { main } = await import("./src/main.ts");
29 const result = await main(argv, {
30 cwd: process.cwd(),
31 env: process.env,
32 write: (text) => process.stdout.write(text),
33 writeErr: (text) => process.stderr.write(text),
34 });
35 if (result.stdout) process.stdout.write(result.stdout);
36 if (result.stderr) process.stderr.write(result.stderr);
37 process.exitCode = result.exit;