interface DiscoveryCriteria

What a subscription is looking for, handed to discover (issue #55).

Exactly one shape drives a given call: an extension that can search its own site is given creator/tags; one pointed at a feed or index page is given listing_url. Both paths return the same thing — candidate works — which is why they share one capability rather than being two.

Properties

optional
creator: string

A creator/uploader to follow.

optional
tags: string[]

Tags that scope the subscription.

optional
listing_url: string

A feed or index page the user supplied, for sources whose extension cannot search unaided.

optional
max_pages: number

How many listing pages to read at most, supplied by the host.

An extension that pages MUST respect it rather than walking the whole result set: a tag search can run to tens of thousands of works. Reading only the first page is not enough either — an existing work edited to carry a tag enters the result set in the middle, ordered by its original publication date, so it never appears on page one.

Usage

import { type DiscoveryCriteria } from "crates/lanrurugi-plugin/dispatcher/plugin-sdk.ts";