Lines 105–115 at 295 (were 105–113 at 294)
106106 newsAboutOwnDraft as hostedNewsAboutOwnDraft, 107107 newsForOthers as hostedNewsForOthers, 108+ definitionNewsOwed as hostedDefinitionNewsOwed, 112+ type OwedDefinitionNews, 113115} from "./news.ts"; Lines 332–343 at 295 (were 330–335 at 294)
330332 * doesn't depend on it. 332334 checkerReady = false; 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. 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); 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; 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); 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); 1367+ this.#flush(entries); 1368+ return entries.length; 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), 21372174 return this.#news; Lines 3032–3045 at 295 (were 2995–3007 at 294)
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); 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)); 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). */ 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)
31543194 this.#agentView(agent), 3156− this.#viewAt(space, last(space)),
3196+ this.#viewAt(space, version ?? last(space)),