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 154 to 318

Compare

+24 −2 in 5 places
Lines 89–96 at 318 (were 89–94 at 154)
8989 queueHold: boolean;
9090 /** The next publish: commit it and answer 500 ('after'), or answer 500 without it ('before'), as a storage reset does. */
9191 failPublish: "after" | "before" | undefined;
92+ /** How many of the next pulls to carry out and then cut before answering, as an answer that never arrives (abso-core 26). */
93+ loseSyncAnswers: number;
9294 /** Run the merge queue's rounds now (after queueHold is let go). */
9395 kickQueue(name: string): Promise<void>;
9496 /** Each run POST's X-Abso-Run-Key, and whether a run started for it. */
Lines 157–163 at 318 (were 155–160 at 154)
155157 boxExtra: undefined,
156158 queueHold: false,
157159 failPublish: undefined,
160+ loseSyncAnswers: 0,
158161 kickQueue: async () => {},
159162 close: async () => {},
160163 };
Lines 274–280 at 318 (were 271–277 at 154)
271274 return;
272275 }
273276 const m =
274− /^\/p\/([^/]+)\/(init|status|queue|change\/\d+|changes|notes|ci\/revoke|ci|blame|why|where|labels|files|diff|log|show|file|compare|a\/([^/]+)\/(edit|record|publish|sync|run|draft|land|draft-sync|diff|restore|announce|news|starting|reader|drop|pluck|amend|label|files|unqueue|note|note-close|move))$/.exec(
277+ /^\/p\/([^/]+)\/(init|status|queue|change\/\d+|changes|notes|ci\/revoke|ci|blame|why|where|labels|files|diff|log|show|file|compare|without|a\/([^/]+)\/(edit|record|publish|sync|run|draft|land|draft-sync|diff|restore|announce|news|starting|reader|drop|pluck|amend|label|files|unqueue|note|note-close|move))$/.exec(
275278 url.pathname,
276279 );
277280 if (!m) return send(res, 404, { error: "no such route; see docs/v2-slice1.md" });
Lines 437–462 at 318 (were 434–445 at 154)
434437 return send(res, 200, blame(hosted.project, q.file, num(q.from), num(q.to), num(q.version), view));
435438 const line = num(q.line);
436439 if (!line || !Number.isInteger(line)) return send(res, 400, { error: "why needs ?line=<number>" });
437− return send(res, 200, why(hosted.project, q.file, line, view));
440+ return send(res, 200, why(hosted.project, q.file, line, { ...view, version: num(q.version) }));
438441 } catch (e) {
439442 const code = (e as { code?: string }).code;
440443 return send(res, code === "bad-request" ? 400 : 500, { error: e instanceof Error ? e.message : String(e) });
441444 }
442445 }
446+ if (op === "without") {
447+ // GET ?version=<n>&versions=<n,n>, as worker/project/http.ts routes it.
448+ const q = Object.fromEntries(url.searchParams) as Record<string, string | undefined>;
449+ try {
450+ return send(
451+ res,
452+ 200,
453+ hosted.project.without(Number(q.version), (q.versions ?? "").split(",").filter(Boolean).map(Number)),
454+ );
455+ } catch (e) {
456+ const code = (e as { code?: string }).code;
457+ return send(res, code === "bad-request" ? 400 : 500, { error: e instanceof Error ? e.message : String(e) });
458+ }
459+ }
443460 if (op === "log" || op === "show" || op === "file" || op === "compare") {
444461 // As the Worker routes them: ?draft=<name>, shared when absent.
445462 const q = Object.fromEntries(url.searchParams) as Record<string, string | undefined>;
Lines 635–645 at 318 (were 618–623 at 154)
618635 ...(typeof body.label === "string" ? { label: body.label } : {}),
619636 ...(body.full === true ? { full: true } : {}),
620637 });
638+ if (fake.loseSyncAnswers > 0) {
639+ fake.loseSyncAnswers--;
640+ res.destroy();
641+ return;
642+ }
621643 const extra = fake.injectSync;
622644 fake.injectSync = undefined;
623645 if (extra === undefined) return send(res, 200, synced);
MCP
compare on this site's /mcp
CLI
abso diff 154 318 client/test/fake-server.ts --json
JSON
/christopher/abso-core/compare/154..318?file=client%2Ftest%2Ffake-server.ts&format=json