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 206 to 207

Compare

+39 −4 in 3 places
Lines 12–27 at 207 (were 12–19 at 206)
1212// agents publish into under the same rules, and that lands in shared as one
1313// unit. Every agent works in one space at a time.
1414
15−import { type Atom, type AtomId, EngineError, Graph, type LineId, type ReadView } from "../../src/engine/index.ts";
1615import {
16+ type Atom,
17+ type AtomId,
18+ EngineError,
19+ Graph,
20+ type LineId,
21+ type ReadView,
22+ View,
23+} from "../../src/engine/index.ts";
24+import {
1725 CachedStateStorage,
1826 differenceSet,
1927 type GraphStateStorage,
Lines 184–204 at 207 (were 176–186 at 206)
176184import { recordFile as hostedRecordFile, type RecordFileHost } from "./record-file.ts";
177185import { refusals as hostedRefusals, refuse as hostedRefuse, type RefuseHost } from "./refuse.ts";
178186import { restore as hostedRestore, type RestoreHost } from "./restore.ts";
179−import { indexClosure, last, Membership, SHARED, SharedAdditions, type Space, sharedBaseOf } from "./spaces.ts";
187+import {
188+ closureChangedAt,
189+ indexClosure,
190+ last,
191+ Membership,
192+ SHARED,
193+ SharedAdditions,
194+ type Space,
195+ sharedBaseOf,
196+} from "./spaces.ts";
180197import { starting as hostedStarting, type StartingHost } from "./start.ts";
181198import { switchTo as hostedSwitchTo, type SwitchHost } from "./switch-to.ts";
182199import { sync as hostedSync, type SyncHost } from "./sync.ts";
183200import { treeHash } from "./tree.ts";
201+import { versionFiles as keptVersionFiles, type VersionFilesHost } from "./version-files.ts";
184202import {
185203 type LogHost,
186204 compare as versionCompare,
Lines 1606–1630 at 207 (were 1588–1595 at 206)
15881606 this.#applyEntry(entry, at, keptTime);
15891607 // Shared's closure, kept per version on disk (abso Capacity): after the entry, since its atoms join the graph after
15901608 // its membership.
1591− if (this.#writerStorage && (this.#spaces.get(SHARED)?.versions.length ?? 0) > versionsBefore)
1592− indexClosure(this.#writerStorage, this.#spaces.get(SHARED)!, this.#graph);
1609+ if (this.#writerStorage && (this.#spaces.get(SHARED)?.versions.length ?? 0) > versionsBefore) {
1610+ const shared = this.#spaces.get(SHARED)!;
1611+ const storage = this.#writerStorage;
1612+ indexClosure(storage, shared, this.#graph);
1613+ // Each new version's changed files, from what it touched (version-files.ts): kept in the shapes table when
1614+ // the host gives one, so the log, a path's history and the tree never lay versions out to find them.
1615+ const host: VersionFilesHost = {
1616+ storage,
1617+ graph: this.#graph,
1618+ at: (v) => this.#at(shared, v),
1619+ viewAt: (v) => this.#viewAt(shared, v),
1620+ empty: () => new View(this.#graph, []),
1621+ closureChangedAt: (v) => closureChangedAt(storage, v),
1622+ };
1623+ for (let v = versionsBefore; v < shared.versions.length; v++) {
1624+ const { files, exists } = keptVersionFiles(host, shared.versions[v]!);
1625+ this.#paths.keep(shared, v, files, v === 0 ? host.empty() : host.viewAt(v - 1), host.viewAt(v), exists);
1626+ }
1627+ }
15931628 } finally {
15941629 // Positions by version: where each version of shared was made.
15951630 const versionsAfter = this.#spaces.get(SHARED)?.versions.length ?? 0;
MCP
compare on this site's /mcp
CLI
abso diff 206 207 worker/project/project.ts --json
JSON
/christopher/abso-core/compare/206..207?file=worker%2Fproject%2Fproject.ts&format=json