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 23

Compare

+13 −7 in 2 places
Lines 120–134 at 23 (were 120–131 at 22)
120120 return rel === "" || (rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute(rel));
121121}
122122
123+/** The tool inputs that name files on this machine to read, comma-separated: each is confined like the folder. */
124+export const FILE_INPUTS = ["attach", "clean"] as const;
123126/**
124127 * 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.
128+ * every file a FILE_INPUTS input names stay inside the folder the server
129+ * started in. A relative path that climbs out (..), an absolute one elsewhere,
130+ * or a link out is refused, so no tool reads a file outside the project.
131+ * Answers the folder, or why the call is refused.
129132 */
130133export function confineCall(
131134 start: string,
Lines 140–157 at 23 (were 137–151 at 22)
137140 return {
138141 refused: `folder ${JSON.stringify(named)} is outside ${start}, the folder this server started in; tools run there or below`,
139142 };
140− if (typeof input.attach === "string")
141− for (const p of input.attach
143+ for (const flag of FILE_INPUTS) {
144+ const value = input[flag];
145+ if (typeof value !== "string") continue;
146+ for (const p of value
142147 .split(",")
143148 .map((x) => x.trim())
144149 .filter((x) => x !== ""))
145150 if (!inside(start, resolve(folder, p)))
146151 return {
147− refused: `--attach ${p} is outside ${start}, the folder this server started in; a tool attaches files from there or below`,
152+ refused: `--${flag} ${p} is outside ${start}, the folder this server started in; a tool reads files from there or below`,
148153 };
154+ }
149155 return { folder };
150156}
151157
MCP
compare on this site's /mcp
CLI
abso diff 22 23 client/src/mcp.ts --json
JSON
/christopher/abso-core/compare/22..23?file=client%2Fsrc%2Fmcp.ts&format=json