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

Compare

+8 −5 in 1 place
Lines 41–63 at 318 (were 41–60 at 5)
4141 * A path part's key for comparing it against reserved names: pathKey, after
4242 * dropping the characters HFS+ ignores in names, so ".g\u200Cit" is .git
4343 * there (git's is_hfs_dotgit). Only for this comparison: U+200C and U+200D
44− * are ordinary characters in Persian and Indic names (Pinch Hitter).
44+ * are ordinary characters in Persian and Indic names.
4545 */
4646function reservedKey(seg: string): string {
4747 return pathKey(seg.replace(/[\u200C-\u200F\u202A-\u202E\u206A-\u206F\uFEFF]/g, ""));
4848}
49−const AVCS_KEY = pathKey(".avcs");
49+/** The client's folder: .abso, and .avcs from before the rename (224). */
50+const SETTINGS_KEYS = new Set([pathKey(".abso"), pathKey(".avcs")]);
5051
51−/** For writes: the path must be canonical, and not under .avcs/ in any spelling, at any depth. */
52+/** For writes: the path must be canonical, and not under .abso/ or .avcs/ in any spelling, at any depth. */
5253export function checkPath(path: string): void {
5354 const problem = pathProblem(path);
5455 if (problem) throw new ProjectError("bad-request", `bad file path ${JSON.stringify(path)}: ${problem}`);
5556 // The client's settings stay in the agent's folder and are never published.
56− if (path.split("/").some((seg) => reservedKey(seg) === AVCS_KEY)) {
57− throw new ProjectError("bad-request", `${path} is under .avcs/, which stays in the agent's folder`);
57+ const settings = path.split("/").find((seg) => SETTINGS_KEYS.has(reservedKey(seg)));
58+ if (settings !== undefined) {
59+ const folder = reservedKey(settings) === pathKey(".abso") ? ".abso" : ".avcs";
60+ throw new ProjectError("bad-request", `${path} is under ${folder}/, which stays in the agent's folder`);
5861 }
5962}
6063
MCP
compare on this site's /mcp
CLI
abso diff 5 318 worker/project/path-rules.ts --json
JSON
/christopher/abso-core/compare/5..318?file=worker%2Fproject%2Fpath-rules.ts&format=json