One of four plugin-API seams surfaced by building 33 out-of-tree plugins on the #206 loader (full report + ranking). Ranked by independent demand, this is the broadest and cheapest.
The gap
A plugin cannot learn its own server origin (baseUrl, port) at activate time. Every plugin that mints an absolute URL or calls the host back over loopback must be told its origin via config, and a wrong value fails quietly (e.g. nip05/ serves an empty identity map).
Consumers (~16, uncoordinated)
The whole DAV family (webdav/carddav/caldav), the shims (mastodon/bluesky/matrix/activitypub), rss, sparql, nip05, webfinger, notifications, micropub, backup, metrics, dashboard, oembed, jmap, remotestorage — essentially every plugin that isn't purely realtime. All repeat baseUrl/loopbackUrl in config today. The test harness's probe-port-then-boot dance exists for the same reason.
Sketch
api.serverInfo → { baseUrl, port }, available by activate time, or an onListen-style hook if the origin isn't known until listen.
Cost
Trivial — the server knows its own bind address; this is exposing it on the api object. Best effort-to-value ratio of the four seams; suggested to land first as the reference PR.
One of four plugin-API seams surfaced by building 33 out-of-tree plugins on the #206 loader (full report + ranking). Ranked by independent demand, this is the broadest and cheapest.
The gap
A plugin cannot learn its own server origin (
baseUrl,port) atactivatetime. Every plugin that mints an absolute URL or calls the host back over loopback must be told its origin via config, and a wrong value fails quietly (e.g.nip05/serves an empty identity map).Consumers (~16, uncoordinated)
The whole DAV family (webdav/carddav/caldav), the shims (mastodon/bluesky/matrix/activitypub), rss, sparql, nip05, webfinger, notifications, micropub, backup, metrics, dashboard, oembed, jmap, remotestorage — essentially every plugin that isn't purely realtime. All repeat
baseUrl/loopbackUrlin config today. The test harness's probe-port-then-boot dance exists for the same reason.Sketch
api.serverInfo → { baseUrl, port }, available byactivatetime, or anonListen-style hook if the origin isn't known until listen.Cost
Trivial — the server knows its own bind address; this is exposing it on the
apiobject. Best effort-to-value ratio of the four seams; suggested to land first as the reference PR.