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
MCP
show on this site's /mcp
CLI
abso show 272 --json
JSON
/christopher/abso-core/versions/272?format=json

abso-hooks mod: ask for news every 5 minutes, not 30 seconds, and not at all in a chat with no tool call for 10 minutes (its next tool call starts it again). Prod abso's object reset under the load of every chat asking every 30 seconds (Agent VCS, 5:10 PM CT). abso announce says so. Tests: node client/test-mods.ts.

of shared·box-grants··Not checked

Version 271 · Files at version 272

3 files, 41 lines added, 11 removed.

--- a/client/hooks/register.test.ts
+++ b/client/hooks/register.test.ts
@@ -40,15 +40,17 @@
4040 appended.push((e.message.content as { text: string }[])[0]!.text);
4141 return next(e);
4242 });
43+ // Tools the chat calls run as asked.
44+ on("tool.call", () => ({ result: { isError: false, text: "ok" } }) as never);
4345 return { clock, asked, auth, clients, appended, written };
4446}
4547
46−test("the news poll asks every 30 seconds in an abso folder, and keeps each item once", async ($, on) => {
48+test("the news poll asks every 5 minutes in an abso folder, and keeps each item once", async ($, on) => {
4749 // The kit has no conversation to append to, so the append itself is checked in a live session (#25);
4850 // here: the poll's timing, the call, and the news log the view mod reads.
4951 const w = world(on, true, [["Announcement from lead: stop pushing until v12 lands"], []]);
5052 await $.session.start({ cwd: "/w/p" });
51− await w.clock.advance(29_000);
53+ await w.clock.advance(299_000);
5254 expect(w.asked).toEqual([]);
5355 await w.clock.advance(1_000);
5456 expect(w.asked).toEqual(["https://avcs.test/p/p/a/bob/news"]);
@@ -56,7 +58,8 @@
5658 expect(w.auth[0]).toBe("none");
5759 // Which mod asked: avcs-mod/<version> once installed, avcs-mod/checkout from a checkout (#29).
5860 expect(w.clients[0]).toMatch(/^avcs-mod\/(checkout|\d+\.\d+\.\d+(\+[\w.]+)?)$/);
59− await w.clock.advance(30_000);
61+ await $.tool.call({ tool: "Bash", command: "ls" } as never);
62+ await w.clock.advance(300_000);
6063 expect(w.asked).toHaveLength(2);
6164 const log = w.written.get("/w/p/.abso/news.log") ?? "";
6265 expect(log.split("\n").filter((l) => l.includes("Announcement from lead"))).toHaveLength(1);
@@ -64,14 +67,28 @@
6467
6568test("while the seat holds its news stream (abso 690), the poll stands down, and asks again once the mark runs out", async ($, on) => {
6669 const w = world(on, true, [[], []]);
67− w.written.set("/w/p/.abso/news-stream.json", JSON.stringify({ until: 1_000_000 + 95_000 }));
70+ w.written.set("/w/p/.abso/news-stream.json", JSON.stringify({ until: 1_000_000 + 400_000 }));
6871 await $.session.start({ cwd: "/w/p" });
69− await w.clock.advance(90_000);
72+ await w.clock.advance(300_000);
7073 expect(w.asked).toEqual([]);
71− await w.clock.advance(30_000);
74+ await $.tool.call({ tool: "Bash", command: "ls" } as never);
75+ await w.clock.advance(300_000);
7276 expect(w.asked).toEqual(["https://avcs.test/p/p/a/bob/news"]);
7377});
7478
79+test("a chat with no tool call for 10 minutes stops asking for news; its next tool call starts it again", async ($, on) => {
80+ const w = world(on, true, [[], [], []]);
81+ await $.session.start({ cwd: "/w/p" });
82+ await w.clock.advance(300_000);
83+ expect(w.asked).toHaveLength(1);
84+ // Idle since the start: at 10 and 15 minutes it doesn't ask.
85+ await w.clock.advance(600_000);
86+ expect(w.asked).toHaveLength(1);
87+ await $.tool.call({ tool: "Read", file_path: "/w/p/a.ts" } as never);
88+ await w.clock.advance(300_000);
89+ expect(w.asked).toHaveLength(2);
90+});
7592test("outside an abso folder it never asks", async ($, on) => {
7693 const w = world(on, false, [["should not arrive"]]);
7794 await $.session.start({ cwd: "/w/p" });
@@ -85,7 +102,6 @@
85102 w.written.set("/w/p/.abso/known/fuzz.ts", "one\ntwo\nthree\n");
86103 w.written.set("/w/p/fuzz.ts", "one\ntwo\nth\u0000ree\n");
87104 on("fs.stat", () => ({ value: { realPath: "/w/p/fuzz.ts" } }) as never);
88− on("tool.call", () => ({ result: { isError: false, text: "ok" } }) as never);
89105 on("session.id", () => ({ value: "sess" }));
90106 await $.session.start({ cwd: "/w/p" });
91107 await $.tool.call({
--- a/client/hooks/register.ts
+++ b/client/hooks/register.ts
@@ -89,8 +89,15 @@
8989let draining = false;
9090const TICK_MS = 150;
9191const roots = new Map<string, { root: string | undefined; at: number }>();
92−/** How often to ask for news without an edit (announcements reach an agent that isn't editing). */
93−const NEWS_POLL_MS = 30_000;
92+/**
93+ * How often to ask for news without an edit (announcements reach an agent that isn't editing). Every 5 minutes, and
94+ * not at all in a chat that has made no tool call for IDLE_MS: prod abso's object reset under the load of every chat
95+ * asking every 30 seconds (2026-10-15). abso news --stream (abso 690) wakes a chat without asking.
96+ */
97+const NEWS_POLL_MS = 5 * 60_000;
98+const IDLE_MS = 10 * 60_000;
99+/** When this chat last made a tool call (or started). */
100+let activeAt = 0;
94101/** The abso folder this chat works in: the session's folder, or the first edited file's. */
95102let newsRoot: string | undefined;
96103let polling = false;
@@ -108,8 +115,10 @@
108115 });
109116 // Outside an abso folder each tick only reads a variable.
110117 newsRoot = await findRoot($, `${slash(await $.session.cwd())}/.`).catch(() => undefined);
111− $.clock.every(NEWS_POLL_MS, () => {
118+ activeAt = await $.clock.now();
119+ $.clock.every(NEWS_POLL_MS, async () => {
112120 if (polling || newsRoot === undefined) return;
121+ if ((await $.clock.now()) - activeAt >= IDLE_MS) return;
113122 polling = true;
114123 void pollNews($, newsRoot).finally(() => {
115124 polling = false;
@@ -118,6 +127,11 @@
118127 return next(e);
119128 });
120129
130+ on("tool.call", async ($, e, next) => {
131+ activeAt = await $.clock.now();
132+ return next(e);
133+ });
121135 on("tool.call", { tool: TOOLS }, async ($, e, next) => {
122136 const ran = await next(e);
123137 try {
--- a/client/src/announce.ts
+++ b/client/src/announce.ts
@@ -28,7 +28,7 @@
2828 const answer = await api.announce(text, to);
2929 const who = answer.to.length === 0 ? "nobody (no other agents yet)" : answer.to.join(", ");
3030 return {
31− text: `Announced to ${who}. Each gets it once, as news on their next edit, or within about 30 seconds where the abso mod runs.`,
31+ text: `Announced to ${who}. Each gets it once, as news on their next edit, within about 5 minutes in a working chat where the abso mod runs, or at once where it holds its news stream.`,
3232 json: { id: answer.id, to: answer.to },
3333 };
3434}