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 142 to 143

Compare

+8 −8 in 7 places
Lines 10–16 at 143 (were 10–16 at 142)
1010 type Graph,
1111 joinLines,
1212 parseKey,
13− type View,
13+ type ReadView,
1414} from "../../src/engine/index.ts";
1515import { differenceSet, StableOverlaySet } from "../../src/engine/state-source.ts";
1616import { definedTwice } from "./definitions.ts";
Lines 147–154 at 143 (were 147–154 at 142)
147147 g: Graph,
148148 origin: (atom: AtomId, spaceName: string) => Origin,
149149 pair: Pair,
150− yoursView: View,
151− theirsView: View,
150+ yoursView: ReadView,
151+ theirsView: ReadView,
152152 spaceName: string,
153153): Collision {
154154 const file = fileOfKey(pair.keys[0]!.key, yoursView);
Lines 157–163 at 143 (were 157–163 at 142)
157157 if (attrsOnly.length === fileKeys.length) {
158158 // Both set the same attribute of the file: show each side's value.
159159 const name = attrsOnly[0]!.attr!;
160− const valueIn = (view: View, atom: AtomId): string => {
160+ const valueIn = (view: ReadView, atom: AtomId): string => {
161161 const set = (g.atom(atom).attrs ?? []).find((a) => a.file === file && a.name === name);
162162 return set?.value ?? (name === "exec" ? "" : String(view.attrs(file)[name] ?? ""));
163163 };
Lines 177–183 at 143 (were 177–183 at 142)
177177 };
178178}
179179
180−export function fileOfKey(key: string, view: View): string {
180+export function fileOfKey(key: string, view: ReadView): string {
181181 const { kind, node } = parseKey(key);
182182 if (kind === "attr") return node;
183183 return node.startsWith("^") ? node.slice(1) : view.fileOf(node);
Lines 187–193 at 143 (were 187–193 at 142)
187187 * The files some atoms change: the graph's files of each, and, in views
188188 * with moves (#28), wherever the lines they touch are in those views.
189189 */
190−export function touchedFiles(g: Graph, ids: Iterable<AtomId>, views: readonly View[]): Set<string> {
190+export function touchedFiles(g: Graph, ids: Iterable<AtomId>, views: readonly ReadView[]): Set<string> {
191191 const out = new Set<string>();
192192 const moved = views.filter((v) => v.hasMoves());
193193 for (const id of ids) {
Lines 206–212 at 143 (were 206–212 at 142)
206206}
207207
208208/** The atom's visible lines in a file of a view, or where it acted when none are left. */
209−export function describeSide(view: View, atom: AtomId, file: string, keys: readonly string[]): CollisionSide {
209+export function describeSide(view: ReadView, atom: AtomId, file: string, keys: readonly string[]): CollisionSide {
210210 const visible = view.lines(file);
211211 let first = -1;
212212 let lastLine = -1;
Lines 238–244 at 143 (were 238–244 at 142)
238238 spaceOf(agent: AgentState): Space;
239239 agentSet(agent: AgentState): ReadonlySet<AtomId>;
240240 draft(agent: AgentState): AtomId[];
241− agentView(agent: AgentState): View;
241+ agentView(agent: AgentState): ReadView;
242242 at(space: Space, version: number): ReadonlySet<AtomId>;
243243 shared(): Space;
244244}
MCP
compare on this site's /mcp
CLI
abso diff 142 143 worker/project/collisions.ts --json
JSON
/christopher/abso-core/compare/142..143?file=worker%2Fproject%2Fcollisions.ts&format=json