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 142 to 143

Compare

+8 −7 in 6 places
Lines 1–9 at 143 (were 1–8 at 142)
1+import { View } from "../../src/engine/index.ts";
12// Each version's files and shape, and each path's history in a space (#41; #46, disk-first 1). Built the first
23// time it's asked for and kept up as versions land; a version's files are also kept in the shapes table, so a
34// load needn't lay them out again.
45
5−import { type AtomId, type Graph, type LineId, View } from "../../src/engine/index.ts";
6+import type { AtomId, Graph, LineId, ReadView } from "../../src/engine/index.ts";
67import {
78 differs,
89 type LastChange,
Lines 18–25 at 143 (were 17–24 at 142)
1718export interface PathIndexDeps {
1819 readonly graph: Graph;
1920 at(space: Space, version: number): ReadonlySet<AtomId>;
20− viewAt(space: Space, version: number): View;
21− touchedFiles(ids: Iterable<AtomId>, views: readonly View[]): Set<string>;
21+ viewAt(space: Space, version: number): ReadView;
22+ touchedFiles(ids: Iterable<AtomId>, views: readonly ReadView[]): Set<string>;
2223 readonly shapes: ProjectOptions["shapes"];
2324}
2425
Lines 45–51 at 143 (were 44–50 at 142)
4445 readonly #pathIndex = new WeakMap<Space, { upTo: number; paths: Map<string, PathLife> }>();
4546
4647 /** The files a version changed. `views` holds views by version, so a run of versions builds each once. */
47− versionFiles(space: Space, version: number, views = new Map<number, View>()): string[] {
48+ versionFiles(space: Space, version: number, views = new Map<number, ReadView>()): string[] {
4849 let cache = this.#filesCache.get(space);
4950 if (!cache) this.#filesCache.set(space, (cache = new Map()));
5051 const known = cache.get(version);
Lines 54–60 at 143 (were 53–59 at 142)
5354 if (kept) return kept;
5455 const shapes = this.#shapeCache.get(space)!;
5556 const p = space.versions[version]!;
56− const viewAt = (v: number): View => {
57+ const viewAt = (v: number): ReadView => {
5758 let view = views.get(v);
5859 if (!view) views.set(v, (view = v < 0 ? new View(this.#deps.graph, []) : this.#deps.viewAt(space, v)));
5960 return view;
Lines 108–114 at 143 (were 107–113 at 142)
107108 }
108109
109110 /** A version's files made and taken out, and moves (#41). */
110− versionShape(space: Space, version: number, views?: Map<number, View>): VersionShape {
111+ versionShape(space: Space, version: number, views?: Map<number, ReadView>): VersionShape {
111112 const known = this.#shapeCache.get(space)?.get(version);
112113 if (known) return known;
113114 this.#filesCache.get(space)?.delete(version);
Lines 125–131 at 143 (were 124–130 at 142)
124125 pathsOf(space: Space): Map<string, PathLife> {
125126 let index = this.#pathIndex.get(space);
126127 if (!index) this.#pathIndex.set(space, (index = { upTo: -1, paths: new Map() }));
127− const views = new Map<number, View>();
128+ const views = new Map<number, ReadView>();
128129 // Shared's sets grow version by version, so walk them forward rather than build each from the
129130 // start; the views stay out of the cache, which they would only push other views from. A version
130131 // whose files are kept (#41) needs no views at all.
MCP
compare on this site's /mcp
CLI
abso diff 142 143 worker/project/pathindex.ts --json
JSON
/christopher/abso-core/compare/142..143?file=worker%2Fproject%2Fpathindex.ts&format=json