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 119 to 120

Compare

+39 −9 in 4 places
Lines 315–323 at 120 (were 315–323 at 119)
315315 this.#lineText = storedArray(storage, "line-text");
316316 this.#pathIndex = storedMap(storage, "path-index");
317317 this.#moreDeleters = storedMap(storage, "more-deleters");
318− this.#writers = storedMap(storage, "writers");
319− this.#readers = storedMap(storage, "readers");
320− this.#holders = storedMap(storage, "holders");
318+ this.#writersPages = storedLists<AtomId>(storage, "writers", (key) => key);
319+ this.#readersPages = storedLists<AtomId>(storage, "readers", (key) => key);
320+ this.#holdersPages = storedLists<AtomId>(storage, "holders", (key) => key);
321321 this.#dependents = storedMap(storage, "dependents");
322322 this.#resolvers = storedMap(storage, "resolvers");
323323 this.#together = storedMap(storage, "together");
Lines 421–431 at 120 (were 421–428 at 119)
421421 #deleter: NumberIndex = new Ints();
422422 #moreDeleters: StateMap<number, number[]> = new Map();
423423 #writers: StateMap<Key | number, AtomId | AtomId[]> = new Map();
424+ #writersPages: ReturnType<typeof storedLists<AtomId>> | undefined;
424425 #readers: StateMap<Key | number, AtomId | AtomId[]> = new Map();
426+ #readersPages: ReturnType<typeof storedLists<AtomId>> | undefined;
425427 #holders: StateMap<Key | number, AtomId | AtomId[]> = new Map();
428+ #holdersPages: ReturnType<typeof storedLists<AtomId>> | undefined;
426429 #dependents: StateMap<AtomId, AtomId | AtomId[]> = new Map();
427430 #resolvers: StateMap<AtomId, AtomId | AtomId[]> = new Map();
428431 #together: StateMap<AtomId, TogetherLink[]> = new Map();
Lines 698–730 at 120 (were 695–712 at 119)
695698 }
696699
697700 writersOf(key: Key): readonly AtomId[] {
698− return listOf(this.#writers.get(this.#code(key)));
701+ return [...this.eachWriterOf(key)];
699702 }
703+ *eachWriterOf(key: Key): IterableIterator<AtomId> {
704+ const code = this.#code(key);
705+ if (this.#writersPages) yield* this.#writersPages.values(JSON.stringify([typeof code, code]));
706+ else yield* listOf(this.#writers.get(code));
707+ }
700708
701709 /** Atoms whose implicit reads include the key. */
702710 readersOf(key: Key): readonly AtomId[] {
703− return listOf(this.#readers.get(this.#code(key)));
711+ return [...this.eachReaderOf(key)];
704712 }
713+ *eachReaderOf(key: Key): IterableIterator<AtomId> {
714+ const code = this.#code(key);
715+ if (this.#readersPages) yield* this.#readersPages.values(JSON.stringify([typeof code, code]));
716+ else yield* listOf(this.#readers.get(code));
717+ }
705718
706719 /** Atoms whose explicit holds include the key. */
707720 holdersOf(key: Key): readonly AtomId[] {
708− return listOf(this.#holders.get(this.#code(key)));
721+ return [...this.eachHolderOf(key)];
709722 }
723+ *eachHolderOf(key: Key): IterableIterator<AtomId> {
724+ const code = this.#code(key);
725+ if (this.#holdersPages) yield* this.#holdersPages.values(JSON.stringify([typeof code, code]));
726+ else yield* listOf(this.#holders.get(code));
727+ }
710728
711729 /** Every atom that inserts or deletes a line of the file, in seq order. */
712730 atomsIn(file: string): readonly AtomId[] {
Lines 1001–1021 at 120 (were 983–991 at 119)
9831001 if (this.#deleter.at(n) < 0) this.#deleter.set(n, seq);
9841002 else pushIndex(this.#moreDeleters, n, seq);
9851003 }
986− for (const key of new Set(atom.writes)) pushOne(this.#writers, this.#code(key), frozen.id);
987− for (const key of new Set(atom.reads)) pushOne(this.#readers, this.#code(key), frozen.id);
988− for (const key of new Set(atom.holds)) pushOne(this.#holders, this.#code(key), frozen.id);
1004+ for (const key of new Set(atom.writes)) {
1005+ const code = this.#code(key);
1006+ if (this.#writersPages) this.#writersPages.append(JSON.stringify([typeof code, code]), frozen.id);
1007+ else pushOne(this.#writers, code, frozen.id);
1008+ }
1009+ for (const key of new Set(atom.reads)) {
1010+ const code = this.#code(key);
1011+ if (this.#readersPages) this.#readersPages.append(JSON.stringify([typeof code, code]), frozen.id);
1012+ else pushOne(this.#readers, code, frozen.id);
1013+ }
1014+ for (const key of new Set(atom.holds)) {
1015+ const code = this.#code(key);
1016+ if (this.#holdersPages) this.#holdersPages.append(JSON.stringify([typeof code, code]), frozen.id);
1017+ else pushOne(this.#holders, code, frozen.id);
1018+ }
9891019 for (const d of deps) pushOne(this.#dependents, d, frozen.id);
9901020 for (const r of new Set(frozen.resolves)) pushOne(this.#resolvers, r, frozen.id);
9911021 const files = new Set<string>();
MCP
compare on this site's /mcp
CLI
abso diff 119 120 src/engine/graph.ts --json
JSON
/christopher/abso-core/compare/119..120?file=src%2Fengine%2Fgraph.ts&format=json