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

Compare

+21 −0 in 4 places
Lines 12–19 at 178 (were 12–17 at 177)
1212import { DiskFirstRuntime } from "./disk-first-runtime.ts";
1313import { EngineProject, SqliteLog } from "./engine-project.ts";
1414import { artifactsOf, type Env } from "./env.ts";
15+import { GitDiskIntake } from "./git-disk-intake.ts";
16+import { GitIntakeTrees } from "./git-intake-trees.ts";
1517import { pushedSince, remoteHead } from "./ingest.ts";
1618import {
1719 checkKey,
Lines 61–70 at 178 (were 59–64 at 177)
5961export const PUSH_EVERY_MS = 60_000;
6062/** While agents are working, how often a call looks for plain-git pushes to the repo. */
6163const GIT_CHECK_MS = 15_000;
64+// Disk scratch admission limits, independent of the Worker's resident memory.
65+const GIT_PACK_MAX_BYTES = 128 * 1024 * 1024;
66+const GIT_OBJECT_MAX_BYTES = 64 * 1024 * 1024;
67+const GIT_DECODED_MAX_BYTES = 256 * 1024 * 1024;
6268
6369/**
6470 * The load guard (platform issue 46): an estimate of a loaded project's memory from its log entries, lines and claim
Lines 125–134 at 178 (were 119–124 at 177)
119125 constructor(ctx: DurableObjectState, env: Env) {
120126 super(ctx, env);
121127 this.blobs = new BlobStore(ctx.storage);
128+ if (env.ABSO_DISK_FIRST === "on") {
129+ GitDiskIntake.recover(ctx.storage);
130+ GitIntakeTrees.recover(ctx.storage);
131+ }
122132 }
123133
124134 /** Where files kept whole go: the project's blob store. */
Lines 543–565 at 178 (were 533–544 at 177)
533543 const head = await remoteHead(artifacts, name);
534544 if (!head || head === seen || head === pushed?.commit) return null;
535545 const sharedBlobs = this.useProject((p) => p.shared().blobs ?? {});
546+ using trees = this.diskRuntime() ? new GitIntakeTrees(this.ctx.storage) : undefined;
536547 const found = await pushedSince(
537548 artifacts,
538549 name,
539550 seen,
540551 async (bytes) => (bytes.byteLength > BLOB_MAX ? null : this.blobs.putBytes(bytes)),
541552 (path) => sharedBlobs[path],
553+ trees ? (files, path, body, oid) => trees.retainFile(files, path, body, oid) : undefined,
554+ trees
555+ ? {
556+ storage: this.ctx.storage,
557+ maxPackBytes: GIT_PACK_MAX_BYTES,
558+ maxObjectBytes: GIT_OBJECT_MAX_BYTES,
559+ maxDecodedBytes: GIT_DECODED_MAX_BYTES,
560+ retainFileChunks: (files, path, chunks, oid) => trees.retainChunks(files, path, chunks, oid),
561+ }
562+ : undefined,
542563 );
543564 if (!found || found.commits.length === 0) {
544565 if (found) await this.ctx.storage.put("git:head", found.head);
MCP
compare on this site's /mcp
CLI
abso diff 177 178 server/src/project-object.ts --json
JSON
/christopher/abso-core/compare/177..178?file=server%2Fsrc%2Fproject-object.ts&format=json