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 234 to 235

Compare

+25 −2 in 3 places
Lines 49–55 at 235 (were 49–55 at 234)
4949/** Structural read boundary shared by historical and transaction-bound projections. */
5050export type ReadView = Omit<
5151 Pick<View, keyof View>,
52− "sameText" | "visibleCount" | "shareMoves" | "fileOfNumber" | "lineNumberOf" | "visibleWriters"
52+ "sameText" | "visibleCount" | "shareMoves" | "shareFiles" | "fileOfNumber" | "lineNumberOf" | "visibleWriters"
5353> & {
5454 sameText(path: string, other: ReadView): boolean;
5555};
Lines 389–415 at 235 (were 389–394 at 234)
389389 this.#movesFrom = from;
390390 }
391391
392+ /**
393+ * Files laid out as another view lays them out (abso Capacity): a draft's view over its base's, for every file the
394+ * draft doesn't touch. The caller knows what the draft is; `except` is asked once, when a file is first needed, for
395+ * the files the draft touches, or undefined when nothing can be shared (a draft that moves lines). Without it, an
396+ * agent's tree, files and blame laid out every file of the project again for each agent.
397+ */
398+ shareFiles(from: View, except: () => ReadonlySet<string> | undefined): void {
399+ if (from.graph !== this.graph || from === this || this.#filesFrom !== undefined) return;
400+ this.#filesFrom = { from, except };
401+ }
402+ #filesFrom: { from: View; except: () => ReadonlySet<string> | undefined } | null | undefined;
403+ #filesShared: { from: View; except: ReadonlySet<string> } | null | undefined;
404+ #sharedFiles(): { from: View; except: ReadonlySet<string> } | null {
405+ if (this.#filesShared === undefined) {
406+ const share = this.#filesFrom;
407+ const except = share ? share.except() : undefined;
408+ this.#filesShared = share && except ? { from: share.from, except } : null;
409+ }
410+ return this.#filesShared;
411+ }
392413 #takeShared(): void {
393414 const from = this.#movesFrom;
394415 if (!from) return;
Lines 1125–1133 at 235 (were 1104–1110 at 234)
11041125 #file(path: string, complete = false): FileState {
11051126 let state = this.#files.get(path);
11061127 if (!state || (complete && !state.complete)) {
1107− state = this.graph.hasAtomsIn(path) ? this.#layout(path, complete) : NO_FILE;
1128+ const shared = this.#filesFrom === undefined ? null : this.#sharedFiles();
1129+ if (shared && !shared.except.has(path)) state = shared.from.#file(path, complete);
1130+ else state = this.graph.hasAtomsIn(path) ? this.#layout(path, complete) : NO_FILE;
11081131 this.#files.set(path, state);
11091132 }
11101133 return state;
MCP
compare on this site's /mcp
CLI
abso diff 234 235 src/engine/view.ts --json
JSON
/christopher/abso-core/compare/234..235?file=src%2Fengine%2Fview.ts&format=json