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 215 to 216

Compare

+22 −0 in 1 place
Lines 41–68 at 216 (were 41–46 at 215)
4141 /** Each version's files made and taken out, and moves (#41), worked out with its files. */
4242 readonly #shapeCache = new WeakMap<Space, Map<number, VersionShape>>();
4343
44+ /** The files at the newest version folded so far from kept shapes, per space (keptPaths). */
45+ readonly #keptPaths = new WeakMap<Space, { version: number; files: Set<string> }>();
47+ /**
48+ * The files a space has at a version, from the kept rows of every version up to it: each one's files made and
49+ * taken out, folded from version 0 (abso Capacity). Undefined when a version has no kept row that describes it;
50+ * then the caller lays the version out.
51+ */
52+ keptPaths(space: Space, version: number): string[] | undefined {
53+ let fold = this.#keptPaths.get(space);
54+ if (!fold || fold.version > version) fold = { version: -1, files: new Set() };
55+ const files = new Set(fold.files);
56+ for (let v = fold.version + 1; v <= version; v++) {
57+ if (!this.#keptFiles(space, v)) return undefined;
58+ const shape = this.#shapeCache.get(space)!.get(v)!;
59+ for (const f of shape.gone) files.delete(f);
60+ for (const f of shape.made) files.add(f);
61+ }
62+ this.#keptPaths.set(space, { version, files });
63+ return [...files].sort();
64+ }
4466 /** Each space's path index (#41): built the first time it's asked for, then kept up as versions land. */
4567 readonly #pathIndex = new WeakMap<Space, { upTo: number; paths: Map<string, PathLife> }>();
4668
MCP
compare on this site's /mcp
CLI
abso diff 215 216 worker/project/pathindex.ts --json
JSON
/christopher/abso-core/compare/215..216?file=worker%2Fproject%2Fpathindex.ts&format=json