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

Compare

+23 −4 in 5 places
Lines 15–29 at 119 (were 15–22 at 118)
1515 seqOf,
1616 startNode,
1717} from "./keys.ts";
18−import { type GraphStateStorage, type StateMap, storedArray, storedMap, storedNumbers } from "./state-source.ts";
1918import {
19+ type GraphStateStorage,
20+ type StateMap,
21+ storedArray,
22+ storedLists,
23+ storedMap,
24+ storedNumbers,
25+} from "./state-source.ts";
26+import {
2027 ATTR_NAMES,
2128 type Atom,
2229 type AtomId,
Lines 321–327 at 119 (were 314–320 at 118)
314321 this.#dependents = storedMap(storage, "dependents");
315322 this.#resolvers = storedMap(storage, "resolvers");
316323 this.#together = storedMap(storage, "together");
317− this.#fileAtoms = storedMap(storage, "file-atoms");
324+ this.#fileAtomPages = storedLists<AtomId>(storage, "file-atoms");
318325 this.#runStarts = storedMap(storage, "run-starts");
319326 this.#relocations = storedMap(storage, "relocations");
320327 this.#relocatedTo = storedMap(storage, "relocated-to");
Lines 427–433 at 119 (were 420–425 at 118)
420427 #resolvers: StateMap<AtomId, AtomId | AtomId[]> = new Map();
421428 #together: StateMap<AtomId, TogetherLink[]> = new Map();
422429 #fileAtoms: StateMap<string, AtomId[]> = new Map();
430+ #fileAtomPages: ReturnType<typeof storedLists<AtomId>> | undefined;
423431 /** First lines of runs (their n), by the node they were written after: a line's n, or -1 - a path's index. */
424432 #runStarts: StateMap<number, number | number[]> = new Map();
425433 /** 1 for the first line of a run whose atom deleted the line it hangs off: the run replaces it. */
Lines 710–729 at 119 (were 702–713 at 118)
702710
703711 /** Every atom that inserts or deletes a line of the file, in seq order. */
704712 atomsIn(file: string): readonly AtomId[] {
713+ if (this.#fileAtomPages) return [...this.#fileAtomPages.values(file)];
705714 return this.#fileAtoms.get(file) ?? EMPTY;
706715 }
716+ *eachAtomIn(file: string): IterableIterator<AtomId> {
717+ if (this.#fileAtomPages) yield* this.#fileAtomPages.values(file);
718+ else yield* this.#fileAtoms.get(file) ?? EMPTY;
719+ }
720+ hasAtomsIn(file: string): boolean {
721+ return this.#fileAtomPages ? this.#fileAtomPages.length(file) > 0 : this.#fileAtoms.has(file);
722+ }
707723
708724 /** Unique historical file paths, streamed without collecting their names. */
709725 *knownFiles(): IterableIterator<string> {
710− yield* this.#fileAtoms.keys();
726+ yield* this.#fileAtomPages ? this.#fileAtomPages.keys() : this.#fileAtoms.keys();
711727 }
712728
713729 /**
Lines 997–1006 at 119 (were 981–987 at 118)
981997 files.add(isStartNode(m.parent) ? m.parent.slice(1) : this.lineFile(m.parent)!);
982998 }
983999 this.#atomFiles.push(Object.freeze([...files].sort()));
984− for (const file of files) pushIndex(this.#fileAtoms, file, frozen.id);
1000+ for (const file of files) {
1001+ if (this.#fileAtomPages) this.#fileAtomPages.append(file, frozen.id);
1002+ else pushIndex(this.#fileAtoms, file, frozen.id);
1003+ }
9851004 for (const r of frozen.reasons) {
9861005 if (r.kind !== "together" || r.to === frozen.id) continue;
9871006 pushIndex(this.#together, frozen.id, { other: r.to, text: r.text, from: frozen.id });
MCP
compare on this site's /mcp
CLI
abso diff 118 119 src/engine/graph.ts --json
JSON
/christopher/abso-core/compare/118..119?file=src%2Fengine%2Fgraph.ts&format=json