interplane.Get Omega
Read in your language

interplane-forge

INTERPLANE Forge

Brought by drakestapleton

branch main Branches Tags History

interplane-forge / docs / AGENT-DOOR.md

164 lines · 13479 bytes Raw Blame History Source

The agent door: agents.json, the event stream, the feed

Owner: AgentDoor (2026-11-14). Code: server/agents.om and server/agents.tsv (the address list), door/ (the stream and the feed; names ev*, globals gev*, texts tev*), server/nodoor.om (the seam). Schemas: interplane/agents/1 and interplane/events/1 in docs/API.md. Gate: server/tests/agentdoor.sh (with server/tests/agentdoor.py). Status: HOST_TESTED, not deployed.

Read-only. Nothing here writes to Radicle, git or the social log, and nothing changes sign-in.

The three addresses

AddressWhat it is
<base>agents.jsonThe document an agent reads first: every machine-readable address the forge answers, as a path template, with how to ask for JSON (.json name, Accept header, or always), the schema it answers, whether it needs a browser session, and one line of purpose. Also the plain-text form (format=text), the error schema forge/error/1, the event stream, and a not_available list (writes over HTTP without a browser session, an MCP server, git over this HTTP server, webhooks, an HTML /agents page) so agents stop guessing.
<base>events.json?after=<seq>&limit=<n>The public activity of the forge as one append-only stream, oldest first. Also <base>events and <base>feed with Accept: application/json; <base>events without it redirects to the feed. after is exclusive; limit is 50 by default and 200 at most (a larger one is answered with 200 and limited: true); next is the address to read next. An ETag lets a poller send If-None-Match and get 304 while nothing changed.
<base>feedThe same stream for people: newest first, 50 a page, older pages with ?before=<seq>, one plain sentence each ("fixdev proposed a change to hop: <title>", "hop: 3 new commits on main", "someone starred omega-mv"), each naming who did it with a link to their page and linking the thing. ?format=text is its plain-text form; its <link rel="alternate" type="application/json"> is <base>events.json; "Feed" is in the forge row of every page.

/agents is not claimed: interplane.io serves the static /agents/ page of the site first (nginx try_files $uri $uri/ @forged), so only agents.json is the forge's.

The list cannot drift

server/agents.tsv is the one table (method, path template, how to ask for JSON, schema, auth, doc, purpose; rows whose first field is none are the not_available list). ./run.sh units (every build) compiles it into .build/agents.om as one text, refusing a byte that is not printable ASCII or tab, a quote or a backslash. server/tests/agentdoor.sh fetches every row under both bases with the template filled from its fixture and checks the schema the address answers, checks that every ## schema heading of docs/API.md is a row and that every row's schema is written in the file its doc column names; a row with a wrong schema makes it fail (negative control broken-row).

Kinds

Only from records that exist, each with the object it was read from as source:

