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 161 to 162

Compare

+13 −10 in 3 places
Lines 118–138 at 162 (were 118–133 at 161)
118118 if (!this.members.get(previous.membership, this.graph.atom(id).seq)?.present) throw Error("missing dependency");
119119 return this.storage.transaction(() => {
120120 const state = { ...previous };
121− const sequence = this.sequence;
122121 this.ensureFile(state, this.path);
123122 for (const run of atom.inserts) this.ensureFile(state, run.file);
124123 let k = 0;
125124 for (const run of atom.inserts) for (const _ of run.lines) this.insertLine(state, `${atom.id}.${k++}`);
125+ let visibility: Array<{ kind: "visibility"; id: number; delta: number }> = [];
126126 for (const line of atom.deletes) {
127127 const marker = this.markers.get(state.locator, this.graph.lineN(line) + 1);
128128 if (!marker) throw Error("missing deleted marker");
129− state.sequence = sequence.update(state.sequence, { kind: "visibility", id: marker.enter, delta: 1 });
129+ visibility.push({ kind: "visibility", id: marker.enter, delta: 1 });
130+ if (visibility.length === 16) {
131+ state.sequence = this.sequence.updateMany(state.sequence, visibility);
132+ visibility = [];
133+ }
130134 }
135+ if (visibility.length) state.sequence = this.sequence.updateMany(state.sequence, visibility);
131136 for (const id of atom.deps) {
132137 const seq = this.graph.atom(id).seq,
133138 member = required(this.members.get(state.membership, seq));
Lines 148–153 at 162 (were 143–154 at 161)
143148 insertLine(state: MarkerState, line: string): void {
144149 this.assertContext(state);
145150 const sequence = this.sequence;
146− const insert = (rank: number, text: string, hidden = false): number => {
147− const id = state.sequence.next;
148− state.sequence = sequence.update(state.sequence, { kind: "insert", rank, text });
149− if (hidden) state.sequence = sequence.update(state.sequence, { kind: "visibility", id, delta: 1 });
150− return id;
151− };
152151 const n = this.graph.lineN(line),
153152 parent = this.graph.parentCodeOf(n);
154153 if (n + 1 >= 0x80000000) throw Error("prototype line identity limit");
Lines 174–185 at 162 (were 175–182 at 161)
175174 preceding === undefined ? parentMarker.enter : required(this.markers.get(state.locator, preceding + 1)).exit;
176175 state.children = this.childRoots.set(state.children, parentKey, { root: index.insert(root, key, n) });
177176 const at = sequence.rank(state.sequence, anchor) + 1;
178− const enter = insert(at, line),
179− exit = insert(at + 1, `${line}:end`, true);
177+ const enter = state.sequence.next,
178+ exit = enter + 1;
179+ state.sequence = sequence.updateMany(state.sequence, [
180+ { kind: "insert", rank: at, text: line },
181+ { kind: "insert", rank: at + 1, text: `${line}:end`, hidden: true },
182+ ]);
180183 state.locator = this.markers.set(state.locator, n + 1, { kind: "line", enter, exit, parentKey, key });
181184 }
182185 removeDeleter(previous: MarkerState, atom: Atom): MarkerState {
MCP
compare on this site's /mcp
CLI
abso diff 161 162 src/engine/experimental/projection-marker.ts --json
JSON
/christopher/abso-core/compare/161..162?file=src%2Fengine%2Fexperimental%2Fprojection-marker.ts&format=json