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 294 to 295

Compare

+44 −4 in 7 places
Lines 105–115 at 295 (were 105–113 at 294)
105105 addressedItem,
106106 newsAboutOwnDraft as hostedNewsAboutOwnDraft,
107107 newsForOthers as hostedNewsForOthers,
108+ definitionNewsOwed as hostedDefinitionNewsOwed,
108109 markedItem,
109110 type NewsHost,
110111 type NewsItem,
112+ type OwedDefinitionNews,
111113 reviewItem,
112114 settledItem,
113115} from "./news.ts";
Lines 332–343 at 295 (were 330–335 at 294)
330332 * doesn't depend on it.
331333 */
332334 checkerReady = false;
335+ /**
336+ * Owed news (abso Capacity, 2026-10-15): a publish's definition news for other agents is left for after its write
337+ * (takeOwedDefinitionNews, definitionNewsOwed, deliverOwedNews). The disk route sets it; the replay engine doesn't.
338+ */
339+ owesDefinitionNews = false;
340+ #owed: OwedDefinitionNews[] = [];
333341 readonly #now: (() => number) | undefined;
334342 readonly #newsWritten: ((items: readonly NewsWritten[]) => void) | undefined;
335343 readonly #whole: ProjectOptions["whole"];
Lines 1345–1373 at 295 (were 1337–1342 at 294)
13371345 return hostedAnnouncePerson(this.#announceHost, ...args);
13381346 }
13391347
1348+ /** The definition news the writes since the last call owe other agents, handed over once (news.ts). */
1349+ takeOwedDefinitionNews(): OwedDefinitionNews[] {
1350+ const owed = this.#owed;
1351+ this.#owed = [];
1352+ return owed;
1353+ }
1355+ /** What a publish owes, worked out against its version (news.ts definitionNewsOwed). Reads only. */
1356+ definitionNewsOwed(owed: OwedDefinitionNews): { agent: string; items: NewsItem[] }[] {
1357+ return hostedDefinitionNewsOwed(this.#newsHost, owed);
1358+ }
1360+ /** Tells each agent its owed items, as queueNews does: what an agent was already told adds nothing. */
1361+ deliverOwedNews(found: readonly { agent: string; items: readonly NewsItem[] }[]): number {
1362+ const entries: Entry[] = [];
1363+ for (const { agent: name, items } of found) {
1364+ const agent = this.#agents.get(name);
1365+ if (agent) this.#queueNews(agent, items, entries);
1366+ }
1367+ this.#flush(entries);
1368+ return entries.length;
1369+ }
13401371 /** A seat's earlier chat hears that another chat just used the seat (announce.ts seatNotice). */
13411372 seatNotice(...args: Tail<Parameters<typeof hostedSeatNotice>>): ReturnType<typeof hostedSeatNotice> {
13421373 return hostedSeatNotice(this.#announceHost, ...args);
Lines 2164–2175 at 295 (were 2133–2138 at 294)
21332164 definitionCollisions: (agent, newer, names) => this.#definitionCollisions(agent, newer, names),
21342165 queueNews: (agent, items, entries) => this.#queueNews(agent, items, entries),
21352166 logLine: (line) => this.#logLine?.(line),
2167+ owesDefinitionNews: () => this.owesDefinitionNews,
2168+ owe: (owed) => void this.#owed.push(owed),
2169+ spaceNamed: (name) => (name === SHARED ? this.#shared : this.#spaces.get(name)),
2170+ newerAt: (agent, version) => this.#newerFor(agent, version),
2171+ definitionCollisionsAt: (agent, newer, names, version) =>
2172+ this.#definitionCollisions(agent, newer, names, version),
21362173 };
21372174 return this.#news;
21382175 }
Lines 3032–3045 at 295 (were 2995–3007 at 294)
29953032 }
29963033
29973034 /** The space's atoms published after the agent's base, by others. */
2998− #newerFor(agent: AgentState): ReadonlySet<AtomId> {
3035+ /** `upTo`: the work published after the agent's base up to that version only (owed news, news.ts). */
3036+ #newerFor(agent: AgentState, upTo?: number): ReadonlySet<AtomId> {
29993037 const space = this.#spaceOf(agent);
30003038 const base = this.#at(space, agent.base);
3001− const current = this.#setOf(space);
3039+ const current = upTo === undefined ? this.#setOf(space) : this.#at(space, upTo);
30023040 const newer =
30033041 space.name === SHARED && space.membershipVersion
3004− ? new SharedAdditions(space, agent.base, base, current)
3042+ ? new SharedAdditions(space, agent.base, base, current, upTo ?? last(space))
30053043 : differenceSet(current, base);
30063044 return differenceSet(newer, new StableOverlaySet(agent.mine));
30073045 }
Lines 3179–3186 at 295 (were 3141–3146 at 294)
31413179 agent: AgentState,
31423180 newer: ReadonlySet<AtomId>,
31433181 names?: ReadonlySet<string>,
3182+ /** The space's version to compare against: its newest, or an owed publish's (news.ts). */
3183+ version?: number,
31443184 ): DefinitionCollision[] {
31453185 const draft = new Set(this.#draft(agent));
31463186 if (draft.size === 0 || newer.size === 0) return [];
Lines 3193–3199 at 295 (were 3153–3159 at 294)
31533193 draft,
31543194 this.#agentView(agent),
31553195 base,
3156− this.#viewAt(space, last(space)),
3196+ this.#viewAt(space, version ?? last(space)),
31573197 newer,
31583198 space.name,
31593199 undefined,
MCP
compare on this site's /mcp
CLI
abso diff 294 295 worker/project/project.ts --json
JSON
/christopher/abso-core/compare/294..295?file=worker%2Fproject%2Fproject.ts&format=json