LWS requires Link: <storage>; rel="https://www.w3.org/ns/lws#storage" on every response from the storage, plus up, type and linkset relations on resources. Plugins get a scoped Fastify instance (api.fastify), so an onSend hook registered there only fires under the plugin's prefix — never on /alice/foo.
Discovery links are the canonical "a plugin wants to be visible from pod resources" need (ActivityPub rel="alternate" to an actor, Nostr rel="nostr", remoteStorage rel="remotestorage" would all use it), so this is worth a general seam rather than LWS-specific code.
Proposal
api.headers.link((request,{ url, isContainer, isRoot, pod })=>{// return an array of { href, rel, attrs? } or nothingreturn[{href: pod.storageUrl,rel: 'https://www.w3.org/ns/lws#storage'}];});
Called from the existing header builder in src/ldp/headers.js (getLinkHeader) for every LDP response, so output is merged into the one Link header rather than appended as a second one.
Also exposed under the plugin's own prefix for symmetry.
Activity