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 250 to 251

Compare

+27 −1 in 3 places
Lines 200–213 at 251 (were 200–207 at 250)
200200import { switchTo as hostedSwitchTo, type SwitchHost } from "./switch-to.ts";
201201import { sync as hostedSync, type SyncHost } from "./sync.ts";
202202import { treeHash } from "./tree.ts";
203−import { versionFiles as keptVersionFiles, type VersionFilesHost } from "./version-files.ts";
204203import {
204+ authoredVersion,
205+ authorTotalsAt,
206+ type FileTotals,
207+ versionFiles as keptVersionFiles,
208+ type VersionFilesHost,
209+} from "./version-files.ts";
210+import {
205211 type LogHost,
206212 compare as versionCompare,
207213 compareSummary as versionCompareSummary,
Lines 1793–1799 at 251 (were 1787–1792 at 250)
17871793 checkVersion: (space, version) => this.#checkVersion(space, version),
17881794 viewAt: (space, version) => this.#viewAt(space, version),
17891795 keptPaths: (space, version) => this.#keptPaths(space, version),
1796+ authorTotals: (space, version, agent) => this.#authorTotals(space, version, agent as AgentState | undefined),
17901797 agentView: (agent) => this.#agentView(agent as AgentState),
17911798 spellingIn: (view, asked) => this.spellingIn(view, asked),
17921799 pathsOf: (space) => this.#paths.pathsOf(space),
Lines 1809–1833 at 251 (were 1802–1807 at 250)
18021809 return this.#writerStorage && space.name === SHARED ? this.#paths.keptPaths(space, version) : undefined;
18031810 }
18041811
1812+ /**
1813+ * Each file's kept author totals for tree with authors (version-files.ts), on a stored writer and for shared only. An
1814+ * agent's view takes its base's totals for every file its draft doesn't touch, as its layout does (touchedBeyond),
1815+ * and lays out the rest; a draft that moves lines lays out everything.
1816+ */
1817+ #authorTotals(
1818+ space: Space,
1819+ version: number,
1820+ agent?: AgentState,
1821+ ): ((path: string) => FileTotals | undefined) | undefined {
1822+ const storage = this.#writerStorage;
1823+ if (!storage || space.name !== SHARED || authoredVersion(storage) === undefined) return undefined;
1824+ if (!agent || agent.mine.length === 0) return (path) => authorTotalsAt(storage, path, version);
1825+ const base = this.#viewAt(space, version);
1826+ const except = touchedBeyond(this.#graph, base.set, agent.mine, [base, this.#agentView(agent)]);
1827+ if (!except) return undefined;
1828+ return (path) => (except.has(path) ? undefined : authorTotalsAt(storage, path, version));
1829+ }
18051831 /** One folder at a version (history.ts). */
18061832 tree(...args: Tail<Parameters<typeof historyTree>>): ReturnType<typeof historyTree> {
18071833 return historyTree(this.#history, ...args);
MCP
compare on this site's /mcp
CLI
abso diff 250 251 worker/project/project.ts --json
JSON
/christopher/abso-core/compare/250..251?file=worker%2Fproject%2Fproject.ts&format=json