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 15 to 16

Compare

+27 −27 in 14 places
Lines 1–7 at 16 (were 1–7 at 15)
1−// Issues (#54): avcs issues, avcs issue, avcs ask, avcs waiting and avcs
1+// Issues (#54): abso issues, abso issue, abso ask, abso waiting and avcs
22// answer. The Issues Worker keeps them (avcs-issues beside avcs, or
33// AVCS_ISSUES_SERVER), and takes the same token. Statuses come from the work: a start note naming
4−// an issue (avcs start --issue N) puts it In progress, an open ask Blocked or
4+// an issue (abso start --issue N) puts it In progress, an open ask Blocked or
55// In review, and publish --done closes it. Other agents' and people's words
66// are quoted as JSON, so none can print as another line (#30).
77
Lines 26–32 at 16 (were 26–32 at 15)
2626 );
2727 if (config.token !== undefined && !tokenGoesTo(server, trustedServers(env.env))) {
2828 throw new UsageError(
29− `the Issues Worker is ${server}, and avcs sends your token only to its own servers and this machine. If ${server} is yours, name it in ~/.avcs/servers.json or AVCS_TRUSTED_SERVERS.`,
29+ `the Issues Worker is ${server}, and abso sends your token only to its own servers and this machine. If ${server} is yours, name it in ~/.avcs/servers.json or AVCS_TRUSTED_SERVERS.`,
3030 );
3131 }
3232 api.issuesServer = server;
Lines 190–203 at 16 (were 190–203 at 15)
190190 ...(p.children.length > 0 ? ["", "Sub-issues:", ...p.children.map(issueLine)] : []),
191191 ...((i.watchers ?? []).length > 0 ? ["", `Watchers: ${i.watchers.join(", ")}.`] : []),
192192 "",
193− `avcs start "..." --issue ${i.id} starts on it; avcs issue ${i.id} --comment "..." comments; avcs ask <who> "..." --issue ${i.id} asks.`,
193+ `abso start "..." --issue ${i.id} starts on it; abso issue ${i.id} --comment "..." comments; abso ask <who> "..." --issue ${i.id} asks.`,
194194 ];
195195}
196196
197197export async function runIssues(args: Parsed, env: Env): Promise<Output> {
198198 if (args.positionals.length > 0)
199199 throw new UsageError(
200− "issues takes no words: avcs issues [--open] [--status <s>] [--agent <a>] [--parent <N>] [--label <l,l>] | avcs issues --labels; avcs issue <N> shows one",
200+ "issues takes no words: abso issues [--open] [--status <s>] [--agent <a>] [--parent <N>] [--label <l,l>] | abso issues --labels; abso issue <N> shows one",
201201 );
202202 const { api } = openIssues(env);
203203 if (bool(args, "drafts")) {
Lines 205–215 at 16 (were 205–215 at 15)
205205 return {
206206 text:
207207 drafts.length === 0
208− ? 'No drafts. avcs issue draft "<title>" saves one: only you see it, and nobody hears of it.'
208+ ? 'No drafts. abso issue draft "<title>" saves one: only you see it, and nobody hears of it.'
209209 : [
210210 `${plural(drafts.length, "draft")}, newest first (only you see them):`,
211211 ...drafts.map(draftLine),
212− "avcs issue draft <D> --open opens one as an issue; --delete deletes it.",
212+ "abso issue draft <D> --open opens one as an issue; --delete deletes it.",
213213 ].join("\n"),
214214 json: { drafts },
215215 };
Lines 219–229 at 16 (were 219–229 at 15)
219219 return {
220220 text:
221221 labels.length === 0
222− ? 'No labels yet. avcs issue new "<title>" --label friction labels a new issue; avcs issue <N> --label <l> labels one.'
222+ ? 'No labels yet. abso issue new "<title>" --label friction labels a new issue; abso issue <N> --label <l> labels one.'
223223 : [
224224 `${plural(labels.length, "label")} in use:`,
225225 ...labels.map((l) => ` ${l.label}: ${l.open} open of ${l.total}`),
226− "avcs issues --label <label> lists a label's issues.",
226+ "abso issues --label <label> lists a label's issues.",
227227 ].join("\n"),
228228 json: { labels },
229229 };
Lines 245–255 at 16 (were 245–255 at 15)
245245 return {
246246 text:
247247 issues.length === 0
248− ? `No ${scope}issues${filter.agent ? ` for ${filter.agent}` : ""}${parent !== undefined ? ` under ${parent}` : ""}. avcs issue new "<title>" opens one.`
248+ ? `No ${scope}issues${filter.agent ? ` for ${filter.agent}` : ""}${parent !== undefined ? ` under ${parent}` : ""}. abso issue new "<title>" opens one.`
249249 : [
250250 `${plural(issues.length, `${scope}issue`)}, most recently updated first:`,
251251 ...issues.map(issueLine),
252− "avcs issue <N> shows one.",
252+ "abso issue <N> shows one.",
253253 ].join("\n"),
254254 json: { issues },
255255 };
Lines 306–326 at 16 (were 306–326 at 15)
306306 if (bool(args, "open")) {
307307 const r = await api.openDraft(id, openFields(args, ""));
308308 return {
309− text: `Opened draft ${id} as issue ${r.id}. avcs start "..." --issue ${r.id} starts on it.`,
309+ text: `Opened draft ${id} as issue ${r.id}. abso start "..." --issue ${r.id} starts on it.`,
310310 json: { draft: id, id: r.id },
311311 };
312312 }
313313 // Saving replaces the draft's body, so the fields given go over what it holds.
314314 const found = (await api.drafts()).drafts.find((x) => x.id === id);
315− if (!found) throw new UsageError(`you have no draft ${id}; avcs issues --drafts lists yours`);
315+ if (!found) throw new UsageError(`you have no draft ${id}; abso issues --drafts lists yours`);
316316 await api.saveDraft({ ...found.body, ...openFields(args, ""), id });
317317 return { text: `Saved draft ${id}.`, json: { draft: id } };
318318 }
319319 if (bool(args, "open") || bool(args, "delete"))
320− throw new UsageError("--open and --delete take a draft's number: avcs issue draft <D> --open");
320+ throw new UsageError("--open and --delete take a draft's number: abso issue draft <D> --open");
321321 const r = await api.saveDraft(openFields(args, words.join(" ")));
322322 return {
323− text: `Saved draft ${r.id}. Only you see it, and nobody hears of it. avcs issue draft ${r.id} --open opens it as an issue.`,
323+ text: `Saved draft ${r.id}. Only you see it, and nobody hears of it. abso issue draft ${r.id} --open opens it as an issue.`,
324324 json: { draft: r.id },
325325 };
326326}
Lines 332–350 at 16 (were 332–350 at 15)
332332 if (first === "new") {
333333 if (rest.length === 0)
334334 throw new UsageError(
335− 'avcs issue new "<title>" [--description "..."] [--parent <N>] [--lines <file>:<from>-<to>@<version>] [--agent <agent>] [--blocked-by <N,N>] [--notify <who,who>] [--label <l,l>]',
335+ 'abso issue new "<title>" [--description "..."] [--parent <N>] [--lines <file>:<from>-<to>@<version>] [--agent <agent>] [--blocked-by <N,N>] [--notify <who,who>] [--label <l,l>]',
336336 );
337337 const fields = { ...openFields(args, rest.join(" ")), title: rest.join(" ") };
338338 const attachments = await uploadAttachments(api, env.cwd, str(args, "attach"));
339339 const r = await api.issueOpen({ ...fields, ...(attachments.length > 0 ? { attachments } : {}) });
340340 return {
341− text: `Opened issue ${r.id}${attachments.length > 0 ? ` with ${plural(attachments.length, "attachment")} (${attachments.join(", ")})` : ""}. avcs start "..." --issue ${r.id} starts on it.`,
341+ text: `Opened issue ${r.id}${attachments.length > 0 ? ` with ${plural(attachments.length, "attachment")} (${attachments.join(", ")})` : ""}. abso start "..." --issue ${r.id} starts on it.`,
342342 json: { id: r.id, ...(attachments.length > 0 ? { attachments } : {}) },
343343 };
344344 }
345345 if (first === undefined || rest.length > 0)
346346 throw new UsageError(
347− 'avcs issue <N> [--comment "..." | --object "..." | --drop | --reopen | --done [--done-by <version>] | an edit], or avcs issue new "<title>"',
347+ 'abso issue <N> [--comment "..." | --object "..." | --drop | --reopen | --done [--done-by <version>] | an edit], or abso issue new "<title>"',
348348 );
349349 const id = issueNumber(first);
350350 const comment = str(args, "comment");
Lines 394–400 at 16 (were 394–400 at 15)
394394 "--quiet and --notify go with an edit (--title, --description, --parent, --agent, --blocked-by, --label or --unlabel)",
395395 );
396396 if (str(args, "attach") !== undefined && comment === undefined && object === undefined)
397− throw new UsageError("--attach goes with avcs issue new or --comment (or --object)");
397+ throw new UsageError("--attach goes with abso issue new or --comment (or --object)");
398398 if (comment !== undefined || object !== undefined) {
399399 const attachments = await uploadAttachments(api, env.cwd, str(args, "attach"));
400400 const r = await api.issueComment(id, (comment ?? object)!, object !== undefined, attachments);
Lines 436–446 at 16 (were 436–446 at 15)
436436 const withdraw = str(args, "withdraw");
437437 if (withdraw !== undefined) return withdrawAsk(args, env, withdraw);
438438 if (str(args, "note") !== undefined)
439− throw new UsageError('--note goes with --withdraw: avcs ask --withdraw <ask> --note "why"');
439+ throw new UsageError('--note goes with --withdraw: abso ask --withdraw <ask> --note "why"');
440440 const [of, ...words] = args.positionals;
441441 if (of === undefined || words.length === 0)
442442 throw new UsageError(
443− 'avcs ask <who> "<question>" [--issue <N>] [--review | --task] [--due <YYYY-MM-DD>] [--blocks <N,N>] [--options "A|B|C"]; who is an agent, or person:<id>',
443+ 'abso ask <who> "<question>" [--issue <N>] [--review | --task] [--due <YYYY-MM-DD>] [--blocks <N,N>] [--options "A|B|C"]; who is an agent, or person:<id>',
444444 );
445445 const { api } = openIssues(env);
446446 if (bool(args, "review") && bool(args, "task")) throw new UsageError("an ask is a review or a task, not both");
Lines 464–477 at 16 (were 464–477 at 15)
464464 }
465465 : {}),
466466 });
467− return { text: `Asked ${of} (ask ${r.id}). They hear it; avcs waiting shows what's open.`, json: { id: r.id } };
467+ return { text: `Asked ${of} (ask ${r.id}). They hear it; abso waiting shows what's open.`, json: { id: r.id } };
468468}
469469
470−/** avcs ask --withdraw <ask> [--note "why"]: the asker takes an ask back. It closes like an answer, and the one asked hears it. */
470+/** abso ask --withdraw <ask> [--note "why"]: the asker takes an ask back. It closes like an answer, and the one asked hears it. */
471471async function withdrawAsk(args: Parsed, env: Env, word: string): Promise<Output> {
472472 const others = ["issue", "due", "blocks", "options"].filter((f) => str(args, f) !== undefined);
473473 if (args.positionals.length > 0 || others.length > 0 || bool(args, "review") || bool(args, "task"))
474− throw new UsageError('avcs ask --withdraw <ask> [--note "why"] takes nothing else: it takes back an ask you made');
474+ throw new UsageError('abso ask --withdraw <ask> [--note "why"] takes nothing else: it takes back an ask you made');
475475 const id = issueNumber(word, "the ask number");
476476 const { api } = openIssues(env);
477477 const note = str(args, "note");
Lines 481–487 at 16 (were 481–487 at 15)
481481
482482export async function runWaiting(args: Parsed, env: Env): Promise<Output> {
483483 if (args.positionals.length > 0)
484− throw new UsageError("waiting takes no words: avcs waiting [--of <agent or person:id>] [--mine]");
484+ throw new UsageError("waiting takes no words: abso waiting [--of <agent or person:id>] [--mine]");
485485 const { api, config } = openIssues(env);
486486 const mine = bool(args, "mine") || str(args, "of") === config.agent;
487487 const of = mine ? config.agent : str(args, "of");
Lines 493–499 at 16 (were 493–499 at 15)
493493 : [
494494 `${plural(asks.length, "open ask")}${of ? ` of ${of}` : ""}, soonest due first:`,
495495 ...asks.map(askLine),
496− 'avcs answer <ask> "..." answers one asked of you.',
496+ 'abso answer <ask> "..." answers one asked of you.',
497497 ].join("\n"),
498498 json: { asks },
499499 };
Lines 505–511 at 16 (were 505–511 at 15)
505505 const option = str(args, "option");
506506 const done = bool(args, "done");
507507 if (words.length === 0 && option === undefined && !done)
508− throw new UsageError('avcs answer <ask> "<words>" | --option <N> [--note "..."] | --done [--note "..."]');
508+ throw new UsageError('abso answer <ask> "<words>" | --option <N> [--note "..."] | --done [--note "..."]');
509509 const { api } = openIssues(env);
510510 const note = str(args, "note");
511511 const r = await api.answer(id, {
MCP
compare on this site's /mcp
CLI
abso diff 15 16 client/src/issues.ts --json
JSON
/christopher/abso-core/compare/15..16?file=client%2Fsrc%2Fissues.ts&format=json