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 59 to 60

Compare

+58 −0 in 1 place
Lines 102–165 at 60 (were 102–107 at 59)
102102 assert.equal(JSON.stringify(boxPublic(got)).includes(CREDENTIAL), false);
103103});
104104
105+test("login opens the approve page with the code in it, and prints the link and code all the same", async () => {
106+ const said: string[] = [];
107+ const opened: string[] = [];
108+ const c = clock();
109+ await login(
110+ SERVER,
111+ {
112+ fetch: server(
113+ [
114+ [200, started],
115+ [200, { box_id: "b_0123abcd", box_token: CREDENTIAL, expires_at: EXPIRES, grant }],
116+ ],
117+ [],
118+ ),
119+ sleep: c.sleep,
120+ now: c.now,
121+ say: (line) => said.push(line),
122+ open: (url) => (opened.push(url), true),
123+ },
124+ home(),
125+ );
126+ assert.deepEqual(opened, ["https://abso.dev/login/box?code=WXYZ-BCDF"]);
127+ assert.deepEqual(said.slice(0, 2), [
128+ "Opening the approve page in your browser.",
129+ "To sign this box in, open https://abso.dev/login/box?code=WXYZ-BCDF and approve the code WXYZ-BCDF.",
130+ ]);
131+});
133+test("an open that doesn't start says nothing about a browser, and the printed link stands", async () => {
134+ const said: string[] = [];
135+ const c = clock();
136+ await login(
137+ SERVER,
138+ {
139+ fetch: server(
140+ [
141+ [200, started],
142+ [200, { box_id: "b_0123abcd", box_token: CREDENTIAL, expires_at: EXPIRES, grant }],
143+ ],
144+ [],
145+ ),
146+ sleep: c.sleep,
147+ now: c.now,
148+ say: (line) => said.push(line),
149+ open: () => false,
150+ },
151+ home(),
152+ );
153+ assert.equal(
154+ said[0],
155+ "To sign this box in, open https://abso.dev/login/box?code=WXYZ-BCDF and approve the code WXYZ-BCDF.",
156+ );
157+ assert.equal(
158+ said.some((l) => l.includes("browser")),
159+ false,
160+ );
161+});
105163test("a code that's turned down or runs out says so and keeps nothing", async () => {
106164 const h = home();
107165 const c = clock();
MCP
compare on this site's /mcp
CLI
abso diff 59 60 client/test/box.test.ts --json
JSON
/christopher/abso-core/compare/59..60?file=client%2Ftest%2Fbox.test.ts&format=json