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 88 to 89

Compare

+14 −3 in 3 places
Lines 439–455 at 89 (were 439–444 at 88)
439439 return this.json(method, path, body, this.issuesServer);
440440 }
441441
442+ /** An ask-thread call, with a server from before ask threads named as that rather than a bare 404. */
443+ async #threads<T>(call: Promise<T>): Promise<T> {
444+ try {
445+ return await call;
446+ } catch (err) {
447+ if (err instanceof ApiError && err.status === 404 && /no such issues route/.test(err.message))
448+ throw new ApiError(`${this.config.server} doesn't have ask threads yet`, 404);
449+ throw err;
450+ }
451+ }
442453 /** Issues, most recently updated first. */
443454 issues(
444455 q: { status?: string; agent?: string; parent?: number; open?: boolean; labels?: readonly string[] } = {},
Lines 479–490 at 89 (were 468–479 at 88)
468479
469480 /** The asks this agent sent: the open ones, then the latest answered, each with its thread. */
470481 asked(): Promise<{ asks: readonly (Ask & { title: string | null })[] }> {
471− return this.#issues("GET", this.agentPath("asked"));
482+ return this.#threads(this.#issues("GET", this.agentPath("asked")));
472483 }
473484
474485 /** One ask, open or closed, with its thread and who it waits on. */
475486 askThread(id: number): Promise<{ ask: Ask & { title: string | null } }> {
476− return this.#issues("GET", `/ask/${id}`);
487+ return this.#threads(this.#issues("GET", `/ask/${id}`));
477488 }
478489
479490 /** Open asks of someone (an agent, or person:<id>), soonest due first; every open ask without `of`. */
Lines 669–675 at 89 (were 658–664 at 88)
658669
659670 /** Adds to an ask's thread, as its asker or the one asked; the other side hears it, and the ask stays as it is. */
660671 reply(id: number, body: { text: string; question?: boolean }): Promise<{ ask: Ask; news?: IssueNews }> {
661− return this.#issues("POST", this.agentPath(`reply/${id}`), body);
672+ return this.#threads(this.#issues("POST", this.agentPath(`reply/${id}`), body));
662673 }
663674
664675 /** Takes back an ask this agent made, with a note on why; the one asked hears it. */
MCP
compare on this site's /mcp
CLI
abso diff 88 89 client/src/api.ts --json
JSON
/christopher/abso-core/compare/88..89?file=client%2Fsrc%2Fapi.ts&format=json