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

+24 −1 in 1 place
Lines 1900–1934 at 246 (were 1900–1911 at 245)
19001900 definitionRule: () => this.#definitionRule,
19011901 draft: (agent) => this.#draft(agent as AgentState),
19021902 agentView: (agent) => this.#agentView(agent as AgentState),
1903− view: (set) => this.#view(set),
1903+ draftsView: (agents) => this.#draftsView(agents as readonly AgentState[]),
19041904 touchedFiles: (ids, views) => this.#touchedFiles(ids, views),
19051905 };
19061906 return this.#draftCollisionHost;
19071907 }
19081908
1909+ /**
1910+ * Shared now with some agents' drafts on top, for draft collisions (abso Capacity). Kept under the drafts' atoms and
1911+ * shared's version, so a second ask with nothing changed lays nothing out again, and laid out as shared is for every
1912+ * file the drafts don't touch, as an agent's view is. One agent based on shared's newest version is its own view.
1913+ */
1914+ #draftsView(agents: readonly AgentState[]): ReadView {
1915+ const shared = this.#shared;
1916+ const version = last(shared);
1917+ const only = agents.length === 1 ? agents[0]! : undefined;
1918+ if (only && only.space === SHARED && only.base === version) return this.#agentView(only);
1919+ const drafts = agents.map((agent) => this.#draft(agent));
1920+ const mine = drafts.flat();
1921+ const base = this.#sharedView();
1922+ const view = this.#viewKeyed(`d ${SHARED}@${version}+${drafts.map((d) => d.join(",")).join("+")}`, () =>
1923+ unionOverlay(base.set, mine),
1924+ );
1925+ if (this.#writerStorage && mine.length > 0 && view instanceof View && base instanceof View) {
1926+ view.shareMoves(base);
1927+ view.shareFiles(base, () => touchedBeyond(this.#graph, base.set, mine, [base, view]));
1928+ }
1929+ return view;
1930+ }
19091932 /** Whether agents' unpublished changes would collide, by the publish rule (draft-collisions.ts). */
19101933 collisions(...args: Tail<Parameters<typeof draftCollisions>>): ReturnType<typeof draftCollisions> {
19111934 return draftCollisions(this.#draftCollisions, ...args);
MCP
compare on this site's /mcp
CLI
abso diff 245 246 worker/project/project.ts --json
JSON
/christopher/abso-core/compare/245..246?file=worker%2Fproject%2Fproject.ts&format=json