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 144 to 145

Compare

+11 −2 in 2 places
Lines 88–98 at 145 (were 88–93 at 144)
8888 const json = JSON.stringify({ value });
8989 entry = { kind: "json", json, bytes: overhead + 2 * json.length };
9090 }
91+ this.#remember(cacheKey, entry);
92+ return value;
93+ }
94+ #remember(cacheKey: string, entry: CachedValue): void {
95+ this.#drop(cacheKey);
9196 // Payload accounting is bounded, not a measurement of actual isolate heap.
9297 if (entry.bytes <= this.#maxBytes && this.#maxEntries > 0) {
9398 while (this.#bytes + entry.bytes > this.#maxBytes || this.#cache.size >= this.#maxEntries)
Lines 100–114 at 145 (were 95–105 at 144)
95100 this.#cache.set(cacheKey, entry);
96101 this.#bytes += entry.bytes;
97102 }
98− return value;
99103 }
100104 write(collection: string, key: string, value: unknown): void {
101− this.#drop(JSON.stringify([collection, key]));
105+ const cacheKey = JSON.stringify([collection, key]);
106+ this.#drop(cacheKey);
102107 this.#source.write(collection, key, value);
108+ // Allocation counters are immutable scalars. Keep successful writes within
109+ // the existing cache budget instead of immediately reading them back.
110+ if (typeof value === "number" && Number.isSafeInteger(value) && !Object.is(value, -0))
111+ this.#remember(cacheKey, { kind: "scalar", value, bytes: 2 * cacheKey.length + 176 });
103112 }
104113 remove(collection: string, key: string): void {
105114 this.#drop(JSON.stringify([collection, key]));
MCP
compare on this site's /mcp
CLI
abso diff 144 145 src/engine/state-source.ts --json
JSON
/christopher/abso-core/compare/144..145?file=src%2Fengine%2Fstate-source.ts&format=json