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 22 to 318

Compare

+38 −20 in 6 places
Lines 2–10 at 318 (were 2–10 at 22)
22// command, run by the same code as the command line and answering with the
33// same text, so the CLI and the tools can't drift apart and an agent learns
44// one set of words. The folder and the token come from where the server runs,
5−// as for the CLI: .avcs/config.json, and AVCS_TOKEN or ~/.avcs/token.
5+// as for the CLI: .avcs/config.json, and ABSO_TOKEN or ~/.abso/token.
66//
7−// claude mcp add avcs -- node <repo>/client/avcs.ts mcp
7+// claude mcp add abso -- abso mcp
88//
99// The protocol is JSON-RPC 2.0, one message per line, with no library: the
1010// client uses nothing outside Node.
Lines 35–42 at 318 (were 35–42 at 22)
3535 "announce",
3636 "start",
3737 "record",
38− "sync",
39− "publish",
38+ "pull",
39+ "push",
4040 "unqueue",
4141 "restore",
4242 "settle",
Lines 52–65 at 318 (were 52–57 at 22)
5252 "ask",
5353 "waiting",
5454 "answer",
55+ "ack",
56+ "reply",
57+ "groups",
58+ "group",
59+ "orgs",
60+ "org",
61+ "whoami",
62+ "doctor",
5563] as const;
5664
5765const PROTOCOLS = ["2025-06-18", "2025-03-26", "2024-11-05"];
Lines 78–96 at 318 (were 70–84 at 22)
7078 return MCP_COMMANDS.map((command) => {
7179 const def = table[command]!;
7280 const flags = Object.fromEntries(
73− Object.entries(def.flags).map(([flag, kind]) => [
74− flag,
75− kind === "boolean"
76− ? { type: "boolean", description: `--${flag}` }
77− : {
78− type: "string",
79− description: kind === "optional" ? `--${flag} "<value>"; "" gives --${flag} alone` : `--${flag} <value>`,
80− },
81− ]),
81+ // No --token-file: a tool signs in with its folder's key, never this machine's token file.
82+ Object.entries(def.flags)
83+ .filter(([flag]) => flag !== "token-file")
84+ .map(([flag, kind]) => [
85+ flag,
86+ kind === "boolean"
87+ ? { type: "boolean", description: `--${flag}` }
88+ : {
89+ type: "string",
90+ description:
91+ kind === "optional" ? `--${flag} "<value>"; "" gives --${flag} alone` : `--${flag} <value>`,
92+ },
93+ ]),
8294 );
8395 return {
8496 name: toolName(command),
Lines 132–146 at 318 (were 120–131 at 22)
120132 return rel === "" || (rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute(rel));
121133}
122134
135+/** The tool inputs that name files or folders on this machine to read or write, comma-separated: each is confined like the folder. */
136+export const FILE_INPUTS = ["attach", "clean", "save-attachments"] as const;
123138/**
124139 * Where a tool call runs, and what it may read: its folder and
125− * every --attach file stay inside the folder the server started in. A relative
126− * path that climbs out (..), an absolute one elsewhere, or a link out is
127− * refused, so no tool reads a file outside the project. Answers the folder, or
128− * why the call is refused.
140+ * every file a FILE_INPUTS input names stay inside the folder the server
141+ * started in. A relative path that climbs out (..), an absolute one elsewhere,
142+ * or a link out is refused, so no tool reads a file outside the project.
143+ * Answers the folder, or why the call is refused.
129144 */
130145export function confineCall(
131146 start: string,
Lines 152–169 at 318 (were 137–151 at 22)
137152 return {
138153 refused: `folder ${JSON.stringify(named)} is outside ${start}, the folder this server started in; tools run there or below`,
139154 };
140− if (typeof input.attach === "string")
141− for (const p of input.attach
155+ for (const flag of FILE_INPUTS) {
156+ const value = input[flag];
157+ if (typeof value !== "string") continue;
158+ for (const p of value
142159 .split(",")
143160 .map((x) => x.trim())
144161 .filter((x) => x !== ""))
145162 if (!inside(start, resolve(folder, p)))
146163 return {
147− refused: `--attach ${p} is outside ${start}, the folder this server started in; a tool attaches files from there or below`,
164+ refused: `--${flag} ${p} is outside ${start}, the folder this server started in; a tool reads and writes files only there or below`,
148165 };
166+ }
149167 return { folder };
150168}
151169
MCP
compare on this site's /mcp
CLI
abso diff 22 318 client/src/mcp.ts --json
JSON
/christopher/abso-core/compare/22..318?file=client%2Fsrc%2Fmcp.ts&format=json