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 129 to 130

Compare

+15 −20 in 5 places
Lines 324–332 at 130 (were 324–330 at 129)
324324 this.#resolversPages = storedLists<AtomId>(storage, "resolvers");
325325 this.#togetherPages = storedLists<TogetherLink>(storage, "together");
326326 this.#fileAtomPages = storedLists<AtomId>(storage, "file-atoms");
327− this.#runStarts = storedMap(storage, "run-starts");
327+ this.#runStartPages = storedLists<number>(storage, "run-starts", (key) =>
328+ JSON.stringify(["number", Number(key)]),
329+ );
328330 this.#relocationPages = storedLists<RelocationInfo>(storage, "relocations");
329331 this.#relocatedToPages = storedLists<RelocationInfo>(storage, "relocated-to");
330332 this.#relocatedToCodePages = storedLists<RelocationInfo>(storage, "relocated-to-code", (key) =>
Lines 443–449 at 130 (were 441–446 at 129)
441443 #fileAtomPages: ReturnType<typeof storedLists<AtomId>> | undefined;
442444 /** First lines of runs (their n), by the node they were written after: a line's n, or -1 - a path's index. */
443445 #runStarts: StateMap<number, number | number[]> = new Map();
446+ #runStartPages: ReturnType<typeof storedLists<number>> | undefined;
444447 /** 1 for the first line of a run whose atom deleted the line it hangs off: the run replaces it. */
445448 #replacing: NumberIndex = new Ints(true);
446449 #relocations: StateMap<LineId, RelocationInfo[]> = new Map();
Lines 615–634 at 130 (were 612–629 at 129)
612615 }
613616
614617 /** The lines (their n) written right after a node, as childrenOf, into `out`. */
615619 childrenN(code: number, out: number[]): void {
620+ for (const n of this.eachChildN(code)) out.push(n);
621+ }
622+ *eachChildN(code: number): IterableIterator<number> {
616623 if (
617624 code >= 0 &&
618625 code + 1 < this.#lineTotal &&
619626 this.#lineAtom.at(code + 1) === this.#lineAtom.at(code) &&
620627 this.#lineParent.at(code + 1) === code
621628 )
622− out.push(code + 1);
623− const starts = this.#runStarts.get(code);
624− if (starts === undefined) return;
625− if (Array.isArray(starts)) out.push(...starts);
626− else out.push(starts);
629+ yield code + 1;
630+ if (this.#runStartPages) yield* this.#runStartPages.values(String(code));
631+ else yield* listOf(this.#runStarts.get(code));
627632 }
628633
629634 replacesN(n: number): boolean {
Lines 775–784 at 130 (were 770–790 at 129)
770775 }
771776
772777 /** Lines written right after a node (not counting moves), in seq order. */
773779 childrenOf(node: NodeId): LineId[] {
774− const out: LineId[] = [];
775780 const code = this.#nodeCode(node);
776− if (code === undefined) return out;
777− // The next line of the same run hangs off this one.
778− if (
779− code >= 0 &&
780− code + 1 < this.#lineTotal &&
781− this.#lineAtom.at(code + 1) === this.#lineAtom.at(code) &&
782− this.#lineParent.at(code + 1) === code
783− ) {
784− out.push(this.#lineName(code + 1));
785− }
786− for (const n of listOf(this.#runStarts.get(code))) out.push(this.#lineName(n));
787− return out;
781+ return code === undefined ? [] : [...this.eachChildN(code)].map((n) => this.#lineName(n));
788782 }
789783
790784 /** Whether a line starts a run whose atom deleted the line it hangs off. */
Lines 1001–1008 at 130 (were 1007–1013 at 129)
10071001 const file = this.#pathOf(run.file);
10081002 let parent = isStartNode(run.parent) ? -1 - file : this.#lineN(run.parent);
10091003 const first = this.#lineTotal;
1010− pushOne(this.#runStarts, parent, first);
1004+ if (this.#runStartPages) this.#runStartPages.append(String(parent), first);
1005+ else pushOne(this.#runStarts, parent, first);
10111006 for (let i = 0; i < run.lines.length; i++) {
10121007 const n = this.#lineTotal;
10131008 this.#lineAtom.push(seq);
MCP
compare on this site's /mcp
CLI
abso diff 129 130 src/engine/graph.ts --json
JSON
/christopher/abso-core/compare/129..130?file=src%2Fengine%2Fgraph.ts&format=json