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 281 to 282

Compare

+12 −1 in 2 places
Lines 1–8 at 282 (were 1–6 at 281)
11// What every abso command shares: its output, its environment, the folder it opens, and the news it took.
22
3+import { createHash } from "node:crypto";
34import { hostname } from "node:os";
5+import { basename } from "node:path";
46import { callerHeader } from "../../src/caller.ts";
57import { Api, type News, newsLines, type RunKind, takeSeatNotices } from "./api.ts";
68import { UsageError } from "./args.ts";
Lines 50–69 at 282 (were 48–58 at 281)
4850 );
4951 const config = readConfig(root, env.env, env.tokenFile === true);
5052 const api = new Api(config);
51− api.caller = callerHeader({ session: env.env.CLAUDE_CODE_SESSION_ID, machine: hostname(), folder: root });
53+ api.caller = callerFor(env.env.CLAUDE_CODE_SESSION_ID, hostname(), root);
5254 return { root, config, api };
5355}
5456
5557/**
58+ * The caller header for this chat, computer and folder. The chat's session id goes as a short SHA-256 of it and the
59+ * folder as its last part, so neither the raw id nor the path (which names the person) leaves the machine.
60+ */
61+export function callerFor(session: string | undefined, machine: string, root: string): string | undefined {
62+ const hashed = session ? createHash("sha256").update(session).digest("hex").slice(0, 16) : undefined;
63+ return callerHeader({ session: hashed, machine, folder: basename(root) });
64+}
66+/**
5667 * News a command took from the server while recording first. main() prints it
5768 * after whatever the command says, so every command that takes news shows it
5869 * (#37, News Report: sync, run and diff took it, wrote it to .avcs/news.log and
MCP
compare on this site's /mcp
CLI
abso diff 281 282 client/src/command-env.ts --json
JSON
/christopher/abso-core/compare/281..282?file=client%2Fsrc%2Fcommand-env.ts&format=json