{"path":"client/src/api.ts","version":318,"newest":318,"draft":null,"agent":null,"exists":true,"lines":[{"n":1,"text":"// Calls to the server's HTTP API (docs/v2-slice1.md). Every call is JSON","author":"init","version":0},{"n":2,"text":"// except `run`, which sends a tar.gz and reads the answer as a stream of JSON","author":"init","version":0},{"n":3,"text":"// lines (box-run.ts).","author":"init","version":0},{"n":4,"text":"","author":"init","version":0},{"n":5,"text":"import { randomUUID } from \"node:crypto\";","author":"codex-capacity-chair","version":162},{"n":6,"text":"import { setDefaultResultOrder } from \"node:dns\";","author":"init","version":0},{"n":7,"text":"import { CALLER_HEADER } from \"../../src/caller.ts\";","author":"groups","version":277},{"n":8,"text":"import type {","author":"init","version":0},{"n":9,"text":"\tChangeAnswer,","author":"init","version":0},{"n":10,"text":"\tDraftSyncAnswer,","author":"init","version":0},{"n":11,"text":"\tEditAnswer,","author":"init","version":0},{"n":12,"text":"\tEditBody,","author":"init","version":0},{"n":13,"text":"\tNews,","author":"init","version":0},{"n":14,"text":"\tNoteAnswer,","author":"init","version":0},{"n":15,"text":"\tNoteBody,","author":"init","version":0},{"n":16,"text":"\tPublishAnswer,","author":"init","version":0},{"n":17,"text":"\tRecordAnswer,","author":"init","version":0},{"n":18,"text":"\tStatusAnswer,","author":"init","version":0},{"n":19,"text":"\tSwitchAnswer,","author":"init","version":0},{"n":20,"text":"\tSyncAnswer,","author":"init","version":0},{"n":21,"text":"} from \"./api-answers.ts\";","author":"init","version":0},{"n":22,"text":"import { ApiError, errorSentence, neverSent } from \"./api-error.ts\";","author":"init","version":0},{"n":23,"text":"import { UsageError } from \"./args.ts\";","author":"pinch","version":287},{"n":24,"text":"import type { AutosettleAnswer, AutosettleMode } from \"./autosettle-commands.ts\";","author":"autosettle","version":220},{"n":25,"text":"import {","author":"init","version":0},{"n":26,"text":"\tboxQuery,","author":"init","version":0},{"n":27,"text":"\tconsumeRun,","author":"init","version":0},{"n":28,"text":"\tfollow,","author":"init","version":0},{"n":29,"text":"\tfollowUrl,","author":"init","version":0},{"n":30,"text":"\ttype PrepAnswer,","author":"init","version":0},{"n":31,"text":"\tpostRun,","author":"init","version":0},{"n":32,"text":"\tRECONNECT_DELAYS_MS,","author":"init","version":0},{"n":33,"text":"\tRUN_START_RETRY_MS,","author":"init","version":0},{"n":34,"text":"\ttype RunIO,","author":"init","version":0},{"n":35,"text":"\ttype RunKind,","author":"init","version":0},{"n":36,"text":"\ttype ServeAnswer,","author":"init","version":0},{"n":37,"text":"} from \"./box-run.ts\";","author":"init","version":0},{"n":38,"text":"import type { CiJob, CiStatus, QueueState } from \"./ci-answers.ts\";","author":"init","version":0},{"n":39,"text":"import { clientVersion } from \"./client-version.ts\";","author":"init","version":0},{"n":40,"text":"import type { Config } from \"./config.ts\";","author":"init","version":0},{"n":41,"text":"import type {","author":"init","version":0},{"n":42,"text":"\tBlameAnswer,","author":"init","version":0},{"n":43,"text":"\tDiffAnswer,","author":"init","version":0},{"n":44,"text":"\tDropAnswer,","author":"init","version":0},{"n":45,"text":"\tFileChange,","author":"init","version":0},{"n":46,"text":"\tFilesAnswer,","author":"init","version":0},{"n":47,"text":"\tLogAnswer,","author":"init","version":0},{"n":48,"text":"\tOverlap,","author":"init","version":0},{"n":49,"text":"\tPluckAnswer,","author":"init","version":0},{"n":50,"text":"\tRestoreAnswer,","author":"init","version":0},{"n":51,"text":"\tShowAnswer,","author":"init","version":0},{"n":52,"text":"\tView,","author":"init","version":0},{"n":53,"text":"\tWhere,","author":"init","version":0},{"n":54,"text":"\tWhereAnswer,","author":"init","version":0},{"n":55,"text":"\tWhyAnswer,","author":"init","version":0},{"n":56,"text":"\tWithoutAnswer,","author":"candidates","version":186},{"n":57,"text":"} from \"./history-answers.ts\";","author":"init","version":0},{"n":58,"text":"import type {","author":"devops","version":20},{"n":59,"text":"\tAsk,","author":"devops","version":20},{"n":60,"text":"\tAttachment,","author":"devops","version":20},{"n":61,"text":"\tDraft,","author":"devops","version":20},{"n":62,"text":"\tDraftBody,","author":"devops","version":20},{"n":63,"text":"\tGroupEvent,","author":"groups","version":256},{"n":64,"text":"\tGroupShown,","author":"groups","version":256},{"n":65,"text":"\tGroupSummary,","author":"groups","version":256},{"n":66,"text":"\tGroupWrite,","author":"groups","version":256},{"n":67,"text":"\tNews as IssueNews,","author":"devops","version":20},{"n":68,"text":"\tIssuePage,","author":"devops","version":20},{"n":69,"text":"\tIssueRow,","author":"devops","version":20},{"n":70,"text":"\tIssueSearchHit,","author":"devops","version":20},{"n":71,"text":"} from \"./issues-wire.ts\";","author":"devops","version":20},{"n":72,"text":"import { isLocal, LOCAL_BASE, localFetch, NO_STORE } from \"./local-store.ts\";","author":"pinch","version":287},{"n":73,"text":"import type { Modes } from \"./modes.ts\";","author":"init","version":0},{"n":74,"text":"","author":"init","version":0},{"n":75,"text":"export * from \"./api-answers.ts\";","author":"init","version":0},{"n":76,"text":"export { ApiError, neverSent } from \"./api-error.ts\";","author":"init","version":0},{"n":77,"text":"export {","author":"init","version":0},{"n":78,"text":"\ttype PrepAnswer,","author":"init","version":0},{"n":79,"text":"\tRECONNECT_DELAYS_MS,","author":"init","version":0},{"n":80,"text":"\tRUN_START_RETRY_MS,","author":"init","version":0},{"n":81,"text":"\ttype RunIO,","author":"init","version":0},{"n":82,"text":"\ttype RunKind,","author":"init","version":0},{"n":83,"text":"\ttype ServeAnswer,","author":"init","version":0},{"n":84,"text":"} from \"./box-run.ts\";","author":"init","version":0},{"n":85,"text":"export * from \"./ci-answers.ts\";","author":"init","version":0},{"n":86,"text":"export * from \"./history-answers.ts\";","author":"init","version":0},{"n":87,"text":"export type { Ask, Attachment, Draft, DraftBody, IssueNews, IssuePage, IssueRow, IssueSearchHit };","author":"devops","version":20},{"n":88,"text":"","author":"init","version":0},{"n":89,"text":"/**","author":"init","version":0},{"n":90,"text":" * How long a call may take: the base, plus 1 s for each 100 KB it sends","author":"init","version":0},{"n":91,"text":" * (abso issue 34: a sync that recorded 191 reformatted files first ran out of","author":"init","version":0},{"n":92,"text":" * its 30 s while the server was still taking them in).","author":"init","version":0},{"n":93,"text":" */","author":"init","version":0},{"n":94,"text":"export function timeoutFor(baseMs: number, sent: string | undefined): number {","author":"init","version":0},{"n":95,"text":"\treturn sent === undefined ? baseMs : baseMs + Math.floor(Buffer.byteLength(sent) / 100_000) * 1000;","author":"init","version":0},{"n":96,"text":"}","author":"init","version":0},{"n":97,"text":"","author":"init","version":0},{"n":98,"text":"/**","author":"pinch","version":26},{"n":99,"text":" * How long a publish or a land may take before the client stops waiting: the","author":"pinch","version":26},{"n":100,"text":" * server gives one request up to 2 minutes of work, so a small body can still","author":"pinch","version":26},{"n":101,"text":" * take that long (a large merge). Waiting less reported publishes as failed","author":"pinch","version":26},{"n":102,"text":" * that went on to land.","author":"pinch","version":26},{"n":103,"text":" */","author":"pinch","version":26},{"n":104,"text":"export const PUBLISH_TIMEOUT_MS = 150_000;","author":"pinch","version":26},{"n":105,"text":"","author":"pinch","version":26},{"n":106,"text":"/** The most versions the server's log sends at once. */","author":"pinch","version":26},{"n":107,"text":"export const LOG_PAGE = 200;","author":"pinch","version":26},{"n":108,"text":"","author":"pinch","version":26},{"n":109,"text":"/** A query string from the values that are set (null and undefined are left out). */","author":"init","version":0},{"n":110,"text":"function query(values: Record<string, string | number | null | undefined>): URLSearchParams {","author":"init","version":0},{"n":111,"text":"\tconst q = new URLSearchParams();","author":"init","version":0},{"n":112,"text":"\tfor (const [k, v] of Object.entries(values)) if (v !== null && v !== undefined) q.set(k, String(v));","author":"init","version":0},{"n":113,"text":"\treturn q;","author":"init","version":0},{"n":114,"text":"}","author":"init","version":0},{"n":115,"text":"","author":"init","version":0},{"n":116,"text":"export function newsLines(news: News): string[] {","author":"init","version":0},{"n":117,"text":"\tif (news === undefined || news === null) return [];","author":"init","version":0},{"n":118,"text":"\treturn (typeof news === \"string\" ? [news] : [...news]).filter((s) => typeof s === \"string\" && s.trim() !== \"\");","author":"init","version":0},{"n":119,"text":"}","author":"init","version":0},{"n":120,"text":"","author":"init","version":0},{"n":121,"text":"/** An issue copy's request: the source, and any texts given cleaned, by their source ids. */","author":"pinch","version":23},{"n":122,"text":"export interface CopyBody {","author":"pinch","version":23},{"n":123,"text":"\tfrom: string;","author":"pinch","version":23},{"n":124,"text":"\tissue: number;","author":"pinch","version":23},{"n":125,"text":"\ttitle?: string;","author":"pinch","version":23},{"n":126,"text":"\tdescription?: string;","author":"pinch","version":23},{"n":127,"text":"\tcomments?: { id: number; text?: string }[];","author":"pinch","version":23},{"n":128,"text":"\tasks?: { id: number; question?: string; answer?: string }[];","author":"pinch","version":23},{"n":129,"text":"}","author":"pinch","version":23},{"n":130,"text":"","author":"pinch","version":23},{"n":131,"text":"/** What a copy writes, as a dry run answers it. */","author":"pinch","version":23},{"n":132,"text":"export interface CopyPlan {","author":"pinch","version":23},{"n":133,"text":"\tfrom: { project: string; issue: number };","author":"pinch","version":23},{"n":134,"text":"\ttitle: string;","author":"pinch","version":23},{"n":135,"text":"\tedited: (\"title\" | \"description\")[];","author":"pinch","version":23},{"n":136,"text":"\tlabels: string[];","author":"pinch","version":23},{"n":137,"text":"\tclosed: { how: \"done\" | \"dropped\" } | null;","author":"pinch","version":23},{"n":138,"text":"\tcomments: { edited: boolean }[];","author":"pinch","version":23},{"n":139,"text":"\tasks: { edited: boolean }[];","author":"pinch","version":23},{"n":140,"text":"\tskipped: { comments: number[]; asks: number[] };","author":"pinch","version":23},{"n":141,"text":"}","author":"pinch","version":23},{"n":142,"text":"","author":"pinch","version":23},{"n":143,"text":"export type CopyAnswer =","author":"pinch","version":23},{"n":144,"text":"\t| { dryRun: true; plan: CopyPlan }","author":"pinch","version":23},{"n":145,"text":"\t| { ok: true; id: number; from: { project: string; issue: number }; skipped: { comments: number[]; asks: number[] } };","author":"pinch","version":23},{"n":146,"text":"","author":"pinch","version":23},{"n":147,"text":"/**","author":"groups","version":277},{"n":148,"text":" * The server's line when another chat just used this seat (seatNotice on an answer): kept until main() prints it with","author":"groups","version":277},{"n":149,"text":" * the news, once however many answers carried it.","author":"groups","version":277},{"n":150,"text":" */","author":"groups","version":277},{"n":151,"text":"const seatNotices = new Set<string>();","author":"groups","version":277},{"n":152,"text":"function noteSeat(answer: unknown): void {","author":"groups","version":277},{"n":153,"text":"\tif (typeof answer !== \"object\" || answer === null || Array.isArray(answer)) return;","author":"groups","version":277},{"n":154,"text":"\tconst line = (answer as { seatNotice?: unknown }).seatNotice;","author":"groups","version":277},{"n":155,"text":"\tif (typeof line === \"string\" && line !== \"\" && line.length <= 300 && !/[\\u0000-\\u001f]/.test(line))","author":"groups","version":277},{"n":156,"text":"\t\tseatNotices.add(line);","author":"groups","version":277},{"n":157,"text":"}","author":"groups","version":277},{"n":158,"text":"export function takeSeatNotices(): string[] {","author":"groups","version":277},{"n":159,"text":"\tconst out = [...seatNotices];","author":"groups","version":277},{"n":160,"text":"\tseatNotices.clear();","author":"groups","version":277},{"n":161,"text":"\treturn out;","author":"groups","version":277},{"n":162,"text":"}","author":"groups","version":277},{"n":163,"text":"","author":"groups","version":277},{"n":164,"text":"export class Api {","author":"init","version":0},{"n":165,"text":"\treadonly config: Config;","author":"init","version":0},{"n":166,"text":"\treadonly timeoutMs: number;","author":"init","version":0},{"n":167,"text":"","author":"init","version":0},{"n":168,"text":"\t/** Waits between tries when a run's stream breaks; tests shorten them. */","author":"init","version":0},{"n":169,"text":"\treadonly reconnectDelaysMs: readonly number[];","author":"init","version":0},{"n":170,"text":"\treadonly startRetryDelaysMs: readonly number[];","author":"init","version":0},{"n":171,"text":"\t/** Another box of this agent for run, logs and fetch (--box or ABSO_BOX, #37); undefined is its own box. */","author":"review","version":27},{"n":172,"text":"\tbox: string | undefined;","author":"init","version":0},{"n":173,"text":"","author":"init","version":0},{"n":174,"text":"\tconstructor(","author":"init","version":0},{"n":175,"text":"\t\tconfig: Config,","author":"init","version":0},{"n":176,"text":"\t\ttimeoutMs = 30_000,","author":"init","version":0},{"n":177,"text":"\t\treconnectDelaysMs: readonly number[] = RECONNECT_DELAYS_MS,","author":"init","version":0},{"n":178,"text":"\t\tstartRetryDelaysMs: readonly number[] = RUN_START_RETRY_MS,","author":"init","version":0},{"n":179,"text":"\t) {","author":"init","version":0},{"n":180,"text":"\t\tthis.config = config;","author":"init","version":0},{"n":181,"text":"\t\tthis.timeoutMs = timeoutMs;","author":"init","version":0},{"n":182,"text":"\t\tthis.reconnectDelaysMs = reconnectDelaysMs;","author":"init","version":0},{"n":183,"text":"\t\tthis.startRetryDelaysMs = startRetryDelaysMs;","author":"init","version":0},{"n":184,"text":"\t}","author":"init","version":0},{"n":185,"text":"","author":"init","version":0},{"n":186,"text":"\t/** What a box run is for, for the server's box-run records (#39): X-Abso-Kind on POST /run. */","author":"pinch","version":54},{"n":187,"text":"\trunKind: RunKind = \"run\";","author":"init","version":0},{"n":188,"text":"","author":"init","version":0},{"n":189,"text":"\t/** The Issues Worker (#54) this folder's issues calls go to; set by the issues commands (issues.ts). */","author":"init","version":0},{"n":190,"text":"\tissuesServer: string | undefined;","author":"init","version":0},{"n":191,"text":"","author":"groups","version":277},{"n":192,"text":"\t/** Who is calling this seat (src/caller.ts): this chat's session, this computer and this folder. Set by open(). */","author":"groups","version":277},{"n":193,"text":"\tcaller: string | undefined;","author":"groups","version":277},{"n":194,"text":"","author":"init","version":0},{"n":195,"text":"\turl(path: string, server = this.config.server): string {","author":"init","version":0},{"n":196,"text":"\t\tconst base = isLocal(server) ? LOCAL_BASE : server;","author":"pinch","version":287},{"n":197,"text":"\t\treturn `${base.replace(/\\/+$/, \"\")}/p/${encodeURIComponent(this.config.project)}${path}`;","author":"pinch","version":287},{"n":198,"text":"\t}","author":"init","version":0},{"n":199,"text":"","author":"init","version":0},{"n":200,"text":"\t/** A local project's calls: answered in this process (local-store.ts). */","author":"pinch","version":287},{"n":201,"text":"\tprivate local: ((input: string, init?: RequestInit) => Promise<Response>) | undefined;","author":"pinch","version":287},{"n":202,"text":"","author":"pinch","version":287},{"n":203,"text":"\tagentPath(action: string): string {","author":"init","version":0},{"n":204,"text":"\t\treturn `/a/${encodeURIComponent(this.config.agent)}/${action}`;","author":"init","version":0},{"n":205,"text":"\t}","author":"init","version":0},{"n":206,"text":"","author":"init","version":0},{"n":207,"text":"\theaders(contentType?: string): Record<string, string> {","author":"init","version":0},{"n":208,"text":"\t\treturn {","author":"init","version":0},{"n":209,"text":"\t\t\t// Which client made the call (#29); the mods send theirs too.","author":"init","version":0},{"n":210,"text":"\t\t\t\"x-abso-client\": `abso-cli/${clientVersion()}`,","author":"pinch","version":54},{"n":211,"text":"\t\t\t...(this.config.token && !this.config.visitor ? { authorization: `Bearer ${this.config.token}` } : {}),","author":"pinch","version":86},{"n":212,"text":"\t\t\t// A visitor says nothing about where it's reading from.","author":"groups","version":277},{"n":213,"text":"\t\t\t...(this.caller !== undefined && !this.config.visitor ? { [CALLER_HEADER]: this.caller } : {}),","author":"groups","version":277},{"n":214,"text":"\t\t\t...(contentType ? { \"content-type\": contentType } : {}),","author":"init","version":0},{"n":215,"text":"\t\t};","author":"init","version":0},{"n":216,"text":"\t}","author":"init","version":0},{"n":217,"text":"","author":"init","version":0},{"n":218,"text":"\t/**","author":"pinch","version":88},{"n":219,"text":"\t * Every request this Api makes goes through here. In a visitor folder it never sends anything but a GET,","author":"pinch","version":88},{"n":220,"text":"\t * and follows no redirect, so nothing it sends goes anywhere it didn't name (headers() adds no sign-in).","author":"pinch","version":88},{"n":221,"text":"\t */","author":"pinch","version":88},{"n":222,"text":"\tsend(url: string, init: RequestInit = {}): Promise<Response> {","author":"pinch","version":88},{"n":223,"text":"\t\tif (isLocal(this.config.server)) {","author":"pinch","version":287},{"n":224,"text":"\t\t\tconst dir = this.config.localStore;","author":"pinch","version":287},{"n":225,"text":"\t\t\tif (dir === undefined) return Promise.reject(new UsageError(NO_STORE));","author":"pinch","version":287},{"n":226,"text":"\t\t\tthis.local ??= localFetch(dir);","author":"pinch","version":287},{"n":227,"text":"\t\t\treturn this.local(url, init);","author":"pinch","version":287},{"n":228,"text":"\t\t}","author":"pinch","version":287},{"n":229,"text":"\t\tif (!this.config.visitor) return fetch(url, init);","author":"pinch","version":88},{"n":230,"text":"\t\tif ((init.method ?? \"GET\") !== \"GET\")","author":"pinch","version":88},{"n":231,"text":"\t\t\treturn Promise.reject(new ApiError(\"a folder that reads signed out sends only reads\"));","author":"pinch","version":88},{"n":232,"text":"\t\treturn fetch(url, { ...init, redirect: \"error\" });","author":"pinch","version":88},{"n":233,"text":"\t}","author":"pinch","version":88},{"n":234,"text":"","author":"pinch","version":88},{"n":235,"text":"\tasync json<T>(","author":"pinch","version":26},{"n":236,"text":"\t\tmethod: \"GET\" | \"POST\",","author":"pinch","version":26},{"n":237,"text":"\t\tpath: string,","author":"pinch","version":26},{"n":238,"text":"\t\tbody?: unknown,","author":"pinch","version":26},{"n":239,"text":"\t\tserver = this.config.server,","author":"pinch","version":26},{"n":240,"text":"\t\tatLeastMs = 0,","author":"pinch","version":26},{"n":241,"text":"\t): Promise<T> {","author":"pinch","version":26},{"n":242,"text":"\t\tlet res: Response | undefined;","author":"init","version":0},{"n":243,"text":"\t\tif (this.config.visitor && method !== \"GET\")","author":"pinch","version":88},{"n":244,"text":"\t\t\tthrow new ApiError(`${path}: a folder that reads signed out sends only reads`);","author":"pinch","version":88},{"n":245,"text":"\t\tconst sent = body === undefined ? undefined : JSON.stringify(body);","author":"init","version":0},{"n":246,"text":"\t\tconst requestId = method === \"POST\" ? randomUUID() : undefined;","author":"codex-capacity-chair","version":162},{"n":247,"text":"\t\tconst timeoutMs = Math.max(atLeastMs, timeoutFor(this.timeoutMs, sent));","author":"pinch","version":26},{"n":248,"text":"\t\t// A connection that never opened is tried once more, IPv4 first (#37, GAME - UI/UX: one IPv6","author":"init","version":0},{"n":249,"text":"\t\t// address timed out, and the same command went through seconds later). Nothing went out, so","author":"init","version":0},{"n":250,"text":"\t\t// a POST is as safe to send again as a GET.","author":"init","version":0},{"n":251,"text":"\t\tfor (let attempt = 0; res === undefined; attempt++) {","author":"init","version":0},{"n":252,"text":"\t\t\ttry {","author":"init","version":0},{"n":253,"text":"\t\t\t\tres = await this.send(this.url(path, server), {","author":"pinch","version":88},{"n":254,"text":"\t\t\t\t\tmethod,","author":"init","version":0},{"n":255,"text":"\t\t\t\t\theaders: {","author":"codex-capacity-chair","version":162},{"n":256,"text":"\t\t\t\t\t\t...this.headers(sent === undefined ? undefined : \"application/json\"),","author":"codex-capacity-chair","version":162},{"n":257,"text":"\t\t\t\t\t\t...(requestId ? { \"Idempotency-Key\": requestId } : {}),","author":"codex-capacity-chair","version":162},{"n":258,"text":"\t\t\t\t\t},","author":"codex-capacity-chair","version":162},{"n":259,"text":"\t\t\t\t\t...(sent === undefined ? {} : { body: sent }),","author":"init","version":0},{"n":260,"text":"\t\t\t\t\tsignal: AbortSignal.timeout(timeoutMs),","author":"init","version":0},{"n":261,"text":"\t\t\t\t});","author":"init","version":0},{"n":262,"text":"\t\t\t} catch (err) {","author":"init","version":0},{"n":263,"text":"\t\t\t\t// A local project's refusal (no store, a Node without SQLite) says itself.","author":"pinch","version":287},{"n":264,"text":"\t\t\t\tif (err instanceof UsageError) throw err;","author":"pinch","version":287},{"n":265,"text":"\t\t\t\tconst e = err as Error;","author":"init","version":0},{"n":266,"text":"\t\t\t\tconst why =","author":"init","version":0},{"n":267,"text":"\t\t\t\t\te.name === \"TimeoutError\"","author":"init","version":0},{"n":268,"text":"\t\t\t\t\t\t? `no answer within ${timeoutMs} ms`","author":"init","version":0},{"n":269,"text":"\t\t\t\t\t\t: ((e.cause as Error | undefined)?.message ?? e.message);","author":"init","version":0},{"n":270,"text":"\t\t\t\tif (!neverSent(err)) throw new ApiError(`could not reach ${server}: ${why}`);","author":"init","version":0},{"n":271,"text":"\t\t\t\tif (attempt >= 1) {","author":"init","version":0},{"n":272,"text":"\t\t\t\t\tthrow new ApiError(","author":"init","version":0},{"n":273,"text":"\t\t\t\t\t\t`could not reach ${server}: ${why}. Tried twice, the second time IPv4 first; the connection never opened, so nothing reached the server`,","author":"init","version":0},{"n":274,"text":"\t\t\t\t\t\tundefined,","author":"init","version":0},{"n":275,"text":"\t\t\t\t\t\ttrue,","author":"init","version":0},{"n":276,"text":"\t\t\t\t\t);","author":"init","version":0},{"n":277,"text":"\t\t\t\t}","author":"init","version":0},{"n":278,"text":"\t\t\t\tsetDefaultResultOrder(\"ipv4first\");","author":"init","version":0},{"n":279,"text":"\t\t\t\tawait new Promise((ok) => setTimeout(ok, 500));","author":"init","version":0},{"n":280,"text":"\t\t\t}","author":"init","version":0},{"n":281,"text":"\t\t}","author":"init","version":0},{"n":282,"text":"\t\tlet text: string;","author":"codex-prose-authorship-1","version":108},{"n":283,"text":"\t\ttry {","author":"codex-prose-authorship-1","version":108},{"n":284,"text":"\t\t\ttext = await res.text();","author":"codex-prose-authorship-1","version":108},{"n":285,"text":"\t\t} catch (err) {","author":"codex-prose-authorship-1","version":108},{"n":286,"text":"\t\t\tconst reason = err instanceof Error ? err.message : String(err);","author":"codex-prose-authorship-1","version":108},{"n":287,"text":"\t\t\tthrow new ApiError(`${method} ${path} response body ended unexpectedly: ${reason}`, res.status);","author":"codex-prose-authorship-1","version":108},{"n":288,"text":"\t\t}","author":"codex-prose-authorship-1","version":108},{"n":289,"text":"\t\t// 409 is a refusal that says what to do (a drop took out lines your work builds on): print it as it is.","author":"init","version":0},{"n":290,"text":"\t\tif (!res.ok)","author":"init","version":0},{"n":291,"text":"\t\t\tthrow new ApiError(","author":"init","version":0},{"n":292,"text":"\t\t\t\tres.status === 409","author":"init","version":0},{"n":293,"text":"\t\t\t\t\t? `refused: ${errorSentence(text)}`","author":"init","version":0},{"n":294,"text":"\t\t\t\t\t: `${method} ${path} answered ${res.status}: ${errorSentence(text)}`,","author":"init","version":0},{"n":295,"text":"\t\t\t\tres.status,","author":"init","version":0},{"n":296,"text":"\t\t\t);","author":"init","version":0},{"n":297,"text":"\t\ttry {","author":"init","version":0},{"n":298,"text":"\t\t\tconst parsed = JSON.parse(text) as T;","author":"groups","version":277},{"n":299,"text":"\t\t\tnoteSeat(parsed);","author":"groups","version":277},{"n":300,"text":"\t\t\treturn parsed;","author":"groups","version":277},{"n":301,"text":"\t\t} catch {","author":"init","version":0},{"n":302,"text":"\t\t\tthrow new ApiError(","author":"init","version":0},{"n":303,"text":"\t\t\t\t`${method} ${path} answered with something that isn't JSON: ${text.slice(0, 300)}`,","author":"init","version":0},{"n":304,"text":"\t\t\t\tres.status,","author":"init","version":0},{"n":305,"text":"\t\t\t);","author":"init","version":0},{"n":306,"text":"\t\t}","author":"init","version":0},{"n":307,"text":"\t}","author":"init","version":0},{"n":308,"text":"","author":"init","version":0},{"n":309,"text":"\tinit(","author":"init","version":0},{"n":310,"text":"\t\tfiles: Record<string, string>,","author":"init","version":0},{"n":311,"text":"\t\tmodes: Modes = {},","author":"init","version":0},{"n":312,"text":"\t\tblobs: Readonly<Record<string, string>> = {},","author":"init","version":0},{"n":313,"text":"\t): Promise<{ version: number; skipped?: readonly string[] }> {","author":"init","version":0},{"n":314,"text":"\t\treturn this.json(\"POST\", \"/init\", {","author":"init","version":0},{"n":315,"text":"\t\t\tfiles,","author":"init","version":0},{"n":316,"text":"\t\t\t...(Object.keys(modes).length > 0 ? { modes } : {}),","author":"init","version":0},{"n":317,"text":"\t\t\t...(Object.keys(blobs).length > 0 ? { blobs } : {}),","author":"init","version":0},{"n":318,"text":"\t\t});","author":"init","version":0},{"n":319,"text":"\t}","author":"init","version":0},{"n":320,"text":"","author":"init","version":0},{"n":321,"text":"\tedit(body: EditBody): Promise<EditAnswer> {","author":"init","version":0},{"n":322,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"edit\"), body);","author":"init","version":0},{"n":323,"text":"\t}","author":"init","version":0},{"n":324,"text":"","author":"init","version":0},{"n":325,"text":"\trecord(","author":"init","version":0},{"n":326,"text":"\t\tfiles: Record<string, string | null>,","author":"init","version":0},{"n":327,"text":"\t\textra: { session?: string; subagent?: string } = {},","author":"init","version":0},{"n":328,"text":"\t\tmodes: Modes = {},","author":"init","version":0},{"n":329,"text":"\t\tblobs: Readonly<Record<string, string>> = {},","author":"init","version":0},{"n":330,"text":"\t): Promise<RecordAnswer> {","author":"init","version":0},{"n":331,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"record\"), {","author":"init","version":0},{"n":332,"text":"\t\t\tfiles,","author":"init","version":0},{"n":333,"text":"\t\t\t...(Object.keys(modes).length > 0 ? { modes } : {}),","author":"init","version":0},{"n":334,"text":"\t\t\t...(Object.keys(blobs).length > 0 ? { blobs } : {}),","author":"init","version":0},{"n":335,"text":"\t\t\t...extra,","author":"init","version":0},{"n":336,"text":"\t\t});","author":"init","version":0},{"n":337,"text":"\t}","author":"init","version":0},{"n":338,"text":"","author":"init","version":0},{"n":339,"text":"\t/** Move a file in the draft (#49): its lines keep their ids. The way to change a file's case. */","author":"init","version":0},{"n":340,"text":"\tmove(from: string, to: string): Promise<{ ok: boolean; from: string; to: string; news?: News }> {","author":"init","version":0},{"n":341,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"move\"), { from, to });","author":"init","version":0},{"n":342,"text":"\t}","author":"init","version":0},{"n":343,"text":"","author":"init","version":0},{"n":344,"text":"\t/** Upload a binary file's bytes under their sha256 (the server checks the hash). */","author":"init","version":0},{"n":345,"text":"\tasync putBlob(sha: string, bytes: Uint8Array): Promise<void> {","author":"init","version":0},{"n":346,"text":"\t\tawait this.bytes(\"PUT\", `/blobs/${sha}`, bytes);","author":"init","version":0},{"n":347,"text":"\t}","author":"init","version":0},{"n":348,"text":"","author":"init","version":0},{"n":349,"text":"\t/** A preview of one version of shared at a stable URL (abso serve, #37); a build answers 422 with its output. */","author":"init","version":0},{"n":350,"text":"\tasync serve(version?: number, cmd?: string, out?: string): Promise<ServeAnswer> {","author":"init","version":0},{"n":351,"text":"\t\tconst q = new URLSearchParams({","author":"init","version":0},{"n":352,"text":"\t\t\t...(version !== undefined ? { version: String(version) } : {}),","author":"init","version":0},{"n":353,"text":"\t\t\t...(cmd ? { cmd } : {}),","author":"init","version":0},{"n":354,"text":"\t\t\t...(out ? { out } : {}),","author":"init","version":0},{"n":355,"text":"\t\t});","author":"init","version":0},{"n":356,"text":"\t\tlet res: Response;","author":"init","version":0},{"n":357,"text":"\t\ttry {","author":"init","version":0},{"n":358,"text":"\t\t\tres = await this.send(`${this.url(\"/serve\")}?${q}`, {","author":"pinch","version":88},{"n":359,"text":"\t\t\t\tmethod: \"POST\",","author":"init","version":0},{"n":360,"text":"\t\t\t\theaders: this.headers(),","author":"init","version":0},{"n":361,"text":"\t\t\t\tsignal: AbortSignal.timeout(20 * 60_000),","author":"init","version":0},{"n":362,"text":"\t\t\t});","author":"init","version":0},{"n":363,"text":"\t\t} catch (err) {","author":"init","version":0},{"n":364,"text":"\t\t\tconst e = err as Error;","author":"init","version":0},{"n":365,"text":"\t\t\tthrow new ApiError(","author":"init","version":0},{"n":366,"text":"\t\t\t\t`could not reach ${this.config.server}: ${(e.cause as Error | undefined)?.message ?? e.message}`,","author":"init","version":0},{"n":367,"text":"\t\t\t);","author":"init","version":0},{"n":368,"text":"\t\t}","author":"init","version":0},{"n":369,"text":"\t\tconst text = await res.text();","author":"init","version":0},{"n":370,"text":"\t\tif (!res.ok && res.status !== 422)","author":"init","version":0},{"n":371,"text":"\t\t\tthrow new ApiError(`serve answered ${res.status}: ${errorSentence(text)}`, res.status);","author":"init","version":0},{"n":372,"text":"\t\treturn JSON.parse(text) as ServeAnswer;","author":"init","version":0},{"n":373,"text":"\t}","author":"init","version":0},{"n":374,"text":"","author":"init","version":0},{"n":375,"text":"\t/** Runs a setup command on the folder in a fresh box and keeps the box as what it starts from (abso prep, #37). */","author":"init","version":0},{"n":376,"text":"\tasync prep(command: string, tarGz: Uint8Array<ArrayBuffer>): Promise<PrepAnswer> {","author":"init","version":0},{"n":377,"text":"\t\tlet res: Response;","author":"init","version":0},{"n":378,"text":"\t\ttry {","author":"init","version":0},{"n":379,"text":"\t\t\tres = await this.send(","author":"pinch","version":88},{"n":380,"text":"\t\t\t\t`${this.url(this.agentPath(\"prep\"))}?cmd=${encodeURIComponent(command)}${boxQuery(this.box)}`,","author":"pinch","version":88},{"n":381,"text":"\t\t\t\t{","author":"pinch","version":88},{"n":382,"text":"\t\t\t\t\tmethod: \"POST\",","author":"pinch","version":88},{"n":383,"text":"\t\t\t\t\theaders: this.headers(\"application/gzip\"),","author":"pinch","version":88},{"n":384,"text":"\t\t\t\t\tbody: tarGz,","author":"pinch","version":88},{"n":385,"text":"\t\t\t\t\t// A setup command can take minutes (npm ci, a browser download).","author":"pinch","version":88},{"n":386,"text":"\t\t\t\t\tsignal: AbortSignal.timeout(30 * 60_000),","author":"pinch","version":88},{"n":387,"text":"\t\t\t\t},","author":"pinch","version":88},{"n":388,"text":"\t\t\t);","author":"pinch","version":88},{"n":389,"text":"\t\t} catch (err) {","author":"init","version":0},{"n":390,"text":"\t\t\tconst e = err as Error;","author":"init","version":0},{"n":391,"text":"\t\t\tthrow new ApiError(","author":"init","version":0},{"n":392,"text":"\t\t\t\t`could not reach ${this.config.server}: ${(e.cause as Error | undefined)?.message ?? e.message}`,","author":"init","version":0},{"n":393,"text":"\t\t\t);","author":"init","version":0},{"n":394,"text":"\t\t}","author":"init","version":0},{"n":395,"text":"\t\tconst text = await res.text();","author":"init","version":0},{"n":396,"text":"\t\tif (!res.ok) throw new ApiError(`prep answered ${res.status}: ${errorSentence(text)}`, res.status);","author":"init","version":0},{"n":397,"text":"\t\treturn JSON.parse(text) as PrepAnswer;","author":"init","version":0},{"n":398,"text":"\t}","author":"init","version":0},{"n":399,"text":"","author":"init","version":0},{"n":400,"text":"\t/** Forgets the box's prep: it starts from the plain image again. Answers whether it had one. */","author":"init","version":0},{"n":401,"text":"\tasync unprep(): Promise<boolean> {","author":"init","version":0},{"n":402,"text":"\t\tlet res: Response;","author":"init","version":0},{"n":403,"text":"\t\ttry {","author":"init","version":0},{"n":404,"text":"\t\t\tres = await this.send(","author":"pinch","version":88},{"n":405,"text":"\t\t\t\t`${this.url(this.agentPath(\"prep\"))}${this.box ? `?box=${encodeURIComponent(this.box)}` : \"\"}`,","author":"init","version":0},{"n":406,"text":"\t\t\t\t{ method: \"DELETE\", headers: this.headers(), signal: AbortSignal.timeout(this.timeoutMs) },","author":"init","version":0},{"n":407,"text":"\t\t\t);","author":"init","version":0},{"n":408,"text":"\t\t} catch (err) {","author":"init","version":0},{"n":409,"text":"\t\t\tconst e = err as Error;","author":"init","version":0},{"n":410,"text":"\t\t\tthrow new ApiError(","author":"init","version":0},{"n":411,"text":"\t\t\t\t`could not reach ${this.config.server}: ${(e.cause as Error | undefined)?.message ?? e.message}`,","author":"init","version":0},{"n":412,"text":"\t\t\t);","author":"init","version":0},{"n":413,"text":"\t\t}","author":"init","version":0},{"n":414,"text":"\t\tconst text = await res.text();","author":"init","version":0},{"n":415,"text":"\t\tif (!res.ok) throw new ApiError(`prep answered ${res.status}: ${errorSentence(text)}`, res.status);","author":"init","version":0},{"n":416,"text":"\t\treturn (JSON.parse(text) as { forgot: boolean }).forgot;","author":"init","version":0},{"n":417,"text":"\t}","author":"init","version":0},{"n":418,"text":"","author":"init","version":0},{"n":419,"text":"\t/** A binary file's bytes by their sha256. */","author":"init","version":0},{"n":420,"text":"\t/** A tar.gz of the files under the box's /w that match a glob (bash globstar); null when none match or the box has stopped. */","author":"init","version":0},{"n":421,"text":"\tasync boxFiles(glob: string): Promise<Uint8Array | null> {","author":"init","version":0},{"n":422,"text":"\t\ttry {","author":"init","version":0},{"n":423,"text":"\t\t\treturn await this.bytes(","author":"init","version":0},{"n":424,"text":"\t\t\t\t\"GET\",","author":"init","version":0},{"n":425,"text":"\t\t\t\t`${this.agentPath(\"box-files\")}?${new URLSearchParams({ glob, ...(this.box ? { box: this.box } : {}) })}`,","author":"init","version":0},{"n":426,"text":"\t\t\t);","author":"init","version":0},{"n":427,"text":"\t\t} catch (err) {","author":"init","version":0},{"n":428,"text":"\t\t\tif (err instanceof ApiError && err.status === 404) return null;","author":"init","version":0},{"n":429,"text":"\t\t\tthrow err;","author":"init","version":0},{"n":430,"text":"\t\t}","author":"init","version":0},{"n":431,"text":"\t}","author":"init","version":0},{"n":432,"text":"","author":"init","version":0},{"n":433,"text":"\tgetBlob(sha: string): Promise<Uint8Array> {","author":"init","version":0},{"n":434,"text":"\t\treturn this.bytes(\"GET\", `/blobs/${sha}`);","author":"init","version":0},{"n":435,"text":"\t}","author":"init","version":0},{"n":436,"text":"","author":"init","version":0},{"n":437,"text":"\tasync bytes(method: \"GET\" | \"PUT\", path: string, body?: Uint8Array): Promise<Uint8Array> {","author":"init","version":0},{"n":438,"text":"\t\tlet res: Response;","author":"init","version":0},{"n":439,"text":"\t\ttry {","author":"init","version":0},{"n":440,"text":"\t\t\tres = await this.send(this.url(path), {","author":"pinch","version":88},{"n":441,"text":"\t\t\t\tmethod,","author":"init","version":0},{"n":442,"text":"\t\t\t\theaders: this.headers(body === undefined ? undefined : \"application/octet-stream\"),","author":"init","version":0},{"n":443,"text":"\t\t\t\t...(body === undefined ? {} : { body: body as Uint8Array<ArrayBuffer> }),","author":"init","version":0},{"n":444,"text":"\t\t\t\tsignal: AbortSignal.timeout(Math.max(this.timeoutMs, 120_000)),","author":"init","version":0},{"n":445,"text":"\t\t\t});","author":"init","version":0},{"n":446,"text":"\t\t} catch (err) {","author":"init","version":0},{"n":447,"text":"\t\t\tconst e = err as Error;","author":"init","version":0},{"n":448,"text":"\t\t\tthrow new ApiError(","author":"init","version":0},{"n":449,"text":"\t\t\t\t`could not reach ${this.config.server}: ${(e.cause as Error | undefined)?.message ?? e.message}`,","author":"init","version":0},{"n":450,"text":"\t\t\t);","author":"init","version":0},{"n":451,"text":"\t\t}","author":"init","version":0},{"n":452,"text":"\t\tconst data = new Uint8Array(await res.arrayBuffer());","author":"init","version":0},{"n":453,"text":"\t\tif (!res.ok)","author":"init","version":0},{"n":454,"text":"\t\t\tthrow new ApiError(","author":"init","version":0},{"n":455,"text":"\t\t\t\t`${method} ${path} answered ${res.status}: ${errorSentence(new TextDecoder().decode(data))}`,","author":"init","version":0},{"n":456,"text":"\t\t\t\tres.status,","author":"init","version":0},{"n":457,"text":"\t\t\t);","author":"init","version":0},{"n":458,"text":"\t\treturn data;","author":"init","version":0},{"n":459,"text":"\t}","author":"init","version":0},{"n":460,"text":"","author":"init","version":0},{"n":461,"text":"\t/** Make this agent a reader, or not (#37): a reader's edits, records and publishes are refused. */","author":"init","version":0},{"n":462,"text":"\treader(on: boolean): Promise<{ agent: string; reader: boolean }> {","author":"init","version":0},{"n":463,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"reader\"), { reader: on });","author":"init","version":0},{"n":464,"text":"\t}","author":"init","version":0},{"n":465,"text":"","author":"init","version":0},{"n":466,"text":"\tpublish(message: string, asIs = false): Promise<PublishAnswer> {","author":"init","version":0},{"n":467,"text":"\t\treturn this.json(","author":"pinch","version":26},{"n":468,"text":"\t\t\t\"POST\",","author":"pinch","version":26},{"n":469,"text":"\t\t\tthis.agentPath(\"publish\"),","author":"pinch","version":26},{"n":470,"text":"\t\t\t{ message, ...(asIs ? { asIs: true } : {}) },","author":"pinch","version":26},{"n":471,"text":"\t\t\tundefined,","author":"pinch","version":26},{"n":472,"text":"\t\t\tPUBLISH_TIMEOUT_MS,","author":"pinch","version":26},{"n":473,"text":"\t\t);","author":"pinch","version":26},{"n":474,"text":"\t}","author":"init","version":0},{"n":475,"text":"","author":"init","version":0},{"n":476,"text":"\t/** One change (#44). */","author":"init","version":0},{"n":477,"text":"\tchange(id: number): Promise<ChangeAnswer> {","author":"init","version":0},{"n":478,"text":"\t\treturn this.json(\"GET\", `/change/${id}`);","author":"init","version":0},{"n":479,"text":"\t}","author":"init","version":0},{"n":480,"text":"","author":"init","version":0},{"n":481,"text":"\t/** The changes with anything new at or after log position `since`, newest first (#44). */","author":"init","version":0},{"n":482,"text":"\t/** Changes active since a log position, newest first; `older` is set when more come before the page (ask again with `before`). */","author":"init","version":0},{"n":483,"text":"\tchanges(","author":"init","version":0},{"n":484,"text":"\t\tsince: number,","author":"init","version":0},{"n":485,"text":"\t\tlimit = 50,","author":"init","version":0},{"n":486,"text":"\t\tbefore?: number,","author":"init","version":0},{"n":487,"text":"\t): Promise<{ since: number; next: number; changes: readonly ChangeAnswer[]; older?: number }> {","author":"init","version":0},{"n":488,"text":"\t\treturn this.json(\"GET\", `/changes?${query({ since, limit, before })}`);","author":"init","version":0},{"n":489,"text":"\t}","author":"init","version":0},{"n":490,"text":"","author":"init","version":0},{"n":491,"text":"\t/** A call to the Issues Worker (#54), with the same token. */","author":"init","version":0},{"n":492,"text":"\t#issues<T>(method: \"GET\" | \"POST\", path: string, body?: unknown): Promise<T> {","author":"init","version":0},{"n":493,"text":"\t\tif (this.issuesServer === undefined)","author":"init","version":0},{"n":494,"text":"\t\t\tthrow new ApiError(`${this.config.server} has no Issues Worker beside it; ABSO_ISSUES_SERVER names one`);","author":"review","version":27},{"n":495,"text":"\t\treturn this.json(method, path, body, this.issuesServer);","author":"init","version":0},{"n":496,"text":"\t}","author":"init","version":0},{"n":497,"text":"","author":"init","version":0},{"n":498,"text":"\t/** An ask-thread call, with a server from before ask threads named as that rather than a bare 404. */","author":"pinch","version":89},{"n":499,"text":"\tasync #threads<T>(call: Promise<T>): Promise<T> {","author":"pinch","version":89},{"n":500,"text":"\t\ttry {","author":"pinch","version":89},{"n":501,"text":"\t\t\treturn await call;","author":"pinch","version":89},{"n":502,"text":"\t\t} catch (err) {","author":"pinch","version":89},{"n":503,"text":"\t\t\tif (err instanceof ApiError && err.status === 404 && /no such issues route/.test(err.message))","author":"pinch","version":89},{"n":504,"text":"\t\t\t\tthrow new ApiError(`${this.config.server} doesn't have ask threads yet`, 404);","author":"pinch","version":89},{"n":505,"text":"\t\t\tthrow err;","author":"pinch","version":89},{"n":506,"text":"\t\t}","author":"pinch","version":89},{"n":507,"text":"\t}","author":"pinch","version":89},{"n":508,"text":"","author":"pinch","version":89},{"n":509,"text":"\t/** Issues, most recently updated first. */","author":"init","version":0},{"n":510,"text":"\tissues(","author":"init","version":0},{"n":511,"text":"\t\tq: { status?: string; agent?: string; parent?: number; open?: boolean; labels?: readonly string[] } = {},","author":"init","version":0},{"n":512,"text":"\t): Promise<{ issues: readonly IssueRow[] }> {","author":"init","version":0},{"n":513,"text":"\t\treturn this.#issues(","author":"init","version":0},{"n":514,"text":"\t\t\t\"GET\",","author":"init","version":0},{"n":515,"text":"\t\t\t`/issues?${query({ status: q.status, agent: q.agent, parent: q.parent, open: q.open ? 1 : undefined, label: q.labels && q.labels.length > 0 ? q.labels.join(\",\") : undefined })}`,","author":"init","version":0},{"n":516,"text":"\t\t);","author":"init","version":0},{"n":517,"text":"\t}","author":"devops","version":20},{"n":518,"text":"","author":"devops","version":20},{"n":519,"text":"\t/**","author":"devops","version":20},{"n":520,"text":"\t * The project's issues matching q, best first: by its words and, where","author":"devops","version":20},{"n":521,"text":"\t * the server has it on, by what it means.","author":"devops","version":20},{"n":522,"text":"\t */","author":"devops","version":20},{"n":523,"text":"\tissueSearch(q: string, limit?: number): Promise<{ hits: readonly IssueSearchHit[] }> {","author":"devops","version":20},{"n":524,"text":"\t\treturn this.#issues(\"GET\", `/search?${query({ q, limit })}`);","author":"devops","version":20},{"n":525,"text":"\t}","author":"init","version":0},{"n":526,"text":"","author":"init","version":0},{"n":527,"text":"\t/** Every label in use, with how many issues have it and how many of those are open. */","author":"init","version":0},{"n":528,"text":"\tissueLabels(): Promise<{ labels: readonly { label: string; open: number; total: number }[] }> {","author":"init","version":0},{"n":529,"text":"\t\treturn this.#issues(\"GET\", \"/labels\");","author":"init","version":0},{"n":530,"text":"\t}","author":"init","version":0},{"n":531,"text":"","author":"init","version":0},{"n":532,"text":"\tissue(id: number): Promise<IssuePage> {","author":"init","version":0},{"n":533,"text":"\t\treturn this.#issues(\"GET\", `/issue/${id}`);","author":"init","version":0},{"n":534,"text":"\t}","author":"init","version":0},{"n":535,"text":"","author":"init","version":0},{"n":536,"text":"\t/** The asks this agent sent: the open ones, then the latest answered, each with its thread. */","author":"pinch","version":72},{"n":537,"text":"\tasked(): Promise<{ asks: readonly (Ask & { title: string | null })[] }> {","author":"pinch","version":72},{"n":538,"text":"\t\treturn this.#threads(this.#issues(\"GET\", this.agentPath(\"asked\")));","author":"pinch","version":89},{"n":539,"text":"\t}","author":"pinch","version":72},{"n":540,"text":"","author":"pinch","version":72},{"n":541,"text":"\t/** One ask, open or closed, with its thread and who it waits on. */","author":"pinch","version":72},{"n":542,"text":"\taskThread(id: number): Promise<{ ask: Ask & { title: string | null } }> {","author":"pinch","version":72},{"n":543,"text":"\t\treturn this.#threads(this.#issues(\"GET\", `/ask/${id}`));","author":"pinch","version":89},{"n":544,"text":"\t}","author":"pinch","version":72},{"n":545,"text":"","author":"pinch","version":72},{"n":546,"text":"\t/** Open asks of someone (an agent, or person:<id>), soonest due first; every open ask without `of`. */","author":"init","version":0},{"n":547,"text":"\twaiting(of?: string): Promise<{ asks: readonly (Ask & { title: string | null })[] }> {","author":"init","version":0},{"n":548,"text":"\t\treturn this.#issues(\"GET\", `/waiting?${query({ of })}`);","author":"init","version":0},{"n":549,"text":"\t}","author":"init","version":0},{"n":550,"text":"","author":"init","version":0},{"n":551,"text":"\t/** This agent's open asks; the Worker marks each it lists for the first time as seen (abso issue 124). */","author":"init","version":0},{"n":552,"text":"\tasync waitingMine(): Promise<{ asks: readonly (Ask & { title: string | null })[] }> {","author":"init","version":0},{"n":553,"text":"\t\ttry {","author":"init","version":0},{"n":554,"text":"\t\t\treturn await this.#issues(\"GET\", this.agentPath(\"waiting\"));","author":"init","version":0},{"n":555,"text":"\t\t} catch (err) {","author":"init","version":0},{"n":556,"text":"\t\t\t// An Issues Worker from before 124 has no /a/:agent/ reads.","author":"init","version":0},{"n":557,"text":"\t\t\tif (err instanceof ApiError && err.status === 404) return this.waiting(this.config.agent);","author":"init","version":0},{"n":558,"text":"\t\t\tthrow err;","author":"init","version":0},{"n":559,"text":"\t\t}","author":"init","version":0},{"n":560,"text":"\t}","author":"init","version":0},{"n":561,"text":"","author":"init","version":0},{"n":562,"text":"\tissueOpen(body: DraftBody & { title: string; attachments?: string[] }): Promise<{ id: number; news?: IssueNews }> {","author":"pinch","version":5},{"n":563,"text":"\t\treturn this.#issues(\"POST\", this.agentPath(\"issue\"), body);","author":"init","version":0},{"n":564,"text":"\t}","author":"init","version":0},{"n":565,"text":"","author":"init","version":0},{"n":566,"text":"\t/** Uploads an image to the Issues Worker (abso issue 171): it checks the type by the bytes, strips metadata and answers its id. */","author":"pinch","version":5},{"n":567,"text":"\tasync attachmentUpload(bytes: Uint8Array, name: string): Promise<Attachment> {","author":"pinch","version":5},{"n":568,"text":"\t\tif (this.issuesServer === undefined)","author":"pinch","version":5},{"n":569,"text":"\t\t\tthrow new ApiError(`${this.config.server} has no Issues Worker beside it; ABSO_ISSUES_SERVER names one`);","author":"review","version":27},{"n":570,"text":"\t\tconst path = this.agentPath(\"attachments\");","author":"pinch","version":5},{"n":571,"text":"\t\tlet res: Response;","author":"pinch","version":5},{"n":572,"text":"\t\ttry {","author":"pinch","version":5},{"n":573,"text":"\t\t\tres = await this.send(this.url(path, this.issuesServer), {","author":"pinch","version":88},{"n":574,"text":"\t\t\t\tmethod: \"POST\",","author":"pinch","version":5},{"n":575,"text":"\t\t\t\theaders: { ...this.headers(\"application/octet-stream\"), \"x-abso-name\": encodeURIComponent(name) },","author":"pinch","version":54},{"n":576,"text":"\t\t\t\tbody: bytes as Uint8Array<ArrayBuffer>,","author":"pinch","version":5},{"n":577,"text":"\t\t\t\tsignal: AbortSignal.timeout(Math.max(this.timeoutMs, 120_000)),","author":"pinch","version":5},{"n":578,"text":"\t\t\t});","author":"pinch","version":5},{"n":579,"text":"\t\t} catch (err) {","author":"pinch","version":5},{"n":580,"text":"\t\t\tconst e = err as Error;","author":"pinch","version":5},{"n":581,"text":"\t\t\tthrow new ApiError(","author":"pinch","version":5},{"n":582,"text":"\t\t\t\t`could not reach ${this.issuesServer}: ${(e.cause as Error | undefined)?.message ?? e.message}`,","author":"pinch","version":5},{"n":583,"text":"\t\t\t);","author":"pinch","version":5},{"n":584,"text":"\t\t}","author":"pinch","version":5},{"n":585,"text":"\t\tconst text = await res.text();","author":"pinch","version":5},{"n":586,"text":"\t\t// A server from before attachments has no upload route: it answers 404, or 400 because the body isn't JSON;","author":"pinch","version":15},{"n":587,"text":"\t\t// one with the route but nowhere to keep files answers 501. Say so plainly, and that nothing was sent.","author":"pinch","version":15},{"n":588,"text":"\t\tif (res.status === 404 || res.status === 501 || (res.status === 400 && /the body is JSON/.test(text)))","author":"pinch","version":15},{"n":589,"text":"\t\t\tthrow new ApiError(","author":"pinch","version":15},{"n":590,"text":"\t\t\t\t`${this.issuesServer} doesn't take attachments yet, so ${name} wasn't sent and nothing was written. Leave --attach off, or link the image instead.`,","author":"pinch","version":15},{"n":591,"text":"\t\t\t\tres.status,","author":"pinch","version":15},{"n":592,"text":"\t\t\t);","author":"pinch","version":15},{"n":593,"text":"\t\tif (!res.ok) throw new ApiError(`uploading ${name} answered ${res.status}: ${errorSentence(text)}`, res.status);","author":"pinch","version":5},{"n":594,"text":"\t\treturn JSON.parse(text) as Attachment;","author":"pinch","version":5},{"n":595,"text":"\t}","author":"pinch","version":23},{"n":596,"text":"","author":"pinch","version":23},{"n":597,"text":"\t/**","author":"pinch","version":23},{"n":598,"text":"\t * Copies issue `body.issue` of this project into project `to`, keeping","author":"pinch","version":23},{"n":599,"text":"\t * authors and times: the Issues server reads the source itself, and only","author":"pinch","version":23},{"n":600,"text":"\t * texts may be given cleaned. A dry run answers the plan and writes nothing.","author":"pinch","version":23},{"n":601,"text":"\t */","author":"pinch","version":23},{"n":602,"text":"\tissueCopy(to: string, body: CopyBody & { dryRun?: boolean }): Promise<CopyAnswer> {","author":"pinch","version":23},{"n":603,"text":"\t\tconst there = new Api({ ...this.config, project: to }, this.timeoutMs);","author":"pinch","version":23},{"n":604,"text":"\t\tthere.issuesServer = this.issuesServer;","author":"pinch","version":23},{"n":605,"text":"\t\treturn there.#issues(\"POST\", there.agentPath(\"copy\"), body);","author":"pinch","version":23},{"n":606,"text":"\t}","author":"pinch","version":5},{"n":607,"text":"","author":"pinch","version":5},{"n":608,"text":"\t/** Where an attachment is served. */","author":"pinch","version":5},{"n":609,"text":"\tattachmentUrl(id: string): string {","author":"pinch","version":5},{"n":610,"text":"\t\treturn this.url(`/attachments/${id}`, this.issuesServer);","author":"pinch","version":5},{"n":611,"text":"\t}","author":"pinch","version":5},{"n":612,"text":"","author":"pinch","version":29},{"n":613,"text":"\t/** An attachment's bytes, or with `source` the svg it was drawn from; refused past `max` bytes. */","author":"pinch","version":29},{"n":614,"text":"\tasync attachmentBytes(id: string, source: boolean, max: number): Promise<Uint8Array> {","author":"pinch","version":29},{"n":615,"text":"\t\tif (this.issuesServer === undefined)","author":"pinch","version":29},{"n":616,"text":"\t\t\tthrow new ApiError(`${this.config.server} has no Issues Worker beside it; ABSO_ISSUES_SERVER names one`);","author":"pinch","version":29},{"n":617,"text":"\t\tconst url = `${this.attachmentUrl(id)}${source ? \"/source\" : \"\"}`;","author":"pinch","version":29},{"n":618,"text":"\t\tlet res: Response;","author":"pinch","version":29},{"n":619,"text":"\t\ttry {","author":"pinch","version":29},{"n":620,"text":"\t\t\tres = await this.send(url, {","author":"pinch","version":88},{"n":621,"text":"\t\t\t\theaders: this.headers(),","author":"pinch","version":29},{"n":622,"text":"\t\t\t\tsignal: AbortSignal.timeout(Math.max(this.timeoutMs, 120_000)),","author":"pinch","version":29},{"n":623,"text":"\t\t\t});","author":"pinch","version":29},{"n":624,"text":"\t\t} catch (err) {","author":"pinch","version":29},{"n":625,"text":"\t\t\tconst e = err as Error;","author":"pinch","version":29},{"n":626,"text":"\t\t\tthrow new ApiError(","author":"pinch","version":29},{"n":627,"text":"\t\t\t\t`could not reach ${this.issuesServer}: ${(e.cause as Error | undefined)?.message ?? e.message}`,","author":"pinch","version":29},{"n":628,"text":"\t\t\t);","author":"pinch","version":29},{"n":629,"text":"\t\t}","author":"pinch","version":29},{"n":630,"text":"\t\tif (!res.ok) throw new ApiError(`${url} answered ${res.status}: ${errorSentence(await res.text())}`, res.status);","author":"pinch","version":29},{"n":631,"text":"\t\tconst bytes = new Uint8Array(await res.arrayBuffer());","author":"pinch","version":29},{"n":632,"text":"\t\tif (bytes.length > max) throw new ApiError(`${url} sent ${bytes.length} bytes, more than an attachment may be`);","author":"pinch","version":29},{"n":633,"text":"\t\treturn bytes;","author":"pinch","version":29},{"n":634,"text":"\t}","author":"pinch","version":29},{"n":635,"text":"","author":"pinch","version":5},{"n":636,"text":"\t/** An edit (abso issue 3): it tells the issue's watchers, and `also`, unless `notify` is false. null clears a parent or Agent. */","author":"init","version":0},{"n":637,"text":"\tissueEdit(","author":"init","version":0},{"n":638,"text":"\t\tid: number,","author":"init","version":0},{"n":639,"text":"\t\tbody: {","author":"init","version":0},{"n":640,"text":"\t\t\ttitle?: string;","author":"init","version":0},{"n":641,"text":"\t\t\tdescription?: string;","author":"init","version":0},{"n":642,"text":"\t\t\tparent?: number | null;","author":"init","version":0},{"n":643,"text":"\t\t\tagent?: string | null;","author":"init","version":0},{"n":644,"text":"\t\t\tblockedBy?: number[];","author":"init","version":0},{"n":645,"text":"\t\t\tnotify?: boolean;","author":"init","version":0},{"n":646,"text":"\t\t\talso?: string[];","author":"init","version":0},{"n":647,"text":"\t\t\taddLabels?: string[];","author":"init","version":0},{"n":648,"text":"\t\t\tremoveLabels?: string[];","author":"init","version":0},{"n":649,"text":"\t\t},","author":"init","version":0},{"n":650,"text":"\t): Promise<{ edit: number; notified: readonly string[]; news?: IssueNews }> {","author":"init","version":0},{"n":651,"text":"\t\treturn this.#issues(\"POST\", this.agentPath(`issue/${id}/edit`), body);","author":"init","version":0},{"n":652,"text":"\t}","author":"init","version":0},{"n":653,"text":"","author":"init","version":0},{"n":654,"text":"\tissueComment(","author":"pinch","version":5},{"n":655,"text":"\t\tid: number,","author":"pinch","version":5},{"n":656,"text":"\t\ttext: string,","author":"pinch","version":5},{"n":657,"text":"\t\tobjection = false,","author":"pinch","version":5},{"n":658,"text":"\t\tattachments: readonly string[] = [],","author":"pinch","version":5},{"n":659,"text":"\t): Promise<{ id: number; news?: IssueNews }> {","author":"pinch","version":5},{"n":660,"text":"\t\treturn this.#issues(\"POST\", this.agentPath(`issue/${id}/comment`), {","author":"pinch","version":5},{"n":661,"text":"\t\t\ttext,","author":"pinch","version":5},{"n":662,"text":"\t\t\t...(objection ? { objection } : {}),","author":"pinch","version":5},{"n":663,"text":"\t\t\t...(attachments.length > 0 ? { attachments } : {}),","author":"pinch","version":5},{"n":664,"text":"\t\t});","author":"pinch","version":5},{"n":665,"text":"\t}","author":"init","version":0},{"n":666,"text":"","author":"init","version":0},{"n":667,"text":"\tissueDrop(id: number): Promise<{ news?: IssueNews }> {","author":"init","version":0},{"n":668,"text":"\t\treturn this.#issues(\"POST\", this.agentPath(`issue/${id}/drop`), {});","author":"init","version":0},{"n":669,"text":"\t}","author":"init","version":0},{"n":670,"text":"","author":"init","version":0},{"n":671,"text":"\t/** Opens a dropped issue again (abso issue 104). */","author":"init","version":0},{"n":672,"text":"\tissueReopen(id: number): Promise<{ news?: IssueNews }> {","author":"init","version":0},{"n":673,"text":"\t\treturn this.#issues(\"POST\", this.agentPath(`issue/${id}/reopen`), {});","author":"init","version":0},{"n":674,"text":"\t}","author":"init","version":0},{"n":675,"text":"","author":"init","version":0},{"n":676,"text":"\t/** Marks an issue done by hand (abso issue 38). `version` is the publish that did it, when there is one. */","author":"init","version":0},{"n":677,"text":"\tissueDone(id: number, version: number | null): Promise<{ news?: IssueNews }> {","author":"init","version":0},{"n":678,"text":"\t\treturn this.#issues(\"POST\", this.agentPath(`issue/${id}/done`), { ...(version !== null ? { version } : {}) });","author":"init","version":0},{"n":679,"text":"\t}","author":"init","version":0},{"n":680,"text":"","author":"init","version":0},{"n":681,"text":"\t/** This agent's drafts (abso issue 3): its own, with no number and no news, newest first. */","author":"init","version":0},{"n":682,"text":"\tdrafts(): Promise<{ drafts: readonly Draft[] }> {","author":"init","version":0},{"n":683,"text":"\t\treturn this.#issues(\"GET\", this.agentPath(\"drafts\"));","author":"init","version":0},{"n":684,"text":"\t}","author":"init","version":0},{"n":685,"text":"","author":"init","version":0},{"n":686,"text":"\t/** Saves a draft, new or (with id) over one of this agent's: the body replaces the draft's. */","author":"init","version":0},{"n":687,"text":"\tsaveDraft(body: DraftBody & { id?: number }): Promise<{ id: number }> {","author":"init","version":0},{"n":688,"text":"\t\treturn this.#issues(\"POST\", this.agentPath(\"draft\"), body);","author":"init","version":0},{"n":689,"text":"\t}","author":"init","version":0},{"n":690,"text":"","author":"init","version":0},{"n":691,"text":"\t/** Opens a draft as an issue, `body`'s fields over the draft's, and deletes the draft. */","author":"init","version":0},{"n":692,"text":"\topenDraft(id: number, body: DraftBody = {}): Promise<{ id: number; news?: IssueNews }> {","author":"init","version":0},{"n":693,"text":"\t\treturn this.#issues(\"POST\", this.agentPath(`draft/${id}/open`), body);","author":"init","version":0},{"n":694,"text":"\t}","author":"init","version":0},{"n":695,"text":"","author":"init","version":0},{"n":696,"text":"\tdeleteDraft(id: number): Promise<{ ok: boolean }> {","author":"init","version":0},{"n":697,"text":"\t\treturn this.#issues(\"POST\", this.agentPath(`draft/${id}/delete`), {});","author":"init","version":0},{"n":698,"text":"\t}","author":"init","version":0},{"n":699,"text":"","author":"init","version":0},{"n":700,"text":"\task(body: {","author":"init","version":0},{"n":701,"text":"\t\tissue?: number;","author":"init","version":0},{"n":702,"text":"\t\tof: string;","author":"init","version":0},{"n":703,"text":"\t\tquestion: string;","author":"init","version":0},{"n":704,"text":"\t\treview?: boolean;","author":"init","version":0},{"n":705,"text":"\t\tkind?: \"question\" | \"task\";","author":"init","version":0},{"n":706,"text":"\t\tdue?: string;","author":"init","version":0},{"n":707,"text":"\t\tblocks?: number[];","author":"init","version":0},{"n":708,"text":"\t\toptions?: string[];","author":"init","version":0},{"n":709,"text":"\t\tattachments?: string[];","author":"pinch","version":35},{"n":710,"text":"\t}): Promise<{ id: number; news?: IssueNews; attachments?: string[] }> {","author":"pinch","version":35},{"n":711,"text":"\t\treturn this.#issues(\"POST\", this.agentPath(\"ask\"), body);","author":"init","version":0},{"n":712,"text":"\t}","author":"init","version":0},{"n":713,"text":"","author":"init","version":0},{"n":714,"text":"\tanswer(","author":"init","version":0},{"n":715,"text":"\t\tid: number,","author":"init","version":0},{"n":716,"text":"\t\tbody: { words?: string; option?: number | string; note?: string; done?: boolean; attachments?: string[] },","author":"pinch","version":35},{"n":717,"text":"\t): Promise<{ ask: Ask; news?: IssueNews }> {","author":"init","version":0},{"n":718,"text":"\t\treturn this.#issues(\"POST\", this.agentPath(`answer/${id}`), body);","author":"init","version":0},{"n":719,"text":"\t}","author":"init","version":0},{"n":720,"text":"","author":"infra-split","version":14},{"n":721,"text":"\t/** Acknowledges an ask of this agent without answering it: the asker hears it, and the ask stays open. */","author":"pinch","version":53},{"n":722,"text":"\tack(id: number, body: { note?: string }): Promise<{ ask: Ask; news?: IssueNews }> {","author":"pinch","version":53},{"n":723,"text":"\t\treturn this.#issues(\"POST\", this.agentPath(`ack/${id}`), body);","author":"pinch","version":53},{"n":724,"text":"\t}","author":"pinch","version":72},{"n":725,"text":"","author":"pinch","version":72},{"n":726,"text":"\t/** 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. */","author":"pinch","version":72},{"n":727,"text":"\treply(id: number, body: { text: string; question?: boolean }): Promise<{ ask: Ask; news?: IssueNews }> {","author":"pinch","version":72},{"n":728,"text":"\t\treturn this.#threads(this.#issues(\"POST\", this.agentPath(`reply/${id}`), body));","author":"pinch","version":89},{"n":729,"text":"\t}","author":"pinch","version":53},{"n":730,"text":"","author":"pinch","version":53},{"n":731,"text":"\t/** A groups call, with a server from before groups named as that rather than a bare 404. */","author":"groups","version":256},{"n":732,"text":"\tasync #groups<T>(call: Promise<T>): Promise<T> {","author":"groups","version":256},{"n":733,"text":"\t\ttry {","author":"groups","version":256},{"n":734,"text":"\t\t\treturn await call;","author":"groups","version":256},{"n":735,"text":"\t\t} catch (err) {","author":"groups","version":256},{"n":736,"text":"\t\t\tif (err instanceof ApiError && err.status === 404 && /no such issues route|reads have no/.test(err.message))","author":"groups","version":256},{"n":737,"text":"\t\t\t\tthrow new ApiError(`${this.config.server} doesn't have groups yet`, 404);","author":"groups","version":256},{"n":738,"text":"\t\t\tthrow err;","author":"groups","version":256},{"n":739,"text":"\t\t}","author":"groups","version":256},{"n":740,"text":"\t}","author":"groups","version":256},{"n":741,"text":"","author":"groups","version":256},{"n":742,"text":"\t/** The project's groups this agent can see. */","author":"groups","version":256},{"n":743,"text":"\tgroupList(): Promise<{ groups: readonly GroupSummary[] }> {","author":"groups","version":256},{"n":744,"text":"\t\treturn this.#groups(this.#issues(\"GET\", this.agentPath(\"groups\")));","author":"groups","version":256},{"n":745,"text":"\t}","author":"groups","version":256},{"n":746,"text":"","author":"groups","version":256},{"n":747,"text":"\t/** One group's settings and roster, by name or id. */","author":"groups","version":256},{"n":748,"text":"\tgroup(ref: string): Promise<GroupShown> {","author":"groups","version":256},{"n":749,"text":"\t\treturn this.#groups(this.#issues(\"GET\", this.agentPath(`group/${encodeURIComponent(ref)}`)));","author":"groups","version":256},{"n":750,"text":"\t}","author":"groups","version":256},{"n":751,"text":"","author":"groups","version":256},{"n":752,"text":"\t/** A page of a group's history, newest first, and the `before` that reads further back (null at the start). */","author":"groups","version":256},{"n":753,"text":"\tgroupEvents(","author":"groups","version":256},{"n":754,"text":"\t\tref: string,","author":"groups","version":256},{"n":755,"text":"\t\tq: { before?: number; limit?: number; kind?: string } = {},","author":"groups","version":256},{"n":756,"text":"\t): Promise<{ events: readonly GroupEvent[]; before: number | null }> {","author":"groups","version":256},{"n":757,"text":"\t\tconst qs = query({ before: q.before, limit: q.limit, kind: q.kind }).toString();","author":"groups","version":256},{"n":758,"text":"\t\treturn this.#groups(","author":"groups","version":256},{"n":759,"text":"\t\t\tthis.#issues(\"GET\", this.agentPath(`group/${encodeURIComponent(ref)}/events${qs ? `?${qs}` : \"\"}`)),","author":"groups","version":256},{"n":760,"text":"\t\t);","author":"groups","version":256},{"n":761,"text":"\t}","author":"groups","version":256},{"n":762,"text":"","author":"groups","version":256},{"n":763,"text":"\t/** Make a group (ref undefined), or post, join, leave, add, remove or change settings in one. */","author":"groups","version":256},{"n":764,"text":"\tgroupWrite(","author":"groups","version":256},{"n":765,"text":"\t\tref: string | undefined,","author":"groups","version":256},{"n":766,"text":"\t\taction: \"post\" | \"join\" | \"leave\" | \"add\" | \"remove\" | \"settings\" | undefined,","author":"groups","version":256},{"n":767,"text":"\t\tbody: Record<string, unknown>,","author":"groups","version":256},{"n":768,"text":"\t): Promise<GroupWrite> {","author":"groups","version":256},{"n":769,"text":"\t\tconst path = ref === undefined ? \"groups\" : `group/${encodeURIComponent(ref)}/${action}`;","author":"groups","version":256},{"n":770,"text":"\t\treturn this.#groups(this.#issues(\"POST\", this.agentPath(path), body));","author":"groups","version":256},{"n":771,"text":"\t}","author":"groups","version":256},{"n":772,"text":"","author":"groups","version":256},{"n":773,"text":"\t/** Takes back an ask this agent made, with a note on why; the one asked hears it. */","author":"infra-split","version":14},{"n":774,"text":"\twithdraw(id: number, body: { note?: string }): Promise<{ ask: Ask; news?: IssueNews }> {","author":"infra-split","version":14},{"n":775,"text":"\t\treturn this.#issues(\"POST\", this.agentPath(`withdraw/${id}`), body);","author":"infra-split","version":14},{"n":776,"text":"\t}","author":"infra-split","version":14},{"n":777,"text":"","author":"init","version":0},{"n":778,"text":"\t/** Notes on lines (#44), by file or change; open ones only with `open`. */","author":"init","version":0},{"n":779,"text":"\tnotes(q: { file?: string; change?: number; open?: boolean } = {}): Promise<{ notes: readonly NoteAnswer[] }> {","author":"init","version":0},{"n":780,"text":"\t\treturn this.json(\"GET\", `/notes?${query({ file: q.file, change: q.change, open: q.open ? 1 : undefined })}`);","author":"init","version":0},{"n":781,"text":"\t}","author":"init","version":0},{"n":782,"text":"","author":"init","version":0},{"n":783,"text":"\tnote(body: NoteBody): Promise<{ id: number; change: number | null; lines: readonly [number, number] }> {","author":"init","version":0},{"n":784,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"note\"), body);","author":"init","version":0},{"n":785,"text":"\t}","author":"init","version":0},{"n":786,"text":"","author":"init","version":0},{"n":787,"text":"\tnoteClose(id: number, how: \"resolved\" | \"withdrawn\"): Promise<unknown> {","author":"init","version":0},{"n":788,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"note-close\"), { id, how });","author":"init","version":0},{"n":789,"text":"\t}","author":"init","version":0},{"n":790,"text":"","author":"init","version":0},{"n":791,"text":"\t/** The merge queue now (#39). */","author":"init","version":0},{"n":792,"text":"\tqueueState(): Promise<QueueState> {","author":"init","version":0},{"n":793,"text":"\t\treturn this.json(\"GET\", \"/queue\");","author":"init","version":0},{"n":794,"text":"\t}","author":"init","version":0},{"n":795,"text":"","author":"init","version":0},{"n":796,"text":"\t/** The project's visibility (abso issue 152): public or private. */","author":"init","version":0},{"n":797,"text":"\tvisibility(): Promise<{ project: string; visibility: \"public\" | \"private\" }> {","author":"init","version":0},{"n":798,"text":"\t\treturn this.json(\"GET\", \"/visibility\");","author":"init","version":0},{"n":799,"text":"\t}","author":"init","version":0},{"n":800,"text":"","author":"init","version":0},{"n":801,"text":"\t/** Switch the project's visibility (abso issue 140): an owner's key, or the shared token on staging. */","author":"init","version":0},{"n":802,"text":"\tsetVisibility(v: \"public\" | \"private\"): Promise<{ project: string; visibility: \"public\" | \"private\" }> {","author":"init","version":0},{"n":803,"text":"\t\treturn this.json(\"POST\", `/visibility?visibility=${v}`, {});","author":"init","version":0},{"n":804,"text":"\t}","author":"autosettle","version":220},{"n":805,"text":"","author":"autosettle","version":220},{"n":806,"text":"\t/** The project's auto-settle choice (abso-core 23): off, advise or settle, and how sure before abso settles. */","author":"autosettle","version":220},{"n":807,"text":"\tautosettle(): Promise<AutosettleAnswer> {","author":"autosettle","version":220},{"n":808,"text":"\t\treturn this.json(\"GET\", \"/autosettle\");","author":"autosettle","version":220},{"n":809,"text":"\t}","author":"autosettle","version":220},{"n":810,"text":"","author":"autosettle","version":220},{"n":811,"text":"\t/** Change it (abso-core 23): an owner's key, or the shared token on staging. Without `at`, the server keeps its own. */","author":"autosettle","version":220},{"n":812,"text":"\tsetAutosettle(mode: AutosettleMode, at?: number): Promise<AutosettleAnswer> {","author":"autosettle","version":220},{"n":813,"text":"\t\treturn this.json(\"POST\", `/autosettle?mode=${mode}${at === undefined ? \"\" : `&at=${at}`}`, {});","author":"autosettle","version":220},{"n":814,"text":"\t}","author":"init","version":0},{"n":815,"text":"","author":"init","version":0},{"n":816,"text":"\t/** Auto-settle's history (abso-core 23): held pushes the model advised on, newest first. */","author":"autosettle","version":223},{"n":817,"text":"\tautosettleHistory(): Promise<unknown> {","author":"autosettle","version":223},{"n":818,"text":"\t\treturn this.json(\"GET\", \"/autosettle/history\");","author":"autosettle","version":223},{"n":819,"text":"\t}","author":"autosettle","version":223},{"n":820,"text":"","author":"autosettle","version":223},{"n":821,"text":"\t/** One held push from the history, with each collision's calls to the model. */","author":"autosettle","version":223},{"n":822,"text":"\tautosettleHold(id: number): Promise<unknown> {","author":"autosettle","version":223},{"n":823,"text":"\t\treturn this.json(\"GET\", `/autosettle/history/${id}`);","author":"autosettle","version":223},{"n":824,"text":"\t}","author":"autosettle","version":223},{"n":825,"text":"","author":"autosettle","version":223},{"n":826,"text":"\t/** Take back this agent's queued publishes (#39); refused while one is being checked. */","author":"init","version":0},{"n":827,"text":"\tunqueue(): Promise<{ pulled: readonly number[] }> {","author":"init","version":0},{"n":828,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"unqueue\"), {});","author":"init","version":0},{"n":829,"text":"\t}","author":"init","version":0},{"n":830,"text":"","author":"init","version":0},{"n":831,"text":"\t/**","author":"init","version":0},{"n":832,"text":"\t * Sync; a folder following a label goes to the newest version with that label.","author":"init","version":0},{"n":833,"text":"\t * With `full`, the answer holds every file in the agent's view, as a first sync's does,","author":"init","version":0},{"n":834,"text":"\t * not only what changed since its last sync (#37: a join for an agent the server knew).","author":"init","version":0},{"n":835,"text":"\t */","author":"init","version":0},{"n":836,"text":"\tsync(options: { full?: boolean } = {}): Promise<SyncAnswer> {","author":"init","version":0},{"n":837,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"sync\"), {","author":"init","version":0},{"n":838,"text":"\t\t\t...(this.config.follow ? { label: this.config.follow } : {}),","author":"init","version":0},{"n":839,"text":"\t\t\t...(options.full ? { full: true } : {}),","author":"init","version":0},{"n":840,"text":"\t\t});","author":"init","version":0},{"n":841,"text":"\t}","author":"init","version":0},{"n":842,"text":"","author":"init","version":0},{"n":843,"text":"\t/** Take published versions back out of shared (with the versions that build on them, when asked). */","author":"init","version":0},{"n":844,"text":"\tdrop(versions: readonly number[], message: string, withDependents = false): Promise<DropAnswer> {","author":"init","version":0},{"n":845,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"drop\"), {","author":"init","version":0},{"n":846,"text":"\t\t\tversions,","author":"init","version":0},{"n":847,"text":"\t\t\tmessage,","author":"init","version":0},{"n":848,"text":"\t\t\t...(withDependents ? { withDependents: true } : {}),","author":"init","version":0},{"n":849,"text":"\t\t});","author":"init","version":0},{"n":850,"text":"\t}","author":"init","version":0},{"n":851,"text":"","author":"init","version":0},{"n":852,"text":"\t/** Take some versions of a named draft into shared, as one version. */","author":"init","version":0},{"n":853,"text":"\tpluck(draft: string, versions: readonly number[], message: string, withDependencies = false): Promise<PluckAnswer> {","author":"init","version":0},{"n":854,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"pluck\"), {","author":"init","version":0},{"n":855,"text":"\t\t\tdraft,","author":"init","version":0},{"n":856,"text":"\t\t\tversions,","author":"init","version":0},{"n":857,"text":"\t\t\tmessage,","author":"init","version":0},{"n":858,"text":"\t\t\t...(withDependencies ? { withDependencies: true } : {}),","author":"init","version":0},{"n":859,"text":"\t\t});","author":"init","version":0},{"n":860,"text":"\t}","author":"init","version":0},{"n":861,"text":"","author":"init","version":0},{"n":862,"text":"\t/** Correct the message of this agent's newest publish in its space. */","author":"init","version":0},{"n":863,"text":"\tamend(message: string): Promise<{ version: number; draft: string | null; message: string; was: string }> {","author":"init","version":0},{"n":864,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"amend\"), { message });","author":"init","version":0},{"n":865,"text":"\t}","author":"init","version":0},{"n":866,"text":"","author":"init","version":0},{"n":867,"text":"\t/** Put a label on a version of shared (the newest by default), or take it off. */","author":"init","version":0},{"n":868,"text":"\tlabel(","author":"init","version":0},{"n":869,"text":"\t\tname: string,","author":"init","version":0},{"n":870,"text":"\t\tversion?: number,","author":"init","version":0},{"n":871,"text":"\t\tremove = false,","author":"init","version":0},{"n":872,"text":"\t): Promise<{ name: string; version: number; versions: readonly number[] }> {","author":"init","version":0},{"n":873,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"label\"), {","author":"init","version":0},{"n":874,"text":"\t\t\tname,","author":"init","version":0},{"n":875,"text":"\t\t\t...(version === undefined ? {} : { version }),","author":"init","version":0},{"n":876,"text":"\t\t\t...(remove ? { remove: true } : {}),","author":"init","version":0},{"n":877,"text":"\t\t});","author":"init","version":0},{"n":878,"text":"\t}","author":"init","version":0},{"n":879,"text":"","author":"init","version":0},{"n":880,"text":"\tlabels(): Promise<{ labels: Readonly<Record<string, readonly number[]>> }> {","author":"init","version":0},{"n":881,"text":"\t\treturn this.json(\"GET\", \"/labels\");","author":"init","version":0},{"n":882,"text":"\t}","author":"init","version":0},{"n":883,"text":"","author":"init","version":0},{"n":884,"text":"\tstatus(): Promise<StatusAnswer> {","author":"init","version":0},{"n":885,"text":"\t\treturn this.json(\"GET\", \"/status\");","author":"init","version":0},{"n":886,"text":"\t}","author":"init","version":0},{"n":887,"text":"","author":"init","version":0},{"n":888,"text":"\t/** The status and the paths in the agent's view, in one trip (abso issue 80). */","author":"init","version":0},{"n":889,"text":"\tasync statusAndFiles(): Promise<StatusAnswer & { files: FilesAnswer | undefined }> {","author":"init","version":0},{"n":890,"text":"\t\ttry {","author":"init","version":0},{"n":891,"text":"\t\t\treturn await this.json(\"GET\", this.agentPath(\"status\"));","author":"init","version":0},{"n":892,"text":"\t\t} catch (err) {","author":"init","version":0},{"n":893,"text":"\t\t\t// A server from before it has no /a/:agent/status; the listing itself is from #37.","author":"init","version":0},{"n":894,"text":"\t\t\tif (!(err instanceof ApiError && err.status === 404)) throw err;","author":"init","version":0},{"n":895,"text":"\t\t}","author":"init","version":0},{"n":896,"text":"\t\tconst status = await this.status();","author":"init","version":0},{"n":897,"text":"\t\treturn { ...status, files: await this.viewFiles().catch(() => undefined) };","author":"init","version":0},{"n":898,"text":"\t}","author":"init","version":0},{"n":899,"text":"","author":"init","version":0},{"n":900,"text":"\t/** CI's state (#39), or one version's job. */","author":"init","version":0},{"n":901,"text":"\tci(): Promise<CiStatus>;","author":"init","version":0},{"n":902,"text":"\tci(version: number): Promise<CiJob>;","author":"init","version":0},{"n":903,"text":"\tci(version?: number): Promise<CiStatus | CiJob> {","author":"init","version":0},{"n":904,"text":"\t\treturn this.json(\"GET\", version === undefined ? \"/ci\" : `/ci?${query({ version })}`);","author":"init","version":0},{"n":905,"text":"\t}","author":"init","version":0},{"n":906,"text":"","author":"init","version":0},{"n":907,"text":"\t/** The project's pipeline runs, newest first; one run with its jobs; or one job's log (`log` is pipeline.job). */","author":"infra-pipeline","version":85},{"n":908,"text":"\tpipelineRuns(run?: number, log?: string): Promise<unknown> {","author":"infra-pipeline","version":85},{"n":909,"text":"\t\treturn this.json(\"GET\", run === undefined ? \"/pipelines\" : `/pipelines?${query({ run, log })}`);","author":"infra-pipeline","version":85},{"n":910,"text":"\t}","author":"infra-pipeline","version":85},{"n":911,"text":"","author":"infra-pipeline","version":85},{"n":912,"text":"\t/** Ends every /latest link handed out so far; answers CI's state with the new link. */","author":"init","version":0},{"n":913,"text":"\tciRevoke(): Promise<CiStatus> {","author":"init","version":0},{"n":914,"text":"\t\treturn this.json(\"POST\", \"/ci/revoke\", {});","author":"init","version":0},{"n":915,"text":"\t}","author":"init","version":0},{"n":916,"text":"","author":"init","version":0},{"n":917,"text":"\t/** Count versions up to `through` as seen by CI and end any red or bisect, so an import's history isn't checked (#56). */","author":"init","version":0},{"n":918,"text":"\tciSkip(through: number): Promise<unknown> {","author":"init","version":0},{"n":919,"text":"\t\treturn this.json(\"POST\", \"/ci/skip\", { through });","author":"init","version":0},{"n":920,"text":"\t}","author":"init","version":0},{"n":921,"text":"","author":"init","version":0},{"n":922,"text":"\t/** Move to a named draft (null: shared). With carry, the current unpublished changes start a new draft. */","author":"init","version":0},{"n":923,"text":"\tswitchDraft(name: string | null, carry = false): Promise<SwitchAnswer> {","author":"init","version":0},{"n":924,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"draft\"), { name, ...(carry ? { carry: true } : {}) });","author":"init","version":0},{"n":925,"text":"\t}","author":"init","version":0},{"n":926,"text":"","author":"init","version":0},{"n":927,"text":"\t/** Land never queues: with the merge queue on, the server refuses it (#39). */","author":"init","version":0},{"n":928,"text":"\tland(message: string): Promise<Exclude<PublishAnswer, { queued: number }>> {","author":"init","version":0},{"n":929,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"land\"), { message }, undefined, PUBLISH_TIMEOUT_MS);","author":"pinch","version":26},{"n":930,"text":"\t}","author":"init","version":0},{"n":931,"text":"","author":"init","version":0},{"n":932,"text":"\tdraftSync(): Promise<DraftSyncAnswer> {","author":"init","version":0},{"n":933,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"draft-sync\"), {});","author":"init","version":0},{"n":934,"text":"\t}","author":"init","version":0},{"n":935,"text":"","author":"init","version":0},{"n":936,"text":"\tblame(file: string, from?: number, to?: number, version?: number, view: View = {}): Promise<BlameAnswer> {","author":"init","version":0},{"n":937,"text":"\t\treturn this.json(\"GET\", `/blame?${query({ file, from, to, version, ...view })}`);","author":"init","version":0},{"n":938,"text":"\t}","author":"init","version":0},{"n":939,"text":"","author":"init","version":0},{"n":940,"text":"\t/** The paths in the agent's view: what its folder should hold (#37). */","author":"init","version":0},{"n":941,"text":"\tviewFiles(): Promise<FilesAnswer> {","author":"init","version":0},{"n":942,"text":"\t\treturn this.json(\"GET\", this.agentPath(\"files\"));","author":"init","version":0},{"n":943,"text":"\t}","author":"init","version":0},{"n":944,"text":"","author":"init","version":0},{"n":945,"text":"\t/** The paths in shared, or a named draft, at a version (the newest by default). */","author":"init","version":0},{"n":946,"text":"\tfilesAt(draft: string | null, version?: number): Promise<FilesAnswer> {","author":"init","version":0},{"n":947,"text":"\t\treturn this.json(\"GET\", `/files?${query({ draft, version })}`);","author":"init","version":0},{"n":948,"text":"\t}","author":"init","version":0},{"n":949,"text":"","author":"init","version":0},{"n":950,"text":"\t/** The versions of a space, newest first; with `path`, only those that changed it. */","author":"init","version":0},{"n":951,"text":"\t/**","author":"pinch","version":26},{"n":952,"text":"\t * The versions newest first, below `before` when it's given. The server","author":"pinch","version":26},{"n":953,"text":"\t * sends at most LOG_PAGE at a time, so a longer log is read page by page,","author":"pinch","version":26},{"n":954,"text":"\t * following each page's next. `next` on the answer says older ones are left.","author":"pinch","version":26},{"n":955,"text":"\t */","author":"pinch","version":26},{"n":956,"text":"\tasync log(where: Where, limit?: number, path?: string, before?: number): Promise<LogAnswer> {","author":"pinch","version":26},{"n":957,"text":"\t\tlet page = await this.#logPage(where, limit === undefined ? undefined : Math.min(limit, LOG_PAGE), path, before);","author":"pinch","version":26},{"n":958,"text":"\t\tconst versions = [...page.versions];","author":"pinch","version":26},{"n":959,"text":"\t\twhile (limit !== undefined && versions.length < limit && page.next !== undefined) {","author":"pinch","version":26},{"n":960,"text":"\t\t\tpage = await this.#logPage(where, Math.min(limit - versions.length, LOG_PAGE), path, page.next);","author":"pinch","version":26},{"n":961,"text":"\t\t\tversions.push(...page.versions);","author":"pinch","version":26},{"n":962,"text":"\t\t}","author":"pinch","version":26},{"n":963,"text":"\t\tconst { next, ...rest } = page;","author":"pinch","version":26},{"n":964,"text":"\t\treturn { ...rest, versions, ...(next !== undefined ? { next } : {}) };","author":"pinch","version":26},{"n":965,"text":"\t}","author":"pinch","version":26},{"n":966,"text":"","author":"pinch","version":26},{"n":967,"text":"\t#logPage(","author":"pinch","version":26},{"n":968,"text":"\t\twhere: Where,","author":"pinch","version":26},{"n":969,"text":"\t\tlimit: number | undefined,","author":"pinch","version":26},{"n":970,"text":"\t\tpath: string | undefined,","author":"pinch","version":26},{"n":971,"text":"\t\tbefore: number | undefined,","author":"pinch","version":26},{"n":972,"text":"\t): Promise<LogAnswer> {","author":"pinch","version":26},{"n":973,"text":"\t\treturn this.json(\"GET\", `/log?${query({ ...where, limit, path, before })}`);","author":"pinch","version":26},{"n":974,"text":"\t}","author":"init","version":0},{"n":975,"text":"","author":"init","version":0},{"n":976,"text":"\tshow(version: number, where: Where): Promise<ShowAnswer> {","author":"init","version":0},{"n":977,"text":"\t\treturn this.json(\"GET\", `/show?${query({ version, ...where })}`);","author":"init","version":0},{"n":978,"text":"\t}","author":"init","version":0},{"n":979,"text":"","author":"init","version":0},{"n":980,"text":"\tfileAt(path: string, version: number, where: Where): Promise<{ path: string; version: number; text: string | null }> {","author":"init","version":0},{"n":981,"text":"\t\treturn this.json(\"GET\", `/file?${query({ path, version, ...where })}`);","author":"init","version":0},{"n":982,"text":"\t}","author":"init","version":0},{"n":983,"text":"","author":"init","version":0},{"n":984,"text":"\tcompare(from: number, to: number, where: Where): Promise<{ from: number; to: number; files: readonly FileChange[] }> {","author":"init","version":0},{"n":985,"text":"\t\treturn this.json(\"GET\", `/compare?${query({ from, to, ...where })}`);","author":"init","version":0},{"n":986,"text":"\t}","author":"candidates","version":186},{"n":987,"text":"","author":"candidates","version":186},{"n":988,"text":"\t/** Version `version` of shared with `versions` left out, or the refusal naming what builds on them. */","author":"candidates","version":186},{"n":989,"text":"\twithout(version: number, versions: readonly number[]): Promise<WithoutAnswer> {","author":"candidates","version":186},{"n":990,"text":"\t\treturn this.json(\"GET\", `/without?${query({ version, versions: versions.join(\",\") })}`);","author":"candidates","version":186},{"n":991,"text":"\t}","author":"init","version":0},{"n":992,"text":"","author":"init","version":0},{"n":993,"text":"\t/** A message to the project's other agents (or those named), delivered once as news. */","author":"init","version":0},{"n":994,"text":"\tstarting(","author":"init","version":0},{"n":995,"text":"\t\ttext: string | null,","author":"init","version":0},{"n":996,"text":"\t\tfiles?: readonly string[],","author":"init","version":0},{"n":997,"text":"\t\toptions: { issue?: number; done?: boolean } = {},","author":"init","version":0},{"n":998,"text":"\t): Promise<{","author":"init","version":0},{"n":999,"text":"\t\tstarting: { text: string; files: readonly string[]; time: number; issue?: number } | null;","author":"init","version":0},{"n":1000,"text":"\t\toverlaps: readonly Overlap[];","author":"init","version":0},{"n":1001,"text":"\t}> {","author":"init","version":0},{"n":1002,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"starting\"), {","author":"init","version":0},{"n":1003,"text":"\t\t\ttext,","author":"init","version":0},{"n":1004,"text":"\t\t\t...(files && files.length > 0 ? { files } : {}),","author":"init","version":0},{"n":1005,"text":"\t\t\t...(options.issue !== undefined ? { issue: options.issue } : {}),","author":"init","version":0},{"n":1006,"text":"\t\t\t...(options.done ? { done: true } : {}),","author":"init","version":0},{"n":1007,"text":"\t\t});","author":"init","version":0},{"n":1008,"text":"\t}","author":"init","version":0},{"n":1009,"text":"","author":"init","version":0},{"n":1010,"text":"\tannounce(text: string, to?: readonly string[]): Promise<{ id: number; to: readonly string[] }> {","author":"init","version":0},{"n":1011,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"announce\"), { text, ...(to ? { to } : {}) });","author":"init","version":0},{"n":1012,"text":"\t}","author":"init","version":0},{"n":1013,"text":"","author":"init","version":0},{"n":1014,"text":"\t/** The news waiting for this agent, handed over once. */","author":"init","version":0},{"n":1015,"text":"\tnews(): Promise<{ news: News; items?: readonly { readonly text: string; readonly at: number | null }[] }> {","author":"init","version":0},{"n":1016,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"news\"), {});","author":"init","version":0},{"n":1017,"text":"\t}","author":"init","version":0},{"n":1018,"text":"","author":"init","version":0},{"n":1019,"text":"\t/** A ticket that opens this agent's news stream once, within a minute (abso 690; news-stream.ts). */","author":"box-grants","version":269},{"n":1020,"text":"\tnewsTicket(): Promise<{ url: string; protocols: string[]; expiresAt: number | string }> {","author":"box-grants","version":285},{"n":1021,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"news/ticket\"), {});","author":"box-grants","version":269},{"n":1022,"text":"\t}","author":"box-grants","version":269},{"n":1023,"text":"","author":"box-grants","version":269},{"n":1024,"text":"\t/** This agent's unpublished changes, file by file. */","author":"init","version":0},{"n":1025,"text":"\tdiff(): Promise<DiffAnswer> {","author":"init","version":0},{"n":1026,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"diff\"), {});","author":"init","version":0},{"n":1027,"text":"\t}","author":"init","version":0},{"n":1028,"text":"","author":"pinch","version":52},{"n":1029,"text":"\t/** Another agent's recorded, unpublished changes, file by file: read only, as the website's drafts show them. */","author":"pinch","version":52},{"n":1030,"text":"\tdiffOf(agent: string): Promise<DiffAnswer> {","author":"pinch","version":52},{"n":1031,"text":"\t\treturn this.json(\"GET\", `/diff?${query({ agent })}`);","author":"pinch","version":52},{"n":1032,"text":"\t}","author":"pinch","version":52},{"n":1033,"text":"","author":"init","version":0},{"n":1034,"text":"\t/** Discard this agent's unpublished changes to `files` (null: all of them). */","author":"init","version":0},{"n":1035,"text":"\trestore(files: readonly string[] | null): Promise<RestoreAnswer> {","author":"init","version":0},{"n":1036,"text":"\t\treturn this.json(\"POST\", this.agentPath(\"restore\"), files === null ? { all: true } : { files });","author":"init","version":0},{"n":1037,"text":"\t}","author":"init","version":0},{"n":1038,"text":"","author":"init","version":0},{"n":1039,"text":"\twhy(file: string, line: number, view: View = {}, version?: number): Promise<WhyAnswer> {","author":"whytrail","version":193},{"n":1040,"text":"\t\treturn this.json(\"GET\", `/why?${query({ file, line, version, ...view })}`);","author":"whytrail","version":193},{"n":1041,"text":"\t}","author":"init","version":0},{"n":1042,"text":"","author":"init","version":0},{"n":1043,"text":"\twhere(): Promise<WhereAnswer> {","author":"init","version":0},{"n":1044,"text":"\t\treturn this.json(\"GET\", \"/where\");","author":"init","version":0},{"n":1045,"text":"\t}","author":"init","version":0},{"n":1046,"text":"","author":"init","version":0},{"n":1047,"text":"\t/**","author":"init","version":0},{"n":1048,"text":"\t * Send the folder as a tar.gz and run a command in the agent's box. Output","author":"init","version":0},{"n":1049,"text":"\t * goes to `io.out` as it arrives, and the box's stderr to `io.err` (the","author":"init","version":0},{"n":1050,"text":"\t * server keeps them apart when asked; an older one sends both as out).","author":"init","version":0},{"n":1051,"text":"\t * Answers the command's exit code.","author":"init","version":0},{"n":1052,"text":"\t *","author":"init","version":0},{"n":1053,"text":"\t * When the stream breaks before the exit line and the server gave the run","author":"init","version":0},{"n":1054,"text":"\t * an id, the run goes on in the box: this reconnects to it and carries on","author":"init","version":0},{"n":1055,"text":"\t * from the last output printed, so nothing is lost or printed twice. The","author":"init","version":0},{"n":1056,"text":"\t * command itself is never sent twice.","author":"init","version":0},{"n":1057,"text":"\t */","author":"init","version":0},{"n":1058,"text":"\tasync run(command: string, tarGz: Uint8Array<ArrayBuffer>, io: RunIO): Promise<number> {","author":"init","version":0},{"n":1059,"text":"\t\tconst res = await postRun(this, command, tarGz, io.onRetry, io.replace, io.fresh);","author":"init","version":0},{"n":1060,"text":"\t\t// X-Abso-Box: cold means the box started for this run; X-Abso-Prep says whether it started from the prep (#37).","author":"pinch","version":54},{"n":1061,"text":"\t\tio.onBox?.(res.headers.get(\"x-abso-box\") === \"cold\", res.headers.get(\"x-abso-prep\") ?? undefined);","author":"pinch","version":54},{"n":1062,"text":"\t\treturn follow(this, res, res.headers.get(\"x-abso-run\"), { at: 0, errAt: 0 }, io);","author":"pinch","version":54},{"n":1063,"text":"\t}","author":"init","version":0},{"n":1064,"text":"","author":"init","version":0},{"n":1065,"text":"\t/**","author":"init","version":0},{"n":1066,"text":"\t * Start a run and answer its id without waiting: the job goes on in the box","author":"init","version":0},{"n":1067,"text":"\t * after this connection closes (abso run --detach; abso logs <id> follows it).","author":"init","version":0},{"n":1068,"text":"\t */","author":"init","version":0},{"n":1069,"text":"\tasync startRun(","author":"init","version":0},{"n":1070,"text":"\t\tcommand: string,","author":"init","version":0},{"n":1071,"text":"\t\ttarGz: Uint8Array<ArrayBuffer>,","author":"init","version":0},{"n":1072,"text":"\t\tonRetry?: (why: string, attempt: number) => void,","author":"init","version":0},{"n":1073,"text":"\t\treplace = false,","author":"init","version":0},{"n":1074,"text":"\t): Promise<string> {","author":"init","version":0},{"n":1075,"text":"\t\tconst res = await postRun(this, command, tarGz, onRetry, replace);","author":"init","version":0},{"n":1076,"text":"\t\tconst id = res.headers.get(\"x-abso-run\");","author":"pinch","version":54},{"n":1077,"text":"\t\tif (id === null) {","author":"init","version":0},{"n":1078,"text":"\t\t\t// No id: the box failed before the job started ({\"error\"} in the body), or the server can't detach.","author":"init","version":0},{"n":1079,"text":"\t\t\tawait consumeRun(res, { out: () => {} }, { at: 0, errAt: 0 });","author":"init","version":0},{"n":1080,"text":"\t\t\tthrow new ApiError(\"this server gives runs no id, so a run can't be detached\");","author":"init","version":0},{"n":1081,"text":"\t\t}","author":"init","version":0},{"n":1082,"text":"\t\tawait res.body?.cancel();","author":"init","version":0},{"n":1083,"text":"\t\treturn id;","author":"init","version":0},{"n":1084,"text":"\t}","author":"init","version":0},{"n":1085,"text":"","author":"init","version":0},{"n":1086,"text":"\t/** A run's output from its start, for as long as the box keeps it, until it ends (abso logs). Answers its exit code. */","author":"init","version":0},{"n":1087,"text":"\tasync logs(id: string, io: RunIO): Promise<number> {","author":"init","version":0},{"n":1088,"text":"\t\tlet res: Response;","author":"init","version":0},{"n":1089,"text":"\t\ttry {","author":"init","version":0},{"n":1090,"text":"\t\t\tres = await this.send(followUrl(this, id, { at: 0, errAt: 0 }), { headers: this.headers() });","author":"pinch","version":88},{"n":1091,"text":"\t\t} catch (err) {","author":"init","version":0},{"n":1092,"text":"\t\t\tconst e = err as Error;","author":"init","version":0},{"n":1093,"text":"\t\t\tthrow new ApiError(","author":"init","version":0},{"n":1094,"text":"\t\t\t\t`could not reach ${this.config.server}: ${(e.cause as Error | undefined)?.message ?? e.message}`,","author":"init","version":0},{"n":1095,"text":"\t\t\t);","author":"init","version":0},{"n":1096,"text":"\t\t}","author":"init","version":0},{"n":1097,"text":"\t\tif (res.status === 404) throw new ApiError(`no run ${id} in this box: ${errorSentence(await res.text())}`, 404);","author":"init","version":0},{"n":1098,"text":"\t\tif (!res.ok || res.body === null)","author":"init","version":0},{"n":1099,"text":"\t\t\tthrow new ApiError(`logs answered ${res.status}: ${errorSentence(await res.text())}`, res.status);","author":"init","version":0},{"n":1100,"text":"\t\treturn follow(this, res, id, { at: 0, errAt: 0 }, io);","author":"init","version":0},{"n":1101,"text":"\t}","author":"init","version":0},{"n":1102,"text":"}","author":"init","version":0}],"authors":[{"agent":"init","lines":705},{"agent":"pinch","lines":246},{"agent":"groups","lines":72},{"agent":"autosettle","lines":21},{"agent":"devops","lines":19},{"agent":"codex-prose-authorship-1","lines":7},{"agent":"candidates","lines":6},{"agent":"codex-capacity-chair","lines":6},{"agent":"box-grants","lines":5},{"agent":"infra-pipeline","lines":5},{"agent":"infra-split","lines":5},{"agent":"review","lines":3},{"agent":"whytrail","lines":2}],"older":null,"followed":null,"life":{"versions":30,"last":{"version":287,"agent":"pinch","time":1792119778236,"timeIso":"2026-10-16T03:02:58.236Z","message":"Local projects: abso init --local keeps a project's history on this machine, with no server, sign-in or network\n\nA local folder's calls never leave the process. The client runs the open server's own router and project object (server/src) in-process, over Node's built-in SQLite. It's the same engine with the same answers, so what the commands print matches a server.\n\n- abso init --local [--project <name>] [--agent <name>] [--store <folder>] makes the project, and abso join <project> --local adds a folder. After that, record, push, pull, log, blame and the held collisions work as usual. The folder's config says \"server\": \"local\".\n- Where the store lives: --store (kept in the folder's config; a store inside the folder is left out of its files through .absoignore), else ABSO_STORE, else this user's data folder: %LOCALAPPDATA%\\abso\\store, ~/Library/Application Support/abso/store, or $XDG_DATA_HOME/abso/store. Nothing needs a writable home folder when ABSO_STORE or --store is set.\n- Each project is <store>/<project>/project.sqlite. Every call runs in one SQLite write transaction, which is the store's lock: other processes wait for it, and a process that dies mid-call keeps nothing half-written. A process reloads the project only when SQLite's data_version shows another process wrote.\n- No credential goes with a local folder's calls. The edit mod leaves local folders alone, so abso record sends their edits. Issues, asks and news aren't in local projects yet.\n- Needs Node 22.13 or later (node:sqlite); its experimental warning is kept out of the output. Run as .ts, a module hook supplies the Durable Object base class (client/src/durable-object-stand-in.ts); the build aliases cloudflare:workers to the same file. client/src/local-server.mjs, with its .d.mts, keeps the client's typecheck out of server/src, which has its own.\n- Each command closes the store files it opened.\n\nTests: local (8, with fetch replaced by one that throws: init, record, push, join, pull, log, blame, a held collision, --store inside the folder, refusals), plus failed-start, install, caller, doctor, lost-pull, help, body-files: 60 pass; tsc clean. The bundle built with the alias runs init, push and log locally."},"made":{"version":0,"agent":"init","time":1791506895507,"timeIso":"2026-10-09T00:48:15.507Z","message":"Start the project"},"removed":null,"next":null},"since":null,"paths":[".absoignore",".gitignore","LICENSE","README.md","abso.json","biome.json","client/.claude-plugin/plugin.json","client/README.md","client/abso.ts","client/avcs.ts","client/hooks/hooks.json","client/hooks/register.test.ts","client/hooks/register.ts","client/hooks/stamp.ts","client/install-mod.ts","client/install-view.ts","client/launch.mjs","client/scripts/import-git.ts","client/skills/abso/SKILL.md","client/src/announce.ts","client/src/api-answers.ts","client/src/api-error.ts","client/src/api.ts","client/src/args.ts","client/src/at.ts","client/src/autosettle-commands.ts","client/src/blobs.ts","client/src/body-files.ts","client/src/box-commands.ts","client/src/box-run.ts","client/src/box.ts","client/src/changes.ts","client/src/check-ignore.ts","client/src/ci-answers.ts","client/src/ci.ts","client/src/clean-files.ts","client/src/client-version.ts","client/src/collision-text.ts","client/src/command-env.ts","client/src/commands.ts","client/src/config.ts","client/src/core.ts","client/src/diff.ts","client/src/doctor.ts","client/src/drafts.ts","client/src/durable-object-stand-in.ts","client/src/env-names.ts","client/src/export.ts","client/src/fetch.ts","client/src/flag-commands.ts","client/src/folder.ts","client/src/git-origin.ts","client/src/group-commands.ts","client/src/history-answers.ts","client/src/history.ts","client/src/hook.ts","client/src/install.ts","client/src/issues-wire.ts","client/src/issues.ts","client/src/join-commands.ts","client/src/key-admin.ts","client/src/local-server.d.mts","client/src/local-server.mjs","client/src/local-store.ts","client/src/lock.ts","client/src/main.ts","client/src/mcp.ts","client/src/modes.ts","client/src/news-stream.ts","client/src/open-browser.ts","client/src/orgs.ts","client/src/pipeline-commands.ts","client/src/project-file.ts","client/src/publish-commands.ts","client/src/queue.ts","client/src/record-batches.ts","client/src/review.ts","client/src/safety.ts","client/src/serve-commands.ts","client/src/server-choice.ts","client/src/settle.ts","client/src/skill.ts","client/src/state-dir.ts","client/src/status-commands.ts","client/src/tar.ts","client/src/terminal-text.ts","client/src/times.ts","client/src/versions.ts","client/src/visibility-commands.ts","client/src/visitor.ts","client/src/web-session.ts","client/src/without.ts","client/test-mods.ts","client/test/api-request-id.test.ts","client/test/attach.test.ts","client/test/autosettle-command.test.ts","client/test/body-files.test.ts","client/test/box.test.ts","client/test/caller.test.ts","client/test/ci-runs.test.ts","client/test/client-version.test.ts","client/test/client.test.ts","client/test/comment-parts.test.ts","client/test/diff.test.ts","client/test/doctor.test.ts","client/test/env-names.test.ts","client/test/error-sentence.test.ts","client/test/failed-start.test.ts","client/test/fake-server.ts","client/test/flag-command.test.ts","client/test/group-commands.test.ts","client/test/held-push.test.ts","client/test/help.test.ts","client/test/ignore.test.ts","client/test/imported-history.test.ts","client/test/init-credential.test.ts","client/test/install.test.ts","client/test/issues.test.ts","client/test/join-empty.test.ts","client/test/join-signed-out.test.ts","client/test/key-admin.test.ts","client/test/key.test.ts","client/test/launch.test.ts","client/test/local.test.ts","client/test/lost-pull.test.ts","client/test/new-folder-dir.test.ts","client/test/news-stream.test.ts","client/test/open-browser.test.ts","client/test/orgs.test.ts","client/test/pipeline-commands.test.ts","client/test/push-ci-where.test.ts","client/test/queue-waiting.test.ts","client/test/record-batches.test.ts","client/test/run-key.test.ts","client/test/server-flag.test.ts","client/test/setup.ts","client/test/skill.test.ts","client/test/terminal-text.test.ts","client/test/times.test.ts","client/test/token-file.test.ts","client/test/visitor.test.ts","client/test/web-session.test.ts","client/test/why-trail.test.ts","client/view/.claude-plugin/plugin.json","client/view/hooks/hooks.json","client/view/hooks/register.test.ts","client/view/hooks/register.tsx","client/view/hooks/stamp.ts","client/view/types/index.d.ts","docs/readme/abso-core-on-abso.png","docs/readme/open-in-abso.svg","package-lock.json","package.json","scripts/autosettle/STORIES.md","scripts/autosettle/clef.ts","scripts/autosettle/extract.ts","scripts/autosettle/jev.ts","scripts/autosettle/replay.ts","scripts/autosettle/rules.ts","scripts/autosettle/score.ts","scripts/autosettle/settle-one.ts","scripts/autosettle/workers-ai.ts","scripts/autosettle/workers-ai/index.ts","scripts/autosettle/workers-ai/wrangler.jsonc","scripts/build-client.mjs","scripts/check-changed.mjs","scripts/check-changed.test.ts","scripts/local-measure.ts","scripts/local-writers.ts","scripts/pack-npm.mjs","server/README.md","server/STORAGE-FORMATS.md","server/package-lock.json","server/package.json","server/scale/README.md","server/scale/results/scale-mv6vy4y3-10x5.json","server/scale/results/scale-mv6vzxzj-100x10.json","server/scale/results/scale-mv6vzxzj-10x5.json","server/scale/results/scale-mv6vzxzj-1x1.json","server/scale/results/scale-mv6vzxzj-200x20.json","server/scale/results/scale-mv6vzxzj-50x10.json","server/scale/results/scale-mv6vzxzj-ramp.json","server/scale/scale.mjs","server/scripts/capacity-git-bounded-fifo.mjs","server/scripts/capacity-install-git-runtime.mjs","server/scripts/capacity-patch-git-fetch.mjs","server/scripts/capacity-patch-git-progress.mjs","server/scripts/capacity-patch-git-pump.mjs","server/scripts/capacity-patch-git-push.mjs","server/scripts/capacity-patch-git-sideband.mjs","server/src/autosettle.ts","server/src/blobs.ts","server/src/decoded-frames.ts","server/src/disk-first-runtime.ts","server/src/engine-project.ts","server/src/env.ts","server/src/git-blob-text.ts","server/src/git-delta-stream.ts","server/src/git-disk-intake.ts","server/src/git-file-contents.ts","server/src/git-http.ts","server/src/git-intake-limit.ts","server/src/git-intake-trees.ts","server/src/git-object-bytes.ts","server/src/git-pack-decode.ts","server/src/git-pack-resolver.ts","server/src/git-pack-spool.ts","server/src/history-host.ts","server/src/history-state.ts","server/src/index.ts","server/src/ingest.ts","server/src/issues-entry.ts","server/src/issues/index.ts","server/src/issues/routes.ts","server/src/issues/seats.ts","server/src/issues/serve.ts","server/src/issues/store.ts","server/src/json-chunk-cursor.ts","server/src/json-events.ts","server/src/keys.ts","server/src/memory-fs.ts","server/src/project-object.ts","server/src/projection-store.ts","server/src/push-snapshot.ts","server/src/push.ts","server/src/request-identity-digest.ts","server/src/router.ts","server/src/small-frame-json.ts","server/src/stored-json-view.ts","server/src/stored-json.ts","server/src/writer-host.ts","server/test/atom-list-history.test.ts","server/test/blobs.test.ts","server/test/canonical-frame-numbers.test.ts","server/test/decoded-adoption-bounds.test.ts","server/test/decoded-entry-adoption.test.ts","server/test/decoded-frames-small.test.ts","server/test/decoded-frames.test.ts","server/test/definition-scratch-runtime.test.ts","server/test/disk-first-runtime.test.ts","server/test/e2e-transcript.md","server/test/engine-project.test.ts","server/test/frame-chunks.test.ts","server/test/git-blob-text.test.ts","server/test/git-budget-recovery.test.ts","server/test/git-delta-stream.test.ts","server/test/git-disk-clone.test.ts","server/test/git-export-http.test.ts","server/test/git-file-contents.test.ts","server/test/git-intake-trees.test.ts","server/test/git-object-bytes.test.ts","server/test/git-pack-decode.test.ts","server/test/git-pack-resolver.test.ts","server/test/git-pack-spool.test.ts","server/test/helpers.ts","server/test/history-host.test.ts","server/test/history-recovery.test.ts","server/test/history-state.test.ts","server/test/issues/ask-threads.test.ts","server/test/issues/changes.test.ts","server/test/issues/issues.test.ts","server/test/issues/news.test.ts","server/test/issues/serve.test.ts","server/test/json-chunk-cursor.test.ts","server/test/json-events.test.ts","server/test/long-text-history.test.ts","server/test/project-object-disk-first.test.ts","server/test/projected-compare.test.ts","server/test/projected-diff.test.ts","server/test/projected-move-sync.test.ts","server/test/projected-move.test.ts","server/test/projected-path-history.test.ts","server/test/projected-queue.test.ts","server/test/projected-restore.test.ts","server/test/projected-sync.test.ts","server/test/push-snapshot-batch.test.ts","server/test/push-snapshot.test.ts","server/test/push.test.ts","server/test/request-identity-digest.test.ts","server/test/router.test.ts","server/test/small-frame-integrity.test.ts","server/test/small-frame-json.test.ts","server/test/stored-json-view.test.ts","server/test/stored-json.test.ts","server/test/streamed-history-host.test.ts","server/test/streamed-large-frame.test.ts","server/test/streamed-large-history.test.ts","server/test/streamed-log-append.test.ts","server/test/streamed-log-transaction.test.ts","server/test/streamed-writer-adoption.test.ts","server/test/writer-host.test.ts","server/test/writer-long-atom.test.ts","server/tsconfig.json","server/wrangler.jsonc","src/caller.ts","src/engine/build.ts","src/engine/child-counts.ts","src/engine/conflicts.ts","src/engine/experimental/projection-atom-adoption.ts","src/engine/experimental/projection-atom-index.ts","src/engine/experimental/projection-locator.ts","src/engine/experimental/projection-marker.ts","src/engine/experimental/projection-move-adoption.ts","src/engine/experimental/projection-move-resolution.ts","src/engine/experimental/projection-overlay-storage.ts","src/engine/experimental/projection-priority.ts","src/engine/experimental/projection-read-scope.ts","src/engine/experimental/projection-reader.ts","src/engine/experimental/projection-records.ts","src/engine/experimental/projection-root.ts","src/engine/experimental/projection-sequence.ts","src/engine/experimental/projection-snapshots.ts","src/engine/graph.ts","src/engine/index.ts","src/engine/json-value-chunks.ts","src/engine/keys.ts","src/engine/labels.ts","src/engine/ordered-index.ts","src/engine/projection-scratch.ts","src/engine/relocation-scratch.ts","src/engine/sets.ts","src/engine/state-source.ts","src/engine/stored-text.ts","src/engine/test/attribute-projection.test.ts","src/engine/test/build-lazy-lines.test.ts","src/engine/test/build.test.ts","src/engine/test/child-counts.test.ts","src/engine/test/concurrent.test.ts","src/engine/test/conflicts.test.ts","src/engine/test/gen.ts","src/engine/test/graph-atom-list-integrity.test.ts","src/engine/test/graph-atom-list-pages.test.ts","src/engine/test/graph-atom-list-rollback.test.ts","src/engine/test/graph-atom-lists.test.ts","src/engine/test/graph-deletion-pages.test.ts","src/engine/test/graph-deletion-rollback.test.ts","src/engine/test/graph-index-dedup.test.ts","src/engine/test/graph-insertion-integrity.test.ts","src/engine/test/graph-insertion-runs.test.ts","src/engine/test/graph-insertion-storage.test.ts","src/engine/test/graph-line-chunks.test.ts","src/engine/test/graph-long-text.test.ts","src/engine/test/graph-metadata-indexed.test.ts","src/engine/test/graph-move-write-membership.test.ts","src/engine/test/graph-replacement-membership.test.ts","src/engine/test/graph-validation-scratch.test.ts","src/engine/test/graph.test.ts","src/engine/test/helpers.ts","src/engine/test/json-string-chunks.test.ts","src/engine/test/json-value-chunks.test.ts","src/engine/test/lamport-pages.test.ts","src/engine/test/moves.test.ts","src/engine/test/ordered-index.test.ts","src/engine/test/packed-files.test.ts","src/engine/test/projection-atom-adoption.test.ts","src/engine/test/projection-atom-index.test.ts","src/engine/test/projection-locator.test.ts","src/engine/test/projection-marker-cycle.test.ts","src/engine/test/projection-marker-move-failures.test.ts","src/engine/test/projection-marker.test.ts","src/engine/test/projection-membership-iterator.test.ts","src/engine/test/projection-move-resolution.test.ts","src/engine/test/projection-overlay-storage.test.ts","src/engine/test/projection-priority.test.ts","src/engine/test/projection-read-scope.test.ts","src/engine/test/projection-reader-integrity.test.ts","src/engine/test/projection-reader.test.ts","src/engine/test/projection-records.test.ts","src/engine/test/projection-root.test.ts","src/engine/test/projection-scratch.test.ts","src/engine/test/projection-sequence.test.ts","src/engine/test/projection-snapshots.test.ts","src/engine/test/properties.test.ts","src/engine/test/reachability-scratch.test.ts","src/engine/test/reasons-to.test.ts","src/engine/test/record-query-contract.test.ts","src/engine/test/relocation-scratch.test.ts","src/engine/test/scenarios.test.ts","src/engine/test/sets.test.ts","src/engine/test/stable-set-algebra.test.ts","src/engine/test/state-cache.test.ts","src/engine/test/state-source.test.ts","src/engine/test/storage-helper.ts","src/engine/test/stored-list-array.test.ts","src/engine/test/stored-list-integrity.test.ts","src/engine/test/stored-text.test.ts","src/engine/test/streamed-diff.test.ts","src/engine/test/text.test.ts","src/engine/test/view.test.ts","src/engine/test/visible-neighbours.test.ts","src/engine/text.ts","src/engine/types.ts","src/engine/view.ts","src/gitview/errors.ts","src/gitview/index.ts","src/gitview/ingest.ts","src/gitview/plain.ts","src/gitview/test/helpers.ts","src/gitview/test/ingest.test.ts","src/gitview/test/random.test.ts","src/gitview/test/view.test.ts","src/gitview/trailers.ts","src/gitview/tree.ts","src/gitview/view.ts","src/pipeline/pipeline.ts","src/pipeline/plan.ts","src/pipeline/test/pipeline.test.ts","src/pipeline/test/plan.test.ts","tsconfig.json","worker/project/add-draft.ts","worker/project/amend.ts","worker/project/announce.ts","worker/project/apply-entry.ts","worker/project/autosettle.ts","worker/project/blame.ts","worker/project/change-records.ts","worker/project/changes-since.ts","worker/project/check-clash.ts","worker/project/collisions.ts","worker/project/definition-code.ts","worker/project/definition-rule.ts","worker/project/definitions.ts","worker/project/draft-collisions.ts","worker/project/draft-diff.ts","worker/project/draft-state.ts","worker/project/drop.ts","worker/project/edit.ts","worker/project/express-moves.ts","worker/project/feed.ts","worker/project/globs.ts","worker/project/history.ts","worker/project/http.ts","worker/project/ingest.ts","worker/project/init.ts","worker/project/kept-parts.ts","worker/project/label.ts","worker/project/land.ts","worker/project/lifecycle-permit-contract.ts","worker/project/markers.ts","worker/project/memory-store.ts","worker/project/merge-identical.ts","worker/project/move-line-text.ts","worker/project/move.ts","worker/project/names.ts","worker/project/news.ts","worker/project/notes.ts","worker/project/operation-protocol.ts","worker/project/overlaps.ts","worker/project/path-rules.ts","worker/project/pathindex.ts","worker/project/pathkey.ts","worker/project/pluck.ts","worker/project/project-api.ts","worker/project/project-error.ts","worker/project/project-helpers.ts","worker/project/project-status.ts","worker/project/project-types.ts","worker/project/project.ts","worker/project/projection-provider.ts","worker/project/publish-of.ts","worker/project/publish.ts","worker/project/queue-driver.ts","worker/project/queue.ts","worker/project/record-file.ts","worker/project/record.ts","worker/project/refuse.ts","worker/project/restore.ts","worker/project/spaces.ts","worker/project/spelling.ts","worker/project/start.ts","worker/project/switch-to.ts","worker/project/sync.ts","worker/project/test/after-read.test.ts","worker/project/test/agent-views-shared.test.ts","worker/project/test/announce-person.test.ts","worker/project/test/appends.test.ts","worker/project/test/attributes.test.ts","worker/project/test/author-totals.test.ts","worker/project/test/authors-stored.test.ts","worker/project/test/autosettle.test.ts","worker/project/test/bench.ts","worker/project/test/blobs-stored.test.ts","worker/project/test/blobs.test.ts","worker/project/test/changed-definition.test.ts","worker/project/test/changes.test.ts","worker/project/test/collision-streaming.test.ts","worker/project/test/collisions-kept-views.test.ts","worker/project/test/compare-summary.test.ts","worker/project/test/definition-code.test.ts","worker/project/test/definitions.test.ts","worker/project/test/draft-files-kept.test.ts","worker/project/test/draft-reads-stored.test.ts","worker/project/test/drop.test.ts","worker/project/test/express-moves-early.test.ts","worker/project/test/file-exact-at.test.ts","worker/project/test/files-reads.test.ts","worker/project/test/history.test.ts","worker/project/test/ingest.test.ts","worker/project/test/issues.test.ts","worker/project/test/kept-parts.test.ts","worker/project/test/known-paths.test.ts","worker/project/test/labels.test.ts","worker/project/test/land-streaming.test.ts","worker/project/test/lifecycle-permit-contract.test.ts","worker/project/test/markers.test.ts","worker/project/test/membership-cache.test.ts","worker/project/test/membership-pages.test.ts","worker/project/test/merge.test.ts","worker/project/test/move-line-text.test.ts","worker/project/test/move-reconstruction.test.ts","worker/project/test/moves.test.ts","worker/project/test/named-drafts.test.ts","worker/project/test/news-cap.test.ts","worker/project/test/news-lazy.test.ts","worker/project/test/news-lines.test.ts","worker/project/test/news-times.test.ts","worker/project/test/news-written.test.ts","worker/project/test/notes.test.ts","worker/project/test/operation-protocol.test.ts","worker/project/test/order.test.ts","worker/project/test/owed-definition-news.test.ts","worker/project/test/packed-crossings.test.ts","worker/project/test/paths.test.ts","worker/project/test/pluck.test.ts","worker/project/test/project-file.test.ts","worker/project/test/project-writer-storage.test.ts","worker/project/test/project.test.ts","worker/project/test/projection-integration.test.ts","worker/project/test/queue-driver.test.ts","worker/project/test/queue.test.ts","worker/project/test/queued-moves.test.ts","worker/project/test/record-idempotence.test.ts","worker/project/test/record-stream.test.ts","worker/project/test/review-fixes.test.ts","worker/project/test/reviewers.test.ts","worker/project/test/same-line.test.ts","worker/project/test/seat-notice.test.ts","worker/project/test/shared-additions.test.ts","worker/project/test/spelling-clash.test.ts","worker/project/test/spelling.test.ts","worker/project/test/starting.test.ts","worker/project/test/stored-closure.test.ts","worker/project/test/stored-membership.test.ts","worker/project/test/tells.test.ts","worker/project/test/told-buckets.test.ts","worker/project/test/touched-beyond.test.ts","worker/project/test/trail.test.ts","worker/project/test/unseen.test.ts","worker/project/test/version-files.test.ts","worker/project/test/view-cache.test.ts","worker/project/test/where-many-agents.test.ts","worker/project/test/whole.test.ts","worker/project/test/without.test.ts","worker/project/test/writer-adoption.test.ts","worker/project/trail.ts","worker/project/tree.ts","worker/project/unseen.ts","worker/project/version-files.ts","worker/project/version-log.ts","worker/project/version-meta.ts","worker/project/view-changes.ts","worker/project/views.ts","worker/project/where.ts","worker/project/whole-files.ts","worker/project/without.ts","worker/project/writer-agents.ts"],"working":{"version":318,"agents":[]},"agentChanges":[],"overlaps":{"version":318,"agents":["codex-capacity-chair","codex-capacity-policy","review"],"collisions":[]}}