{"draft":null,"from":281,"to":318,"files":[{"path":"client/src/command-env.ts","added":17,"removed":1,"diff":"--- a/client/src/command-env.ts\n+++ b/client/src/command-env.ts\n@@ -1,5 +1,6 @@\n // What every abso command shares: its output, its environment, the folder it opens, and the news it took.\n \n+import { createHash } from \"node:crypto\";\n import { hostname } from \"node:os\";\n import { callerHeader } from \"../../src/caller.ts\";\n import { Api, type News, newsLines, type RunKind, takeSeatNotices } from \"./api.ts\";\n@@ -48,11 +49,26 @@\n \t\t);\n \tconst config = readConfig(root, env.env, env.tokenFile === true);\n \tconst api = new Api(config);\n-\tapi.caller = callerHeader({ session: env.env.CLAUDE_CODE_SESSION_ID, machine: hostname(), folder: root });\n+\tapi.caller = callerFor(env.env.CLAUDE_CODE_SESSION_ID, hostname(), root);\n \treturn { root, config, api };\n }\n \n /**\n+ * The caller header for this chat, computer and folder. The chat's session id goes as a short SHA-256 of it and the\n+ * folder as its last part, so neither the raw id nor the path (which names the person) leaves the machine.\n+ */\n+export function callerFor(session: string | undefined, machine: string, root: string): string | undefined {\n+\tconst hashed = session ? createHash(\"sha256\").update(session).digest(\"hex\").slice(0, 16) : undefined;\n+\t// The last part on either separator, so a Windows path names its folder on any machine.\n+\tconst folder =\n+\t\troot\n+\t\t\t.split(/[\\\\/]+/)\n+\t\t\t.filter((p) => p !== \"\")\n+\t\t\t.at(-1) ?? \"\";\n+\treturn callerHeader({ session: hashed, machine, folder });\n+}\n+\n+/**\n  * News a command took from the server while recording first. main() prints it\n  * after whatever the command says, so every command that takes news shows it\n  * (#37, News Report: sync, run and diff took it, wrote it to .avcs/news.log and"}],"unmatched":[]}