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

waiting --mine lists your publishes still in the merge queue: where each stands (being checked, or how many wait ahead of it), whether the queue is paused, and that the outcome comes as news; --json carries them as queued. A server without a queue, or one that can't be read, leaves them out rather than failing the asks.

of shared·pinch··Not checked

Version 35 · Files at version 36

5 files, 110 lines added, 7 removed.

--- a/client/src/issues.ts
+++ b/client/src/issues.ts
@@ -27,6 +27,7 @@
2727import { fromEnv } from "./env-names.ts";
2828import { ignoredHere } from "./fetch.ts";
2929import { loadIgnore, relativeTo } from "./folder.ts";
30+import { queuedLines, standing } from "./queue.ts";
3031import { seenText, shortWhen } from "./times.ts";
3132
3233const q = (s: string): string => JSON.stringify(s);
@@ -698,17 +699,31 @@
698699 const { api, config } = openIssues(env);
699700 const mine = bool(args, "mine") || str(args, "of") === config.agent;
700701 const of = mine ? config.agent : str(args, "of");
701− const { asks } = mine ? await api.waitingMine() : await api.waiting(of);
702+ // With --mine, your own publishes still in the merge queue are open work too. A server without a queue,
703+ // or one that can't be read now, leaves them out rather than failing the asks.
704+ const [{ asks }, queue] = await Promise.all([
705+ mine ? api.waitingMine() : api.waiting(of),
706+ mine ? api.queueState().catch(() => undefined) : undefined,
707+ ]);
708+ const queued = queuedLines(queue, config.agent);
709+ const yours = (queue?.items ?? []).filter((q) => q.agent === config.agent);
702710 return {
703− text:
704− asks.length === 0
705− ? `Nothing is waiting${of ? ` on ${of}` : ""}.`
711+ text: [
712+ ...queued,
713+ ...(asks.length === 0
714+ ? [queued.length > 0 ? `No open asks of ${of}.` : `Nothing is waiting${of ? ` on ${of}` : ""}.`]
706715 : [
707716 `${plural(asks.length, "open ask")}${of ? ` of ${of}` : ""}, soonest due first:`,
708717 ...asks.map((a) => askLine(a, api)),
709718 'abso answer <ask> "..." answers one asked of you.',
710− ].join("\n"),
711− json: { asks },
719+ ]),
720+ ].join("\n"),
721+ json: {
722+ asks,
723+ ...(yours.length > 0
724+ ? { queued: yours.map((q) => ({ id: q.id, message: q.message, standing: standing(queue!.items, q.id) })) }
725+ : {}),
726+ },
712727 };
713728}
714729
--- a/client/src/main.ts
+++ b/client/src/main.ts
@@ -455,7 +455,8 @@
455455 waiting: {
456456 flags: { of: "string", mine: "boolean" },
457457 usage: "abso waiting [--of <agent or person:id>] [--mine]",
458− about: "The open asks, soonest due first: every one, those of someone (--of), or those of you (--mine).",
458+ about:
459+ "The open asks, soonest due first: every one, those of someone (--of), or those of you (--mine). --mine also lists your publishes still in the merge queue and where each stands; the outcome comes as news.",
459460 run: runWaiting,
460461 },
461462 answer: {
--- a/client/src/queue.ts
+++ b/client/src/queue.ts
@@ -138,6 +138,23 @@
138138 return lines;
139139}
140140
141+/**
142+ * What abso waiting --mine says about this agent's own publishes in the merge queue: where each stands, whether
143+ * the queue is paused, and how the outcome comes. Nothing when none of theirs waits.
144+ */
145+export function queuedLines(queue: QueueState | null | undefined, me: string): string[] {
146+ const items = queue?.items ?? [];
147+ const mine = items.filter((q) => q.agent === me);
148+ if (mine.length === 0) return [];
149+ return [
150+ ...mine.map(
151+ (q) => `Your publish ${q.id} (${JSON.stringify(q.message)}) is in the merge queue: ${standing(items, q.id)}.`,
152+ ),
153+ ...(queue?.paused ? [`The merge queue is paused: ${queue.paused.reason}.`] : []),
154+ `${mine.length === 1 ? "It lands or is pulled" : "Each lands or is pulled"} once the project's check runs on it; the outcome comes as news, and abso unqueue takes ${mine.length === 1 ? "it" : "them"} back.`,
155+ ];
156+}
141158/** abso unqueue: take this agent's queued publishes back; their changes stay in the draft. */
142159export async function runUnqueue(args: Parsed, env: Env): Promise<Output> {
143160 if (args.positionals.length > 0)
--- a/client/test/client.test.ts
+++ b/client/test/client.test.ts
@@ -2204,6 +2204,26 @@
22042204 (await main(["status", "--short"], { cwd: folders.alice!, env: QENV, write: () => {} })).stdout,
22052205 "0+unpublished+queued\n",
22062206 );
2207+ // waiting --mine lists it beside the asks (an Issues stand-in with none open).
2208+ const stub = createHttpServer((_req, res) =>
2209+ res.writeHead(200, { "content-type": "application/json" }).end('{"asks":[]}'),
2210+ );
2211+ await new Promise<void>((ok) => stub.listen(0, "127.0.0.1", ok));
2212+ try {
2213+ const issuesUrl = `http://127.0.0.1:${(stub.address() as AddressInfo).port}`;
2214+ const waiting = await main(["waiting", "--mine"], {
2215+ cwd: folders.alice!,
2216+ env: { ...QENV, AVCS_ISSUES_SERVER: issuesUrl },
2217+ write: () => {},
2218+ });
2219+ assert.equal(waiting.exit, 0, waiting.stdout + waiting.stderr);
2220+ assert.match(
2221+ waiting.stdout,
2222+ /^Your publish 1 \("two"\) is in the merge queue: [^\n]+\.\nIt lands or is pulled once the project's check runs on it; the outcome comes as news, and abso unqueue takes it back\.\nNo open asks of alice\.\n$/,
2223+ );
2224+ } finally {
2225+ await new Promise((ok) => stub.close(ok));
2226+ }
22072227
22082228 // bob changes the same line: refused at once, naming the queued publish, not a version.
22092229 write(folders.bob!, { "other.txt": "two, by bob\n" });
--- /dev/null
+++ b/client/test/queue-waiting.test.ts
@@ -0,0 +1,50 @@
1+// What abso waiting --mine says about your own publishes in the merge queue: where each stands, a pause, and how
2+// the outcome comes. Nothing when none of yours waits.
3+
4+import assert from "node:assert/strict";
5+import { describe, it } from "node:test";
6+import type { QueueItem, QueueState } from "../src/api.ts";
7+import { queuedLines } from "../src/queue.ts";
8+
9+const item = (id: number, agent: string, checking = false): QueueItem => ({
10+ id,
11+ agent,
12+ message: `publish ${id}`,
13+ time: 0,
14+ changes: 1,
15+ checking,
16+});
17+const state = (items: QueueItem[], paused: QueueState["paused"] = null): QueueState =>
18+ ({ items, paused }) as unknown as QueueState;
20+describe("waiting: your publishes in the merge queue", () => {
21+ it("says nothing when none of yours waits, or there's no queue to read", () => {
22+ assert.deepEqual(queuedLines(undefined, "ann"), []);
23+ assert.deepEqual(queuedLines(state([]), "ann"), []);
24+ assert.deepEqual(queuedLines(state([item(1, "bob")]), "ann"), []);
25+ });
27+ it("says where yours stands, and how the outcome comes", () => {
28+ assert.deepEqual(queuedLines(state([item(1, "bob", true), item(2, "ann")]), "ann"), [
29+ 'Your publish 2 ("publish 2") is in the merge queue: waiting, 1 publish ahead of it.',
30+ "It lands or is pulled once the project's check runs on it; the outcome comes as news, and abso unqueue takes it back.",
31+ ]);
32+ assert.deepEqual(queuedLines(state([item(3, "ann", true), item(4, "bob", true), item(5, "ann")]), "ann"), [
33+ 'Your publish 3 ("publish 3") is in the merge queue: being checked in a batch of 2.',
34+ 'Your publish 5 ("publish 5") is in the merge queue: waiting, 2 publishes ahead of it.',
35+ "Each lands or is pulled once the project's check runs on it; the outcome comes as news, and abso unqueue takes them back.",
36+ ]);
37+ });
39+ it("says when the queue is paused", () => {
40+ const paused = {
41+ reason: "the box failed twice",
42+ since: "2026-01-01T00:00:00.000Z",
43+ nextTry: "2026-01-01T00:05:00.000Z",
44+ };
45+ assert.equal(
46+ queuedLines(state([item(1, "ann")], paused), "ann")[1],
47+ "The merge queue is paused: the box failed twice.",
48+ );
49+ });
50+});