KindRead fromsourcetime
patch_opened, issue_openedthe COB (collab coload)the COB idthe root change's author time
patch_reviseda revision after the firstthe change commitits author time
patch_mergeda merge actionthe change commitits author time
patch_archived, issue_closedthe lifecycle action in force (gclfc)the change commitits author time
review (verdict accept or reject)a review actionthe change commitits author time
commenta patch or issue comment (not the issue's opening text, not a redacted one)the change commitits author time
releasea tag, at the storage root or in the delegate's namespacethe tag object (or the commit of a light tag)the tag date
branch_moved (from, commits)the default branch moving from one head to anotherthe new headits committer date
stara star line of the social log, of a public repositorysocial.log:<seq>the line's ts
follow (target)a follow line of the social logsocial.log:<seq>the line's ts
open_brought, open_withdrawna held/stored or withdrawn row of <data>open/list.tsvopen/list.tsv:<rid>@<day>the row's day, 00:00 UTC (the list keeps the day only)

One event per kind and change: two comments in one change are one event. Several states between two reads of a COB are seen as the last one (an archive undone before the next read is not an event).

Never an event: favorites (private), unstar, watch, unwatch, unfollow, account, name, session and logout lines; anything about a repository that is not on the public allow-list (a private one, a name or RID refused by server/repos.om fdeny); the refused RIDs on the open shelf. An event whose repository leaves the allow-list later is no longer shown (its seq stays used).

Storage

<data>events/log, one line an event, tab-separated: seq, time, kind, actor, rid, source, path, json, x, subject, prev, where prev is the hex sha256 of the previous line (64 zeros for line 1), the same chain as social.log. It is read and checked once after a start; a line that does not check switches the stream off (503, EVENTS-LOG TAMPER on stderr) and nothing is appended to it. seq is the line number, so it is stable across restarts and never reused. <data>events/r/<rid> is the last ref list read of each repository (written to .tmp, then renamed). An event is appended once: its key (kind, rid, source, x) is checked against every line already in the log. Account names are not stored: the stream shows the name an account has when it is read.

The trigger: change-triggered, never a clock, never a full rescan per request

forged serves one request at a time, so collection runs inside the request that needs it: before events.json, events or feed is answered, evcollect compares cheap fingerprints with the ones of the last pass and reads only what moved:

Why this trigger: the sources are files that change only when someone acts; a stat of each is cheap and needs no other process. A timer would run when nobody reads; a rescan per request would load every COB of every repository each time; a hook in the node or the social writer would put this slice inside code it does not own (the social log is written by forged itself, but the Radicle storage is written by the node and git push). Nothing runs when nobody reads the stream; the first read after a change pays for that change only. A start reads every repository's ref list once (fingerprints live in memory) and appends nothing new.

Store-reading build

The store-reading build (FORGE_STORE, interplane-native DESIGN.md step 2) serves every public line of the store's catalog.tsv less the deny list (there is no separate served list since 2026-11-14) and composes door/ with store/evcol.om in place of door/ev3col.om (which reads Radicle refs and COBs); it needs social/ only. Its collector reads the store: per served project, its own catalog line (id, branch, head), and the change times and sizes of repo.git/refs/heads, repo.git/refs/tags, repo.git/packed-refs and chain.tsv; a moved project gets one git for-each-ref of its default branch and its tags, compared with its snapshot. The catalog file's own stat is not in any fingerprint: ipl rewrites catalog.tsv on every landing, and with it in every fingerprint each landing made the next request read every served project. A landing changes its project's line (head) and refs, so it costs that one project's read; a project added, removed or replaced, or rows moved by a reload, give the row another key or id, so it is read; a catalog rewritten with the same lines reads nothing. Kinds: branch_moved (old and new head, commit count; source chain.tsv:<N>, the LAND or IMPORT record of that branch whose payload says new <head>, and its time, or repo.git:<sha> and the commit time when no record names the move), release (a tag created or moved, source repo.git:<sha>), star and follow (social.log:<seq>). The patch, issue and open-shelf kinds never occur: their slices are seams in this build, and agents.json lists their addresses under not_available (generated from the build's units, run.sh agentsgen). The feed's first lines name only these kinds. Gate: store/tests/agentdoor-store.sh (two served projects: a landing reads one source; the same catalog rewritten reads none; an added project is read once).

The parts this build composes out while they move to the new Interplane store (the Salvage Yard, Community Machines, Open builds, trending) answer 503 with no Retry-After and the text "This part is moving to the new Interplane store and is not available yet." (forge/error/1 with "reason":"moving" to a JSON request; docs/API.md "Parts moving to the new Interplane store" lists the addresses). agents.json names them under not_available: their rows (open.json, open/{project}.json, open/alarms.json, trending.json) say "moving to the new Interplane store" and that the address answers 503, and two rows salvage/ and community/ name those parts, which have no machine-readable row of their own. The growth rows that are not moving addresses (explore?order=, insights) say they answer 404 or without their schema.

A build that composes neither (no social/, or the Radicle build without collab/) gets the seam server/nodoor.om: events.json, events and feed answer 501 (forge/error/1 for events.json), the forge row has no Feed entry, and agents.json moves those three addresses to not_available. Chosen over an empty stream because an empty stream would say "nothing happened" when the truth is "not built here".

Measured costs

MEASURED on the Spark, 2026-11-14 15:03Z, build of a37cb7bc (pinned omc 3ad9f10f...3194), cores 16-18 at nice 10 while the machine carried other lanes (load about 17), by server/tests/agentdoor.sh (log sha256 7466ed88ad31621021b830b7c2a42846bf0d07f4e80121ab86598ddc45327ffe, in ~/work/hive/agent-door/ev-a37cb7b/logs/agentdoor.log). Client: curl time_total, one request at a time. Pass times are forged's own stderr line (events: pass <us> us, sources read <n>, events added <n>). The ranges below are the smallest and largest sample; no other statistic was computed.

WhatDataMeasured
events.json?limit=200, nothing changed (fingerprints only, no pass)fixture, 19 events20 requests: 0.362 ms to 3.053 ms
events.json?limit=200, nothing changedlive-sized: the 50 public repositories of the real storage and allow-list (read-only), copies of the real social log and open list; 1,318 events20 requests: 2.654 ms to 5.316 ms
feed, nothing changedlive-sized5 requests: 1.943 ms to 17.737 ms
first pass (backfill: every source read, every changed COB loaded)fixture: 3 sources, 17 events67.5 ms
one repository changed (main moved by 2 commits)fixture23.2 ms, 1 source read, 1 event
one COB changed (an issue comment after a restart)fixture34.4 ms, 1 source read, 1 event
first pass after a restart, nothing new (fingerprints are in memory, so every ref list is read once and compared)fixture / live-sized15.2 ms / 517.5 ms (52 sources: the social log, the open list, 50 repositories; 0 events)
first pass ever (backfill)live-sized11.06 s (52 sources, 1,318 events); an earlier run the same day on the same data took 6.87 s
the log and the snapshotslive-sized1,318 lines, 550,559 bytes; events/r/ 125,794 bytes

The cost that matters is the backfill: forged is sequential, so the first stream request after the first deploy holds every other request for about 7 to 11 seconds on today's data, once. After that, a pass reads only what changed; a restart costs about half a second once. Live-sized backfill kinds: 598 patch_opened, 516 patch_merged, 47 patch_revised, 2 patch_archived, 8 issue_opened, 10 comment, 66 release, 1 star, 69 open_brought, 1 open_withdrawn; no COB failed to load.

Not done