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 176 to 177

Compare

+33 −0 in 2 places
Lines 9–15 at 177 (were 9–14 at 176)
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 808–845 at 177 (were 807–812 at 176)
807808 filesAt(version: number) {
808809 return this.project.viewAt(version).files();
809810 }
811+ fileTextAt(version: number, path: string): string {
812+ return this.project.viewAt(version).text(path);
813+ }
814+ /** One scoped batch: at most 64 files and 64 Ki characters plus one whole file. */
815+ fileTextsAt(version: number, paths: readonly string[]): Record<string, string> {
816+ const view = this.project.viewAt(version);
817+ const files: Record<string, string> = Object.create(null);
818+ let characters = 0;
819+ for (const path of paths.slice(0, 64)) {
820+ const text = view.attrs(path).link !== null ? "" : view.text(path);
821+ files[path] = text;
822+ characters += text.length;
823+ if (characters >= 65536) break;
824+ }
825+ return files;
826+ }
827+ /** Capture metadata now; each text read reopens the captured version in a fresh host scope. */
828+ sharedPushMetadata(): PushSnapshotMetadata {
829+ const version = this.project.version;
830+ const view = this.project.viewAt(version);
831+ const paths: string[] = [];
832+ const modes: PushSnapshotMetadata["modes"] = Object.create(null);
833+ const blobs: Record<string, string> = Object.create(null);
834+ for (const path of view.paths()) {
835+ const attrs = view.attrs(path);
836+ modes[path] = { exec: attrs.exec, link: attrs.link };
837+ if (attrs.blob !== null) blobs[path] = attrs.blob;
838+ else paths.push(path);
839+ }
840+ const by = version > 0 ? this.project.published(version) : undefined;
841+ return { version, paths, modes, blobs, ...(by ? { last: { agent: by.agent, message: by.message } } : {}) };
842+ }
810843 blobsAt(version: number) {
811844 return this.project.viewAt(version).blobs();
812845 }
MCP
compare on this site's /mcp
CLI
abso diff 176 177 server/src/engine-project.ts --json
JSON
/christopher/abso-core/compare/176..177?file=server%2Fsrc%2Fengine-project.ts&format=json