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

Compare

+19 −0 in 1 place
Lines 101–122 at 318 (were 101–103 at 45)
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 45 318 worker/project/announce.ts --json
JSON
/christopher/abso-core/compare/45..318?file=worker%2Fproject%2Fannounce.ts&format=json