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 273 --json
JSON
/christopher/abso-core/versions/273?format=json

abso news --follow (abso 690): stop on close 1008 (a revoked key, or a fifth socket for the agent), the server's shape from Read Speed, instead of 4401/4403. Any other close opens again with a new ticket. Tests: client/test/news-stream.test.ts.

of shared·box-grants··Not checked

Version 272 · Files at version 273

2 files, 7 lines added, 6 removed.

--- a/client/src/news-stream.ts
+++ b/client/src/news-stream.ts
@@ -61,9 +61,9 @@
6161 close(code?: number): void;
6262}
6363
64−/** A close the server sends when the ticket or key is refused: --follow stops instead of trying again. */
64+/** A close the server sends for a revoked key or a fifth socket (1008): --follow stops instead of trying again. */
6565export function isRefusal(code: number): boolean {
66− return code === 4401 || code === 4403;
66+ return code === 1008;
6767}
6868
6969/** How long --follow waits before opening a socket again: 1 s doubling to a minute; a socket that lived a minute resets it. */
--- a/client/test/news-stream.test.ts
+++ b/client/test/news-stream.test.ts
@@ -44,8 +44,9 @@
4444});
4545
4646test("a refusal close stops --follow; any other close opens again, waiting 1 s doubling to a minute", () => {
47− assert.equal(isRefusal(4401), true);
48− assert.equal(isRefusal(4403), true);
47+ // 1008: a revoked key, or a fifth socket for the agent. A bad ticket is refused before the upgrade, so it closes 1006
48+ // and is tried again with a new ticket; a refused key then fails the mint.
49+ assert.equal(isRefusal(1008), true);
4950 assert.equal(isRefusal(1006), false);
5051 assert.equal(isRefusal(1001), false);
5152 assert.equal(nextWait(1_000, 0), 2_000);
@@ -144,8 +145,8 @@
144145});
145146
146147test("a refused ticket or a refusal close ends --follow; a ticket that can't be had is tried again", async () => {
147− const refusedClose = world([{ frames: ["one item"], close: { code: 4401, reason: "the key was revoked" } }]);
148− assert.deepEqual(await follow(refusedClose.deps), { ended: "refused", reason: "the key was revoked" });
148+ const refusedClose = world([{ frames: ["one item"], close: { code: 1008, reason: "key revoked" } }]);
149+ assert.deepEqual(await follow(refusedClose.deps), { ended: "refused", reason: "key revoked" });
149150 assert.deepEqual(refusedClose.lines, ["one item"]);
150151
151152 const w = world([{ frames: [], close: { code: 1000 } }]);