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
show on this site's /mcp
CLI
abso show 282 --json
JSON
/christopher/abso-core/versions/282?format=json

The caller header carries a short hash of the chat's session and only the folder's last part

of shared·pinch··Not checked

X-Abso-Caller sent the raw CLAUDE_CODE_SESSION_ID and the full folder path, which names the person (C:\Users<name>...). The client now sends the first 16 hex digits of the session id's SHA-256 and the folder's last part. The server already showed only "<folder> on <machine>", and the same chat hashes the same way, so seat notices still tell chats apart. Neither the raw id nor the path leaves the machine.

Tests: client caller (6 pass); tsc clean.

Version 281 · Files at version 282

3 files, 28 lines added, 2 removed.

--- a/client/src/command-env.ts
+++ b/client/src/command-env.ts
@@ -1,6 +1,8 @@
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";
@@ -48,11 +50,20 @@
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
--- a/client/test/caller.test.ts
+++ b/client/test/caller.test.ts
@@ -3,9 +3,23 @@
33import { test } from "node:test";
44import { CALLER_HEADER, CALLER_MAX, callerHeader, callerPlace, parseCaller } from "../../src/caller.ts";
55import { Api } from "../src/api.ts";
6+import { callerFor } from "../src/command-env.ts";
67
78const session = "0da5c2b7-ab07-4249-b868-e8f09b6ec7b6";
89
10+test("the client sends a hash of the session and only the folder's last part", () => {
11+ const header = callerFor(session, "DESKTOP-1", "C:\\Users\\sam\\repos\\abso\\groups")!;
12+ const caller = parseCaller(header)!;
13+ assert.equal(caller.folder, "groups");
14+ assert.match(caller.session!, /^[0-9a-f]{16}$/);
15+ assert.notEqual(caller.session, session);
16+ assert.doesNotMatch(Buffer.from(header, "base64url").toString(), /sam|0da5c2b7/);
17+ // The same chat hashes the same way, so the server still tells one chat from another.
18+ assert.equal(parseCaller(callerFor(session, "DESKTOP-1", "/x/groups"))!.session, caller.session);
19+ assert.equal(parseCaller(callerFor(undefined, "box", "/work/über"))!.session, undefined);
20+ assert.equal(callerPlace(caller), "groups on DESKTOP-1");
21+});
923test("a caller goes out and comes back as it was", () => {
1024 const header = callerHeader({ session, machine: "DESKTOP-1", folder: "C:\\Users\\sam\\repos\\abso\\groups" })!;
1125 assert.match(header, /^[A-Za-z0-9_-]+$/);
--- a/src/caller.ts
+++ b/src/caller.ts
@@ -7,9 +7,10 @@
77export const CALLER_MAX = 512;
88
99export interface Caller {
10− /** The chat's session id, when abso runs in one (Claude Code's CLAUDE_CODE_SESSION_ID, or the mod's own). */
10+ /** The chat's session, when abso runs in one: the client sends a short SHA-256 of the id, never the id itself. */
1111 readonly session?: string;
1212 readonly machine: string;
13+ /** The folder's last part: the client sends no more of its path. */
1314 readonly folder: string;
1415}
1516