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 175 to 176

Compare

+16 −6 in 3 places
Lines 380–399 at 176 (were 380–385 at 175)
380380 throw Error("stored atom text range missing");
381381 }
382382 : undefined;
383+ // Sequential reads advance once per run without retaining a history-sized offset array.
384+ let offsetRun = 0;
385+ let offsetLine = 0;
386+ const insertionStart = (index: number): number => {
387+ if (index < offsetRun) {
388+ offsetRun = 0;
389+ offsetLine = 0;
390+ }
391+ while (offsetRun < index) {
392+ offsetLine += readonlyStoredArray(storage, `atom-inserts:${atom.seq}:lines:${offsetRun}`).length;
393+ offsetRun++;
394+ }
395+ return offsetLine;
396+ };
383397 const streamed = (target: Atom): Atom => {
384398 registerJsonChunkValue(target, () => {
385399 const line = (raw: unknown, index: number): unknown => {
Lines 411–417 at 176 (were 397–405 at 175)
397411 const lines = `${collection}:lines:${index}`;
398412 if (run.lines !== lines || typeof run.file !== "string" || typeof run.parent !== "string")
399413 throw Error("invalid stored insertion run");
400− let start = 0;
401− for (let prior = 0; prior < index; prior++)
402− start += readonlyStoredArray(storage, `${collection}:lines:${prior}`).length;
414+ const start = insertionStart(index);
403415 return {
404416 file: run.file,
405417 parent: run.parent,
Lines 452–458 at 176 (were 440–448 at 175)
440452 lines: readonlyStoredArray<string>(storage, lines, (rawLine, lineIndex) => {
441453 if (typeof rawLine === "string") return rawLine;
442454 const ref = rawLine as TextReference;
443− let atomLine = lineIndex;
444− for (let prior = 0; prior < index; prior++)
445− atomLine += readonlyStoredArray(storage, `${collection}:lines:${prior}`).length;
455+ const atomLine = insertionStart(index) + lineIndex;
446456 if (!ref || ref.text !== JSON.stringify([String(atom.seq), atomLine]))
447457 throw Error("invalid stored insertion text");
448458 return atomText.read(ref.text);
MCP
compare on this site's /mcp
CLI
abso diff 175 176 src/engine/graph.ts --json
JSON
/christopher/abso-core/compare/175..176?file=src%2Fengine%2Fgraph.ts&format=json