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 175 to 318

Compare

+49 −4 in 5 places
Lines 9–15 at 318 (were 9–14 at 175)
99import { type Entry, type ProjectStore as LogStore, MemoryStore, Project } from "../../worker/project/project.ts";
1010import type { EditBody, ProjectCalls, ProjectHistory } from "../../worker/project/project-api.ts";
1111import { where } from "../../worker/project/where.ts";
12+import type { PushSnapshotMetadata } from "./push-snapshot.ts";
1213
1314/** The parts of a Durable Object's storage the log and blob store use, declared structurally so tests can stand in. */
1415export interface SqliteStorage {
Lines 496–507 at 318 (were 495–502 at 175)
495496 ...(folder !== undefined ? { folder } : {}),
496497 });
497498 }
498− why(file: string, line: number, draft?: string, agent?: string) {
499− return why(this.project, file, line, { ...(draft ? { draft } : {}), ...(agent ? { agent } : {}) });
499+ why(file: string, line: number, draft?: string, agent?: string, version?: number) {
500+ return why(this.project, file, line, {
501+ ...(draft ? { draft } : {}),
502+ ...(agent ? { agent } : {}),
503+ ...(version !== undefined ? { version } : {}),
504+ });
500505 }
501506 where() {
502507 return where(this.project);
Lines 523–535 at 318 (were 518–526 at 175)
518523 fileAt(path: string, version: number, draft: string | null, agent?: string) {
519524 return this.project.fileAt(path, version, { draft, ...(agent ? { agent } : {}) });
520525 }
521− compare(from: number, to: number, draft: string | null, agent?: string) {
522− return this.project.compare(from, to, { draft, ...(agent ? { agent } : {}) });
526+ compare(from: number, to: number, draft: string | null, agent?: string, summary?: boolean) {
527+ const where = { draft, ...(agent ? { agent } : {}) };
528+ return summary ? this.project.compareSummary(from, to, where) : this.project.compare(from, to, where);
523529 }
530+ without(version: number, versions: readonly number[]) {
531+ return this.project.without(version, versions);
532+ }
524533 show(version: number, draft: string | null, agent?: string) {
525534 return this.project.show(version, { draft, ...(agent ? { agent } : {}) });
526535 }
Lines 572–581 at 318 (were 563–568 at 175)
563572 announcePerson(person: { id: string; name: string }, text: string, to?: string[]) {
564573 return this.project.announcePerson(person, text, to, Date.now());
565574 }
575+ /** A seat's earlier chat hears that another chat used the seat (277, groups); as abso's worker has it. */
576+ seatNotice(agent: string, place: string, key: string) {
577+ return this.project.seatNotice(agent, place, key);
578+ }
566579 starting(agent: string, text: string | null, files?: string[], options: { issue?: unknown; done?: unknown } = {}) {
567580 return this.project.starting(agent, text, files, Date.now(), options);
568581 }
Lines 820–857 at 318 (were 807–812 at 175)
807820 filesAt(version: number) {
808821 return this.project.viewAt(version).files();
809822 }
823+ fileTextAt(version: number, path: string): string {
824+ return this.project.viewAt(version).text(path);
825+ }
826+ /** One scoped batch: at most 64 files and 64 Ki characters plus one whole file. */
827+ fileTextsAt(version: number, paths: readonly string[]): Record<string, string> {
828+ const view = this.project.viewAt(version);
829+ const files: Record<string, string> = Object.create(null);
830+ let characters = 0;
831+ for (const path of paths.slice(0, 64)) {
832+ const text = view.attrs(path).link !== null ? "" : view.text(path);
833+ files[path] = text;
834+ characters += text.length;
835+ if (characters >= 65536) break;
836+ }
837+ return files;
838+ }
839+ /** Capture metadata now; each text read reopens the captured version in a fresh host scope. */
840+ sharedPushMetadata(): PushSnapshotMetadata {
841+ const version = this.project.version;
842+ const view = this.project.viewAt(version);
843+ const paths: string[] = [];
844+ const modes: PushSnapshotMetadata["modes"] = Object.create(null);
845+ const blobs: Record<string, string> = Object.create(null);
846+ for (const path of view.paths()) {
847+ const attrs = view.attrs(path);
848+ modes[path] = { exec: attrs.exec, link: attrs.link };
849+ if (attrs.blob !== null) blobs[path] = attrs.blob;
850+ else paths.push(path);
851+ }
852+ const by = version > 0 ? this.project.published(version) : undefined;
853+ return { version, paths, modes, blobs, ...(by ? { last: { agent: by.agent, message: by.message } } : {}) };
854+ }
810855 blobsAt(version: number) {
811856 return this.project.viewAt(version).blobs();
812857 }
MCP
compare on this site's /mcp
CLI
abso diff 175 318 server/src/engine-project.ts --json
JSON
/christopher/abso-core/compare/175..318?file=server%2Fsrc%2Fengine-project.ts&format=json