Versions 5 to 318
Lines 1–8 at 318 (were 1–6 at 5)
3+
46
Lines 49–59 at 318 (were 47–55 at 5)
4850
50− * What a reader may not do. Edits and records (which old edit mods send on
51− * their own) and publishes answer 200 {ok: false, reason}, so a mod only logs
52− * it; the rest are refused outright.
Lines 70–81 at 318 (were 66–75 at 5)
6771
73+/** A path under a folder's state folder (.abso/, or .avcs/ from before the rename), which never leaves it. */
70− return paths.find((p) => p === ".avcs" || p.startsWith(".avcs/") || p.startsWith("./.avcs/"));
75+ return paths.find((p) => [".abso", ".avcs"].some((d) => p === d || p.startsWith(`${d}/`) || p.startsWith(`./${d}/`)));
72−const LOCAL = (p: string) => fail(400, `${p} is under .avcs/, which stays in the agent's folder`);
78+ fail(400, `${p} is under ${p.replace(/^\.\//, "").split("/")[0]}/, which stays in the agent's folder`);
7379
Lines 100–106 at 318 (were 94–100 at 5)
97− `${agent} has unpublished changes; publish or restore them (abso restore --all) before it becomes a reader`,
103+ `${agent} has unpushed changes; push or restore them (abso restore --all) before it becomes a reader`,
Lines 318–328 at 318 (were 312–322 at 5)
312318 return { status: 200, body: history.blame(q.file, num(q.from), num(q.to), num(q.version), draft, who) };
315− return { status: 200, body: history.why(q.file, line, draft, who) };
319− // a body field anyone can fill in (Security, #31).
320326 return fail(400, "announce from your own agent: POST /p/:project/a/<you>/announce {text, to?}");
Lines 352–368 at 318 (were 346–351 at 5)
346352 const limit = q.limit !== undefined && Number.isInteger(Number(q.limit)) ? Number(q.limit) : undefined;
356+ // GET ?version=<n>&versions=<n,n>: version n of shared with those versions left out (without.ts).
360+ const version = q.version !== undefined && /^\d+$/.test(q.version) ? Number(q.version) : undefined;
362+ if (version === undefined || versions.length === 0 || versions.some((s) => !/^\s*\d+\s*$/.test(s)))
350367 // GETs: ?draft=<name> (shared when absent); log ?limit, ?path; show ?version; file ?path, ?version; compare ?from, ?to.
Lines 394–401 at 318 (were 377–383 at 5)
379396 if (from === undefined || to === undefined) return fail(400, "compare needs ?from=<number>&to=<number>");
380− return { status: 200, body: history.compare(from, to, draft, who) };
383401 if (q.version === undefined || !Number.isInteger(version)) return fail(400, "show needs ?version=<number>");
Lines 444–452 at 318 (were 426–432 at 5)
429− if (typeof message !== "string" || !message.trim()) return fail(400, "publish needs {message} saying why");
447+ if (typeof message !== "string" || !message.trim()) return fail(400, "push needs {message} saying why");
431451 return { status: 200, body: project.publish(agent, message, (body as { asIs?: unknown }).asIs === true) };
Lines 456–462 at 318 (were 436–442 at 5)
439− if (!history.syncFull) return fail(501, "a full sync needs the engine");
440460 if (label !== undefined && typeof label !== "string") return fail(400, "label must be a label name");
Lines 484–491 at 318 (were 464–469 at 5)
466486 if (typeof message !== "string" || !message.trim()) return fail(400, "land needs {message} saying why");
Lines 511–518 at 318 (were 489–494 at 5)
491513 if (typeof message !== "string" || !message.trim()) return fail(400, "amend needs {message}");
Lines 529–536 at 318 (were 505–510 at 5)
505529 if (!Array.isArray(b.versions) || b.versions.length === 0 || !b.versions.every((v) => Number.isInteger(v)))
507531 if (typeof b.message !== "string" || !b.message.trim()) return fail(400, "pluck needs {message} saying why");
510536 body: history.pluck(agent, b.draft, b.versions as number[], b.message, b.withDependencies === true),
Lines 544–551 at 318 (were 518–523 at 5)
518544 if (!Array.isArray(b.versions) || b.versions.length === 0 || !b.versions.every((v) => Number.isInteger(v)))
520546 if (typeof b.message !== "string" || !b.message.trim()) return fail(400, "drop needs {message} saying why");
521549 return { status: 200, body: history.drop(agent, b.versions as number[], b.message, b.withDependents === true) };
Lines 563–570 at 318 (were 535–540 at 5)
537565 if (op === "note-close") return { status: 200, body: history.closeNote(agent, b.id as number, b.how) };
Lines 574–581 at 318 (were 544–549 at 5)
547579 if (b.to !== undefined && (!Array.isArray(b.to) || !b.to.every((a) => typeof a === "string")))
549581 return { status: 200, body: history.announce(agent, b.text, b.to as string[] | undefined, how) };
Lines 587–594 at 318 (were 555–560 at 5)
555587 const b = (body ?? {}) as { text?: unknown; files?: unknown; issue?: unknown; done?: unknown };
558592 if (b.files !== undefined && (!Array.isArray(b.files) || !b.files.every((f) => typeof f === "string")))
560594 // issue (#54): the issue the note works on; done: a take-back because the work is finished, closing it.
- MCP
- compare on this site's /mcp
- CLI
- abso diff 5 318 worker/project/http.ts --json
- JSON
- /christopher/abso-core/compare/5..318?file=worker%2Fproject%2Fhttp.ts&format=json