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 148 to 149

Compare

+14 −1 in 3 places
Lines 277–284 at 149 (were 277–282 at 148)
277277 #textCache = new Map<number, readonly string[]>();
278278 #textCached = 0;
279279
280+ readonly #indexAcceptedAtom?: (atom: Atom, files: readonly string[], storage: GraphStateStorage) => void;
280282 /**
281283 * `texts`, when given, says where each atom's lines' text can be read back
282284 * (#46): the graph then keeps no text, only each line's place, and reads an
Lines 289–301 at 149 (were 287–294 at 148)
287289 texts?: (seq: number) => readonly (readonly string[])[];
288290 lists?: (seq: number) => AtomLists;
289291 storage?: GraphStateStorage;
292+ /** Optional derived indexing inside persistent atom acceptance; must be synchronous. */
293+ indexAcceptedAtom?: (atom: Atom, files: readonly string[], storage: GraphStateStorage) => void;
290294 } = {},
291295 ) {
296+ if (options.indexAcceptedAtom && !options.storage)
297+ throw Error("accepted atom indexing requires persistent storage");
298+ this.#indexAcceptedAtom = options.indexAcceptedAtom;
292299 if (options.texts) {
293300 this.#texts = options.texts;
294301 this.#lineText = undefined;
Lines 1001–1013 at 149 (were 994–1000 at 148)
9941001 * The atom is frozen. Adding to the graph does not add it to any set.
9951002 */
9961003 add(atom: Atom): void {
997− if (this.#storage) this.#storage.transaction(() => this.#add(atom));
1004+ if (this.#storage)
1005+ this.#storage.transaction(() => {
1006+ this.#add(atom);
1007+ const result: unknown = this.#indexAcceptedAtom?.(atom, this.filesOf(atom.id), this.#storage!);
1008+ if (result && typeof result === "object" && "then" in result)
1009+ throw Error("accepted atom indexing must be synchronous");
1010+ });
9981011 else this.#add(atom);
9991012 }
10001013
MCP
compare on this site's /mcp
CLI
abso diff 148 149 src/engine/graph.ts --json
JSON
/christopher/abso-core/compare/148..149?file=src%2Fengine%2Fgraph.ts&format=json