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 7 to 318

Compare

+21 −2 in 2 places
Lines 44–55 at 318 (were 44–55 at 7)
4444 const targets = [...new Set(to ?? [...host.agents.keys()].filter((a) => a !== sender.name))].toSorted();
4545 const id = host.announced() + 1;
4646 // "(as claimed)": every agent holds the same token, so the name is only
47− // the one the sender's route gave (Security, #31). A staging key says
47+ // the one the sender's route gave (#31). A staging key says
4848 // which key (abso issue 103); claimMark allows only that wording.
4949 const sentence = agentAnnouncement(sender.name, claimMark(how), text);
5050 for (const name of targets)
5151 host.queueNews(host.agents.get(name)!, [{ key: `announce ${id}`, text: sentence }], entries);
52− // Replay knows the number only from the news written, so it's taken only when some was (Git Lessons' review).
52+ // Replay knows the number only from the news written, so it's taken only when some was.
5353 if (entries.some((e) => e.type === "news")) host.setAnnounced(id);
5454 host.flush(entries);
5555 return { id, to: targets };
Lines 101–122 at 318 (were 101–103 at 7)
101101 return how as `key ${string}`;
102102 return "as claimed";
103103}
105+/**
106+ * A seat's earlier chat hears that another chat just used the seat (seats notice when someone else picks them up):
107+ * "<agent> was just used from another chat (<place>)". The Worker says where, from the caller it checked; the wording
108+ * is this one only. `key` keeps it to once per pair of chats per window: the same key again adds nothing.
109+ */
110+export function seatNotice(host: AnnounceHost, agentName: string, place: string, key: string): boolean {
111+ const agent = host.agents.get(agentName);
112+ if (agent === undefined) return false;
113+ const where = place
114+ .replace(/[\u0000-\u001f\u007f]+/g, " ")
115+ .trim()
116+ .slice(0, 120);
117+ if (where === "" || !/^seat [\w:.-]{1,200}$/.test(key) || agent.told.has(key)) return false;
118+ const entries: Entry[] = [];
119+ host.queueNews(agent, [{ key, text: `${agent.name} was just used from another chat (${where})` }], entries);
120+ host.flush(entries);
121+ return entries.length > 0;
122+}
MCP
compare on this site's /mcp
CLI
abso diff 7 318 worker/project/announce.ts --json
JSON
/christopher/abso-core/compare/7..318?file=worker%2Fproject%2Fannounce.ts&format=json