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 271 to 272

Compare

+23 −7 in 4 places
Lines 40–56 at 272 (were 40–54 at 271)
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"]);
Lines 58–65 at 272 (were 56–62 at 271)
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);
Lines 67–94 at 272 (were 64–77 at 271)
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" });
Lines 102–107 at 272 (were 85–91 at 271)
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({
MCP
compare on this site's /mcp
CLI
abso diff 271 272 client/hooks/register.test.ts --json
JSON
/christopher/abso-core/compare/271..272?file=client%2Fhooks%2Fregister.test.ts&format=json