Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed

Versions 116 to 318

Compare

+17 −8 in 5 places
Lines 3–9 at 318 (were 3–8 at 116)
33// which space) is applied first, in spaces.ts.
44
55import type { AtomId, Graph } from "../../src/engine/index.ts";
6+import { capNews, outlastsSync } from "./news.ts";
67import { ProjectError } from "./project-error.ts";
78import type {
89 AgentState,
Lines 113–119 at 318 (were 112–117 at 116)
112113 }
113114 host.joinChange(agent, entry, at, space.name === SHARED ? null : space.name);
114115 agent.marked = agent.marked.filter((r) => r.space !== (entry.space ?? SHARED));
116+ delete agent.held;
115117 if (entry.queued !== undefined) host.setQueued(host.queued().filter((q) => q.id !== entry.queued));
116118 break;
117119 }
Lines 201–207 at 318 (were 199–204 at 116)
199201 host.setAnnounced(Math.max(host.announced(), id));
200202 tellSent(host.tells, id, entry.text[i] ?? entry.text[0] ?? "", agent.name, time);
201203 });
204+ capNews(agent);
202205 break;
203206 }
204207 case "discard": {
Lines 213–223 at 318 (were 210–220 at 116)
210213 }
211214 case "heard": {
212215 const agent = host.agentOf(entry.agent);
213− // A sync's stale heard keeps announcements, so it hears no tell.
216+ // A sync's stale heard keeps announcements and settles' news (outlastsSync), so it hears no tell.
214217 if (entry.stale !== true)
215218 for (const tell of host.tells.values())
216219 if (tell.heard.get(agent.name) === null) tell.heard.set(agent.name, { at: time });
217− const keep = agent.news.map((t) => entry.stale === true && t.startsWith("Announcement from "));
220+ const keep = agent.news.map((t) => entry.stale === true && outlastsSync(t));
218221 agent.news = agent.news.filter((_, i) => keep[i]);
219222 agent.newsAt = agent.newsAt.filter((_, i) => keep[i]);
220223 break;
Lines 246–274 at 318 (were 243–265 at 116)
243246 via: entry.via,
244247 time: entry.time,
245248 collisions: entry.collisions.map((c) => ({ ...c })),
249+ ...(entry.message ? { message: entry.message } : {}),
246250 });
247251 {
248252 // On the change the agent was working on, when there is one (#44).
249253 const agent = host.agentOf(entry.agent);
250254 host.active(agent, entry.time);
251255 const id = host.currentChange(agent, entry.time);
256+ const refusal = {
257+ at,
258+ time: entry.time,
259+ kinds: [...new Set(entry.collisions.map((c) => c.kind))].sort(),
260+ files: [...new Set(entry.collisions.map((c) => c.file))].sort(),
261+ ...(entry.message ? { message: entry.message } : {}),
262+ };
252263 if (id !== undefined) {
253264 const rec = host.changeRecord(id, agent, entry.time);
254− rec.refusals.push({
255− at,
256− time: entry.time,
257− kinds: [...new Set(entry.collisions.map((c) => c.kind))].sort(),
258− files: [...new Set(entry.collisions.map((c) => c.file))].sort(),
259− });
265+ rec.refusals.push({ ...refusal, files: [...refusal.files], kinds: [...refusal.kinds] });
260266 rec.last = at;
261267 host.changes.set(id, rec);
262268 }
269+ // Kept until it pushes: the settle tells the held push's reason, and its change lists the refusal.
270+ if (entry.via === "publish")
271+ agent.held = [...(agent.held ?? []), { ...refusal, ...(id !== undefined ? { change: id } : {}) }];
263272 }
264273 break;
265274 case "switch": {
MCP
compare on this site's /mcp
CLI
abso diff 116 318 worker/project/apply-entry.ts --json
JSON
/christopher/abso-core/compare/116..318?file=worker%2Fproject%2Fapply-entry.ts&format=json