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

Compare

+27 −2 in 2 places
Lines 32–65 at 318 (were 32–42 at 7)
3232 return counts;
3333}
3434
35+/** The project file's names, the one read first first (224): abso.json, then avcs.json from before the rename. */
36+export const PROJECT_FILES = ["abso.json", "avcs.json"] as const;
3538/**
36− * What's wrong with an avcs.json, or undefined (Git Lessons' review, batch 4):
39+ * The project file a set of files holds: abso.json when it has one, else
40+ * avcs.json. `ignored` names avcs.json when both are there, so status can say
41+ * which one counts.
42+ */
43+export function projectFileIn(files: {
44+ hasFile(path: string): boolean;
45+ text(path: string): string;
46+}): { name: (typeof PROJECT_FILES)[number]; text: string; ignored?: "avcs.json" } | undefined {
47+ const [name, other] = PROJECT_FILES.filter((n) => files.hasFile(n));
48+ if (!name) return undefined;
49+ return { name, text: files.text(name), ...(other ? { ignored: "avcs.json" as const } : {}) };
50+}
52+/** projectFileIn for a plain path -> text record (init, git intake). */
53+export function projectFileOf(files: Readonly<Record<string, unknown>>): ReturnType<typeof projectFileIn> {
54+ return projectFileIn({ hasFile: (p) => typeof files[p] === "string", text: (p) => files[p] as string });
55+}
57+/**
58+ * What's wrong with a project file (abso.json or avcs.json), or undefined:
3759 * it must be a JSON object, and the keys abso reads must have their types:
3860 * "whole" a list of globs, "queue" true or false, "review" a list of
39− * {paths, reviewer}, and CI's "setup", "build", "check" and "out" strings.
61+ * {paths, reviewer}, CI's "setup", "build", "check" and "out" strings, and
62+ * "gitIssues" (where "#N" in history imported from git points) a web address.
4063 */
4164export function configProblem(text: string): string | undefined {
4265 let config: unknown;
Lines 87–94 at 318 (were 64–69 at 7)
6487 });
6588 if (!ok) return `has "review" that isn't a list of {"paths": [globs], "reviewer": "<agent>"}`;
6689 }
90+ if (c.gitIssues !== undefined && (typeof c.gitIssues !== "string" || !/^https?:\/\/\S+$/.test(c.gitIssues)))
91+ return `has "gitIssues" that isn't a web address (like "https://github.com/owner/repo/issues")`;
6792 for (const key of ["setup", "build", "check", "out"])
6893 if (c[key] !== undefined && typeof c[key] !== "string") return `has "${key}" that isn't a string`;
6994 return undefined;
MCP
compare on this site's /mcp
CLI
abso diff 7 318 worker/project/project-helpers.ts --json
JSON
/christopher/abso-core/compare/7..318?file=worker%2Fproject%2Fproject-helpers.ts&format=json