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 245 to 246

Compare

+7 −13 in 4 places
Lines 2–8 at 246 (were 2–8 at 245)
22// is the project in memory.
33
44import { type AtomId, type Graph, parseKey, type ReadView } from "../../src/engine/index.ts";
5−import { StableSet, unionOverlay } from "../../src/engine/state-source.ts";
5+import { StableSet } from "../../src/engine/state-source.ts";
66import { claimantsAmong, describeSide, fileOfKey, pairsFrom } from "./collisions.ts";
77import type { DefinitionRule } from "./definition-rule.ts";
88import { type Definition, definedTwice } from "./definitions.ts";
Lines 25–32 at 246 (were 25–31 at 245)
2525 definitionRule(): DefinitionRule;
2626 draft(agent: Agent): AtomId[];
2727 agentView(agent: Agent): ReadView;
28− view(set: ReadonlySet<AtomId>): ReadView;
28+ /** Shared now with these agents' drafts on top. */
29+ draftsView(agents: readonly Agent[]): ReadView;
2930 touchedFiles(ids: Iterable<AtomId>, views: readonly ReadView[]): Set<string>;
3031}
3132
Lines 96–104 at 246 (were 95–110 at 245)
9596 if (!set) draftSets.set(agent, (set = new Set(host.draft(agent))));
9697 return set;
9798 };
98− // Shared now with each agent's draft on top, once per agent. Over shared's view's own set (abso Capacity): a view's set
99− // is closed under dependencies anyway, so shared's closed set and the drafts lay out what shared's atoms and the drafts
100− // do, and only the drafts' atoms are walked to close it.
101− const withDraftsView = (...drafts: readonly AtomId[][]) => host.view(unionOverlay(sharedView.set, drafts.flat()));
102− const nowViews = new Map<Agent, ReadView>();
103− const nowViewOf = (agent: Agent) => {
104− let view = nowViews.get(agent);
105− if (!view) nowViews.set(agent, (view = withDraftsView(host.draft(agent))));
106− return view;
107− };
99+ // Shared now with each agent's draft on top (project.ts, draftsView): kept between calls while shared and the
100+ // draft stay the same, and laid out as shared is for every file the draft doesn't touch (abso Capacity).
101+ const nowViewOf = (agent: Agent) => host.draftsView([agent]);
108102 // Each agent's touched files once, not once per pair (abso Capacity).
109103 const touched = new Map<Agent, Set<string>>();
110104 const touchedBy = (agent: Agent) => {
Lines 155–161 at 246 (were 161–167 at 245)
161155 const mineB = new Set(draftB);
162156 const filesA = touchedBy(a);
163157 for (const file of [...touchedBy(b)].filter((f) => filesA.has(f)).toSorted()) {
164− both ??= withDraftsView(draftA, draftB);
158+ both ??= host.draftsView([a, b]);
165159 if (!both.hasFile(file)) continue;
166160 for (const [name, defs] of definedTwice(both, file)) {
167161 const by = (mine: Set<AtomId>) => defs.find((d) => d.lines.some((l) => mine.has(host.graph.lineAtom(l)!)));
MCP
compare on this site's /mcp
CLI
abso diff 245 246 worker/project/draft-collisions.ts --json
JSON
/christopher/abso-core/compare/245..246?file=worker%2Fproject%2Fdraft-collisions.ts&format=json