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 244 to 245

Compare

+28 −1 in 3 places
Lines 49–62 at 245 (were 49–55 at 244)
4949/** Structural read boundary shared by historical and transaction-bound projections. */
5050export type ReadView = Omit<
5151 Pick<View, keyof View>,
52− "sameText" | "visibleCount" | "shareMoves" | "shareFiles" | "fileOfNumber" | "lineNumberOf" | "visibleWriters"
52+ | "sameText"
53+ | "visibleCount"
54+ | "shareMoves"
55+ | "shareFiles"
56+ | "knowPaths"
57+ | "fileOfNumber"
58+ | "lineNumberOf"
59+ | "visibleWriters"
5360> & {
5461 sameText(path: string, other: ReadView): boolean;
5562};
Lines 434–450 at 245 (were 427–432 at 244)
427434 this.#filesFrom = { from, except };
428435 }
429436 #filesFrom: { from: View; except: () => ReadonlySet<string> | undefined } | null | undefined;
438+ /**
439+ * The files this view's set has, from what the project keeps for a published version (abso Capacity): hasFile
440+ * answers from it, not a layout of the file. Collisions resolving an import tried up to seven names, and each one
441+ * laid its file out. `paths` is asked once, when first needed; undefined lays files out as before.
442+ */
443+ knowPaths(paths: () => ReadonlySet<string> | undefined): void {
444+ if (this.#pathsFrom === undefined) this.#pathsFrom = paths;
445+ }
446+ #pathsFrom: (() => ReadonlySet<string> | undefined) | undefined;
447+ #knownPaths: ReadonlySet<string> | null | undefined;
430448 #filesShared: { from: View; except: ReadonlySet<string> } | null | undefined;
431449 #sharedFiles(): { from: View; except: ReadonlySet<string> } | null {
432450 if (this.#filesShared === undefined) {
Lines 917–931 at 245 (were 899–904 at 244)
899917
900918 /** Whether the file exists in this projection (has a visible line). */
901919 hasFile(path: string): boolean {
920+ if (!this.#files.has(path)) {
921+ // A file the draft doesn't touch exists as it does in the base; a published version's files are kept.
922+ const shared = this.#filesFrom === undefined ? null : this.#sharedFiles();
923+ if (shared && !shared.except.has(path)) return shared.from.hasFile(path);
924+ if (this.#pathsFrom !== undefined) {
925+ if (this.#knownPaths === undefined) this.#knownPaths = this.#pathsFrom() ?? null;
926+ if (this.#knownPaths) return this.#knownPaths.has(path);
927+ }
928+ }
902929 const attrs = this.attrs(path);
903930 return attrs.exists || attrs.link !== null || attrs.blob !== null || this.#file(path).vis.length > 0;
904931 }
MCP
compare on this site's /mcp
CLI
abso diff 244 245 src/engine/view.ts --json
JSON
/christopher/abso-core/compare/244..245?file=src%2Fengine%2Fview.ts&format=json