The caller header carries a short hash of the chat's session and only the folder's last part Version 282 of shared· pinch· Oct 16 (2026-10-16 01:57 UTC) · 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 @@
1 1 // What every abso command shares: its output, its environment, the folder it opens, and the news it took. 3 + import { createHash } from "node:crypto"; 3 4 import { hostname } from "node:os"; 5 + import { basename } from "node:path"; 4 6 import { callerHeader } from "../../src/caller.ts"; 5 7 import { Api, type News, newsLines, type RunKind, takeSeatNotices } from "./api.ts"; 6 8 import { UsageError } from "./args.ts"; @@ -48,11 +50,20 @@
49 51 const config = readConfig(root, env.env, env.tokenFile === true); 50 52 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); 52 54 return { root, config, api }; 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. 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) }); 56 67 * News a command took from the server while recording first. main() prints it 57 68 * after whatever the command says, so every command that takes news shows it 58 69 * (#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 @@
3 3 import { test } from "node:test"; 4 4 import { CALLER_HEADER, CALLER_MAX, callerHeader, callerPlace, parseCaller } from "../../src/caller.ts"; 5 5 import { Api } from "../src/api.ts"; 6 + import { callerFor } from "../src/command-env.ts"; 7 8 const session = "0da5c2b7-ab07-4249-b868-e8f09b6ec7b6"; 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"); 9 23 test("a caller goes out and comes back as it was", () => { 10 24 const header = callerHeader({ session, machine: "DESKTOP-1", folder: "C:\\Users\\sam\\repos\\abso\\groups" })!; 11 25 assert.match(header, /^[A-Za-z0-9_-]+$/); --- a/src/caller.ts
+++ b/src/caller.ts
@@ -7,9 +7,10 @@
7 7 export const CALLER_MAX = 512; 9 9 export 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. */ 11 11 readonly session?: string; 12 12 readonly machine: string; 13 + /** The folder's last part: the client sends no more of its path. */ 13 14 readonly folder: string;