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

Compare

+30 −3 in 2 places
Lines 1794–1800 at 252 (were 1794–1799 at 251)
17941794 viewAt: (space, version) => this.#viewAt(space, version),
17951795 keptPaths: (space, version) => this.#keptPaths(space, version),
17961796 authorTotals: (space, version, agent) => this.#authorTotals(space, version, agent as AgentState | undefined),
1797+ agentTouched: (agent) => this.#agentTouched(agent as AgentState),
17971798 agentView: (agent) => this.#agentView(agent as AgentState),
17981799 spellingIn: (view, asked) => this.spellingIn(view, asked),
17991800 pathsOf: (space) => this.#paths.pathsOf(space),
Lines 1822–1860 at 252 (were 1821–1833 at 251)
18211822 ): ((path: string) => FileTotals | undefined) | undefined {
18221823 const storage = this.#writerStorage;
18231824 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)]);
1825+ if (!agent) return (path) => authorTotalsAt(storage, path, version);
1826+ const except = this.#agentTouched(agent);
18271827 if (!except) return undefined;
18281828 return (path) => (except.has(path) ? undefined : authorTotalsAt(storage, path, version));
18291829 }
18301830
1831+ /**
1832+ * The files an agent's draft, and whatever it depends on beyond its base, can make differ from its base
1833+ * (touchedBeyond); every other file is the same in both. Undefined when the draft moves lines.
1834+ */
1835+ #agentTouched(agent: AgentState): ReadonlySet<string> | undefined {
1836+ if (agent.mine.length === 0) return new Set();
1837+ const base = this.#viewAt(this.#spaceOf(agent), agent.base);
1838+ return touchedBeyond(this.#graph, base.set, agent.mine, [base, this.#agentView(agent)]);
1839+ }
1841+ /**
1842+ * Kept author totals for a folder's blame (blame.ts), where blame reads: shared at a version (the newest by default) or
1843+ * an agent's view. A named draft has none. Undefined when none are kept.
1844+ */
1845+ authorTotalsFor(where: {
1846+ version?: number;
1847+ draft?: string;
1848+ agent?: string;
1849+ }): ((path: string) => FileTotals | undefined) | undefined {
1850+ if (where.draft !== undefined) return undefined;
1851+ if (where.agent !== undefined) {
1852+ const agent = this.#agents.get(where.agent);
1853+ return agent ? this.#authorTotals(this.#spaceOf(agent), agent.base, agent) : undefined;
1854+ }
1855+ return this.#authorTotals(this.#shared, where.version ?? last(this.#shared));
1856+ }
18311858 /** One folder at a version (history.ts). */
18321859 tree(...args: Tail<Parameters<typeof historyTree>>): ReturnType<typeof historyTree> {
18331860 return historyTree(this.#history, ...args);
MCP
compare on this site's /mcp
CLI
abso diff 251 252 worker/project/project.ts --json
JSON
/christopher/abso-core/compare/251..252?file=worker%2Fproject%2Fproject.ts&format=json